Fix T99885: Invalid dependency graph state when curves surface is invisible

Differential Revision: https://developer.blender.org/D15510
This commit is contained in:
Sergey Sharybin
2022-07-21 11:25:24 +02:00
parent ee3facd087
commit 10b048fd9e
2 changed files with 17 additions and 1 deletions

View File

@@ -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: {

View File

@@ -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: {