[Bf-blender-cvs] [e2901615314] temp-angavrilov: Fix T103118: depsgraph issues for bbone property drivers on non-bbones.

Alexander Gavrilov noreply at git.blender.org
Thu Dec 29 18:43:36 CET 2022


Commit: e29016153149f4545d5a4623cdc660a8ca7d3216
Author: Alexander Gavrilov
Date:   Tue Dec 27 17:31:37 2022 +0200
Branches: temp-angavrilov
https://developer.blender.org/rBe29016153149f4545d5a4623cdc660a8ca7d3216

Fix T103118: depsgraph issues for bbone property drivers on non-bbones.

The BONE_SEGMENTS operation node is only created if the bone is
actually a B-Bone. One location in the code wasn't checking that
before trying to create a relation.

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

M	source/blender/depsgraph/intern/builder/deg_builder_relations.cc

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

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 32cd56b3584..b8581b16aef 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -1675,8 +1675,11 @@ void DepsgraphRelationBuilder::build_driver_data(ID *id, FCurve *fcu)
         continue;
       }
 
-      OperationCode target_op = driver_targets_bbone ? OperationCode::BONE_SEGMENTS :
-                                                       OperationCode::BONE_LOCAL;
+      OperationCode target_op = OperationCode::BONE_LOCAL;
+      if (driver_targets_bbone) {
+        target_op = check_pchan_has_bbone_segments(object, pchan) ? OperationCode::BONE_SEGMENTS :
+                                                                    OperationCode::BONE_DONE;
+      }
       OperationKey bone_key(&object->id, NodeType::BONE, pchan->name, target_op);
       add_relation(driver_key, bone_key, "Arm Bone -> Driver -> Bone");
     }



More information about the Bf-blender-cvs mailing list