[Bf-python] DRAW Module in Blender Python
joeedh
joeeagar at prodigy.net
Tue Dec 7 04:48:19 CET 2004
Willian Padovani Germano wrote:
> Daphna Steinbach wrote:
>
>> Hi all,
>> I have a problem concerning the module DRAW in Blender Python. I want
>> to create a gui with several sliders. e.g let's say I have two
>> sliders and there values range from 0 -255. Now I want to set slider
>> one to value 20 and slider two to value 200. After I have set these
>> values I want to fire the event ! For now I think every slider is
>> sending an event each time you change the sliders value but I have
>> depend sliders and need to fire the event after every value is set,
>> so how can I do that?
>>
>>
> Hi,
>
> Well, you can keep one global var related to each slider (or an array
> for all, of course) with initial "bad" values that get updated to
> proper values after each slider is set. After each such event you
> check if any var still has the initial value, case not it's done.
>
> But probably it's better to have an extra button that the user can
> press after setting all sliders and other buttons to proper values,
> like an "Update" or "Do It!" sort of button. After all, even after
> setting all sliders, the user may want to change one of them again
> before going on.
>
And the Registry module can help here, too, especially if your editing
some per-object attribute. I do it all the time.
joeedh
More information about the Bf-python
mailing list