Fix T62457: Crash with rigid body and disabled objects

Need to always ensure objects form rigid body wortld are part
of dependency graph.
This commit is contained in:
Sergey Sharybin 2019-03-12 15:25:50 +01:00
parent 936014ea8c
commit c10d011cc5
Notes: blender-bot 2023-02-14 11:35:46 +01:00
Referenced by issue #62497, Render window artifacts on F12
Referenced by issue #62457, Blender crashes when any mesh is disabled in renders and tries to render
1 changed files with 8 additions and 2 deletions

View File

@ -496,6 +496,12 @@ void DepsgraphNodeBuilder::build_collection(
* objects are poked with the new visibility flag, since they
* might become visible too. */
}
else if (from_layer_collection == NULL &&
!id_node->is_collection_fully_expanded) {
/* Initially collection was built from layer now, and was requested
* to not recurs into object. But nw it's asked to recurs into all
* objects. */
}
else {
return;
}
@ -1047,8 +1053,8 @@ void DepsgraphNodeBuilder::build_rigidbody(Scene *scene)
/* Init/rebuild operation. */
add_operation_node(&scene->id, NodeType::TRANSFORM,
OperationCode::RIGIDBODY_REBUILD,
function_bind(BKE_rigidbody_rebuild_sim, _1, scene_cow));
OperationCode::RIGIDBODY_REBUILD,
function_bind(BKE_rigidbody_rebuild_sim, _1, scene_cow));
/* Do-sim operation. */
OperationNode *sim_node = add_operation_node(
&scene->id, NodeType::TRANSFORM,