From 0264d8390fa28153e8a122ed419faba936944bd9 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sun, 8 Jul 2018 17:10:15 +0300 Subject: Apply Pose as Rest Pose: implement an Only Selected bones option. The most difficult part is handling parent-child relations correctly: when a parent is applied, the children should be moved accordingly, and when applying a child, it should not include transformation from unapplied parents. All this requires walking bones as a tree, instead of a flat list. Limitation: Applying bones with non-uniform scaling without also applying children will distort non-rest posing on said children for reasons related to T54159 (basically, non-uniform scale plus rotation creates shear, and Blender matrix decomposition utilities don't have tools to deal with it). Reviewers: campbellbarton, brecht, mont29 Differential Revision: https://developer.blender.org/D3775 --- release/scripts/startup/bl_ui/space_view3d.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 8510f8c1dd0..23cd2c36e76 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3143,7 +3143,8 @@ class VIEW3D_MT_pose_apply(Menu): def draw(self, _context): layout = self.layout - layout.operator("pose.armature_apply") + layout.operator("pose.armature_apply").selected = False + layout.operator("pose.armature_apply", text="Apply Selected as Rest Pose").selected = True layout.operator("pose.visual_transform_apply") layout.separator() -- cgit v1.2.3