Fix: Failing instance visibility test after recent commit

The "visibility_instances.blend" cycles test was failing..
The stack of dupli generator types added in e508de0417
wasn't "popped" correctly after recursive duplis were generated.
This commit is contained in:
Hans Goudey 2022-11-11 12:31:50 -06:00
parent ba2072524b
commit 864af51d6a
Notes: blender-bot 2023-02-14 08:58:01 +01:00
Referenced by commit 0e6d893d07, Fix: Assert, invisible instances with mixed instancing types
1 changed files with 9 additions and 0 deletions

View File

@ -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++;