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:
authorHans Goudey <h.goudey@me.com>2022-11-11 21:31:50 +0300
committerHans Goudey <h.goudey@me.com>2022-11-11 21:32:18 +0300
commit864af51d6a88e1408367ab7083825b3b40b75e24 (patch)
tree8a2e7437aaae6c9d5e3f60a526a8247bcdf4e34e
parentba2072524bbf06068bec5c12e185a222b4d57f76 (diff)
Fix: Failing instance visibility test after recent commit
The "visibility_instances.blend" cycles test was failing.. The stack of dupli generator types added in e508de041712cc31588 wasn't "popped" correctly after recursive duplis were generated.
-rw-r--r--source/blender/blenkernel/intern/object_dupli.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/object_dupli.cc b/source/blender/blenkernel/intern/object_dupli.cc
index 54a26a897d8..cca609a2e0d 100644
--- a/source/blender/blenkernel/intern/object_dupli.cc
+++ b/source/blender/blenkernel/intern/object_dupli.cc
@@ -344,6 +344,9 @@ static void make_recursive_duplis(const DupliContext *ctx,
ctx->instance_stack->append(ob);
rctx.gen->make_duplis(&rctx);
ctx->instance_stack->remove_last();
+ if (!ctx->dupli_gen_type_stack->is_empty()) {
+ ctx->dupli_gen_type_stack->remove_last();
+ }
}
}
}
@@ -388,6 +391,9 @@ static void make_child_duplis(const DupliContext *ctx,
ob->flag |= OB_DONE; /* Doesn't render. */
}
make_child_duplis_cb(&pctx, userdata, ob);
+ if (!ctx->dupli_gen_type_stack->is_empty()) {
+ ctx->dupli_gen_type_stack->remove_last();
+ }
}
}
}
@@ -413,6 +419,9 @@ static void make_child_duplis(const DupliContext *ctx,
}
make_child_duplis_cb(&pctx, userdata, ob);
+ if (!ctx->dupli_gen_type_stack->is_empty()) {
+ ctx->dupli_gen_type_stack->remove_last();
+ }
}
}
persistent_dupli_id++;