Wish - select object layer - command

Hello,
possibly a stupid question, I am working on a file with many layers and sublayers, so am using the layer tools to select the layer of a selected object quite often. Is there also a command for that, so I can spare a few clicks?

thanks for any feedback

Andreas

Hi Andreas - this should help.

HighlightLayers.py (683 Bytes)

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"

RH-61270 Layers: Highlight layers of selected objects

-Pascal

6 Likes

that would be awesome !! Thanks Pascal!

SetLayerToObject command makes the layer of a selected object the current layer. I made two-letter keyboard shortcuts for layer manipulation:
LA '_-Layer _On * _Enter
LC '_ChangeToCurrentLayer
LF '_OneLayerOff
LM '_MatchLayer
LO '_OneLayerOn
LS '_SetLayerToObject

You can make and change the keyboard shortcuts by running Options command and clicking Keyboard button in Options dialog box. By the way, name of current layer and its color are displayed in the Status bar (at the bottom of the Rhino window).

1 Like

This crashes rhino (OSX) for me - v6.30.20288.16412

Hm - I’ll check… thanks for the report.
RH-61309 RunPythonScript - crash on mac

-Pascal

That works really nice. Thank you, @pascal ! :slight_smile:

THIS- HighLightLayers- is super useful , @pascal :pray:

Hi All - this will be a native feature in the V8/WIP.

-Pascal

5 Likes

Pascal, you say this will be available in the WIP. Does that mean it isn’t now ? If it is, I am unable to find it. Thank you ,Mark

Hi Mark -
that probably went into a release after the public release, so you’ll have to wait for this until next week.
The feature has been in Rhino 8 a while longer but under the TestHighlightObjectLayers test command name. In the current (internal) releases, this is HighlightObjectLayers.
-wim

1 Like

having no wip, how does it work once activated does it stay on? or do i have to activate it each time again?

It’s not a mode. You have to run the command to have a result.
-wim

it might make sense to have it automatically enabled, meaning whenever you select objects that the linked layers show up. at least, if that causes performance impact, to have it enabled till you deactivated it again if that helps.

2 Likes

I actually would prefer to have it manually activated if needed, because most of the time I click on a layer to highlight a layer I want to often turn on and off. I usually select plenty of 3d objects assigned to other layers and an eventual automatic layer highlight would ruin my workflow, since basically I will lose track on the manually highlighted layer.
One solution to serve everyone’s taste is to make an option so that the users could choose whether the highlight should be automatic or evoked by a command manually.

1 Like

Hi Bobi, would it make sense to have the area that is to be highlighted be split in a left and right? Left being Objects highlighted and right is later highlighted. —-Mark

Do you mean splitting the field on the right side of each layer in the Properties menu?

Just thought if you split the existing highlighted area into 2 sections, then you would have room for both.-Mark

It may be a bit confusing to most users.

Wonderful script Pascal. I use it hundreds of times a day…

Is there a way to make this work for Worksession layers as well? It doesn’t seem to work for that…

-Jeremy