Setting Render Paths in Maya via. Python

Hey Everyone,

Great forum, had a question I hope someone can help me with. I’m trying to set the current projects image render path via. script(python) I have a hack in which I open the Project window, set the path in the textFieldGrp ‘np_RenderLocationimages’, here is a code snipet:

           maya.mel.eval('EditProject')
           maya.mel.eval('projectSetup 2')
           originPath = cmds.textFieldGrp('np_RenderLocationimages', query = True, tx =  True)
           cmds.textFieldGrp('np_RenderLocationimages', edit = True, tx =  textStat + '/images')
           maya.mel.eval('np_editProjectCallback;deleteUI newProjectWindow')

Can’t for the life of me find where the renderpath is hidden, would that be a global variable?

Cheers,
Shawn

Hey

No its not a global variable. All project paths are stored within the relative workspace.mel file for the project.

So look into the python version of the mel command ‘workspace’. You should be able to use that to change the path.

Andy

Thanks,

workspace is exactly what I need to do.

Cheers,
Shawn