Feature request: layer color = parent layer color

Hi,

I think it would be very useful to set a layer color from its parent layer.

In the example below would click on the color of the layer “child 1” and pick “parent layer”, and its objects would turn the color of the parent layer (in this case red):

image

The color square in the table could then contain an upward-facing arrow to signify where the color comes from.

If you select the two child layers and the parent, then click on the parent’s color, press OK, the child layers will have the parent’s color. Does that help?

Thank you for the tip I didn’t know. It helps, although I still think a “from parent layer” color would be better in cases where you have many children and not all of them should have the parent color.

See if this script does what you want:
change_child_layercolor.py (945 Bytes)

To run the script:

! -_RunPythonScript (
"full\path\to\pythonscript.py"
)

Are you aware of the possibility to select multiple layers by holding ctrl?

@martinsiegrist yes I am aware

@Gijs thank you for the script, it also helps. My suggestion of feature is really about improving ergonomics of Rhino. I think there are already a lot of things in Rhino UI that are well thought through and really help the daily user. But in my opinion the fact it’s already good doesn’t mean it couldn’t be improved here and there.

What I’m proposing I think would be helpful for all advanced Rhino user, not only for people thinking about this improvement, taking the time to search the forum, and ending up on this thread. At the same time the change would not clutter unnecessarily the current UI.

It could be a simple line “from parent” in the context menu when you right click on the color picker of the layer (right under “random color”):

The color picker would then take the parent color + an arrow (either black or white depending on contrast) to tell that it’s coming from “above”:

Then if the color of the layer “parent” is updated, the color of the layer “child 2” would be updated as well.


I know it’s not necessary, it’s just a suggestion to improve what is already good. In my opinion it would not be new clutter in the way of new users, and it would be another thing to speed up the work of advanced users.

2 Likes