BGE: removed support for time dependent modifiers, they don't make sense in the GE...
authorBenoit Bolsee <benoit.bolsee@online.be>
Fri, 24 Apr 2009 19:49:15 +0000 (19:49 +0000)
committerBenoit Bolsee <benoit.bolsee@online.be>
Fri, 24 Apr 2009 19:49:15 +0000 (19:49 +0000)
source/blender/blenkernel/intern/DerivedMesh.c
source/gameengine/Converter/BL_ModifierDeformer.cpp

index eb2975be0c0aecfe4f7e0faeab5df1d1c0eb9009..6cf934fa16598f1dbd8acc0c642db26252b803d9 100644 (file)
@@ -2158,6 +2158,7 @@ static void mesh_calc_modifiers(Object *ob, float (*inputVertexCos)[3],
 
                        if((md->mode & required_mode) != required_mode) continue;
                        if(mti->isDisabled && mti->isDisabled(md)) continue;
+                       if(useDeform < 0 && mti->dependsOnTime && mti->dependsOnTime(md)) continue;
 
                        if(mti->type == eModifierTypeType_OnlyDeform) {
                                if(!deformedVerts)
@@ -2228,6 +2229,7 @@ static void mesh_calc_modifiers(Object *ob, float (*inputVertexCos)[3],
                }
                if(mti->isDisabled && mti->isDisabled(md)) continue;
                if(needMapping && !modifier_supportsMapping(md)) continue;
+               if(useDeform < 0 && mti->dependsOnTime && mti->dependsOnTime(md)) continue;
 
                /* add an orco layer if needed by this modifier */
                if(dm && mti->requiredDataMask) {
index 09dbe966d0bf561134e342ca1a025ef2e0cc0cc9..c3131559a6ff99be9271b0071a5ca8b4b5043600 100644 (file)
@@ -97,10 +97,16 @@ bool BL_ModifierDeformer::HasCompatibleDeformer(Object *ob)
 {
        if (!ob->modifiers.first)
                return false;
+       // soft body cannot use mesh modifiers
+       if ((ob->gameflag & OB_SOFT_BODY) != 0)
+               return false;
        ModifierData* md;
        for (md = (ModifierData*)ob->modifiers.first; md; md = (ModifierData*)md->next) {
-               if (md->mode & eModifierMode_Realtime)
-                       return true;
+               if (modifier_dependsOnTime(md))
+                       continue;
+               if (!(md->mode & eModifierMode_Realtime))
+                       continue;
+               return true;
        }
        return false;
 }