Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

[Maya : Render Setup] How to add a list of nodes to be included in a previously created collection of a render layer.

[Maya : Render Setup] How to add a list of nodes to be included in a previously created collection of a render layer.

deven.saxenaP7BD5
Enthusiast Enthusiast
415 Views
1 Reply
Message 1 of 2

[Maya : Render Setup] How to add a list of nodes to be included in a previously created collection of a render layer.

deven.saxenaP7BD5
Enthusiast
Enthusiast

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. 

0 Likes
416 Views
1 Reply
Reply (1)
Message 2 of 2

mcw0
Advisor
Advisor

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?

0 Likes