diff options
author | Aaron Carlisle <Blendify> | 2021-03-11 06:10:05 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2021-03-11 06:10:49 +0300 |
commit | 85623f6a5590e99c9d821bba53f8b5fe3812a47d (patch) | |
tree | 5ac6ce712048df63d1eb4aebf8c167f7980bf59d /source/blender/editors/interface/interface_context_menu.c | |
parent | 9ef24d5aaa190b3429756368f29c9acfaf2b2605 (diff) |
UI: Add Copy Full Data Path to RMB menu
This commit adds an operator to the RMB-menu "Copy Full Data Path“,
to copy the full RNA path to the clipboard. It aims to complement
"Copy Data Path“, which only copies the part of the path that is needed
for drivers, but for writing addons, etc. it is useful to have an option that
gives the full data path.
Similar patch have been submitted before, see D763 and D2746
This time I did not split the operator (as D2746) and does not contain the UI reorganization (as D763)
Note, the fixes from D2746 were committed in rB09eac0159db8 so that patch can be closed.
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D10539
Diffstat (limited to 'source/blender/editors/interface/interface_context_menu.c')
-rw-r--r-- | source/blender/editors/interface/interface_context_menu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_context_menu.c b/source/blender/editors/interface/interface_context_menu.c index edfd1ecd539..91c19ff2850 100644 --- a/source/blender/editors/interface/interface_context_menu.c +++ b/source/blender/editors/interface/interface_context_menu.c @@ -936,6 +936,12 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but) CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Copy Data Path"), ICON_NONE, "UI_OT_copy_data_path_button"); + uiItemBooleanO(layout, + CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Copy Full Data Path"), + ICON_NONE, + "UI_OT_copy_data_path_button", + "full_path", + true); if (ptr->owner_id && !is_whole_array && ELEM(type, PROP_BOOLEAN, PROP_INT, PROP_FLOAT, PROP_ENUM)) { |