From ad5579ec92796d31d06f2d5287f2356efadb1788 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 7 May 2008 16:31:49 +0000 Subject: [PATCH] Fix for bug #9676: added warning that particles on multires are not supported on anything else than the first level. --- source/blender/blenkernel/intern/modifier.c | 9 +++++++++ source/blender/blenkernel/intern/particle.c | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index ca95d9edc06..2a8ba878c41 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -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; diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 1eb47fa3da0..2aa0d0ad0b8 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -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))