[Bf-committers] Temporary "global" storage

Brecht Van Lommel brechtvanlommel at pandora.be
Thu Jun 21 14:50:58 CEST 2012


The last button pressed may get removed on UI changes, so then you
need to keep those in sync and things can get tricky, would suggest
not to store that globally. But there is already a flag
UI_BUT_LAST_ACTIVE, maybe that can be used?

About the tooltip close time, I think it's one of those cases where
it's quite harmless to have a static variable in a function somewhere.


On Thu, Jun 21, 2012 at 9:52 AM, Jorge Rodriguez
<jorge at lunarworkshop.com> wrote:
> 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.
> --
> Jorge "Vino" Rodriguez
> jorge at lunarworkshop.com
> [ Tweet <http://twitter.com/vinobs> | Like <http://www.facebook.com/bsvino>|
> Plus <http://www.google.com/profiles/bs.vino> ]
> 919.757.3066
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers

More information about the Bf-committers mailing list