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.
This commit is contained in:
parent
adcb7a2ce7
commit
f345625ded
Notes:
blender-bot
2023-02-14 05:50:03 +01:00
Referenced by issue #77712, Crash on proxied rig with custom bone shape and driver targeting the rig Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue