Storing session persistent data for operators

Note the distinction between RNA properties and customdata. The properties should only store public parameters as seen by the user, these are saved as part of macro’s and written to file. The customdata is an arbitrary pointer, typically to a C struct, that should only exist while the operator is running, an so it is not written to file.

This is a part of the documentation on the wiki regarding Blender Architecture->Operators. Whats the best way to store data halfway between RNA properties and customdata? I mean the data that needs to be persistent for the Blender session and is used by the operators but not need be saved with the file or preferences.

maybe RNA props with the skip_save flag set? (might have an other name in C than in py)

Yes, was looking for that in Arch notes/docs couldn’t find any mention other than its possible. I dug through source and found it myself, you just call RNA_def_property_flag(prop, PROP_SKIP_SAVE); in your op for the property. What I was initially worried about is that operators are initialized on call and that property might not be persistent between calls. So I extended the RegionView3D with the lastofs (last offset) for now.

This all is to get the functionality I mention in this thread:

In Py, you can use bpy properties with explicit getter/setter methods. Then the value won’t persist as ID property.

EDIT: oh, it’s C level… I think you have to use sdna then, but I could easily be wrong

I did the first pass at customization successfully :). Here is a bit hectic screencast (I always forget the framerate problems).

that looks like a useful addition. Once you get it working as desired, make sure to submit patch to the tracker and poke a dev!