[Bf-blender-cvs] [864af51d6a8] blender-v3.4-release: Fix: Failing instance visibility test after recent commit

Hans Goudey noreply at git.blender.org
Fri Nov 11 19:33:32 CET 2022


Commit: 864af51d6a88e1408367ab7083825b3b40b75e24
Author: Hans Goudey
Date:   Fri Nov 11 12:31:50 2022 -0600
Branches: blender-v3.4-release
https://developer.blender.org/rB864af51d6a88e1408367ab7083825b3b40b75e24

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.

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

M	source/blender/blenkernel/intern/object_dupli.cc

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

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



More information about the Bf-blender-cvs mailing list