Hello,
I am trying to add some VRay objectPropertie nodes to all the layers(collection) that are present in the scene.
I can get the list of layers and can loop through them in order to update their collections. I am not able to get the command to select the collection by name and add the above mentioned nodes in there. Key here is that the layer and its collections are pre-existing.
The collection is name "Object_properties". I would love to get some guidance on the command for adding these object_properties(nodes) into a pre-existing render layer collection.
Also, if there are more than one layers with a collection called "Object_Properties", maya will add a number in the end to make them unique, so do we need to so a split()? or how can we tackle this problem efficiently? One way I can do this is to add a serial at the end(Object_properties_01, Object_properties_02.....etc) and can do a split with "_".
see image for more info.
Thanks in advance.
Hello,
I am trying to add some VRay objectPropertie nodes to all the layers(collection) that are present in the scene.
I can get the list of layers and can loop through them in order to update their collections. I am not able to get the command to select the collection by name and add the above mentioned nodes in there. Key here is that the layer and its collections are pre-existing.
The collection is name "Object_properties". I would love to get some guidance on the command for adding these object_properties(nodes) into a pre-existing render layer collection.
Also, if there are more than one layers with a collection called "Object_Properties", maya will add a number in the end to make them unique, so do we need to so a split()? or how can we tackle this problem efficiently? One way I can do this is to add a serial at the end(Object_properties_01, Object_properties_02.....etc) and can do a split with "_".
see image for more info.
Thanks in advance.
I haven't had to look into collections in renderlayers. But have you tried turning on echo commands in the script editor window and adding some node manually to a collection and seeing what comes back?
I haven't had to look into collections in renderlayers. But have you tried turning on echo commands in the script editor window and adding some node manually to a collection and seeing what comes back?
Can't find what you're looking for? Ask the community or share your knowledge.