Select layer parent by name
Hi guys,
Having real problems selecting only the layer parent itself (no nodes, just parent).
Looked through the docs and googled it but no real answer! I am basically looking to select a layer i.e "my new layer" then create a nested layer within there named "my nested layer" and add my current selection as an array to the nested layer.
I started to work with myLayer = LayerManager. gerLayerFromName "my new layer"
myLayer.current = true but this just makes the layer active and does not select the layer parent.
Apologies if the formatting of this looks terrible, having Internet issues so having to type all this on my phone :-
Any help would be very appreciated.
Comments
.
How to select a layer:
How to create a layer, add selected objects to it and make this layer a child of existing layer:
In your case there is no need to select any layer to acheive what you want.
Tools and Scripts for Autodesk 3dsMax
Thanks Miauu, Unfortunately I
Thanks Miauu,
Unfortunately I couldn't get the function to work. Not sure why really?
Your second code block adding the selected to a nested layer workEd fantastic!
Really appreciated, thanks for your help!