[Bf-blender-cvs] [e60c49ecf06] blender2.8: Use orig_pchan when searching for the original copy of a constraint.

Alexander Gavrilov noreply at git.blender.org
Sun Nov 25 09:00:35 CET 2018


Commit: e60c49ecf06815039137c98f86a7198d6ee81e14
Author: Alexander Gavrilov
Date:   Sun Nov 25 10:58:30 2018 +0300
Branches: blender2.8
https://developer.blender.org/rBe60c49ecf06815039137c98f86a7198d6ee81e14

Use orig_pchan when searching for the original copy of a constraint.

===================================================================

M	source/blender/blenkernel/intern/constraint.c

===================================================================

diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index d8956ce28b7..8c31b830ff7 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -5107,11 +5107,7 @@ static bConstraint *constraint_find_original(Object *ob, bPoseChannel *pchan, bC
 	ListBase *constraints, *orig_constraints;
 
 	if (pchan != NULL) {
-		if (orig_ob->type != OB_ARMATURE || orig_ob->pose == NULL) {
-			return NULL;
-		}
-
-		bPoseChannel *orig_pchan = BKE_pose_channel_find_name(orig_ob->pose, pchan->name);
+		bPoseChannel *orig_pchan = pchan->orig_pchan;
 
 		if (orig_pchan == NULL) {
 			return NULL;



More information about the Bf-blender-cvs mailing list