[Bf-taskforce25] Buttons UI context
Brecht Van Lommel
brecht at blender.org
Thu Jan 1 10:22:42 CET 2009
Hi,
Emmanuel Stone wrote:
> I'm trying to change a variable X that was set directly using the
> uiDefBut pointer mechanism to a callback that does:
> changeX(newX-oldX)
>
> Will the new UI context stuff allow to get the old value of a number
> button after it has been changed?
Nothing in 2.5 specifically addresses this problem, though it would be
easy to add some kind of callback to set the value rather than having
the button set it directly for example. It's really a bit of a
limitation in the interface code, where you have to hack a bit to work
with a value for which there is no direct pointer. That is quite rare
though, and in general the purpose is of course that you just pass the
pointer whenever possible, because it gives more compact code.
Brecht.
More information about the Bf-taskforce25
mailing list