diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-06-23 18:03:18 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-06-23 18:03:36 +0300 |
commit | f345625ded0ac3507c69160654360ebe8a463c84 (patch) | |
tree | 9d40661ee5b8c28fcc0154f83054c58eca6df7c7 /source/blender | |
parent | adcb7a2ce7c3ec79f2b30cc1cef02aa1ea9e7690 (diff) |
Fix T77712: Crash on proxied rig, custom bone shape, driver targeting rig
It turns out that
`DepsgraphNodeBuilder::build_object_data_geometry(Object *object, bool
is_object_visible)` was called for the custom shape with
`is_object_visible=false` when there are drivers, and
`is_object_visible=true` when there aren't any.
Diffstat (limited to 'source/blender')
3 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index 513472f6ec9..d84ec9b1363 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -733,7 +733,7 @@ void DepsgraphNodeBuilder::build_object_data(Object *object, bool is_object_visi break; case OB_ARMATURE: if (ID_IS_LINKED(object) && object->proxy_from != nullptr) { - build_proxy_rig(object); + build_proxy_rig(object, is_object_visible); } else { build_rig(object, is_object_visible); diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h index 8c0e486ec04..e0553182918 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h @@ -200,7 +200,7 @@ class DepsgraphNodeBuilder : public DepsgraphBuilder { virtual void build_ik_pose(Object *object, bPoseChannel *pchan, bConstraint *con); virtual void build_splineik_pose(Object *object, bPoseChannel *pchan, bConstraint *con); virtual void build_rig(Object *object, bool is_object_visible); - virtual void build_proxy_rig(Object *object); + virtual void build_proxy_rig(Object *object, bool is_object_visible); virtual void build_armature(bArmature *armature); virtual void build_armature_bones(ListBase *bones); virtual void build_shapekeys(Key *key); diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc index ab0a5c13321..86abfce2deb 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc @@ -283,7 +283,7 @@ void DepsgraphNodeBuilder::build_rig(Object *object, bool is_object_visible) } } -void DepsgraphNodeBuilder::build_proxy_rig(Object *object) +void DepsgraphNodeBuilder::build_proxy_rig(Object *object, bool is_object_visible) { bArmature *armature = (bArmature *)object->data; OperationNode *op_node; @@ -326,6 +326,11 @@ void DepsgraphNodeBuilder::build_proxy_rig(Object *object) &object->id, NodeType::PARAMETERS, OperationCode::PARAMETERS_EVAL, nullptr, pchan->name); } + /* Custom shape. */ + if (pchan->custom != nullptr) { + build_object(-1, pchan->custom, DEG_ID_LINKED_INDIRECTLY, is_object_visible); + } + pchan_index++; } op_node = add_operation_node(&object->id, |