- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi there,
I'm having some problems trying to set a Maya Preferences at Maya startup through the userSetup.py file.
Basically what I would like to achieve is to set the Maya default player/application for the ImageSequence, PlaylastAvi and PlayblastQuicktime type of generated file; we are using in our studio RV and setting it as a default player will speed-up a lot our workflow.
So What I'm trying to do is to set the optionVar at Maya start-up with simple commands like:
rv_path = '/path/to/rv/bin'
cmds.optionVar(category='Applications', stringValue=('viewSequenceDir', rv_path))
cmds.optionVar(category='Applications', stringValue=('playblastCmdAvi', rv_path))
cmds.optionVar(category='Applications', stringValue=('playblastCmdQuicktime', rv_path))
put this commands in a function, which is going to set also other optionVars, and feed this into a,
maya.utisl.executeDeferred(<my_function>)
So now seems like that those pref variables are not being set at all, neither also if I'm going to do that directly in Maya script editor, but the very funny part is... if I open up the Maya Preferences window and then press the save button without change anything (after a Maya start-up process which is using our userSetup file), Maya will save the userPrefs.mel file in the user dir with the optionVar set by my script, but those will not appear in the Applications menu of the Maya Preferences window, and of course if I'm going to make a playblast, Maya won't use the application.
I've also tried to set those optionVar through the
mel.eval(f'optionVar -cat "Applications" -sv "ViewSequenceDir" "{rv_path}";')
mel.eval(f'optionVar -cat "Applications" -sv "playblastCmdAvi" "{rv_path}";')
mel.eval(f'optionVar -cat "Applications" -sv "playblastCmdQuicktime" "{rv_path}";')
but seems like this will just populate the first one (ViewSequenceDir) but not the rest of them.
Do you guys have some thoughts about it?
If I explained myself badly, please feel free to tell me what is incomprehensible and I'll try reformulate it again.
Thanks in advance,
FF
Solved! Go to Solution.