diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-06-26 13:29:20 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-06-26 13:34:38 +0300 |
commit | c7694185c92aa44c90fa43e58e88742e085183d9 (patch) | |
tree | 1a29c6845aa54004a2310ce2e9371989a3c55627 /source/blender/depsgraph/intern/node | |
parent | 2a72421cfb38d9a4a19a473184ba28b8ef8851e4 (diff) |
Fix T78071: Drivers reading object visibility not updating automatically
A driver reading `Object.hide_viewport` would break when that object was
hidden. Hidden objects don't have the `OBJECT_BASE_FLAGS` node in the
depsgraph, but that node was required for the driver to work.
Now the `OBJECT_FROM_LAYER` component (which optionally contains the
`OBJECT_FROM_LAYER` node) has explicit `ENTRY` and `EXIT` nodes, which
are used for relations with other components. These relations now remain
valid, even when the `OBJECT_FROM_LAYER` node is absent.
Differential Revision: https://developer.blender.org/D8124
Reviewed By: sergey
Diffstat (limited to 'source/blender/depsgraph/intern/node')
-rw-r--r-- | source/blender/depsgraph/intern/node/deg_node_operation.cc | 4 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/node/deg_node_operation.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/node/deg_node_operation.cc b/source/blender/depsgraph/intern/node/deg_node_operation.cc index 91bd0117f6c..33d2bf79a5e 100644 --- a/source/blender/depsgraph/intern/node/deg_node_operation.cc +++ b/source/blender/depsgraph/intern/node/deg_node_operation.cc @@ -63,8 +63,12 @@ const char *operationCodeAsString(OperationCode opcode) case OperationCode::AUDIO_VOLUME: return "AUDIO_VOLUME"; /* Object related. */ + case OperationCode::OBJECT_FROM_LAYER_ENTRY: + return "OBJECT_FROM_LAYER_ENTRY"; case OperationCode::OBJECT_BASE_FLAGS: return "OBJECT_BASE_FLAGS"; + case OperationCode::OBJECT_FROM_LAYER_EXIT: + return "OBJECT_FROM_LAYER_EXIT"; case OperationCode::DIMENSIONS: return "DIMENSIONS"; /* Transform. */ diff --git a/source/blender/depsgraph/intern/node/deg_node_operation.h b/source/blender/depsgraph/intern/node/deg_node_operation.h index 6b14e6af02f..4ed266d355f 100644 --- a/source/blender/depsgraph/intern/node/deg_node_operation.h +++ b/source/blender/depsgraph/intern/node/deg_node_operation.h @@ -63,7 +63,9 @@ enum class OperationCode { AUDIO_VOLUME, /* Object related. ------------------------------------------------------ */ + OBJECT_FROM_LAYER_ENTRY, OBJECT_BASE_FLAGS, + OBJECT_FROM_LAYER_EXIT, DIMENSIONS, /* Transform. ----------------------------------------------------------- */ |