Hey Justin,
thanks for the good tricks and advises. Unfortunately your piece of code 
seems only to work for the Legacy Render Layers. If I run that command 
within maya 2017, the renderlayer is copied, but it is not showing up in 
the new Render Layer Editor. 

Here is my way how I create a new Renderlayer + Collection + Override.

from maya.app import renderSetup
rs = renderSetup.model.renderSetup.instance()
ov = renderSetup.model.override
# Create layer, collection, override
layer_obj = rs.createRenderLayer('MyFirstLayer')
collec_obj = layer_obj.createCollection('MyFirstCollection')
over_obj = collec_obj.createOverride('MyFirstOverride', 
ov.AbsOverride.kTypeId) #absolute

Can I find somewere if the "renderSetup.model.renderSetup.instance()" has a 
duplicate fuction?

You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to