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>2011-07-31 07:15:37 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-07-31 07:15:37 +0400
commitf4293067c1420827ddfa62e62430870c6b790a8a (patch)
tree6ad74d1ea760e4450dd27236a0f7ed3987d4283b /release/scripts/modules/bpy_extras/view3d_utils.py
parent670f58023c478995ed055e194482ab288db436a7 (diff)
py api: sphinx doc corrections, pep8 cleanup and style edits, also added __all__ to some modules which were missing it.
Diffstat (limited to 'release/scripts/modules/bpy_extras/view3d_utils.py')
-rw-r--r--release/scripts/modules/bpy_extras/view3d_utils.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/release/scripts/modules/bpy_extras/view3d_utils.py b/release/scripts/modules/bpy_extras/view3d_utils.py
index 5796abce72c..26325633a05 100644
--- a/release/scripts/modules/bpy_extras/view3d_utils.py
+++ b/release/scripts/modules/bpy_extras/view3d_utils.py
@@ -16,13 +16,13 @@
#
# ##### END GPL LICENSE BLOCK #####
-# <pep8 compliant>
+# <pep8-80 compliant>
__all__ = (
"region_2d_to_vector_3d",
"region_2d_to_location_3d",
"location_3d_to_region_2d",
-)
+ )
def region_2d_to_vector_3d(region, rv3d, coord):
@@ -90,15 +90,23 @@ def region_2d_to_location_3d(region, rv3d, coord, depth_location):
origin_start = rv3d.view_matrix.inverted()[3].to_3d()
origin_end = origin_start + coord_vec
view_vec = rv3d.view_matrix.inverted()[2]
- return intersect_line_plane(origin_start, origin_end, depth_location, view_vec, 1)
+ return intersect_line_plane(origin_start,
+ origin_end,
+ depth_location,
+ view_vec, 1,
+ )
else:
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[0].xyz * dx) + (persinv[1].xyz * dy) + viewinv[3].xyz
+ origin_start = ((persinv[0].xyz * dx) +
+ (persinv[1].xyz * dy) + viewinv[3].xyz)
origin_end = origin_start + coord_vec
- return intersect_point_line(depth_location, origin_start, origin_end)[0]
+ return intersect_point_line(depth_location,
+ origin_start,
+ origin_end,
+ )[0]
def location_3d_to_region_2d(region, rv3d, coord):