[Bf-extensions-cvs] [bebd6e7] master: Cleanup: pep8

Campbell Barton noreply at git.blender.org
Tue Jul 26 07:15:38 CEST 2016


Commit: bebd6e7b034810c33e741e7bcf4ccc6c9745fc80
Author: Campbell Barton
Date:   Tue Jul 26 15:15:00 2016 +1000
Branches: master
https://developer.blender.org/rBACbebd6e7b034810c33e741e7bcf4ccc6c9745fc80

Cleanup: pep8

===================================================================

M	oscurart_tools/__init__.py
M	oscurart_tools/oscurart_animation.py
M	oscurart_tools/oscurart_files.py
M	oscurart_tools/oscurart_meshes.py
M	oscurart_tools/oscurart_objects.py
M	oscurart_tools/oscurart_overrides.py
M	oscurart_tools/oscurart_render.py
M	oscurart_tools/oscurart_shapes.py

===================================================================

diff --git a/oscurart_tools/__init__.py b/oscurart_tools/__init__.py
index a4b6936..1802180 100644
--- a/oscurart_tools/__init__.py
+++ b/oscurart_tools/__init__.py
@@ -1,4 +1,4 @@
-# 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
@@ -14,7 +14,9 @@
 #  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 LICENSE BLOCK #####
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8 compliant>
 
 bl_info = {
     "name": "Oscurart Tools",
@@ -27,7 +29,8 @@ bl_info = {
     "wiki_url":
         "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/3D_interaction/Oscurart_Tools",
     "tracker_url": "https://developer.blender.org/maniphest/task/edit/form/2/",
-    "category": "Object"}
+    "category": "Object",
+    }
 
 import bpy
 import math
@@ -77,43 +80,16 @@ class OscPanelControl(View3DOscPanel, bpy.types.Panel):
     def draw(self, context):
         active_obj = context.active_object
         layout = self.layout
+        scene = context.scene
 
         col = layout.column(align=1)
-        col.prop(
-            bpy.context.scene,
-            "osc_object_tools",
-            text="Object",
-            icon="OBJECT_DATAMODE")
-        col.prop(
-            bpy.context.scene,
-            "osc_mesh_tools",
-            text="Mesh",
-            icon="EDITMODE_HLT")
-        col.prop(
-            bpy.context.scene,
-            "osc_shapes_tools",
-            text="Shapes",
-            icon="SHAPEKEY_DATA")
-        col.prop(
-            bpy.context.scene,
-            "osc_animation_tools",
-            text="Animation",
-            icon="POSE_DATA")
-        col.prop(
-            bpy.context.scene,
-            "osc_render_tools",
-            text="Render",
-            icon="SCENE")
-        col.prop(
-            bpy.context.scene,
-            "osc_files_tools",
-            text="Files",
-            icon="IMASEL")
-        col.prop(
-            bpy.context.scene,
-            "osc_overrides_tools",
-            text="Overrides",
-            icon="GREASEPENCIL")
+        col.prop(scene, "osc_object_tools", text="Object", icon="OBJECT_DATAMODE")
+        col.prop(scene, "osc_mesh_tools", text="Mesh", icon="EDITMODE_HLT")
+        col.prop(scene, "osc_shapes_tools", text="Shapes", icon="SHAPEKEY_DATA")
+        col.prop(scene, "osc_animation_tools", text="Animation", icon="POSE_DATA")
+        col.prop(scene, "osc_render_tools", text="Render", icon="SCENE")
+        col.prop(scene, "osc_files_tools", text="Files", icon="IMASEL")
+        col.prop(scene, "osc_overrides_tools", text="Overrides", icon="GREASEPENCIL")
 # POLLS
 
 
@@ -465,10 +441,11 @@ class OscurartToolsAddonPreferences(bpy.types.AddonPreferences):
     bl_idname = __name__
 
     category = bpy.props.StringProperty(
-        name="Category",
+            name="Category",
             description="Choose a name for the category of the panel",
             default="Oscurart Tools",
-            update=update_panel)
+            update=update_panel,
+            )
 
     def draw(self, context):
 
diff --git a/oscurart_tools/oscurart_animation.py b/oscurart_tools/oscurart_animation.py
index a2761a8..8d97e3d 100644
--- a/oscurart_tools/oscurart_animation.py
+++ b/oscurart_tools/oscurart_animation.py
@@ -1,3 +1,23 @@
+# ##### 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 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.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8 compliant>
+
 import bpy
 from mathutils import Matrix
 
@@ -10,9 +30,7 @@ bpy.types.Scene.quick_animation_out = bpy.props.IntProperty(default=250)
 def DefQuickParent(inf, out):
     if bpy.context.object.type == "ARMATURE":
         ob = bpy.context.object
