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-02-12 17:58:45 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-02-12 18:42:34 +0300
commit8614f282348981d63fea7230826a22e179605219 (patch)
tree4fc51415e4c367d72b71506ce7a09ece0e03ea49 /source/blender/depsgraph
parent7c03d6c4e6c1ab55f07036f7259a509217400a9b (diff)
Depsgraph: Special relation for instances and metaballs
Ensures that object which is set for instance-vert or instance-face is evaluated prior to metaball. This is because metaball will request list of instances during evaluation. This should fix issue reported T61431 in release build. The assert is still there and is to be addressed separately.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 879ad5b5826..1f679cda191 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -836,6 +836,7 @@ void DepsgraphRelationBuilder::build_object_data_speaker(Object *object)
void DepsgraphRelationBuilder::build_object_parent(Object *object)
{
+ Object *parent = object->parent;
ID *parent_id = &object->parent->id;
ComponentKey ob_key(&object->id, NodeType::TRANSFORM);
/* Type-specific links/ */
@@ -911,6 +912,16 @@ void DepsgraphRelationBuilder::build_object_parent(Object *object)
break;
}
}
+ /* Metaballs are the odd balls here (no pun intended): they will request
+ * instance-list (formerly known as dupli-list) during evaluation. This is
+ * their way of interacting with all instanced surfaces, making a nice
+ * effect when is used form particle system. */
+ if (object->type == OB_MBALL && parent->transflag & OB_DUPLI) {
+ ComponentKey parent_geometry_key(parent_id, NodeType::GEOMETRY);
+ /* NOTE: Metaballs are evaluating geometry only after their transform,
+ * so we onl;y hook up to transform channel here. */
+ add_relation(parent_geometry_key, ob_key, "Parent");
+ }
}
void DepsgraphRelationBuilder::build_object_pointcache(Object *object)