[Bf-blender-cvs] [f4bbec1bcdc] asset-metadata: Show "Make Asset" in the context menu of buttons showing IDs
Julian Eisel
noreply at git.blender.org
Wed Sep 23 11:56:06 CEST 2020
Commit: f4bbec1bcdc299c1a457e5e748e6494eafa9b3fe
Author: Julian Eisel
Date: Wed Sep 23 11:55:31 2020 +0200
Branches: asset-metadata
https://developer.blender.org/rBf4bbec1bcdc299c1a457e5e748e6494eafa9b3fe
Show "Make Asset" in the context menu of buttons showing IDs
===================================================================
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 02a9c3742d7..82b5d0a174a 100644
--- a/source/blender/editors/interface/interface_context_menu.c
+++ b/source/blender/editors/interface/interface_context_menu.c
@@ -957,6 +957,11 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but)
ui_but_menu_add_path_operators(layout, ptr, prop);
uiItemS(layout);
}
+
+ if (RNA_struct_is_ID(but->rnapoin.type)) {
+ uiItemO(layout, NULL, ICON_NONE, "ASSET_OT_make");
+ uiItemS(layout);
+ }
}
/* Pointer properties and string properties with
More information about the Bf-blender-cvs
mailing list