Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2021-04-07 19:04:43 +0300
committerJulian Eisel <julian@blender.org>2021-04-07 19:04:43 +0300
commit554d921124e556a40d8ba1da46f8f5a3cd832ab5 (patch)
tree2898fa64d7e65265eaa7ff63e87a9bfdfce8a03d /source/blender/editors/interface/interface_context_menu.c
parent965425bcbc4dd8340286b83bccfa17e99792f594 (diff)
UI: Remove confusing "Unset" context menu entry
This was added in 37b82a2d260e, doesn't have much purpose and doesn't even do anything in the vast majority of cases. It only affects custom properties. So at the very least it shouldn't be shown for regular RNA property buttons. But even for cases where it may do something, we couldn't find a good use-case. If this operator has use-cases with some add-ons, the add-ons can expose it differently, e.g. with a little 'x' icon next to the button, like it's done in the keymap editor. So removing the context menu entry now. Should this turn out to be a problem, it can be brought back but much more selectively (only where it actually does something). Or we could combine it with "Reset to Default". Differential Revision: https://developer.blender.org/D8727 Reviewed by: Brecht Van Lommel, Hans Goudey
Diffstat (limited to 'source/blender/editors/interface/interface_context_menu.c')
-rw-r--r--source/blender/editors/interface/interface_context_menu.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/source/blender/editors/interface/interface_context_menu.c b/source/blender/editors/interface/interface_context_menu.c
index 91c19ff2850..c594b61acd3 100644
--- a/source/blender/editors/interface/interface_context_menu.c
+++ b/source/blender/editors/interface/interface_context_menu.c
@@ -542,9 +542,7 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but)
const PropertyType type = RNA_property_type(prop);
const PropertySubType subtype = RNA_property_subtype(prop);
bool is_anim = RNA_property_animateable(ptr, prop);
- const bool is_editable = RNA_property_editable(ptr, prop);
const bool is_idprop = RNA_property_is_idprop(prop);
- const bool is_set = RNA_property_is_set(ptr, prop);
/* second slower test,
* saved people finding keyframe items in menus when its not possible */
@@ -893,12 +891,6 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but)
"all",
1);
}
- if (is_editable /*&& is_idprop*/ && is_set) {
- uiItemO(layout,
- CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Unset"),
- ICON_NONE,
- "UI_OT_unset_property_button");
- }
if (is_idprop && !is_array && ELEM(type, PROP_INT, PROP_FLOAT)) {
uiItemO(layout,