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:
authorCampbell Barton <ideasman42@gmail.com>2012-07-17 16:05:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-17 16:05:15 +0400
commit6f0950a1f4abd884234c4e5f980e21ef3915eaff (patch)
treed3b938d284332760ed6f80363a711c21dc81e8a1 /source/blender/modifiers/intern
parente35d3083ecce72ad01fa63977355beb0c7a5ff68 (diff)
use math vector init functions
Diffstat (limited to 'source/blender/modifiers/intern')
-rw-r--r--source/blender/modifiers/intern/MOD_particleinstance.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c
index 74026efecc5..c034832bfb4 100644
--- a/source/blender/modifiers/intern/MOD_particleinstance.c
+++ b/source/blender/modifiers/intern/MOD_particleinstance.c
@@ -238,8 +238,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
/* TODO: incremental rotations somehow */
if (state.vel[axis] < -0.9999f || state.vel[axis] > 0.9999f) {
- state.rot[0] = 1;
- state.rot[1] = state.rot[2] = state.rot[3] = 0.0f;
+ unit_qt(state.rot);
}
else {
float temp[3] = {0.0f, 0.0f, 0.0f};
@@ -250,7 +249,6 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
/* 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]));
}
-
}
else {
state.time = -1.0;