Fix for bug #9676: added warning that particles on multires are
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 7 May 2008 16:31:49 +0000 (16:31 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 7 May 2008 16:31:49 +0000 (16:31 +0000)
not supported on anything else than the first level.

source/blender/blenkernel/intern/modifier.c
source/blender/blenkernel/intern/particle.c

index ca95d9edc0695d89dd0d020bc4f7f1201ee3a221..2a8ba878c4170dae69a8b28a860740348e05a340 100644 (file)
@@ -5515,6 +5515,7 @@ static void particleSystemModifier_deformVerts(
        DerivedMesh *dm = derivedData;
        ParticleSystemModifierData *psmd= (ParticleSystemModifierData*) md;
        ParticleSystem * psys=0;
+       Mesh *me;
        int needsFree=0;
 
        if(ob->particlesystem.first)
@@ -5522,6 +5523,14 @@ static void particleSystemModifier_deformVerts(
        else
                return;
        
+       /* multires check */
+       if(ob->type == OB_MESH) {
+               me= (Mesh*)ob->data;
+               if(me->mr && me->mr->current != 1)
+                       modifier_setError(md,
+                               "Particles only supported on first multires level.");
+       }
+
        if(!psys_check_enabled(ob, psys))
                return;
 
index 1eb47fa3da058975c9c74776db5543fabfaf19b5..2aa0d0ad0b89df7fd038ff823727541069fd8cda 100644 (file)
@@ -250,10 +250,17 @@ int psys_in_edit_mode(ParticleSystem *psys)
 int psys_check_enabled(Object *ob, ParticleSystem *psys)
 {
        ParticleSystemModifierData *psmd;
+       Mesh *me;
 
        if(psys->flag & PSYS_DISABLED)
                return 0;
 
+       if(ob->type == OB_MESH) {
+               me= (Mesh*)ob->data;
+               if(me->mr && me->mr->current != 1)
+                       return 0;
+       }
+
        psmd= psys_get_modifier(ob, psys);
        if(psys->renderdata) {
                if(!(psmd->modifier.mode & eModifierMode_Render))