Community
Maya Forum
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Saving Variables in the scene

0 REPLIES 0
Reply
Message 1 of 1
kimbo246_
136 Views, 0 Replies

Saving Variables in the scene

I am working on a animation script, but for the script to work I need to save variables across different sessions. So when the file is closed and reopened it loads all the variables it had last time it was open. 

 

First I was thinking about using a shelf button, but this is universal across all scenes. I want it to be scene specific. Therefore, I came up with saving the variables in a scriptnode (or so I thought). However, when working with this script it doesn't seem to respond when I am closing the file. Although, the documentation says when closing the file the after script should run. It doesn't for me.

I tested this out with a simple create cube script and then saving the scene. The 'open' cube does get created, so this works. 

Another thing I was wondering, maybe the after script actually works, but it can't create a cube after closing? 

 

Also, when I want to query certain translate and rotate values, but it doesn't work in general. Not even when I copy my code exactly from the MEL tab. Could somebody please tell me what I am doing wrong. 

Labels (5)
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators