How to create a Render Setup Layer with maya cmds ? (Maya 2016 Ext 2+) (python)
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.
How to create a Render Setup Layer with maya cmds ? (Maya 2016 Ext 2+) (python)
I can't seem to find how to create a Render Setup Layer with maya cmds. ('renderSetupLayer')
When I create a Render Setup Layer with the new Render Setup window the Script Editor doesn't echo the commands (only some results). Also I can't seem to find documentation about maya cmds related to this new feature.
With the Legacy Render Layer I would only have to do it like this :
maya.cmds.createRenderLayer(n="myLayerName")
But now there is a Render Layer and a Render Setup Layer. Creating only the Render Layer will produce errors when changing layers in the Render Settings window and won't add a new Render Setup Layer.
# Add a list to a collection
collec_obj.getSelector().staticSelection.set(['pCube1', '|pCube2'])
# Add an attribute to an override
setover_obj.finalize('defaultRenderQuality.shadingSamples')
Hey Guys, we have a problem here that fits good to this topic. Has someone of you a code snippet for duplicating an existing renderlayer in maya 2017? There is no option exposed in the ui and I can't find any documentation on that topic.
I didn't find a copy/paste, but a work-around could be to select your layer's collections and 'export Selected', create a new layer and 'Import user templates'.
Hey Olivier, thanks for your replay. I already know that trick, but our artists find it quite unpractical. A hotkey that fires a command would be much more practical.
Stumbled onto this thread and after some digging around in the code, I thought I'd share this.
The method myCollection.getSelector().staticSelection.set(["objA", "objB"]) replaces the items in the collection instead of appending the list. To add objects to the collection, use the .add() method. Just make sure your strings are in absolute "long name" format.
so...
myCollection.getSelector().staticSelection.add(maya.cmds.ls(objsList, long =True))