|
hey there,
I might be missing a crucial part of my maya learning, but is there a way to auto load a project?
Say you have a project for each shot in a pipeline, and when opening an animation file Maya automatic sets the project.
|
|
|
|
i might still be missing something about setting projects in maya, but it doesn’t seem to automaticly set a project when you have a workspace file in the same directory as your maya file.
so i came up with this little code for doing just that.
import maya.cmds as mc
path=(mc.file(q=True,sn=True)) fileName=(mc.file(q=True,sn=True,shn=True))
if fileName!='':
temp=path.partition(fileName)
mc.workspace(temp[0],openWorkspace=True)
print 'File Inherit Project Set' else:
mc.workspace(( (mc.optionVar( q='ProjectsDir' ))), openWorkspace=True )
print 'Default Project Set'
|
|
|