Creating a Maya project through scripting

944 views
Skip to first unread message

Vitali Crystal

unread,
Jan 19, 2014, 8:31:11 PM1/19/14
to python_in...@googlegroups.com
Hello, friends : )

I hope someone will be able to help me with the following issue:

I noticed, that if I save a scene outside of a project folder, and then change a path to render images, when I open the same scene on another computer, that path is reset to default one.

I investigated and found that a project folder contains a workorder.mel script with that path and other useful things stored within it. I have not had a chance to prove it, but I assumed that file controls where Maya will find paths to render in. Is is the case?

However, in my case my project folders will be created through a script in a custom network location, while render images will be rendered in a completely different one, so I can not rely on a default location. So, I have to modify the path. Given that mel script, does it mean, that when I create folders for a project through the script, I would need to copy/create that mel file and modify its path to whatever location I need, so that no matter who opens the scene, it will always point to a correct location? That is, once I create a project, I won't move scene anywhere outside of it, but I want to make sure that paths stay the same not just on a computer/user who originally saved the file.

I hope I explained my situation well, but please ask me more if needed!

Vitali

Justin Israel

unread,
Jan 20, 2014, 2:52:07 AM1/20/14
to python_in...@googlegroups.com
Maya is rendering output images relative to your Projects images directory. You wouldn't create a scene file, set the project, and then expect that to carry the absolute path along with the scene file when you open it. It is more of an environment management situation: "I need to work on scene/shot xyz, so I set my project to that workspace".  A minimal pipeline workflow would be to manually set your project to a given location, then open the relative scene files. It gets more involved when you are setting up a more developed pipeline, where your render pipeline might actually pass either the -proj or -rd flag to the Maya render to explicitly control the output location for the proper environment. 
There are a number of ways you can set up your pipeline. Maybe you auto-generate your workspace.mel as part of your new shot setup workflow. Maybe you manipulate it on the fly in Maya as part of an in-app environment management tool. But all in all, the concerns of scene file and the environment management are separated. 

aevar.gu...@gmail.com

unread,
Jan 20, 2014, 2:57:43 AM1/20/14
to python_in...@googlegroups.com

$MAYA_PROJECT
  Set this variable within your environment before you open Maya will set your environment to the project you need.  As Justin points out you can as well use the -rd flag to override the variable at render time.
Reply all
Reply to author
Forward
0 new messages