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

Python rs.LayerIds() wish

$
0
0

@clement wrote:

@Alain,

i´ve just found out that rs.LayerIds() returns ids of layers which have been deleted.

def LayerIds():
    "Return identifiers of all layers in the document"
    return [layer.Id for layer in scriptcontext.doc.Layers]

could you please add a setting to limit the returned list to layers which are still in the document ? eg:

return [layer.Id for layer in scriptcontext.doc.Layers if not layer.IsDeleted]

thanks,
clement

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5825

Trending Articles