Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2018-11-14 14:01:28 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2018-11-14 14:01:40 +0300
commit5c27c76ed3a9683c5d54745add6713eb562996e8 (patch)
treed6e3726fd08ce8cc8298c54fa8f2e9ccf559c041 /source/blender/blenkernel/intern/constraint.c
parent43ee433dceccf13868da683ec781b30f17185a2b (diff)
Depsgraph: fix relations for drivers on bone weight in Armature constraint.
Diffstat (limited to 'source/blender/blenkernel/intern/constraint.c')
-rw-r--r--source/blender/blenkernel/intern/constraint.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index e16117745c9..8dfb50cd159 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -5058,8 +5058,12 @@ static bConstraint *constraint_list_find_from_target(ListBase *constraints, bCon
}
/* Finds the constraint that owns the given target within the object. */
-bConstraint *BKE_constraint_find_from_target(Object *ob, bConstraintTarget *tgt)
+bConstraint *BKE_constraint_find_from_target(Object *ob, bConstraintTarget *tgt, bPoseChannel **r_pchan)
{
+ if (r_pchan != NULL) {
+ *r_pchan = NULL;
+ }
+
bConstraint *result = constraint_list_find_from_target(&ob->constraints, tgt);
if (result != NULL) {
@@ -5071,6 +5075,10 @@ bConstraint *BKE_constraint_find_from_target(Object *ob, bConstraintTarget *tgt)
result = constraint_list_find_from_target(&pchan->constraints, tgt);
if (result != NULL) {
+ if (r_pchan != NULL) {
+ *r_pchan = pchan;
+ }
+
return result;
}
}