[Bf-blender-cvs] [9e188fd] master: Fix walk navigation: scene unit used even when unit not set
Dalai Felinto
noreply at git.blender.org
Tue Aug 25 18:31:44 CEST 2015
Commit: 9e188fdd53e5bdc2efe82ed8cfc545f5705b92e1
Author: Dalai Felinto
Date: Tue Aug 25 13:29:54 2015 -0300
Branches: master
https://developer.blender.org/rB9e188fdd53e5bdc2efe82ed8cfc545f5705b92e1
Fix walk navigation: scene unit used even when unit not set
===================================================================
M source/blender/editors/space_view3d/view3d_walk.c
===================================================================
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c
index e2bb366..e2fbbf5 100644
--- a/source/blender/editors/space_view3d/view3d_walk.c
+++ b/source/blender/editors/space_view3d/view3d_walk.c
@@ -519,7 +519,7 @@ static bool initWalkInfo(bContext *C, WalkInfo *walk, wmOperator *op)
walk->speed = 0.0f;
walk->is_fast = false;
walk->is_slow = false;
- walk->grid = 1.f / walk->scene->unit.scale_length;
+ walk->grid = (walk->scene->unit.system == USER_UNIT_NONE) ? 1.f : 1.f / walk->scene->unit.scale_length;
/* user preference settings */
walk->teleport.duration = U.walk_navigation.teleport_time;
More information about the Bf-blender-cvs
mailing list