forked from blender/blender
main sync #3
@ -2990,6 +2990,17 @@ uiBut *UI_context_active_but_prop_get(const struct bContext *C,
|
|||||||
struct PointerRNA *r_ptr,
|
struct PointerRNA *r_ptr,
|
||||||
struct PropertyRNA **r_prop,
|
struct PropertyRNA **r_prop,
|
||||||
int *r_index);
|
int *r_index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* As above, but for a specified region.
|
||||||
|
*
|
||||||
|
* \return active button, NULL if none found or if it doesn't contain valid RNA data.
|
||||||
|
*/
|
||||||
|
uiBut *UI_region_active_but_prop_get(const struct ARegion *region,
|
||||||
|
struct PointerRNA *r_ptr,
|
||||||
|
struct PropertyRNA **r_prop,
|
||||||
|
int *r_index);
|
||||||
|
|
||||||
void UI_context_active_but_prop_handle(struct bContext *C, bool handle_undo);
|
void UI_context_active_but_prop_handle(struct bContext *C, bool handle_undo);
|
||||||
void UI_context_active_but_clear(struct bContext *C, struct wmWindow *win, struct ARegion *region);
|
void UI_context_active_but_clear(struct bContext *C, struct wmWindow *win, struct ARegion *region);
|
||||||
|
|
||||||
|
@ -8767,12 +8767,12 @@ uiBlock *UI_region_block_find_mouse_over(const ARegion *region, const int xy[2],
|
|||||||
return ui_block_find_mouse_over_ex(region, xy, only_clip);
|
return ui_block_find_mouse_over_ex(region, xy, only_clip);
|
||||||
}
|
}
|
||||||
|
|
||||||
uiBut *UI_context_active_but_prop_get(const bContext *C,
|
uiBut *UI_region_active_but_prop_get(const ARegion *region,
|
||||||
PointerRNA *r_ptr,
|
PointerRNA *r_ptr,
|
||||||
PropertyRNA **r_prop,
|
PropertyRNA **r_prop,
|
||||||
int *r_index)
|
int *r_index)
|
||||||
{
|
{
|
||||||
uiBut *activebut = UI_context_active_but_get_respect_menu(C);
|
uiBut *activebut = UI_region_active_but_get(region);
|
||||||
|
|
||||||
if (activebut && activebut->rnapoin.data) {
|
if (activebut && activebut->rnapoin.data) {
|
||||||
*r_ptr = activebut->rnapoin;
|
*r_ptr = activebut->rnapoin;
|
||||||
@ -8788,6 +8788,16 @@ uiBut *UI_context_active_but_prop_get(const bContext *C,
|
|||||||
return activebut;
|
return activebut;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uiBut *UI_context_active_but_prop_get(const bContext *C,
|
||||||
|
PointerRNA *r_ptr,
|
||||||
|
PropertyRNA **r_prop,
|
||||||
|
int *r_index)
|
||||||
|
{
|
||||||
|
ARegion *region_menu = CTX_wm_menu(C);
|
||||||
|
return UI_region_active_but_prop_get(
|
||||||
|
region_menu ? region_menu : CTX_wm_region(C), r_ptr, r_prop, r_index);
|
||||||
|
}
|
||||||
|
|
||||||
void UI_context_active_but_prop_handle(bContext *C, const bool handle_undo)
|
void UI_context_active_but_prop_handle(bContext *C, const bool handle_undo)
|
||||||
{
|
{
|
||||||
uiBut *activebut = UI_context_active_but_get_respect_menu(C);
|
uiBut *activebut = UI_context_active_but_get_respect_menu(C);
|
||||||
|
@ -1350,7 +1350,7 @@ static void graph_panel_drivers_popover(const bContext *C, Panel *panel)
|
|||||||
uiBut *but = NULL;
|
uiBut *but = NULL;
|
||||||
|
|
||||||
/* Get active property to show driver properties for */
|
/* Get active property to show driver properties for */
|
||||||
but = UI_context_active_but_prop_get((bContext *)C, &ptr, &prop, &index);
|
but = UI_region_active_but_prop_get(CTX_wm_region(C), &ptr, &prop, &index);
|
||||||
if (but) {
|
if (but) {
|
||||||
FCurve *fcu;
|
FCurve *fcu;
|
||||||
bool driven, special;
|
bool driven, special;
|
||||||
|
Loading…
Reference in New Issue
Block a user