3/9/2023 0 Comments Maya python setattr translateOv2 = c2.createRelativeOverride('m圜ube', 'translate') # Set up a relative override on m圜ube.translate with a multiply value of Ov1 = c1.createAbsoluteOverride('mySphereShape', 'template') # Set up an absolute override on mySphereShape.template with a value of True # and collection 2 to select all cubes using the pattern m圜ube*. # Set up collection 1 to select all spheres using the pattern mySphere*, # Create a trivial scene with a cube, a sphere and a cylinder Rl = rs.createRenderLayer("MyRenderSetupLayer")Ĭ1 = rl.createCollection("sphereCollection")Ĭ2 = rl.createCollection("cubeCollection") The example ends by switching to the render layer, where you will see the sphere appear in template display mode and the cube translated. It adds the sphere to the first collection using the expression mySphere*, and then adds the cube to the second collection with the expression m圜ube*.Īn absolute override is created and applied to the first collection, then a relative override created and applied to the second. The following is an example script that creates a layer and two collections. You should also import maya.cmds so that you can use the native Maya commands. To use the Render Setup API, you should first import the Render Setup module as follows: import .override as override Note: The Render Setup Python API is currently not officially supported and is subject to change over time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |