diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-07-21 12:25:24 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-07-21 12:26:36 +0300 |
commit | 10b048fd9e51affa7d36022b32b24e489cfd0cbd (patch) | |
tree | 9f249743cf940481d1622dbbf6e2122fed26d7e5 /source | |
parent | ee3facd0879d48895febdd66661567c2af1b9e33 (diff) |
Fix T99885: Invalid dependency graph state when curves surface is invisible
Differential Revision: https://developer.blender.org/D15510
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_nodes.cc | 7 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 11 |
2 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index c65c4beeed6..4cbb2ce7060 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -26,6 +26,7 @@ #include "DNA_collection_types.h" #include "DNA_constraint_types.h" #include "DNA_curve_types.h" +#include "DNA_curves_types.h" #include "DNA_effect_types.h" #include "DNA_gpencil_types.h" #include "DNA_key_types.h" @@ -1563,8 +1564,14 @@ void DepsgraphNodeBuilder::build_object_data_geometry_datablock(ID *obdata) break; } case ID_CV: { + Curves *curves_id = reinterpret_cast<Curves *>(obdata); + op_node = add_operation_node(obdata, NodeType::GEOMETRY, OperationCode::GEOMETRY_EVAL); op_node->set_as_entry(); + + if (curves_id->surface != nullptr) { + build_object(-1, curves_id->surface, DEG_ID_LINKED_INDIRECTLY, false); + } break; } case ID_PT: { diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index f2646ebc1f1..1269ebeda4e 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -27,6 +27,7 @@ #include "DNA_collection_types.h" #include "DNA_constraint_types.h" #include "DNA_curve_types.h" +#include "DNA_curves_types.h" #include "DNA_effect_types.h" #include "DNA_gpencil_types.h" #include "DNA_key_types.h" @@ -2426,8 +2427,16 @@ void DepsgraphRelationBuilder::build_object_data_geometry_datablock(ID *obdata) } break; } - case ID_CV: + case ID_CV: { + Curves *curves_id = reinterpret_cast<Curves *>(obdata); + if (curves_id->surface != nullptr) { + build_object(curves_id->surface); + + /* The relations between the surface and the curves are handled as part of the modifier + * stack building. */ + } break; + } case ID_PT: break; case ID_VO: { |