Maya Standalone

Maya Standalone

Anonymous
Not applicable
749 Views
4 Replies
Message 1 of 5

Maya Standalone

Anonymous
Not applicable

I'd like to setup some OptionVars and loadPlugin silently using mayapy. However it won't get saved into preferences for future session (not preserved). I tried cmds.savePrefs but error prompted and complas the module is not found in standalone environment? I did include a lot of typical lib path in sys.path. Any hint? Thank you very much

0 Likes
750 Views
4 Replies
Replies (4)
Message 2 of 5

cheng_xi_li
Autodesk Support
Autodesk Support

Hi,

 

I think because it is UI less environment so savePrefs is not there. 

 

For optionVars, perhaps saveToolSettings could help?

 

 

Yours,

Li

 

0 Likes
Message 3 of 5

Anonymous
Not applicable

Unfortunately saveToolsSettings doesn't help in preserving the new optionVar. I wish to know the missing environment or startup script that relates to saving preferences to disk, (eg: userPrefs.mel) when we are in standalone mode. When I called cmds.internalVar(userPrefDir=True), it does recognize my user pref directory.

0 Likes
Message 4 of 5

cheng_xi_li
Autodesk Support
Autodesk Support

Hi,

 

Can you give me a sample code so I could check if it is possible? I think most of these functions are designed for GUI mode. For environment settings should be written in Maya.env.

 

Yours,

Li

0 Likes
Message 5 of 5

Anonymous
Not applicable

I've emailed the sample code. Please let me know if  you found anything. Many thanks!

0 Likes