Commit: 6547d9d3e2cb0eb0b3da8ebf3a96f6664f9c2610
Author: Sebastian Parborg
Date: Wed Apr 15 12:32:06 2020 +0200
Branches: master
https://developer.blender.org/rB6547d9d3e2cb0eb0b3da8ebf3a96f6664f9c2610
Fix T75649: Using "Auto IK" on FK controls with Rigify will crash Blender.
Fixed a coding mistake when adding temp IK chains with Auto-IK.
We need to use the data from the new temporary constraint.
===================================================================
M source/blender/editors/transform/transform_convert_armature.c
===================================================================
diff --git a/source/blender/editors/transform/transform_convert_armature.c
b/source/blender/editors/transform/transform_convert_armature.c
index 0106f4f41c7..4a79fd672b6 100644
--- a/source/blender/editors/transform/transform_convert_armature.c
+++ b/source/blender/editors/transform/transform_convert_armature.c
@@ -58,7 +58,8 @@ typedef struct BoneInitData {
float zwidth;
} BoneInitData;
-static void add_temporary_ik_constraint(bPoseChannel *pchan,
bKinematicConstraint *targetless_con)
+static bConstraint *add_temporary_ik_constraint(bPoseChannel *pchan,
+ bKinematicConstraint
*targetless_con)
{
bConstraint *con = BKE_constraint_add_for_pose(
NULL, pchan, "TempConstraint", CONSTRAINT_TYPE_KINEMATIC);
@@ -77,6 +78,8 @@ static void add_temporary_ik_constraint(bPoseChannel *pchan,
bKinematicConstrain
}
temp_con_data->flag |= CONSTRAINT_IK_TEMP | CONSTRAINT_IK_AUTO |
CONSTRAINT_IK_POS;
+
+ return con;
}
static void update_deg_with_temporary_ik(Main *bmain, Object *ob)
@@ -324,7 +327,8 @@ static short pose_grab_with_ik_add(bPoseChannel *pchan)
}
}
- add_temporary_ik_constraint(pchan, targetless);
+ data = add_temporary_ik_constraint(pchan, targetless)->data;
+
copy_v3_v3(data->grabtarget, pchan->pose_tail);
/* watch-it! has to be 0 here, since we're still on the
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs