== Apply Current Pose as New Restpose ==

In PoseMode, the Ctrl-A hotkey can now be used to apply the current pose as the new restpose for the armature. 

Notes:
* Roll correction may not be totally correct on bone chains, but is ok in most cases.
* Objects that are bone parented to the armature where this is applied are not correctly adjusted yet. 
* It is advisable to 'apply' the existing armature deformations to geometry deformed by the armature before applying this, to prevent unexpected results.
* No menu entry yet... will add in due course.
This commit is contained in:
2008-08-28 12:22:55 +00:00
parent 9f89f4cf34
commit 9f10007bfb
4 changed files with 103 additions and 7 deletions

View File

@@ -4130,15 +4130,26 @@ void apply_object( void )
}
allqueue(REDRAWVIEW3D, 0);
} else {
}
else {
ob= OBACT;
evt = pupmenu("Apply Object%t|Scale and Rotation to ObData|Visual Transform to Objects Loc/Scale/Rot");
if ((ob->pose) && (ob->flag & OB_POSEMODE))
evt = pupmenu("Apply Object%t|Current Pose as RestPose%x3");
else
evt = pupmenu("Apply Object%t|Scale and Rotation to ObData%x1|Visual Transform to Objects Loc/Scale/Rot%x2");
if (evt==-1) return;
if (evt==1) {
apply_objects_locrot();
} else if (evt==2) {
apply_objects_visual_tx();
switch (evt) {
case 1:
apply_objects_locrot();
break;
case 2:
apply_objects_visual_tx();
break;
case 3:
apply_armature_pose2bones();
break;
}
}
}