Revert "Fix T43471, based on patch submitted by @sean_loh."
This reverts commit b2b54b0902
.
The patch breaks particle distribution even in simple cases, not worth
doing this for keeping a hackish loophole open.
This commit is contained in:
@@ -403,7 +403,7 @@ float psys_get_dietime_from_cache(struct PointCache *cache, int index);
|
|||||||
void psys_free_pdd(struct ParticleSystem *psys);
|
void psys_free_pdd(struct ParticleSystem *psys);
|
||||||
|
|
||||||
float *psys_cache_vgroup(struct DerivedMesh *dm, struct ParticleSystem *psys, int vgroup);
|
float *psys_cache_vgroup(struct DerivedMesh *dm, struct ParticleSystem *psys, int vgroup);
|
||||||
bool psys_get_texture(struct ParticleSimulationData *sim, struct ParticleData *pa, struct ParticleTexture *ptex, int event, float cfra);
|
void psys_get_texture(struct ParticleSimulationData *sim, struct ParticleData *pa, struct ParticleTexture *ptex, int event, float cfra);
|
||||||
void psys_interpolate_face(struct MVert *mvert, struct MFace *mface, struct MTFace *tface,
|
void psys_interpolate_face(struct MVert *mvert, struct MFace *mface, struct MTFace *tface,
|
||||||
float (*orcodata)[3], float w[4], float vec[3], float nor[3], float utan[3], float vtan[3],
|
float (*orcodata)[3], float w[4], float vec[3], float nor[3], float utan[3], float vtan[3],
|
||||||
float orco[3], float ornor[3]);
|
float orco[3], float ornor[3]);
|
||||||
|
@@ -3429,7 +3429,7 @@ static void get_cpa_texture(DerivedMesh *dm, ParticleSystem *psys, ParticleSetti
|
|||||||
CLAMP_PARTICLE_TEXTURE_POS(PAMAP_ROUGH, ptex->rough1);
|
CLAMP_PARTICLE_TEXTURE_POS(PAMAP_ROUGH, ptex->rough1);
|
||||||
CLAMP_PARTICLE_TEXTURE_POS(PAMAP_DENS, ptex->exist);
|
CLAMP_PARTICLE_TEXTURE_POS(PAMAP_DENS, ptex->exist);
|
||||||
}
|
}
|
||||||
bool psys_get_texture(ParticleSimulationData *sim, ParticleData *pa, ParticleTexture *ptex, int event, float cfra)
|
void psys_get_texture(ParticleSimulationData *sim, ParticleData *pa, ParticleTexture *ptex, int event, float cfra)
|
||||||
{
|
{
|
||||||
Object *ob = sim->ob;
|
Object *ob = sim->ob;
|
||||||
Mesh *me = (Mesh *)ob->data;
|
Mesh *me = (Mesh *)ob->data;
|
||||||
@@ -3439,7 +3439,6 @@ bool psys_get_texture(ParticleSimulationData *sim, ParticleData *pa, ParticleTex
|
|||||||
int m;
|
int m;
|
||||||
float value, rgba[4], co[3], texvec[3];
|
float value, rgba[4], co[3], texvec[3];
|
||||||
int setvars = 0;
|
int setvars = 0;
|
||||||
bool has_texture = false;
|
|
||||||
|
|
||||||
/* initialize ptex */
|
/* initialize ptex */
|
||||||
ptex->ivel = ptex->life = ptex->exist = ptex->size = ptex->damp =
|
ptex->ivel = ptex->life = ptex->exist = ptex->size = ptex->damp =
|
||||||
@@ -3515,8 +3514,6 @@ bool psys_get_texture(ParticleSimulationData *sim, ParticleData *pa, ParticleTex
|
|||||||
SET_PARTICLE_TEXTURE(PAMAP_GRAVITY, ptex->gravity, mtex->gravityfac);
|
SET_PARTICLE_TEXTURE(PAMAP_GRAVITY, ptex->gravity, mtex->gravityfac);
|
||||||
SET_PARTICLE_TEXTURE(PAMAP_DAMP, ptex->damp, mtex->dampfac);
|
SET_PARTICLE_TEXTURE(PAMAP_DAMP, ptex->damp, mtex->dampfac);
|
||||||
SET_PARTICLE_TEXTURE(PAMAP_LENGTH, ptex->length, mtex->lengthfac);
|
SET_PARTICLE_TEXTURE(PAMAP_LENGTH, ptex->length, mtex->lengthfac);
|
||||||
|
|
||||||
has_texture = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3529,8 +3526,6 @@ bool psys_get_texture(ParticleSimulationData *sim, ParticleData *pa, ParticleTex
|
|||||||
CLAMP_PARTICLE_TEXTURE_POSNEG(PAMAP_GRAVITY, ptex->gravity);
|
CLAMP_PARTICLE_TEXTURE_POSNEG(PAMAP_GRAVITY, ptex->gravity);
|
||||||
CLAMP_PARTICLE_TEXTURE_POS(PAMAP_DAMP, ptex->damp);
|
CLAMP_PARTICLE_TEXTURE_POS(PAMAP_DAMP, ptex->damp);
|
||||||
CLAMP_PARTICLE_TEXTURE_POS(PAMAP_LENGTH, ptex->length);
|
CLAMP_PARTICLE_TEXTURE_POS(PAMAP_LENGTH, ptex->length);
|
||||||
|
|
||||||
return has_texture;
|
|
||||||
}
|
}
|
||||||
/************************************************/
|
/************************************************/
|
||||||
/* Particle State */
|
/* Particle State */
|
||||||
|
@@ -521,25 +521,22 @@ static void initialize_particle_texture(ParticleSimulationData *sim, ParticleDat
|
|||||||
ParticleSystem *psys = sim->psys;
|
ParticleSystem *psys = sim->psys;
|
||||||
ParticleSettings *part = psys->part;
|
ParticleSettings *part = psys->part;
|
||||||
ParticleTexture ptex;
|
ParticleTexture ptex;
|
||||||
bool has_texture = false;
|
|
||||||
|
|
||||||
has_texture = psys_get_texture(sim, pa, &ptex, PAMAP_INIT, 0.f);
|
psys_get_texture(sim, pa, &ptex, PAMAP_INIT, 0.f);
|
||||||
|
|
||||||
if (has_texture) {
|
switch (part->type) {
|
||||||
switch (part->type) {
|
case PART_EMITTER:
|
||||||
case PART_EMITTER:
|
if (ptex.exist < psys_frand(psys, p+125))
|
||||||
if (ptex.exist < psys_frand(psys, p+125))
|
pa->flag |= PARS_UNEXIST;
|
||||||
pa->flag |= PARS_UNEXIST;
|
pa->time = part->sta + (part->end - part->sta)*ptex.time;
|
||||||
pa->time = part->sta + (part->end - part->sta)*ptex.time;
|
break;
|
||||||
break;
|
case PART_HAIR:
|
||||||
case PART_HAIR:
|
if (ptex.exist < psys_frand(psys, p+125))
|
||||||
if (ptex.exist < psys_frand(psys, p+125))
|
pa->flag |= PARS_UNEXIST;
|
||||||
pa->flag |= PARS_UNEXIST;
|
pa->time = 0.f;
|
||||||
pa->time = 0.f;
|
break;
|
||||||
break;
|
case PART_FLUID:
|
||||||
case PART_FLUID:
|
break;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -972,7 +969,6 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
|
|||||||
ParticleSettings *part;
|
ParticleSettings *part;
|
||||||
ParticleTexture ptex;
|
ParticleTexture ptex;
|
||||||
int p = pa - psys->particles;
|
int p = pa - psys->particles;
|
||||||
|
|
||||||
part=psys->part;
|
part=psys->part;
|
||||||
|
|
||||||
/* get precise emitter matrix if particle is born */
|
/* get precise emitter matrix if particle is born */
|
||||||
|
Reference in New Issue
Block a user