UI: add parenting (Keep Transform Without Inverse) to menu

Since db6287873c, 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.
This commit is contained in:
Philipp Oeser
2023-03-07 15:14:00 +01:00
committed by Sybren A. Stüvel
parent 4aea5df231
commit 891eb4938c
+3 -1
View File
@@ -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()