Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4125

Python - move layer set under new parent layer

$
0
0

Mitch Heynick wrote:

OK, lets say I have a set of hierarchical layers/sublayers (leave them empty for now), and I want to create a new parent layer and move the entire existing layer hierarchy under it:

I'm having trouble doing this - I thought it would be sufficient to get the full path name to each layer and then add the parent layer name to that at the front: parentName+"::"+layerpathName, then add a layer to the document with that full path. But it doesn't work... Anyone have a logic for doing this?

Thanks, --Mitch

LayerHierarchy1.3dm (35.7 KB)

LayerHierarchy2.3dm (36.0 KB)

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4125