diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-03-09 18:05:06 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-03-09 18:05:33 +0300 |
commit | dcb93126876879d969a30a7865700abd072066f8 (patch) | |
tree | 19c4132612f4aa0ab34adc88ccec9c48bd4f2418 /source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc | |
parent | 93f636957346f33e7a69b0b4caf0ac48a0a9bf42 (diff) |
Depsgraph: fix crash caused by removing too many NO-OP nodes
Unused no-op operation nodes are not bound to a callback function, and
have no outgoing relations. Incoming relations of such nodes are removed
since ff60dd8b18ed00902e5bdfd36882072db7af8735. However, this was done
too broadly, causing too many relations to be lost and indirectly linked
objects to be unevaluated.
This commit introduces a `DEPSOP_FLAG_FAKE_USER` flag for operation
nodes, which indicates they are not to be removed, even when they appear
to be unused.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7074
Diffstat (limited to 'source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc')
-rw-r--r-- | source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc b/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc index b08281b755e..73b99213005 100644 --- a/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc +++ b/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc @@ -125,6 +125,9 @@ static int deg_debug_node_color_index(const Node *node) case NodeType::OPERATION: { OperationNode *op_node = (OperationNode *)node; if (op_node->is_noop()) { + if (op_node->flag & OperationFlag::DEPSOP_FLAG_PINNED) { + return 7; + } return 8; } break; @@ -195,6 +198,7 @@ static void deg_debug_graphviz_legend(const DebugContext &ctx) deg_debug_graphviz_legend_color(ctx, "Component", colors[1]); deg_debug_graphviz_legend_color(ctx, "ID Node", colors[5]); deg_debug_graphviz_legend_color(ctx, "NOOP", colors[8]); + deg_debug_graphviz_legend_color(ctx, "Pinned OP", colors[7]); #endif #ifdef COLOR_SCHEME_NODE_TYPE |