Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

1 REPLY 1
Reply
Message 1 of 2
deven.saxenaP7BD5
292 Views, 1 Reply

[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

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

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. 

Labels (1)
1 REPLY 1
Message 2 of 2
mcw0
in reply to: deven.saxenaP7BD5

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

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.

Post to forums  

Autodesk Design & Make Report