From db6287873cd2c79741439f4d141c4b2db517d73e Mon Sep 17 00:00:00 2001 From: Wayde Moss Date: Thu, 14 Apr 2022 18:16:23 -0400 Subject: Object: Set Parent (Keep Transform Without Inverse) **Relevant to Artists:** This patch adds an option to the Parenting menu, `Object (Keep Transform Without Inverse)`, and Apply menu, `Parent Inverse`. The operators preserve the child's world transform without using the parent inverse matrix. Effectively, we set the child's origin to the parent. When the child has an identity local transform, then the child is world-space aligned with its parent (scale excluded). **Technical:** In both cases, the hidden parent inverse matrix is generally set to identity (cleared or "not used") as long as the parent has no shear. If the parent has shear, then this matrix will not be entirely cleared. It will contain shear to counter the parent's shear. This is required, otherwise the object's local matrix cannot be properly decomposed into location, rotation and scale, and thus cannot preserve the world transform. If the child's world transform has shear, then its world transform is not preserved. This is currently not supported for consistency in the handling of shear during the other parenting ops: Parent (Keep Transform), Clear [Parent] and Keep Transform. If it should work, then another patch should add the support for all of them. Reviewed By: sybren, RiggingDojo Differential Revision: https://developer.blender.org/D14581 --- release/scripts/startup/bl_ui/space_view3d.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index ecd48aab697..74f20aca072 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2722,6 +2722,9 @@ class VIEW3D_MT_object_apply(Menu): text_ctxt=i18n_contexts.default, ).target = 'MESH' layout.operator("object.duplicates_make_real") + layout.operator("object.parent_inverse_apply", + text="Parent Inverse", + text_ctxt=i18n_contexts.default) class VIEW3D_MT_object_parent(Menu): -- cgit v1.2.3