[Bf-extensions-cvs] [39b7287] master: Cleanup: pep8
Campbell Barton
noreply at git.blender.org
Tue Jul 26 07:15:38 CEST 2016
Commit: 39b728740c67f5b60d143b5cc84f23429e8fc3d1
Author: Campbell Barton
Date: Tue Jul 26 14:58:22 2016 +1000
Branches: master
https://developer.blender.org/rBAC39b728740c67f5b60d143b5cc84f23429e8fc3d1
Cleanup: pep8
Also remove filenames
===================================================================
M measureit/__init__.py
M measureit/measureit_geometry.py
M measureit/measureit_main.py
M measureit/measureit_render.py
===================================================================
diff --git a/measureit/__init__.py b/measureit/__init__.py
index 458f057..56b2e4c 100644
--- a/measureit/__init__.py
+++ b/measureit/__init__.py
@@ -1,31 +1,29 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
+# ##### BEGIN GPL LICENSE BLOCK #####
#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
+# ##### END GPL LICENSE BLOCK #####
-# PEP8 compliant (https://www.python.org/dev/peps/pep-0008)
+# <pep8 compliant>
# ----------------------------------------------------------
-# File: __init__.py
# Author: Antonio Vazquez (antonioya)
# ----------------------------------------------------------
# ----------------------------------------------
-# Define Addon info
+# Define Addon info
# ----------------------------------------------
bl_info = {
"name": "MeasureIt",
diff --git a/measureit/measureit_geometry.py b/measureit/measureit_geometry.py
index 96eb367..c8c6170 100644
--- a/measureit/measureit_geometry.py
+++ b/measureit/measureit_geometry.py
@@ -1,26 +1,24 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
+# ##### BEGIN GPL LICENSE BLOCK #####
#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
+# ##### END GPL LICENSE BLOCK #####
-# PEP8 compliant (https://www.python.org/dev/peps/pep-0008)
+# <pep8 compliant>
# ----------------------------------------------------------
-# File: measureit_geometry.py
# support routines for OpenGL
# Author: Antonio Vazquez (antonioya)
#
@@ -375,7 +373,7 @@ def draw_segments(context, myobj, op, region, rv3d):
if ms.glocz is True:
txt += "Z"
txt += "]"
- draw_text(myobj, txtpoint2d[0], txtpoint2d[1], txt, rgb, fsize-1)
+ draw_text(myobj, txtpoint2d[0], txtpoint2d[1], txt, rgb, fsize - 1)
except:
pass
@@ -519,8 +517,8 @@ def draw_segments(context, myobj, op, region, rv3d):
draw_arrow(screen_point_ap1, screen_point_bp1, a_size, a_type, b_type)
else:
vne = mathutils.Vector((b_p1[0] - a_p1[0],
- b_p1[1] - a_p1[1],
- b_p1[2] - a_p1[2]))
+ b_p1[1] - a_p1[1],
+ b_p1[2] - a_p1[2]))
vne.normalize()
vie = vne * ms.glspace
pe = (b_p1[0] + vie[0], b_p1[1] + vie[1], b_p1[2] + vie[2])
@@ -786,7 +784,7 @@ def get_group_sum(myobj, tag):
else:
return " "
except:
- return " "
+ return " "
# -------------------------------------------------------------
@@ -875,10 +873,10 @@ def draw_triangle(v1, v2, v3):
# -------------------------------------------------------------
# Draw an Arrow
-#
+#
# -------------------------------------------------------------
def draw_arrow(v1, v2, size=20, a_typ="1", b_typ="1"):
-
+
rad45 = math.radians(45)
rad315 = math.radians(315)
rad90 = math.radians(90)
diff --git a/measureit/measureit_main.py b/measureit/measureit_main.py
index 059a5b8..34a0cc9 100644
--- a/measureit/measureit_main.py
+++ b/measureit/measureit_main.py
@@ -1,23 +1,22 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
+# ##### BEGIN GPL LICENSE BLOCK #####
#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
+# ##### END GPL LICENSE BLOCK #####
-# PEP8 compliant (https://www.python.org/dev/peps/pep-0008)
+# <pep8 compliant>
# ----------------------------------------------------------
# File: measureit_main.py
@@ -404,7 +403,7 @@ class MeasureitEditPanel(bpy.types.Panel):
for idx in range(0, mp.measureit_num):
ms = mp.measureit_segments[idx]
if (ms.gltype == 1 or ms.gltype == 12
- or ms.gltype == 13 or ms.gltype == 14) and ms.gltot != '99' \
+ or ms.gltype == 13 or ms.gltype == 14) and ms.gltot != '99' \
and ms.glfree is False: # only segments
if ms.glpointa <= len(obverts) and ms.glpointb <= len(obverts):
p1 = get_point(obverts[ms.glpointa].co, myobj)
@@ -532,11 +531,11 @@ def add_item(box, idx, segment):
row.prop(segment, 'glocwarning', text="Warning")
# ortogonal (only segments)
if segment.gltype == 1:
- if segment.glorto != "99":
- row = box.row(True)
- row.prop(segment, 'glorto_x', text="X", toggle=True)
- row.prop(segment, 'glorto_y', text="Y", toggle=True)
- row.prop(segment, 'glorto_z', text="Z", toggle=True)
+ if segment.glorto != "99":
+ row = box.row(True)
+ row.prop(segment, 'glorto_x', text="X", toggle=True)
+ row.prop(segment, 'glorto_y', text="Y", toggle=True)
+ row.prop(segment, 'glorto_z', text="Z", toggle=True)
# Arc special
if segment.gltype == 11:
diff --git a/measureit/measureit_render.py b/measureit/measureit_render.py
index a3f0b1e..6c9733d 100644
--- a/measureit/measureit_render.py
+++ b/measureit/measureit_render.py
@@ -1,26 +1,24 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
+# ##### BEGIN GPL LICENSE BLOCK #####
#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list