[Bf-committers] Question regarding RNA_property_update().

patrick boelens p_boelens at msn.com
Thu Apr 25 23:49:58 CEST 2013

Ah gotcha, thanks! Even just faking it by calling button_activate_state(C, but, BUTTON_STATE_EXIT) is enough; no need to enter BUTTON_STATE_NUM_EDITING first. =)

Thanks again!

> Date: Fri, 26 Apr 2013 07:41:05 +1000
> From: ideasman42 at gmail.com
> To: bf-committers at blender.org
> Subject: Re: [Bf-committers] Question regarding RNA_property_update().
> On Fri, Apr 26, 2013 at 7:33 AM, patrick boelens <p_boelens at msn.com> wrote:
> > Quick update: I found the region while fixing the offset issue (forgot to call
> > ui_window_to_block()). Calling ED_region_tag_redraw(data->region) does indeed fix the issue. I'd still be curious to know as to why RNA_property_update() isn't working as expected for future reference, but no worries if you have other things to do, at least I got my little wishlist working. =P
> >
> Calling ED_region_tag_redraw is no good, checked the patch.
> The reason RNA_property_update doesn't work is the button doesnt
> reference any RNA where though its rna from &but->rnapoin,
> but->rnaprop - they are NULL and crash for me.
> Instead it relies on but->funcN callback, see use of 'RNAUpdateCb'
> So probably best to do what 'paste' does and fake user button editing:
> button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
> ... edit colorband ...
> button_activate_state(C, but, BUTTON_STATE_EXIT);
> This works for colorband delete.
> _______________________________________________
> 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