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!
-Patrick

> Date: Fri, 26 Apr 2013 07:41:05 +1000
> From: [email protected]
> To: [email protected]
> Subject: Re: [Bf-committers] Question regarding RNA_property_update().
> 
> On Fri, Apr 26, 2013 at 7:33 AM, patrick boelens <[email protected]> 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
> [email protected]
> http://lists.blender.org/mailman/listinfo/bf-committers
                                          
_______________________________________________
Bf-committers mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-committers

Reply via email to