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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-04-29 15:19:56 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-04-30 12:32:02 +0300
commitd7e2fe275d0c575ca20216f5534d85fb8bf6a2dc (patch)
tree2d5bb2999fe353b288e4058d90a98669f5298e85 /source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
parent6bbb82cf79e03cf96947933da292d2666bf81dd6 (diff)
Depsgraph: build bbone operation if bone segments has animation
This is a part of T61296: Crash with animated b-bone segments. Consider animated/driven bendy bones segments as something what requires special bendy-bones operation and relation in the dependency graph. This is because it is more beneficial from a performance point of view to not build operations if they are not needed. But if the property is animated it is not possible to make any reliable decision based on just a property value. Differential Revision: https://developer.blender.org/D4739
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
index c1f904150f3..fadce685d31 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
@@ -374,7 +374,7 @@ void DepsgraphRelationBuilder::build_rig(Object *object)
* to done, with transitive reduction removing this one. */
add_relation(bone_ready_key, bone_done_key, "Ready -> Done");
/* B-Bone shape is the real final step after Done if present. */
- if (pchan->bone != NULL && pchan->bone->segments > 1) {
+ if (check_pchan_has_bbone(object, pchan)) {
OperationKey bone_segments_key(
&object->id, NodeType::BONE, pchan->name, OperationCode::BONE_SEGMENTS);
/* B-Bone shape depends on the final position of the bone. */
@@ -434,7 +434,7 @@ void DepsgraphRelationBuilder::build_proxy_rig(Object *object)
add_relation(bone_done_key, pose_cleanup_key, "Bone Done -> Pose Cleanup");
add_relation(bone_done_key, pose_done_key, "Bone Done -> Pose Done", RELATION_FLAG_GODMODE);
/* Make sure bone in the proxy is not done before it's FROM is done. */
- if (pchan->bone && pchan->bone->segments > 1) {
+ if (check_pchan_has_bbone(object, pchan)) {
OperationKey from_bone_segments_key(
&proxy_from->id, NodeType::BONE, pchan->name, OperationCode::BONE_SEGMENTS);
add_relation(from_bone_segments_key,