Particles' angular velocity mode "velocity" was actually just a duplicate of "spin" without any angular velocity, so it was removed.

This commit is contained in:
Janne Karhu 2008-02-13 21:06:37 +00:00
parent b58274abef
commit b4f975b91a
3 changed files with 3 additions and 5 deletions

@ -2875,7 +2875,7 @@ static void rotate_particle(ParticleSettings *part, ParticleData *pa, float dfra
float rotfac, rot1[4], rot2[4]={1.0,0.0,0.0,0.0}, dtime=dfra*timestep;
if((part->flag & PART_ROT_DYN)==0){
if(ELEM(part->avemode,PART_AVE_SPIN,PART_AVE_VEL)){
if(part->avemode==PART_AVE_SPIN){
float angle;
float len1 = VecLength(pa->state.vel);
float len2 = VecLength(state->vel);
@ -2888,10 +2888,9 @@ static void rotate_particle(ParticleSettings *part, ParticleData *pa, float dfra
angle=Inpf(pa->state.vel,state->vel)/(len1*len2);
VecMulf(state->ave,saacos(angle)/dtime);
}
}
if(part->avemode == PART_AVE_SPIN)
VecRotToQuat(state->vel,dtime*part->avefac,rot2);
}
}
rotfac=VecLength(state->ave);

@ -365,7 +365,6 @@ typedef struct ParticleSystem{
/* part->avemode */
#define PART_AVE_SPIN 1
#define PART_AVE_RAND 2
#define PART_AVE_VEL 3
/* part->reactevent */
#define PART_EVENT_DEATH 0

@ -4513,7 +4513,7 @@ static void object_panel_particle_physics(Object *ob)
uiDefButF(block, NUM, B_PART_RECALC, "Rand:", butx+butw/2,buty,butw/2,buth*4/5, &part->randphasefac, 0.0, 1.0, 1, 3, "Randomize rotation phase");
uiBlockSetCol(block, TH_AUTO);
uiDefButS(block, MENU, B_PART_RECALC, "Angular v %t|Velocity%x3|Random%x2|Spin%x1|None%x0", butx,(buty-=buth*4/5),butw,buth*4/5, &part->avemode, 14.0, 0.0, 0, 0, "Select particle angular velocity mode");
uiDefButS(block, MENU, B_PART_RECALC, "Angular v %t|Random%x2|Spin%x1|None%x0", butx,(buty-=buth*4/5),butw,buth*4/5, &part->avemode, 14.0, 0.0, 0, 0, "Select particle angular velocity mode");
uiBlockSetCol(block, TH_BUT_SETTING2);
if(ELEM(part->avemode,PART_AVE_RAND,PART_AVE_SPIN))
uiDefButF(block, NUM, B_PART_RECALC, "Angular v:", butx,(buty-=buth*4/5),butw,buth*4/5, &part->avefac, -200.0, 200.0, 1, 3, "Angular velocity amount");