[Bf-blender-cvs] [71a85a2563a] temp-angavrilov-constraints: Depsgraph: connect up drivers on various physics properties.

Alexander Gavrilov noreply at git.blender.org
Sun Jan 10 11:50:46 CET 2021


Commit: 71a85a2563a9ac5302ce7183f8ffcff8b31b0992
Author: Alexander Gavrilov
Date:   Sat Jan 9 21:19:37 2021 +0300
Branches: temp-angavrilov-constraints
https://developer.blender.org/rB71a85a2563a9ac5302ce7183f8ffcff8b31b0992

Depsgraph: connect up drivers on various physics properties.

It seems drivers for physics properties weren't being linked to
evaluation nodes. This connects settings used by modifiers
to Geometry; particle settings and rigid body data to Transform
which seems to contain rigid body evaluation; and force fields
to object Transform, since fields can exist on empties.

===================================================================

M	source/blender/depsgraph/intern/builder/deg_builder_rna.cc

===================================================================

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_rna.cc b/source/blender/depsgraph/intern/builder/deg_builder_rna.cc
index 4064058f231..060b29a0fe5 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_rna.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_rna.cc
@@ -280,7 +280,15 @@ RNANodeIdentifier RNANodeQuery::construct_node_identifier(const PointerRNA *ptr,
            RNA_struct_is_a(ptr->type, &RNA_LatticePoint) ||
            RNA_struct_is_a(ptr->type, &RNA_MeshUVLoop) ||
            RNA_struct_is_a(ptr->type, &RNA_MeshLoopColor) ||
-           RNA_struct_is_a(ptr->type, &RNA_VertexGroupElement)) {
+           RNA_struct_is_a(ptr->type, &RNA_VertexGroupElement) ||
+           ELEM(ptr->type,
+                &RNA_CollisionSettings,
+                &RNA_SoftBodySettings,
+                &RNA_ClothSettings,
+                &RNA_ClothCollisionSettings,
+                &RNA_DynamicPaintSurface,
+                &RNA_DynamicPaintCanvasSettings,
+                &RNA_DynamicPaintBrushSettings)) {
     /* When modifier is used as FROM operation this is likely referencing to
      * the property (for example, modifier's influence).
      * But when it's used as TO operation, this is geometry component. */
@@ -381,6 +389,20 @@ RNANodeIdentifier RNANodeQuery::construct_node_identifier(const PointerRNA *ptr,
     node_identifier.type = NodeType::GEOMETRY;
     return node_identifier;
   }
+  else if (GS(node_identifier.id->name) == ID_PA &&
+           ELEM(ptr->type, &RNA_EffectorWeights, &RNA_FieldSettings, &RNA_ParticleSettings)) {
+    node_identifier.type = NodeType::PARTICLE_SETTINGS;
+    return node_identifier;
+  }
+  else if (GS(node_identifier.id->name) == ID_SCE &&
+           ELEM(ptr->type, &RNA_EffectorWeights, &RNA_RigidBodyWorld)) {
+    node_identifier.type = NodeType::TRANSFORM;
+    return node_identifier;
+  }
+  else if (ELEM(ptr->type, &RNA_FieldSettings)) {
+    node_identifier.type = NodeType::TRANSFORM;
+    return node_identifier;
+  }
   if (prop != nullptr) {
     /* All unknown data effectively falls under "parameter evaluation". */
     node_identifier.type = NodeType::PARAMETERS;



More information about the Bf-blender-cvs mailing list