[Bf-python] Is it possible to read the Operator props while in its draw() function?

Campbell Barton ideasman42 at gmail.com
Wed Sep 25 06:30:08 CEST 2013


On Wed, Sep 25, 2013 at 8:36 AM, Dalai Felinto <dfelinto at gmail.com> wrote:
> Hi,
>
> I have an operator that has a custom draw function (invoked by
> wm.invoke_props_dialog()).
>
> I was wondering if I can read the properties in the class as they are set by
> the user before the 'OK' button is pressed.
>
> For example, if the user picks 'A' in an enum, I would like to show
> different options than if 'B' is selected.
>
> The attached sample script should illustrate this properly. I wasn't sure if
> I'm doing something wrong, if this is a bug, or if this is in someone's todo
> list. This is something I think it would be really useful.
>
> Thanks,
> Dalai
> --
> blendernetwork.org/dalai-felinto
> www.dalaifelinto.com

Currently this isn't supported, it could be made to work (in 2.4x we
had this kind of pop-up),
But it had to re-create the popup for every draw so it wasn't so nice
implementation wise.

-- 
- Campbell



More information about the Bf-python mailing list