[Bf-extensions-cvs] [4bf5cb2] master: Cleanup: pep8
Campbell Barton
noreply at git.blender.org
Tue Jul 26 06:51:33 CEST 2016
Commit: 4bf5cb2261b9a15133890110c44da020d326f507
Author: Campbell Barton
Date: Tue Jul 26 14:51:47 2016 +1000
Branches: master
https://developer.blender.org/rBAC4bf5cb2261b9a15133890110c44da020d326f507
Cleanup: pep8
Also remove filename hints, some were wrong, and its not needed.
===================================================================
M archimesh/__init__.py
M archimesh/achm_books_maker.py
M archimesh/achm_column_maker.py
M archimesh/achm_curtain_maker.py
M archimesh/achm_door_maker.py
M archimesh/achm_gltools.py
M archimesh/achm_kitchen_maker.py
M archimesh/achm_lamp_maker.py
M archimesh/achm_main_panel.py
M archimesh/achm_roof_maker.py
M archimesh/achm_room_maker.py
M archimesh/achm_shelves_maker.py
M archimesh/achm_stairs_maker.py
M archimesh/achm_tools.py
M archimesh/achm_venetian_maker.py
M archimesh/achm_window_maker.py
M archimesh/achm_window_panel.py
===================================================================
diff --git a/archimesh/__init__.py b/archimesh/__init__.py
index 39bf1eb..69b9537 100644
--- a/archimesh/__init__.py
+++ b/archimesh/__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": "Archimesh",
@@ -112,7 +110,7 @@ class AchmInfoMtMeshDecorationAdd(bpy.types.Menu):
self.layout.operator("mesh.archimesh_roller", text="Add Roller curtains", icon="PLUGIN")
self.layout.operator("mesh.archimesh_venetian", text="Add Venetian blind", icon="PLUGIN")
self.layout.operator("mesh.archimesh_japan", text="Add Japanese curtains", icon="PLUGIN")
-
+
# ----------------------------------------------------------
# Registration
# ----------------------------------------------------------
@@ -177,7 +175,7 @@ def register():
bpy.utils.register_class(achm_window_panel.AchmWinPanel)
bpy.utils.register_class(achm_window_panel.AchmWindowEditPanel)
bpy.types.INFO_MT_mesh_add.append(AchmMenu_func)
-
+
# Define properties
bpy.types.Scene.archimesh_select_only = bpy.props.BoolProperty(name="Only selected",
description="Apply auto holes only to"
@@ -268,7 +266,7 @@ def unregister():
bpy.utils.unregister_class(achm_window_panel.AchmWinPanel)
bpy.utils.unregister_class(achm_window_panel.AchmWindowEditPanel)
bpy.types.INFO_MT_mesh_add.remove(AchmMenu_func)
-
+
# Remove properties
del bpy.types.Scene.archimesh_select_only
del bpy.types.Scene.archimesh_ceiling
@@ -291,4 +289,4 @@ def unregister():
if __name__ == '__main__':
- register()
\ No newline at end of file
+ register()
diff --git a/archimesh/achm_books_maker.py b/archimesh/achm_books_maker.py
index 7732db8..eccae4c 100644
--- a/archimesh/achm_books_maker.py
+++ b/archimesh/achm_books_maker.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: achm_books_maker.py
# Automatic generation of books
# Author: Antonio Vazquez (antonioya)
#
@@ -67,7 +65,7 @@ class AchmBooks(bpy.types.Operator):
afn = bpy.props.IntProperty(name='Affinity', min=0, max=10, default=5,
description='Number of books with same rotation angle')
- # Materials
+ # Materials
crt_mat = bpy.props.BoolProperty(name="Create default Cycles materials",
description="Create default materials for "
"Cycles render.", default=True)
@@ -129,7 +127,7 @@ class AchmBooks(bpy.types.Operator):
# noinspection PyUnusedLocal
def execute(self, context):
if bpy.context.mode == "OBJECT":
- # Create shelves
+ # Create shelves
create_book_mesh(self)
return {'FINISHED'}
else:
@@ -161,7 +159,7 @@ def generate_books(self):
location = bpy.context.scene.cursor_location
myloc = copy.copy(location) # copy location to keep 3D cursor position
- # Create
+ # Create
lastx = myloc.x
ox = 0
oy = 0
@@ -241,7 +239,7 @@ def create_book(objname, sx, sy, sz, px, py, pz, mat, frx,
# gap Randomness
ri = random.randint(10, 150)
gap = ri / 100000
- # Randomness X
+ # Randomness X
if ox == 0:
ri = random.randint(0, int(frx * 1000))
factor = ri / 1000
@@ -346,7 +344,8 @@ def create_book(objname, sx, sy, sz, px, py, pz, mat, frx,
if mat:
rgb = objcol
# External
- mat = create_diffuse_material(objname + "_material", True, rgb[0], rgb[1], rgb[2], rgb[0], rgb[1], rgb[2], 0.05)
+ mat = create_diffuse_material(objname + "_material", True,
+ rgb[0], rgb[1], rgb[2], rgb[0], rgb[1], rgb[2], 0.05)
set_material(mybook, mat)
# UV unwrap external
select_faces(mybook, 0, True)
@@ -375,4 +374,4 @@ def create_book(objname, sx, sy, sz, px, py, pz, mat, frx,
mybook.rotation_euler = (0.0, math.radians(rot), 0.0) # radians
# add some gap to the size between books
- return mybook, (sx, sy, sz, rot)
\ No newline at end of file
+ return mybook, (sx, sy, sz, rot)
diff --git a/archimesh/achm_column_maker.py b/archimesh/achm_column_maker.py
index f960a29..6d9c6b9 100644
--- a/archimesh/achm_column_maker.py
+++ b/archimesh/achm_column_maker.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: achm_column_maker.py
# Automatic generation of columns
# Author: Antonio Vazquez (antonioya)
#
@@ -273,7 +271,7 @@ def create_column_mesh(self):
mycolumn = create_circular_column(self, "Column", radio_top, radio_mid, radio_bottom, height)
mycolumn.select = True
bpy.context.scene.objects.active = mycolumn
- # Subsurf
+ # Subsurf
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list