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:
authorSebastian Parborg <darkdefende@gmail.com>2020-08-28 15:51:54 +0300
committerSebastian Parborg <darkdefende@gmail.com>2020-08-28 15:55:59 +0300
commit8726354d465ae0930adcab9ba818414681cee077 (patch)
treec0849a36eec6bd0d39f5b0e9331cb56bd34ec04b /source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
parent0852ecd844f8dda21623774d3aa7dc372e81be2f (diff)
Fix Rigidbody depsgraph passive and constraint transform relations.
We need to have transforms from passive objects if they are animated or driven by parent relations. This is not immediately obvious as the object transform matrix will still be available, it is just one frame behind in some cases. Fixed dependency cycles if there is a constraint between two rigid bodies. Because bullet keeps track of its simulated bodies, we do not need to supply objects transforms as bullet should already have them. I need combine these two fixes because otherwise we will get depsgraph warnings that nodes are missing that it expects to be there. Reviewed By: Sergey, Jacques Differential Revision: http://developer.blender.org/D8732
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder_nodes.cc')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 2669de87bc4..670827dc4d8 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -1129,9 +1129,11 @@ void DepsgraphNodeBuilder::build_rigidbody(Scene *scene)
if (object->rigidbody_object == nullptr) {
continue;
}
- if (object->rigidbody_object->type == RBO_TYPE_PASSIVE) {
+
+ if (!BKE_rigidbody_is_affected_by_simulation(object)) {
continue;
}
+
/* Create operation for flushing results. */
/* Object's transform component - where the rigidbody operation
* lives. */