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:
authorDalai Felinto <dfelinto@gmail.com>2015-08-25 19:29:54 +0300
committerDalai Felinto <dfelinto@gmail.com>2015-08-25 19:31:04 +0300
commit9e188fdd53e5bdc2efe82ed8cfc545f5705b92e1 (patch)
tree6019611fe5bf7b64c15a0185abab598b8276d24c /source/blender/editors/space_view3d/view3d_walk.c
parentad0c2d6cbb99aa70ae30b072ac6724a151debe85 (diff)
Fix walk navigation: scene unit used even when unit not set
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_walk.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_walk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c
index e2bb3660332..e2fbbf58a5c 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;