[Bf-blender-cvs] [d3940c22114] blender2.8: Fix button data access for python context menus
Campbell Barton
noreply at git.blender.org
Sun Dec 2 00:16:11 CET 2018
Commit: d3940c2211463609d4fa2b8601c64b3f7744a1f8
Author: Campbell Barton
Date: Sun Dec 2 07:50:25 2018 +1100
Branches: blender2.8
https://developer.blender.org/rBd3940c2211463609d4fa2b8601c64b3f7744a1f8
Fix button data access for python context menus
D4016 by @raa
===================================================================
M source/blender/editors/interface/interface_context_menu.c
===================================================================
diff --git a/source/blender/editors/interface/interface_context_menu.c b/source/blender/editors/interface/interface_context_menu.c
index 0ffc97444e1..5f7cd68a875 100644
--- a/source/blender/editors/interface/interface_context_menu.c
+++ b/source/blender/editors/interface/interface_context_menu.c
@@ -394,11 +394,11 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but)
const int override_status = RNA_property_static_override_status(ptr, prop, -1);
const bool is_overridable = (override_status & RNA_OVERRIDE_STATUS_OVERRIDABLE) != 0;
+ /* Set the (button_pointer, button_prop) and pointer data for Python access to the hovered ui element. */
+ uiLayoutSetContextFromBut(layout, but);
+
/* Keyframes */
if (but->flag & UI_BUT_ANIMATED_KEY) {
- /* Set the (button_pointer, button_prop) and pointer data for Python access to the hovered ui element. */
- uiLayoutSetContextFromBut(layout, but);
-
/* replace/delete keyfraemes */
if (is_array_component) {
uiItemBooleanO(
More information about the Bf-blender-cvs
mailing list