Dynamic Environment Variables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Before I create an idea on the Feedback forums (which is overflowing to say the least) I wanted to ask a few questions to clarify my issues.
Does Maya have any environment variables that can be changed and used while the application is open? I'm in the process of writing a tool that allows for project based environment variables, but I was hoping there would be a way to hook directly into the current Maya system without having to write to Maya.env.
I know this is a broad question, but I'll give an example to clarify:
Maya uses relative paths in a few areas, one of which being File (read) nodes. So instead of hardcoding the path to the texture, you can just use 'sourceimages/texture.ext' and it'll know what's up. However, there are some things in Maya that aren't capable of utilizing this feature, one of which is file referencing. For those of us on team based projects NOT working off of central servers, this is a sizeable issue. In order to have references work cross-platform and cross-machine, I had to use a hacky solution in the Maya.env file of each machine where I would set a variable like 'FILM=path/to/project/root'. Then in the reference editor I would remove the entire path up to the root directory and replace it with this variable, ie '$FILM/scenes/path/to/scene'.
This worked pretty well, but I was hoping that someday we could see dynamic variables, like $CURRENT_PROJ or self-definable variables without needing to edit the environment file and restarting Maya. This way if I were to change projects and open up a scene file or move a project around to another system, as long as the project was set I wouldn't have to worry about delinked paths. Similar to the $JOB and $HIP of Houdini.
As a side note, will there ever be the ability to set a render location that's not /images (or user-defined name) out of the project structure without using overrides from the command line?