Cleanup: Trailing whitespace

This commit is contained in:
2018-04-18 12:04:58 +02:00
parent 287d1924fa
commit 3811998177

View File

@@ -80,14 +80,14 @@ static bool isDisabled(ModifierData *md, int useRenderParams)
ParticleInstanceModifierData *pimd = (ParticleInstanceModifierData *)md;
ParticleSystem *psys;
ModifierData *ob_md;
if (!pimd->ob)
return true;
psys = BLI_findlink(&pimd->ob->particlesystem, pimd->psys - 1);
if (psys == NULL)
return true;
/* If the psys modifier is disabled we cannot use its data.
* First look up the psys modifier from the object, then check if it is enabled.
*/
@@ -96,18 +96,18 @@ static bool isDisabled(ModifierData *md, int useRenderParams)
ParticleSystemModifierData *psmd = (ParticleSystemModifierData *)ob_md;
if (psmd->psys == psys) {
int required_mode;
if (useRenderParams) required_mode = eModifierMode_Render;
else required_mode = eModifierMode_Realtime;
if (!modifier_isEnabled(md->scene, ob_md, required_mode))
return true;
break;
}
}
}
return false;
}
@@ -172,7 +172,7 @@ static int particle_skip(ParticleInstanceModifierData *pimd, ParticleSystem *psy
if (pa->alive == PARS_ALIVE && (pimd->flag & eParticleInstanceFlag_Alive) == 0) return 1;
if (pa->alive == PARS_DEAD && (pimd->flag & eParticleInstanceFlag_Dead) == 0) return 1;
}
return 0;
}
@@ -287,7 +287,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
for (p = 0, p_skip = 0; p < totpart; p++) {
float prev_dir[3];
float frame[4]; /* frame orientation quaternion */
/* skip particle? */
if (particle_skip(pimd, psys, p))
continue;
@@ -337,7 +337,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
if (k == 0) {
float hairmat[4][4];
float mat[3][3];
if (first_particle + p < psys->totpart)
pa = psys->particles + first_particle + p;
else {
@@ -348,7 +348,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
copy_m3_m4(mat, hairmat);
/* to quaternion */
mat3_to_quat(frame, mat);
/* note: direction is same as normal vector currently,
* but best to keep this separate so the frame can be
* rotated later if necessary
@@ -357,14 +357,14 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
else {
float rot[4];
/* incrementally rotate along bend direction */
rotation_between_vecs_to_quat(rot, prev_dir, state.vel);
mul_qt_qtqt(frame, rot, frame);
copy_v3_v3(prev_dir, state.vel);
}
copy_qt_qt(state.rot, frame);
#if 0
/* Absolute Frame (Frenet Frame) */
@@ -375,9 +375,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
float cross[3];
float temp[3] = {0.0f, 0.0f, 0.0f};
temp[axis] = 1.0f;
cross_v3_v3v3(cross, temp, state.vel);
/* state.vel[axis] is the only component surviving from a dot product with the axis */
axis_angle_to_quat(state.rot, cross, saacos(state.vel[axis]));
}