Saving Variables in the scene
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.