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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-03-20 18:35:23 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-03-20 18:37:15 +0300
commit099a41047882bbd835941e70c419290008ee35cd (patch)
tree024417dd079c0fb8b6cc8b83e8a12b1fd65a8542 /source/blender/depsgraph/intern/node
parentc5fc861172879102034129ecbe653e91eeff5caf (diff)
Depsgraph: Fix cycle with rigid body and Weight Proximity
The issue is a feedback loop with point cache reset operation. Solved by introducing extra node which ensures object's transformation is ready for simulator input. Allows to route relations without causing a fake dependency cycle now.
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.h4
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 893c108dc5a..b0b47f89acf 100644
--- a/source/blender/depsgraph/intern/node/deg_node_operation.cc
+++ b/source/blender/depsgraph/intern/node/deg_node_operation.cc
@@ -61,6 +61,8 @@ const char *operationCodeAsString(OperationCode opcode)
return "TRANSFORM_CONSTRAINTS";
case OperationCode::TRANSFORM_FINAL: return "TRANSFORM_FINAL";
case OperationCode::TRANSFORM_EVAL: return "TRANSFORM_EVAL";
+ case OperationCode::TRANSFORM_SIMULATION_INIT:
+ return "TRANSFORM_SIMULATION_INIT";
/* Rigid body. */
case OperationCode::RIGIDBODY_REBUILD: return "RIGIDBODY_REBUILD";
case OperationCode::RIGIDBODY_SIM: return "RIGIDBODY_SIM";
diff --git a/source/blender/depsgraph/intern/node/deg_node_operation.h b/source/blender/depsgraph/intern/node/deg_node_operation.h
index c6db7b012d7..56207b08d4a 100644
--- a/source/blender/depsgraph/intern/node/deg_node_operation.h
+++ b/source/blender/depsgraph/intern/node/deg_node_operation.h
@@ -76,6 +76,10 @@ enum class OperationCode {
TRANSFORM_CONSTRAINTS,
/* Handle object-level updates, mainly proxies hacks and recalc flags. */
TRANSFORM_EVAL,
+ /* Initializes transformation for simulation.
+ * For example, ensures point cache is properly reset before doing rigid
+ * body simulation. */
+ TRANSFORM_SIMULATION_INIT,
/* Transform exit point */
TRANSFORM_FINAL,