[Bf-committers] Temporary "global" storage
CoDEmanX
codemanx at gmx.de
Thu Jun 21 13:01:11 CEST 2012
How about using RNA with SKIP_SAVE flag?
bpy.types.World.temp_var = StringProperty(description="Label of the
control", options={'SKIP_SAVE'})
Or in C:
prop = RNA_def_int(ot->srna, "prop_name", 1, 1, INT_MAX, "Prop Name",
"", 1, 10);
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
Am 21.06.2012 09:52, schrieb Jorge Rodriguez:
> I need a place where I can put a UI-related temporary variable for storing
> things such as what was the last button pressed and when did the last
> tooltip close. It must be in some scope that's visible to and accessible by
> all controls. I can't put it in RNA because those things are stored to the
> hard drive, and these things are runtime-related and shouldn't be stored. I
> don't want to make a global variable because that's obviously sloppy. There
> doesn't seem to be any UI-related area to place stuff that should be
> visible to all controls but not stored on the hard drive. If I can solve
> this problem then I should be able to immediately remove two things from my
> list.
>
More information about the Bf-committers
mailing list