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
This commit is contained in:
parent
9ef24d5aaa
commit
85623f6a55
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue