Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-03-05 19:37:30 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-03-06 13:05:22 +0300
commit7d9a5b7b10b439f62bcc522fee307a942b859ccc (patch)
tree81a0b38270efec16b80701dcb6be34fab19023c8 /source/blender/depsgraph/intern/node
parentabd33a3c0c1cf7097d7ee25a68b6083e19a89f75 (diff)
Fix T73254: Drivers with the object.dimension variable are not updated
This fixes an issue where drivers using `object.dimension` only add a dependency on `GEOMETRY` to the depsgraph, whereas they should also depend on `TRANSFORM`. This patch adds a new no-op operation that depends on the geometry and transform components to the Parameters component. An alternative implementation would be to have `RNANodeQuery::construct_node_identifier` return multiple node identifiers. However, this would spread throughout the depsgraph code and unnecessarily force many other functions to either return or handle multiple nodes where in 99.999% of the time a single node would suffice. The new `DIMENSIONS` node is added for each object. An upcoming patch will go over all no-op operation nodes and remove them from the depsgraph. Since this is a more dangerous operation, it'll be reviewed separately. Differential Revision: https://developer.blender.org/D7031
Diffstat (limited to 'source/blender/depsgraph/intern/node')
-rw-r--r--source/blender/depsgraph/intern/node/deg_node_operation.cc2
-rw-r--r--source/blender/depsgraph/intern/node/deg_node_operation.h1
2 files changed, 3 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 e313b5ccee7..820dd607e3f 100644
--- a/source/blender/depsgraph/intern/node/deg_node_operation.cc
+++ b/source/blender/depsgraph/intern/node/deg_node_operation.cc
@@ -64,6 +64,8 @@ const char *operationCodeAsString(OperationCode opcode)
/* Object related. */
case OperationCode::OBJECT_BASE_FLAGS:
return "OBJECT_BASE_FLAGS";
+ case OperationCode::DIMENSIONS:
+ return "DIMENSIONS";
/* Transform. */
case OperationCode::TRANSFORM_INIT:
return "TRANSFORM_INIT";
diff --git a/source/blender/depsgraph/intern/node/deg_node_operation.h b/source/blender/depsgraph/intern/node/deg_node_operation.h
index 87c1a7f10a1..cedbad3715a 100644
--- a/source/blender/depsgraph/intern/node/deg_node_operation.h
+++ b/source/blender/depsgraph/intern/node/deg_node_operation.h
@@ -63,6 +63,7 @@ enum class OperationCode {
/* Object related. ------------------------------------------------------ */
OBJECT_BASE_FLAGS,
+ DIMENSIONS,
/* Transform. ----------------------------------------------------------- */
/* Transform entry point. */