[Bf-python] Slider Button API

Dave Jarvis thangalin at gmail.com
Thu Apr 12 21:22:05 CEST 2007


Hi, Joe.

Thanks for the reply. Unfortunately, I was not quite clear on what I
was looking to accomplish, as it has nothing to do with the way
Blender draws its UI.

It has to do with the way I was calling Draw.Slider. I needed to pass
variable references for the min/max values, rather than static values.
In this fashion, I can change the value of the variables and the
Slider (on the next call to Draw.Redraw) will have its limits changed
accordingly.

Thus:

powerMin = Draw.Slider( 'Power Min: ', EVENT_SLIDER_POWER_MIN, X_MARGIN, lines
[1], SLIDER_WIDTH, SLIDER_HEIGHT, powerMin.val, powerSliderMin.val, powerSliderM
ax.val, 1, 'Minimum power amplitude data point.' )

Changing powerSliderMin.val and powerSliderMax.val gives me the
behaviour I sought.

Thanks again!



More information about the Bf-python mailing list