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-04-24 18:23:44 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-04-24 18:23:44 +0300
commita8441fc90086bf21dc50dc9dcd6085e0a0674921 (patch)
treef02a5d015e1b315175c1887f7de6a3c575cb1ea8 /source/blender/depsgraph
parent4542b50afcfc9b797d5f3048393ba1f1836561a0 (diff)
Fix T69753 Instanced Metaballs not rendering but showing up in Viewport
This hides the original metaballs when they are used in duplifaces/-verts instancing, and still shows the instanced metaballs. The visibility of the original metaballs is now determined by the visibility of the instancer. I'm not too thrilled about this, but at least it gives users the ability to show/hide the metaballs for viewport/render. Differential Revision: https://developer.blender.org/D7478
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_query_iter.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_query_iter.cc b/source/blender/depsgraph/intern/depsgraph_query_iter.cc
index fadd0beb636..c4b53bd8176 100644
--- a/source/blender/depsgraph/intern/depsgraph_query_iter.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query_iter.cc
@@ -103,7 +103,10 @@ static bool deg_object_hide_original(eEvaluationMode eval_mode, Object *ob, Dupl
* by its parent. Ideally this should not be needed, but due to the wrong
* dependency direction in the data design there is no way to keep the object
* visible otherwise. The better solution eventually would be for objects
- * to specify which object they instance, instead of through parenting. */
+ * to specify which object they instance, instead of through parenting.
+ *
+ * This function should not be used for metaballs. They have custom visibility rules, as hiding
+ * the base metaball will also hide all the other balls in the group. */
if (eval_mode == DAG_EVAL_RENDER || dob) {
const int hide_original_types = OB_DUPLIVERTS | OB_DUPLIFACES;
@@ -215,7 +218,7 @@ void deg_iterator_objects_step(BLI_Iterator *iter, DEG::IDNode *id_node)
if (data->flag & DEG_ITER_OBJECT_FLAG_VISIBLE) {
ob_visibility = BKE_object_visibility(object, data->eval_mode);
- if (deg_object_hide_original(data->eval_mode, object, nullptr)) {
+ if (object->type != OB_MBALL && deg_object_hide_original(data->eval_mode, object, nullptr)) {
return;
}
}