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_rna.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_rna.cc')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_rna.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_rna.cc b/source/blender/depsgraph/intern/builder/deg_builder_rna.cc
index ac4e8e84d44..1238cdc70c6 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_rna.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_rna.cc
@@ -197,8 +197,9 @@ RNANodeIdentifier RNANodeQuery::construct_node_identifier(const PointerRNA *ptr,
node_identifier.type = NodeType::BONE;
node_identifier.component_name = pchan->name;
/* But B-Bone properties should connect to the actual operation. */
- if (!ELEM(NULL, pchan->bone, prop) && pchan->bone->segments > 1 &&
- STRPREFIX(RNA_property_identifier(prop), "bbone_")) {
+ Object *object = reinterpret_cast<Object *>(node_identifier.id);
+ if (!ELEM(NULL, pchan->bone, prop) && STRPREFIX(RNA_property_identifier(prop), "bbone_") &&
+ builder_->check_pchan_has_bbone_segments(object, pchan)) {
node_identifier.operation_code = OperationCode::BONE_SEGMENTS;
}
}