Fix for bug #9676: added warning that particles on multires are

not supported on anything else than the first level.
This commit is contained in:
Brecht Van Lommel 2008-05-07 16:31:49 +00:00
parent bda4e3d19f
commit ad5579ec92
2 changed files with 16 additions and 0 deletions

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

@ -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))