- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a maya python tool that is supposed to load turtle, set it as the renderer, and then bake vertex AO on the selected object. The whole thing works except that when the user first opens Maya, it won't actually initialize the first time. It doesn't create the "TurtleDefaultBakeLayer" node for the script to modify attributes on. The user has to manually open the render settings window and then click on the "TURTLE" tab next to the "Common" tab for it to bake anything. After that it works exactly how it should with or without that Render Settings window open.
My question is, how do I get a freshly opened Maya to get Turtle to initialize and instantiate those components without the user needing to open the Render Settings window?
def initializeTurtle(self):
#Load Turtle
cmds.loadPlugin('Turtle')
#Set renderer
cmds.setAttr("defaultRenderGlobals.currentRenderer", "turtle", type="string")Solved! Go to Solution.