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 ff60dd8b18. 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
This commit is contained in:
@@ -210,6 +210,10 @@ enum OperationFlag {
|
||||
DEPSOP_FLAG_DIRECTLY_MODIFIED = (1 << 1),
|
||||
/* Node was updated due to user input. */
|
||||
DEPSOP_FLAG_USER_MODIFIED = (1 << 2),
|
||||
/* Node may not be removed, even when it has no evaluation callback and no
|
||||
* outgoing relations. This is for NO-OP nodes that are purely used to indicate a
|
||||
* relation between components/IDs, and not for connecting to an operation. */
|
||||
DEPSOP_FLAG_PINNED = (1 << 3),
|
||||
|
||||
/* Set of flags which gets flushed along the relations. */
|
||||
DEPSOP_FLAG_FLUSH = (DEPSOP_FLAG_USER_MODIFIED),
|
||||
|
||||
Reference in New Issue
Block a user