-        target = [
-            object for object in bpy.context.selected_objects if object != ob][
-                0]
+        target = [object for object in bpy.context.selected_objects if object != ob][0]
         ob = bpy.context.active_pose_bone if bpy.context.object.type == 'ARMATURE' else bpy.context.object
         target.select = False
         bpy.context.scene.frame_set(frame=bpy.context.scene.quick_animation_in)
@@ -25,9 +43,7 @@ def DefQuickParent(inf, out):
             bpy.ops.anim.keyframe_insert(type="LocRotScale")
     else:
         ob = bpy.context.object
-        target = [
-            object for object in bpy.context.selected_objects if object != ob][
-                0]
+        target = [object for object in bpy.context.selected_objects if object != ob][0]
         ob = bpy.context.active_pose_bone if bpy.context.object.type == 'ARMATURE' else bpy.context.object
         target.select = False
         bpy.context.scene.frame_set(frame=bpy.context.scene.quick_animation_in)
diff --git a/oscurart_tools/oscurart_files.py b/oscurart_tools/oscurart_files.py
index 10af45a..6898333 100644
--- a/oscurart_tools/oscurart_files.py
+++ b/oscurart_tools/oscurart_files.py
@@ -1,3 +1,23 @@
+# ##### 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 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.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8 compliant>
+
 import bpy
 import math
 import sys
diff --git a/oscurart_tools/oscurart_meshes.py b/oscurart_tools/oscurart_meshes.py
index 6057d0c..101a910 100644
--- a/oscurart_tools/oscurart_meshes.py
+++ b/oscurart_tools/oscurart_meshes.py
@@ -1,3 +1,23 @@
+# ##### 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 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.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8 compliant>
+
 import bpy
 import math
 import sys
@@ -38,8 +58,8 @@ def defReconst(self, OFFSET):
     bpy.ops.uv.unwrap(
         method='ANGLE_BASED',
         fill_holes=True,
-     correct_aspect=False,
-     use_subsurf_data=0)
+        correct_aspect=False,
+        use_subsurf_data=0)
     bpy.ops.object.mode_set(mode="OBJECT", toggle=False)
     bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Mirror")
     bpy.ops.object.mode_set(mode="EDIT", toggle=False)
@@ -50,8 +70,8 @@ def defReconst(self, OFFSET):
     bpy.ops.uv.unwrap(
         method='ANGLE_BASED',
         fill_holes=True,
-     correct_aspect=False,
-     use_subsurf_data=0)
+        correct_aspect=False,
+        use_subsurf_data=0)
 
 
 class reConst (bpy.types.Operator):
@@ -61,8 +81,8 @@ class reConst (bpy.types.Operator):
     OFFSET = bpy.props.FloatProperty(
         name="Offset",
         default=0.001,
-     min=-0,
-     max=0.1)
+        min=-0,
+        max=0.1)
 
     @classmethod
     def poll(cls, context):
@@ -129,7 +149,8 @@ class resymVertexGroups (bpy.types.Operator):
 
     def execute(self, context):
 
-        with open("%s_%s_SYM_TEMPLATE.xml" % (os.path.join(os.path.dirname(bpy.data.filepath), bpy.context.scene.name), bpy.context.object.name)) as file:
+        with open("%s_%s_SYM_TEMPLATE.xml" % (os.path.join(os.path.dirname(bpy.data.filepath),
+                                              bpy.context.scene.name), bpy.context.object.name)) as file:
             ob = bpy.context.object
             actgr = ob.vertex_groups.active
             actind = ob.vertex_groups.active_index
@@ -302,10 +323,10 @@ class OscResymMesh (bpy.types.Operator):
 
     side = bpy.props.EnumProperty(
         name="Side:",
-            description="Select Side.",
-            items=(('+-', "+X to -X", "+X to -X"),
-                   ('-+', "-X to +X", "-X to +X")),
-            default='+-',
+        description="Select Side.",
+        items=(('+-', "+X to -X", "+X to -X"),
+               ('-+', "-X to +X", "-X to +X")),
+        default='+-',
     )
 
     def execute(self, context):
@@ -320,8 +341,8 @@ def DefOscObjectToMesh():
     MESH = ACTOBJ.to_mesh(
         scene=bpy.context.scene,
         apply_modifiers=True,
-     settings="RENDER",
-     calc_tessface=True)
+        settings="RENDER",
+        calc_tessface=True)
     OBJECT = bpy.data.objects.new(("%s_Freeze") % (ACTOBJ.name), MESH)
     bpy.context.scene.objects.link(OBJECT)
 
@@ -409,8 +430,8 @@ class OscOverlapUv(bpy.types.O

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list