Fix for bug #7872: setting particles disp to 100 has no effect.
Fix for bug #7878: particle panels do not update properly when chaning particle types.
This commit is contained in:
@@ -92,6 +92,7 @@ void mainqenter (unsigned short event, short val);
|
|||||||
void waitcursor(int);
|
void waitcursor(int);
|
||||||
void allqueue(unsigned short event, short val);
|
void allqueue(unsigned short event, short val);
|
||||||
#define REDRAWVIEW3D 0x4010
|
#define REDRAWVIEW3D 0x4010
|
||||||
|
#define REDRAWBUTSOBJECT 0x4018
|
||||||
#define REDRAWBUTSEDIT 0x4019
|
#define REDRAWBUTSEDIT 0x4019
|
||||||
struct Material;
|
struct Material;
|
||||||
extern struct Material defmaterial;
|
extern struct Material defmaterial;
|
||||||
|
|||||||
@@ -2290,7 +2290,7 @@ void psys_mat_hair_to_orco(Object *ob, DerivedMesh *dm, short from, ParticleData
|
|||||||
psys_particle_on_dm(ob, dm, from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, vec, 0, 0, 0, orco, 0);
|
psys_particle_on_dm(ob, dm, from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, vec, 0, 0, 0, orco, 0);
|
||||||
|
|
||||||
/* see psys_face_mat for why this function is called */
|
/* see psys_face_mat for why this function is called */
|
||||||
transform_mesh_orco_verts(ob->data, orco, 1, 1);
|
transform_mesh_orco_verts(ob->data, &orco, 1, 1);
|
||||||
VECCOPY(hairmat[3],orco);
|
VECCOPY(hairmat[3],orco);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4377,6 +4377,10 @@ static void system_step(Object *ob, ParticleSystem *psys, ParticleSystemModifier
|
|||||||
|
|
||||||
psys->recalc &= ~PSYS_TYPE;
|
psys->recalc &= ~PSYS_TYPE;
|
||||||
alloc = 1;
|
alloc = 1;
|
||||||
|
|
||||||
|
/* this is a bad level call, but currently type change
|
||||||
|
* can happen after redraw, so force redraw from here */
|
||||||
|
allqueue(REDRAWBUTSOBJECT, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
oldtotpart = psys->totpart;
|
oldtotpart = psys->totpart;
|
||||||
@@ -4428,7 +4432,7 @@ static void system_step(Object *ob, ParticleSystem *psys, ParticleSystemModifier
|
|||||||
/* set particles to be not calculated */
|
/* set particles to be not calculated */
|
||||||
disp= (float)get_current_display_percentage(psys)/50.0f-1.0f;
|
disp= (float)get_current_display_percentage(psys)/50.0f-1.0f;
|
||||||
|
|
||||||
if(disp<1.0f) for(p=0, pa=psys->particles; p<totpart; p++,pa++){
|
for(p=0, pa=psys->particles; p<totpart; p++,pa++){
|
||||||
if(pa->r_rot[0] > disp)
|
if(pa->r_rot[0] > disp)
|
||||||
pa->flag |= PARS_NO_DISP;
|
pa->flag |= PARS_NO_DISP;
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user