Message 1 of 7
Project Directory with Python?

Not applicable
03-08-2011
01:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm currently working on a Python based simulation project for my university degree. Part of this project involves saving a proprietary file in the user's current project directory. Now I've searched high and low to find the answer, but as of yet cannot: is there any way to query the Maya API and return the currently selected project directory?
os.getcwd() only ever returns the Maya binary folder (since that's where the OS is running Maya from) and whilst a setProject command exists, there's no getProject alternative.
It seems a bit odd that there's no exisiting commands to bring up the project directory, as I'd imagine thats a fairly obvious step for a lot of custom tools...
Any ideas?
Thanks!
I'm currently working on a Python based simulation project for my university degree. Part of this project involves saving a proprietary file in the user's current project directory. Now I've searched high and low to find the answer, but as of yet cannot: is there any way to query the Maya API and return the currently selected project directory?
os.getcwd() only ever returns the Maya binary folder (since that's where the OS is running Maya from) and whilst a setProject command exists, there's no getProject alternative.
It seems a bit odd that there's no exisiting commands to bring up the project directory, as I'd imagine thats a fairly obvious step for a lot of custom tools...
Any ideas?
Thanks!