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>2019-09-07 14:08:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-09-07 14:28:05 +0300
commit1b0dd5a2150c2207768ba74c1a25b842f3d4ece1 (patch)
tree8ab9418bf8e110942258a0135fbd39e1bf8103bb /release
parented779333bb82a483c3f7833b959610c08f0bacb7 (diff)
Cleanup: style, spelling
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/bpy_extras/view3d_utils.py44
-rw-r--r--release/scripts/startup/bl_operators/add_mesh_torus.py10
-rw-r--r--release/scripts/startup/bl_ui/space_topbar.py2
3 files changed, 32 insertions, 24 deletions
diff --git a/release/scripts/modules/bpy_extras/view3d_utils.py b/release/scripts/modules/bpy_extras/view3d_utils.py
index a2e394b270f..9e4958802f1 100644
--- a/release/scripts/modules/bpy_extras/view3d_utils.py
+++ b/release/scripts/modules/bpy_extras/view3d_utils.py
@@ -47,10 +47,11 @@ def region_2d_to_vector_3d(region, rv3d, coord):
if rv3d.is_perspective:
persinv = rv3d.perspective_matrix.inverted()
- out = Vector(((2.0 * coord[0] / region.width) - 1.0,
- (2.0 * coord[1] / region.height) - 1.0,
- -0.5
- ))
+ out = Vector((
+ (2.0 * coord[0] / region.width) - 1.0,
+ (2.0 * coord[1] / region.height) - 1.0,
+ -0.5
+ ))
w = out.dot(persinv[3].xyz) + persinv[3][3]
@@ -99,9 +100,11 @@ def region_2d_to_origin_3d(region, rv3d, coord, clamp=None):
dx = (2.0 * coord[0] / region.width) - 1.0
dy = (2.0 * coord[1] / region.height) - 1.0
persinv = persmat.inverted()
- origin_start = ((persinv.col[0].xyz * dx) +
- (persinv.col[1].xyz * dy) +
- persinv.translation)
+ origin_start = (
+ (persinv.col[0].xyz * dx) +
+ (persinv.col[1].xyz * dy) +
+ persinv.translation
+ )
if clamp != 0.0:
if rv3d.view_perspective != 'CAMERA':
@@ -149,17 +152,19 @@ def region_2d_to_location_3d(region, rv3d, coord, depth_location):
from mathutils.geometry import intersect_line_plane
viewinv = rv3d.view_matrix.inverted()
view_vec = viewinv.col[2].copy()
- 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:
from mathutils.geometry import intersect_point_line
- 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, default=None):
@@ -184,8 +189,9 @@ def location_3d_to_region_2d(region, rv3d, coord, default=None):
width_half = region.width / 2.0
height_half = region.height / 2.0
- return Vector((width_half + width_half * (prj.x / prj.w),
- height_half + height_half * (prj.y / prj.w),
- ))
+ return Vector((
+ width_half + width_half * (prj.x / prj.w),
+ height_half + height_half * (prj.y / prj.w),
+ ))
else:
return default
diff --git a/release/scripts/startup/bl_operators/add_mesh_torus.py b/release/scripts/startup/bl_operators/add_mesh_torus.py
index bd727ec3e83..316ad152a32 100644
--- a/release/scripts/startup/bl_operators/add_mesh_torus.py
+++ b/release/scripts/startup/bl_operators/add_mesh_torus.py
@@ -252,10 +252,12 @@ class AddTorus(Operator, object_utils.AddObjectHelper):
self.major_radius = self.abso_minor_rad + extra_helper
self.minor_radius = extra_helper
- verts_loc, faces = add_torus(self.major_radius,
- self.minor_radius,
- self.major_segments,
- self.minor_segments)
+ verts_loc, faces = add_torus(
+ self.major_radius,
+ self.minor_radius,
+ self.major_segments,
+ self.minor_segments,
+ )
mesh = bpy.data.meshes.new(data_("Torus"))
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index f66a363e6ca..0374a563532 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -563,7 +563,7 @@ class TOPBAR_MT_help(Menu):
show_developer = context.preferences.view.show_developer_ui
- layout.operator("wm.url_open_preset", text="Manual", icon='HELP',).type = 'MANUAL'
+ layout.operator("wm.url_open_preset", text="Manual", icon='HELP').type = 'MANUAL'
layout.operator(
"wm.url_open", text="Tutorials", icon='URL',