[Bf-blender-cvs] [95946117ff0] asset-metadata: Fix mistake in previous commit
Julian Eisel
noreply at git.blender.org
Wed Sep 23 15:03:29 CEST 2020
Commit: 95946117ff0718d482a7adeca963b2d03621261d
Author: Julian Eisel
Date: Wed Sep 23 15:02:09 2020 +0200
Branches: asset-metadata
https://developer.blender.org/rB95946117ff0718d482a7adeca963b2d03621261d
Fix mistake in previous commit
The "Make Asset" button in context menus wouldn't actually do anything.
===================================================================
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 82b5d0a174a..1a70dbd6879 100644
--- a/source/blender/editors/interface/interface_context_menu.c
+++ b/source/blender/editors/interface/interface_context_menu.c
@@ -959,7 +959,11 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but)
}
if (RNA_struct_is_ID(but->rnapoin.type)) {
- uiItemO(layout, NULL, ICON_NONE, "ASSET_OT_make");
+ PointerRNA op_ptr;
+
+ uiItemFullO(
+ layout, "ASSET_OT_make", NULL, ICON_NONE, NULL, WM_OP_INVOKE_DEFAULT, 0, &op_ptr);
+ RNA_pointer_set(&op_ptr, "id", but->rnapoin);
uiItemS(layout);
}
}
More information about the Bf-blender-cvs
mailing list