Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Saving Variables in the scene

kimbo246_
Explorer

Saving Variables in the scene

kimbo246_
Explorer
Explorer

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. 

0 Likes
Reply
249 Views
0 Replies
Replies (0)