Plugin serialization

Plugin serialization

Anonymous
Not applicable
858 Views
2 Replies
Message 1 of 3

Plugin serialization

Anonymous
Not applicable

I have a fairly simple C++ API plugin that is designed to respond to some internal system events and perform some external functions.  It does not create a DAG node, or interact with the overall scene, but does access some properties of objects in it.  There are several preset values that it needs to persist over loads of the scene file, and I'm trying to figure out where to put the values.  I could just create an external file just for the plugin, I suppose, but that seems inelegant and incorrect.

 

Is there an official way to store and retrieve data values in the scene file?  Do I have to create a dummy node, perhaps, and attach some attributes to it?  I've searched in the forums but could not find anything that seemed to apply.

 

SteveB

0 Likes
Accepted solutions (1)
859 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Accepted solution

Answering my own question.

 

To create persistent data information, create a script node that is executed on file-open, that runs a script to assign a unique global variable to whatever value you desire.  When your internal data is modified, edit the named script node (or create it if it does not exist) to update the persistent assignment.

 

(Not sure if this is the best solution, if it's not, corrections solicited.)

0 Likes
Message 3 of 3

Anonymous
Not applicable

autocad lisense

0 Likes