Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-04-18 13:04:58 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-04-18 13:31:26 +0300
commit3811998177a81b96e4759a030403e75378ca7130 (patch)
treeaad3dc8c550cbf76522f83bbf69b2d691779b4c1 /source/blender/modifiers/intern/MOD_particleinstance.c
parent287d1924fa149f0b52c75c387eac9d6621bb79bd (diff)
Cleanup: Trailing whitespace
Diffstat (limited to 'source/blender/modifiers/intern/MOD_particleinstance.c')
-rw-r--r--source/blender/modifiers/intern/MOD_particleinstance.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c
index 82c6b82d492..1b472a9abc8 100644
--- a/source/blender/modifiers/intern/MOD_particleinstance.c
+++ b/source/blender/modifiers/intern/MOD_particleinstance.c
@@ -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]));
}