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-06-30 21:54:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-30 21:54:55 +0400
commitac7b39224798b16db04ec1325a01c77228fb9e34 (patch)
treec697c5b39e0aa44f080bf66766d50aab6eb1d0fd /release
parent39ca3146ff3b52677cbff4d4e58ca23c88e18628 (diff)
code cleanup: some vars were assigned when not needed
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/bpy_extras/view3d_utils.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/release/scripts/modules/bpy_extras/view3d_utils.py b/release/scripts/modules/bpy_extras/view3d_utils.py
index edc17c36c36..5608062c51b 100644
--- a/release/scripts/modules/bpy_extras/view3d_utils.py
+++ b/release/scripts/modules/bpy_extras/view3d_utils.py
@@ -77,9 +77,7 @@ def region_2d_to_location_3d(region, rv3d, coord, depth_location):
:rtype: :class:`mathutils.Vector`
"""
from mathutils import Vector
- from mathutils.geometry import intersect_point_line
- persmat = rv3d.perspective_matrix.copy()
viewinv = rv3d.view_matrix.inverted()
coord_vec = region_2d_to_vector_3d(region, rv3d, coord)
depth_location = Vector(depth_location)
@@ -96,10 +94,11 @@ def region_2d_to_location_3d(region, rv3d, coord, depth_location):
view_vec, 1,
)
else:
+ from mathutils.geometry import intersect_point_line
+ persmat = rv3d.perspective_matrix.copy()
dx = (2.0 * coord[0] / region.width) - 1.0
dy = (2.0 * coord[1] / region.height) - 1.0
persinv = persmat.inverted()
- viewinv = rv3d.view_matrix.inverted()
origin_start = ((persinv.col[0].xyz * dx) +
(persinv.col[1].xyz * dy) +
viewinv.translation)