From d0e4c4fa34dedec5473234e9c0bb4826ff176406 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Tue, 28 Feb 2023 16:00:32 +0100 Subject: [PATCH] UI: add parenting (Keep Transform Without Inverse) to menu Since db6287873cd2, we added parenting (Keep Transform Without Inverse) to the parent_set operator and exposed this in the UI in the invoke menu of that operator. This however never made it to the `Object` > `Parent` menu. Since this is quite useful (and otherwise a bit hidden in the Adjust Last Operation panel) and parent inverse can cause confusion in many cases (see e.g. #105276 or #103969), now add this as an explicit entry in the `Object` > `Parent` menu as well. NOTE: arguably we could unify the entries in the invoke menu and the `Object` > `Parent` menu as well since these are both different: - invoke calls this -- Set Parent to > Object (Without Inverse) -- Set Parent to > Object (Keep Transform Without Inverse) - `Object` > `Parent` menu -- Make Parent without Inverse -- Make Parent without Inverse (Keep Transform) --- scripts/startup/bl_ui/space_view3d.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/startup/bl_ui/space_view3d.py b/scripts/startup/bl_ui/space_view3d.py index 682eb16dbf9..0ce1626f300 100644 --- a/scripts/startup/bl_ui/space_view3d.py +++ b/scripts/startup/bl_ui/space_view3d.py @@ -2832,7 +2832,9 @@ class VIEW3D_MT_object_parent(Menu): layout.separator() layout.operator_context = 'EXEC_REGION_WIN' - layout.operator("object.parent_no_inverse_set") + layout.operator("object.parent_no_inverse_set").keep_transform = False + props = layout.operator("object.parent_no_inverse_set", text="Make Parent without Inverse (Keep Transform)") + props.keep_transform = True layout.operator_context = operator_context_default layout.separator() -- 2.30.2