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
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/transform/transform_constraints.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index 0012334cf92..e5e31a8e319 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -243,7 +243,13 @@ static void axisProjection(TransInfo *t, float axis[3], float in[3], float out[3
sub_v3_v3v3(v, i2, v);
- sub_v3_v3v3(out, i1, t->con.center);
+ sub_v3_v3v3(out, i1, t->con.center);
+
+ /* possible some values become nan when
+ * viewpoint and object are both zero */
+ if(!finite(out[0])) out[0]= 0.0f;
+ if(!finite(out[1])) out[1]= 0.0f;
+ if(!finite(out[2])) out[2]= 0.0f;
}
}
}