workaround [#32866] Crash by cyclic use of Boolean Modifier
authorCampbell Barton <ideasman42@gmail.com>
Wed, 23 Jan 2013 05:42:45 +0000 (05:42 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 23 Jan 2013 05:42:45 +0000 (05:42 +0000)
officially - modifiers shouldn't calc other objects derived mesh, but in some cases its needed at the moment for certain scenes, so just disallow booleans depending on booleans.

source/blender/modifiers/intern/MOD_boolean.c

index 0a48003fc81ce2f0f13d6833c4d36f838cab6af2..a97ca2f924316cffcf01f5db48556e9000bf10f9 100644 (file)
@@ -135,7 +135,13 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
         * in some cases the depsgraph fails us - especially for objects
         * in other scenes when compositing */
        if (bmd->object != ob) {
-               dm = mesh_get_derived_final(md->scene, bmd->object, CD_MASK_MESH);
+               /* weak! - but we can too easy end up with circular dep crash otherwise */
+               if (modifiers_findByType(bmd->object, eModifierType_Boolean) == false) {
+                       dm = mesh_get_derived_final(md->scene, bmd->object, CD_MASK_MESH);
+               }
+               else {
+                       dm = bmd->object->derivedFinal;
+               }
        }
        else {
                dm = NULL;