Get list of layers?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 19/12/2011 at 01:43, xxxxxxxx wrote:

    Hi everyone,

    Can you please tell me if there is a way to get the list of Cinema's layers in scene? 
    I have a scene with billions of layers and I want to rename them but I can't figure out how to do that.

    Thanks!
    Sergey.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 19/12/2011 at 01:53, xxxxxxxx wrote:

    That was easy, sorry for troubling!

       doc = c4d.documents.GetActiveDocument()
        root = doc.GetLayerObjectRoot()#Gets the layer manager
        LayersList = root.GetChildren()
        for layers in LayersList:   
            print layers.GetName()
    


  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 19/12/2011 at 01:55, xxxxxxxx wrote:

    Another thing. Is there a way to return the list of selected layers?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 19/12/2011 at 02:18, xxxxxxxx wrote:

    To test if a layer is selected you can call layer.GetBit(c4d.BIT_ACTIVE).



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 19/12/2011 at 09:42, xxxxxxxx wrote:

    Thanks, Yannick!


Log in to reply