cleanup: pep8
authorCampbell Barton <ideasman42@gmail.com>
Thu, 29 Jan 2015 04:35:06 +0000 (15:35 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 29 Jan 2015 04:35:06 +0000 (15:35 +1100)
also remove empty class parenthesis

67 files changed:
build_files/buildbot/master.cfg
build_files/buildbot/master_unpack.py
build_files/buildbot/slave_compile.py
build_files/buildbot/slave_pack.py
doc/python_api/examples/bpy.types.Panel.2.py
doc/python_api/sphinx_changelog_gen.py
intern/cycles/blender/addon/engine.py
intern/cycles/blender/addon/properties.py
intern/cycles/blender/addon/ui.py
release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
release/scripts/modules/bl_i18n_utils/settings.py
release/scripts/modules/bl_i18n_utils/utils_spell_check.py
release/scripts/modules/bpy_extras/keyconfig_utils.py
release/scripts/modules/bpy_restrict_state.py
release/scripts/modules/bpyml_ui.py
release/scripts/modules/nodeitems_utils.py
release/scripts/modules/rna_prop_ui.py
release/scripts/modules/rna_xml.py
release/scripts/modules/sys_info.py
release/scripts/startup/bl_operators/node.py
release/scripts/startup/bl_operators/object.py
release/scripts/startup/bl_operators/presets.py
release/scripts/startup/bl_operators/vertexpaint_dirt.py
release/scripts/startup/bl_operators/wm.py
release/scripts/startup/bl_ui/properties_animviz.py
release/scripts/startup/bl_ui/properties_constraint.py
release/scripts/startup/bl_ui/properties_data_armature.py
release/scripts/startup/bl_ui/properties_data_bone.py
release/scripts/startup/bl_ui/properties_data_camera.py
release/scripts/startup/bl_ui/properties_data_curve.py
release/scripts/startup/bl_ui/properties_data_empty.py
release/scripts/startup/bl_ui/properties_data_lamp.py
release/scripts/startup/bl_ui/properties_data_lattice.py
release/scripts/startup/bl_ui/properties_data_mesh.py
release/scripts/startup/bl_ui/properties_data_metaball.py
release/scripts/startup/bl_ui/properties_data_modifier.py
release/scripts/startup/bl_ui/properties_data_speaker.py
release/scripts/startup/bl_ui/properties_freestyle.py
release/scripts/startup/bl_ui/properties_game.py
release/scripts/startup/bl_ui/properties_grease_pencil_common.py
release/scripts/startup/bl_ui/properties_mask_common.py
release/scripts/startup/bl_ui/properties_material.py
release/scripts/startup/bl_ui/properties_object.py
release/scripts/startup/bl_ui/properties_paint_common.py
release/scripts/startup/bl_ui/properties_particle.py
release/scripts/startup/bl_ui/properties_physics_cloth.py
release/scripts/startup/bl_ui/properties_physics_common.py
release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
release/scripts/startup/bl_ui/properties_physics_field.py
release/scripts/startup/bl_ui/properties_physics_fluid.py
release/scripts/startup/bl_ui/properties_physics_rigidbody.py
release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py
release/scripts/startup/bl_ui/properties_physics_smoke.py
release/scripts/startup/bl_ui/properties_physics_softbody.py
release/scripts/startup/bl_ui/properties_render.py
release/scripts/startup/bl_ui/properties_render_layer.py
release/scripts/startup/bl_ui/properties_scene.py
release/scripts/startup/bl_ui/properties_texture.py
release/scripts/startup/bl_ui/properties_world.py
release/scripts/startup/bl_ui/space_dopesheet.py
release/scripts/startup/bl_ui/space_image.py
release/scripts/startup/bl_ui/space_node.py
release/scripts/startup/bl_ui/space_sequencer.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
source/blender/datatoc/datatoc_icon_split.py
tests/python/pep8.py

index e96f49bdb5f05ceebfefb35ef0dda9aa93ce6469..d7f56781f38bd7a579d2fdbb9d1e9d8354174c1f 100644 (file)
@@ -4,10 +4,10 @@
 # <pep8 compliant>
 
 # List of the branches being built automatically overnight
-NIGHT_SCHEDULE_BRANCHES=[None, "gooseberry"]
+NIGHT_SCHEDULE_BRANCHES = [None, "gooseberry"]
 
 # List of the branches available for force build
-FORCE_SCHEDULE_BRANCHES=["master", "gooseberry", "experimental-build"]
+FORCE_SCHEDULE_BRANCHES = ["master", "gooseberry", "experimental-build"]
 
 """
 Stock Twisted directory lister doesn't provide any information about last file
@@ -17,6 +17,7 @@ modification time, we hack the class a bit in order to have such functionaliity
 
 from buildbot.status.web.base import DirectoryLister
 
+
 def get_files_and_directories(self, directory):
     from twisted.web.static import (getTypeAndEncoding,
                                     formatFileSize)
@@ -97,6 +98,7 @@ all_repositories = {
     r'https://svn.blender.org/svnroot/bf-blender/': 'lib svn',
 }
 
+
 def codebaseGenerator(chdict):
     return all_repositories[chdict['repository']]
 
@@ -112,6 +114,7 @@ from buildbot.schedulers import timed, forcesched
 
 c['schedulers'] = []
 
+
 def schedule_force_build(name):
     c['schedulers'].append(forcesched.ForceScheduler(name='force ' + name,
         builderNames=[name],
index 56ab80dc87f9d77f85be9142a45a2b43df09b96f..46131c5e1dec75c1a95cbd0d30daca568f6d6f9f 100644 (file)
@@ -37,6 +37,7 @@ def strip_extension(filename):
 
     return filename
 
+
 # extract platform from package name
 def get_platform(filename):
     # name is blender-version-platform.extension. we want to get the
@@ -64,10 +65,11 @@ def get_platform(filename):
 
     return '-'.join(platform_tokens)
 
+
 def get_branch(filename):
     tokens = filename.split("-")
     branch = ""
-    
+
     for token in tokens:
         if token == "blender":
             return branch
index 4ef46331c64e8641b91ab85ef5cf8c6c43370303..cbe345e764c188b03aea5e2e0066f6c81a9b8fbb 100644 (file)
@@ -47,9 +47,9 @@ if 'cmake' in builder:
         cmake_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=ppc')
 
     if 'win64' in builder:
-        cmake_options.append(['-G','"Visual Studio 12 2013 Win64"'])
+        cmake_options.append(['-G', '"Visual Studio 12 2013 Win64"'])
     elif 'win32' in builder:
-        cmake_options.append(['-G','"Visual Studio 12 2013"'])
+        cmake_options.append(['-G', '"Visual Studio 12 2013"'])
 
     cmake_options.append("-C../blender.git/build_files/cmake/config/blender_full.cmake")
     cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=1")
index 8959e0e06f977b265a429f55e409f8b487c8f554..4e5d77b2a0ae245afd9cf2f4c63134b0d756d8b4 100644 (file)
@@ -116,12 +116,12 @@ if builder.find('scons') != -1:
         retcode = subprocess.call([python_bin, 'scons/scons.py'] + scons_options)
         sys.exit(retcode)
 else:
-#cmake
+    # CMake
     if 'win' in builder:
         files = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')]
         for f in files:
             os.remove(f)
-        retcode = subprocess.call(['cpack', '-G','ZIP'])
+        retcode = subprocess.call(['cpack', '-G', 'ZIP'])
         result_file = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')][0]
         os.rename(result_file, "{}.zip".format(builder))
         # create zip file
index a4b2f1fd3381981db22a4f513a8b559fdbe9365d..261430f1396f00a33e8bb6e4d6b9f3fd0036bab1 100644 (file)
@@ -7,7 +7,7 @@ A mix-in parent class can be used to share common properties and
 import bpy
 
 
-class View3DPanel():
+class View3DPanel:
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'TOOLS'
 
index 3b968de9a2caa57391f6c86e1f68c379d27873e0..0b083c31c58b6292b3e7ce7c713b3871cafde712 100644 (file)
@@ -316,7 +316,7 @@ def main():
 
     try:
         import argparse
-    except:
+    except ImportError:
         print("Old Blender, just dumping")
         api_dump()
         return
index a0ad044f24c36d107e60c42053ce5be1821edd91..e1d82db25e101ebfa4e9fb28185ad32c7a9ec6db 100644 (file)
@@ -101,6 +101,7 @@ def with_network():
     import _cycles
     return _cycles.with_network
 
+
 def system_info():
     import _cycles
     return _cycles.system_info()
index 5f8a55d3de8949593fbaae86e69f5d1f24874a9a..4b841466df744fd229b0725a0577a23dff03eb13 100644 (file)
@@ -481,7 +481,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
             name="Bake Type",
             default='COMBINED',
             description="Type of pass to bake",
-            items = (
+            items=(
                 ('COMBINED', "Combined", ""),
                 ('AO', "Ambient Occlusion", ""),
                 ('SHADOW', "Shadow", ""),
index da303ce5690e3e6e6fb2f77f3101e0517f0dc1b0..651114a12dc8a5ff874a8d79ef5c54ea41f1b4cd 100644 (file)
@@ -37,7 +37,7 @@ class CYCLES_MT_integrator_presets(Menu):
     draw = Menu.draw_preset
 
 
-class CyclesButtonsPanel():
+class CyclesButtonsPanel:
     bl_space_type = "PROPERTIES"
     bl_region_type = "WINDOW"
     bl_context = "render"
index 835d1fc51957da2d300eb75d01df5d202fd54d9e..d434c6a79cdaed2454440e0da8bf008c53d164f6 100644 (file)
@@ -62,6 +62,7 @@ def _gen_check_ctxt(settings):
         "spell_errors": {},
     }
 
+
 def _diff_check_ctxt(check_ctxt, minus_check_ctxt):
     """Returns check_ctxt - minus_check_ctxt"""
     for key in check_ctxt:
@@ -74,6 +75,7 @@ def _diff_check_ctxt(check_ctxt, minus_check_ctxt):
                 if warning in check_ctxt[key]:
                     del check_ctxt[key][warning]
 
+
 def _gen_reports(check_ctxt):
     return {
         "check_ctxt": check_ctxt,
@@ -473,7 +475,6 @@ def dump_py_messages_from_files(msgs, reports, files, settings):
 
         return [_extract_string_merge(estr_ls, nds_ls) for estr_ls, nds_ls in bag]
 
-
     i18n_ctxt_ids = {v for v in bpy.app.translations.contexts_C_to_py.values()}
     def _ctxt_to_ctxt(node):
         # We must try, to some extend, to get contexts from vars instead of only literal strings...
index 300cd7ae9559d79179d2903fbfbcb54d4dead094..0e08731c65898fe56e71ad6ee148b235a279d00e 100644 (file)
@@ -473,6 +473,7 @@ for p in set(INTERN_PY_SYS_PATHS.split(";")):
 def _do_get(ref, path):
     return os.path.normpath(os.path.join(ref, path))
 
+
 def _do_set(ref, path):
     path = os.path.normpath(path)
     # If given path is absolute, make it relative to current ref one (else we consider it is already the case!)
@@ -484,6 +485,7 @@ def _do_set(ref, path):
             pass
     return path
 
+
 def _gen_get_set_path(ref, name):
     def _get(self):
         return _do_get(getattr(self, ref), getattr(self, name))
@@ -491,6 +493,7 @@ def _gen_get_set_path(ref, name):
         setattr(self, name, _do_set(getattr(self, ref), value))
     return _get, _set
 
+
 def _gen_get_set_paths(ref, name):
     def _get(self):
         return [_do_get(getattr(self, ref), p) for p in getattr(self, name)]
@@ -498,6 +501,7 @@ def _gen_get_set_paths(ref, name):
         setattr(self, name, [_do_set(getattr(self, ref), p) for p in value])
     return _get, _set
 
+
 class I18nSettings:
     """
     Class allowing persistence of our settings!
index b77c636640a5749c5769547ed46f7bf837cd3a68..ee83c6cc3c99261edeb048614ada42a2bd545f29 100644 (file)
@@ -24,7 +24,7 @@ import pickle
 import re
 
 
-class SpellChecker():
+class SpellChecker:
     """
     A basic spell checker.
     """
index 3f5a23683eeef01b8b895459e24128bf04b0d1c5..abc613bfa142632681612ff75074eacc26687225 100644 (file)
@@ -245,7 +245,7 @@ def keyconfig_export(wm, kc, filepath):
     # the default blender keyconfig, recreating the current setup from a fresh blender
     # without needing to export keymaps which haven't been edited.
 
-    class FakeKeyConfig():
+    class FakeKeyConfig:
         keymaps = []
     edited_kc = FakeKeyConfig()
     for km in wm.keyconfigs.user.keymaps:
index 4aa3c5de5733b70a1ac6b6813ad0af1e8f7dc0b8..4658fddf0dccd9d8b6b9a94c26b5a37b9273a845 100644 (file)
@@ -29,7 +29,7 @@ __all__ = (
 import bpy as _bpy
 
 
-class _RestrictContext():
+class _RestrictContext:
     __slots__ = ()
     _real_data = _bpy.data
     # safe, the pointer never changes
@@ -44,7 +44,7 @@ class _RestrictContext():
         return self._real_pref
 
 
-class _RestrictData():
+class _RestrictData:
     __slots__ = ()
 
 
@@ -52,7 +52,7 @@ _context_restrict = _RestrictContext()
 _data_restrict = _RestrictData()
 
 
-class RestrictBlend():
+class RestrictBlend:
     __slots__ = ("context", "data")
 
     def __enter__(self):
index b4ad4e0b54acd84599ee0fd8374479e2cde9d691..dd5fc38d0ebe0b5a6f591a697e267f195ebe5605 100644 (file)
@@ -84,7 +84,7 @@ def _call_recursive(context, base, py_node):
                 _call_recursive(context, base_new, py_node_child)
 
 
-class BPyML_BaseUI():
+class BPyML_BaseUI:
     """
     This is a mix-in class that defines a draw function
     which checks for draw_data
index 1fef6c3a0192cdd4f48e5fe65045f4db926b5ce4..2882a08fbd4c9beaed40dd9d17e0631caf0c2134 100644 (file)
@@ -20,7 +20,7 @@
 import bpy
 
 
-class NodeCategory():
+class NodeCategory:
     @classmethod
     def poll(cls, context):
         return True
@@ -42,7 +42,7 @@ class NodeCategory():
             self.items = items_gen
 
 
-class NodeItem():
+class NodeItem:
     def __init__(self, nodetype, label=None, settings={}, poll=None):
         self.nodetype = nodetype
         self._label = label
@@ -73,7 +73,7 @@ class NodeItem():
             ops.value = setting[1]
 
 
-class NodeItemCustom():
+class NodeItemCustom:
     def __init__(self, poll=None, draw=None):
         self.poll = poll
         self.draw = draw
index e278b0d20fe3019720d3fca41fbaa2dbd4c6ee80..f4649453b46d479373e75da46e04a8349e20a9d8 100644 (file)
@@ -168,7 +168,7 @@ def draw(layout, context, context_member, property_type, use_edit=True):
             assign_props(props, val_draw, key)
 
 
-class PropertyPanel():
+class PropertyPanel:
     """
     The subclass should have its own poll function
     and the variable '_context_path' MUST be set.
index 41f890de51f7fa7e0a8158f27413886698055291..729d6238ac32b8b33def57eefc477f0f3e8036cb 100644 (file)
@@ -331,7 +331,7 @@ def xml2rna(root_xml,
                                     rna2xml_node(child_xml_real, subsubvalue)
 
                     else:
-#                        print(elems)
+                        # print(elems)
 
                         if len(elems) == 1:
                             # sub node named by its type
index cecb2a767ef97ec5267508ea564aa577cb02c5ca..74a6f4c36e8e7be52041dcc4e2ce619b522e1e50 100644 (file)
@@ -153,7 +153,7 @@ def write_sysinfo(op):
     else:
         output.write("\nOpenGL\n")
         output.write(lilies)
-        version = bgl.glGetString(bgl.GL_RENDERER);
+        version = bgl.glGetString(bgl.GL_RENDERER)
         output.write("renderer:\t%r\n" % version)
         output.write("vendor:\t\t%r\n" % (bgl.glGetString(bgl.GL_VENDOR)))
         output.write("version:\t%r\n" % (bgl.glGetString(bgl.GL_VERSION)))
index 264cfa349926500a909ec02a5a7cdbd61cc293a8..f660f775c5c771803f68d40359492477cef19f86 100644 (file)
@@ -42,7 +42,7 @@ class NodeSetting(PropertyGroup):
 
 
 # Base class for node 'Add' operators
-class NodeAddOperator():
+class NodeAddOperator:
 
     type = StringProperty(
             name="Node Type",
index 1f8c89b2fd929e16a698268298b1044d29bb920d..e3ceeca8abec4fb9d20ee2b6334d49ba05628d3d 100644 (file)
@@ -252,7 +252,7 @@ class SubdivisionSet(Operator):
                     if not relative:
                         if level > mod.total_levels:
                             sub = level - mod.total_levels
-                            for i in range (0, sub):
+                            for i in range(sub):
                                 bpy.ops.object.multires_subdivide(modifier="Multires")
 
                         if obj.mode == 'SCULPT':
index bb6b3a5a7c08f8db1fbecd0ecad311ace79307a6..7195b7819d1be05524500c61a8a5b2b69b171e22 100644 (file)
@@ -23,7 +23,7 @@ from bpy.types import Menu, Operator
 from bpy.props import StringProperty, BoolProperty
 
 
-class AddPresetBase():
+class AddPresetBase:
     """Base preset class, only for subclassing
     subclasses must define
      - preset_values
index e0d2da2a027aa01044f961426f31b15dfd799bc3..892e1822d68fa58f2a96a561e9d35476f6a540e2 100644 (file)
@@ -176,8 +176,6 @@ class VertexPaintDirt(Operator):
         return (obj and obj.type == 'MESH')
 
     def execute(self, context):
-        import time
-
         obj = context.object
         mesh = obj.data
 
index 53bf52498b1a7fab5663eb827aed19f782f51381..a48415caa9b241dfe9a903b149d85b43db61f5e3 100644 (file)
@@ -1988,7 +1988,6 @@ class WM_OT_addon_install(Operator):
             # if not compressed file just copy into the addon path
             try:
                 shutil.copyfile(pyfile, path_dest)
-
             except:
                 traceback.print_exc()
                 return {'CANCELLED'}
index 8308c7fc4253e8615154c8c636eac152c8f38114..11081232f12e945d8171f543ca76c04f4647792f 100644 (file)
@@ -25,7 +25,7 @@
 # don't register these classes since they are only helpers.
 
 
-class MotionPathButtonsPanel():
+class MotionPathButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_label = "Motion Paths"
@@ -97,7 +97,7 @@ class MotionPathButtonsPanel():
 
 
 # FIXME: this panel still needs to be ported so that it will work correctly with animviz
-class OnionSkinButtonsPanel():
+class OnionSkinButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_label = "Onion Skinning"
index 0c5aae1de2fffc9d5081eae953694eb4ba4347dd..9aa67223fc4c6dc802dbedf746b345b2066f4a01 100644 (file)
@@ -21,7 +21,7 @@ import bpy
 from bpy.types import Panel
 
 
-class ConstraintButtonsPanel():
+class ConstraintButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "constraint"
index 9453e9a4690688db7b35f05514af2ce51536c1ef..84e06d4c7fc72ce122193b0c725f0f4e57401615 100644 (file)
@@ -22,7 +22,7 @@ from bpy.types import Panel, Menu
 from rna_prop_ui import PropertyPanel
 
 
-class ArmatureButtonsPanel():
+class ArmatureButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "data"
@@ -144,7 +144,7 @@ class DATA_PT_bone_groups(ArmatureButtonsPanel, Panel):
             if group.color_set:
                 col = split.column()
                 sub = col.row(align=True)
-                sub.enabled = group.is_custom_color_set # only custom colors are editable
+                sub.enabled = group.is_custom_color_set  # only custom colors are editable
                 sub.prop(group.colors, "normal", text="")
                 sub.prop(group.colors, "select", text="")
                 sub.prop(group.colors, "active", text="")
index c07e9d677e7e252ed43ac6d42dc951b35ade8195..a14e34580c55d13b003b842c8694205b8856afac 100644 (file)
@@ -23,7 +23,7 @@ from bpy.types import Panel
 from rna_prop_ui import PropertyPanel
 
 
-class BoneButtonsPanel():
+class BoneButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "bone"
index 13a9b88f1691a7ecbf1e4fa265c3b4446d686c08..0b0b9b6690ddf0683e64418aff6fd430afc08cb2 100644 (file)
@@ -22,7 +22,7 @@ from bpy.types import Panel, Menu
 from rna_prop_ui import PropertyPanel
 
 
-class CameraButtonsPanel():
+class CameraButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "data"
@@ -109,11 +109,11 @@ class DATA_PT_lens(CameraButtonsPanel, Panel):
                 elif ccam.panorama_type == 'EQUIRECTANGULAR':
                     row = layout.row()
                     sub = row.column(align=True)
-                    sub.prop(ccam, "latitude_min");
-                    sub.prop(ccam, "latitude_max");
+                    sub.prop(ccam, "latitude_min")
+                    sub.prop(ccam, "latitude_max")
                     sub = row.column(align=True)
-                    sub.prop(ccam, "longitude_min");
-                    sub.prop(ccam, "longitude_max");
+                    sub.prop(ccam, "longitude_min")
+                    sub.prop(ccam, "longitude_max")
             elif engine == 'BLENDER_RENDER':
                 row = col.row()
                 if cam.lens_unit == 'MILLIMETERS':
index 7cfdcccfb9463a1094a9b13a95902b321d15e105..9277bbe20f9503ec6c4919cd71c8d4d7d871f8f4 100644 (file)
@@ -24,7 +24,7 @@ from rna_prop_ui import PropertyPanel
 from bpy.types import Curve, SurfaceCurve, TextCurve
 
 
-class CurveButtonsPanel():
+class CurveButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "data"
index c93bebf2673e542c22f370775fefed73d21bac73..a752d3517de69b767ddaec0721dec0ff43b0b2f9 100644 (file)
@@ -21,7 +21,7 @@ import bpy
 from bpy.types import Panel
 
 
-class DataButtonsPanel():
+class DataButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "data"
index 3aa0b71ae04b330b5aba54011add8350a1a49da6..6fef30fa3e6b4dc6ef9e66f9cb2d620bc8ad34d5 100644 (file)
@@ -30,7 +30,7 @@ class LAMP_MT_sunsky_presets(Menu):
     draw = Menu.draw_preset
 
 
-class DataButtonsPanel():
+class DataButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "data"
index 14d6ea66894ae488599ae9828a84529668e12f6f..cbfa6961e8c1028b262f70ef0855c35b1518100d 100644 (file)
@@ -22,7 +22,7 @@ from bpy.types import Panel
 from rna_prop_ui import PropertyPanel
 
 
-class DataButtonsPanel():
+class DataButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "data"
index 670ecf495be17e0cc43788c82712823bbbf19264..5db8692e6d83a479685aa23b9dcea06b66f67819 100644 (file)
@@ -111,7 +111,7 @@ class MESH_UL_uvmaps_vcols(UIList):
             layout.label(text="", icon_value=icon)
 
 
-class MeshButtonsPanel():
+class MeshButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "data"
index cd894e60dbba9a1135ba9062cd8f3751e75deae2..b42258c386abd2cfcc29cdc2a8cf3f76d55c3e72 100644 (file)
@@ -22,7 +22,7 @@ from bpy.types import Panel
 from rna_prop_ui import PropertyPanel
 
 
-class DataButtonsPanel():
+class DataButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "data"
index e13d007a6d6a77336b3a0b951b3be80c93ccf379..4c967079137cdcb65fdb00f157d85e9bacf126ce 100644 (file)
@@ -22,7 +22,7 @@ from bpy.types import Panel
 from bpy.app.translations import pgettext_iface as iface_
 
 
-class ModifierButtonsPanel():
+class ModifierButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "modifier"
index ca922dfb54483d2de646cec9e859eed091667953..5ed0f8c326543b9f5317facd3ce144737a6f2771 100644 (file)
@@ -22,7 +22,7 @@ from bpy.types import Panel
 from rna_prop_ui import PropertyPanel
 
 
-class DataButtonsPanel():
+class DataButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "data"
index 606842db01d8fd276a441503eff3c027f7363d54..2d91c99800715395844a0625d67474f8903a18f3 100644 (file)
@@ -23,7 +23,7 @@ from bpy.types import Menu, Panel, UIList
 
 # Render properties
 
-class RenderFreestyleButtonsPanel():
+class RenderFreestyleButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "render"
@@ -62,7 +62,7 @@ class RENDER_PT_freestyle(RenderFreestyleButtonsPanel, Panel):
 
 # Render layer properties
 
-class RenderLayerFreestyleButtonsPanel():
+class RenderLayerFreestyleButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "render_layer"
@@ -701,7 +701,7 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel,
 
 # Material properties
 
-class MaterialFreestyleButtonsPanel():
+class MaterialFreestyleButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "material"
index 503b3cd234ce4baf7e61e6102adc561a947b3b92..4d9dbe67226ef2572eb378f2acc1f2a110689dc6 100644 (file)
@@ -21,7 +21,7 @@ import bpy
 from bpy.types import Panel, Menu
 
 
-class PhysicsButtonsPanel():
+class PhysicsButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "physics"
@@ -256,7 +256,7 @@ class PHYSICS_PT_game_obstacles(PhysicsButtonsPanel, Panel):
         row.label()
 
 
-class RenderButtonsPanel():
+class RenderButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "render"
@@ -455,7 +455,7 @@ class RENDER_PT_game_display(RenderButtonsPanel, Panel):
             col.prop(gs, "frame_color", text="")
 
 
-class SceneButtonsPanel():
+class SceneButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "scene"
@@ -535,7 +535,7 @@ class RENDER_PT_game_sound(RenderButtonsPanel, Panel):
         col.prop(scene, "audio_doppler_factor")
 
 
-class WorldButtonsPanel():
+class WorldButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "world"
@@ -691,7 +691,7 @@ class WORLD_PT_game_physics_obstacles(WorldButtonsPanel, Panel):
             layout.prop(gs, "show_obstacle_simulation")
 
 
-class DataButtonsPanel():
+class DataButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "data"
@@ -749,7 +749,7 @@ class DATA_PT_shadow_game(DataButtonsPanel, Panel):
             row.prop(lamp, "shadow_frustum_size", text="Frustum Size")
 
 
-class ObjectButtonsPanel():
+class ObjectButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "object"
index 81079edd93876c71463bf14727f3c0c63012f884..9969c568bf967dd93e59289a3b35241725d02c56 100644 (file)
@@ -41,7 +41,7 @@ def gpencil_stroke_placement_settings(context, layout, gpd):
         row.prop(gpd, "use_stroke_endpoints")
 
 
-class GreasePencilDrawingToolsPanel():
+class GreasePencilDrawingToolsPanel:
     # subclass must set
     # bl_space_type = 'IMAGE_EDITOR'
     bl_label = "Grease Pencil"
@@ -89,7 +89,7 @@ class GreasePencilDrawingToolsPanel():
             col.operator("view3d.ruler")
 
 
-class GreasePencilStrokeEditPanel():
+class GreasePencilStrokeEditPanel:
     # subclass must set
     # bl_space_type = 'IMAGE_EDITOR'
     bl_label = "Edit Strokes"
@@ -196,8 +196,8 @@ class GPENCIL_PIE_tool_palette(Menu):
                 col = pie.column()
                 row = col.row(align=True)
                 row.operator("transform.translate", icon='MAN_TRANS').gpencil_strokes = True
-                row.operator("transform.rotate",    icon='MAN_ROT').gpencil_strokes = True
-                row.operator("transform.resize",    text="Scale", icon='MAN_SCALE').gpencil_strokes = True
+                row.operator("transform.rotate", icon='MAN_ROT').gpencil_strokes = True
+                row.operator("transform.resize", text="Scale", icon='MAN_SCALE').gpencil_strokes = True
                 row = col.row(align=True)
                 row.label("Proportional Edit:")
                 row.prop(context.tool_settings, "proportional_edit", text="", icon_only=True)
@@ -314,9 +314,9 @@ class GPENCIL_UL_layer(UIList):
 
             split = layout.split(percentage=0.25)
             row = split.row(align=True)
-            row.prop(gpl, "color",      text="", emboss = gpl.is_stroke_visible)
-            row.prop(gpl, "fill_color", text="", emboss = gpl.is_fill_visible)
-            split.prop(gpl, "info",  text="", emboss=False)
+            row.prop(gpl, "color", text="", emboss=gpl.is_stroke_visible)
+            row.prop(gpl, "fill_color", text="", emboss=gpl.is_fill_visible)
+            split.prop(gpl, "info", text="", emboss=False)
 
             row = layout.row(align=True)
             row.prop(gpl, "lock", text="", emboss=False)
@@ -326,7 +326,7 @@ class GPENCIL_UL_layer(UIList):
             layout.label(text="", icon_value=icon)
 
 
-class GreasePencilDataPanel():
+class GreasePencilDataPanel:
     # subclass must set
     # bl_space_type = 'IMAGE_EDITOR'
     bl_label = "Grease Pencil"
@@ -371,7 +371,7 @@ class GreasePencilDataPanel():
 
         gpl = context.active_gpencil_layer
         if gpl:
-            sub.operator("gpencil.layer_duplicate", icon='COPY_ID', text="") # XXX: needs a dedicated icon
+            sub.operator("gpencil.layer_duplicate", icon='COPY_ID', text="")  # XXX: needs a dedicated icon
 
             col.separator()
 
@@ -455,7 +455,7 @@ class GreasePencilDataPanel():
         sub.prop(gpl, "ghost_after_range", text="After")
 
 
-class GreasePencilToolsPanel():
+class GreasePencilToolsPanel:
     # subclass must set
     # bl_space_type = 'IMAGE_EDITOR'
     # bl_options = {'DEFAULT_CLOSED'}
index 9a2857cc7b86e801049bde8999f9c59927e7065d..a455677abb4bbde21c49d2919f8033b8708226f6 100644 (file)
@@ -112,7 +112,7 @@ class MASK_PT_layers:
             row.prop(active_layer, "use_fill_holes", text="Holes")
 
 
-class MASK_PT_spline():
+class MASK_PT_spline:
     # subclasses must define...
     #~ bl_space_type = 'CLIP_EDITOR'
     #~ bl_region_type = 'UI'
@@ -146,7 +146,7 @@ class MASK_PT_spline():
         col.prop(spline, "use_self_intersection_check")
 
 
-class MASK_PT_point():
+class MASK_PT_point:
     # subclasses must define...
     #~ bl_space_type = 'CLIP_EDITOR'
     #~ bl_region_type = 'UI'
@@ -201,7 +201,7 @@ class MASK_PT_point():
                                 tracks_list, icon='ANIM_DATA', text="Track:")
 
 
-class MASK_PT_display():
+class MASK_PT_display:
     # subclasses must define...
     #~ bl_space_type = 'CLIP_EDITOR'
     #~ bl_region_type = 'UI'
@@ -227,7 +227,7 @@ class MASK_PT_display():
         sub.prop(space_data, "mask_overlay_mode", text="")
 
 
-class MASK_PT_transforms():
+class MASK_PT_transforms:
     # subclasses must define...
     #~ bl_space_type = 'CLIP_EDITOR'
     #~ bl_region_type = 'TOOLS'
@@ -251,7 +251,7 @@ class MASK_PT_transforms():
         col.operator("transform.transform", text="Scale Feather").mode = 'MASK_SHRINKFATTEN'
 
 
-class MASK_PT_tools():
+class MASK_PT_tools:
     # subclasses must define...
     #~ bl_space_type = 'CLIP_EDITOR'
     #~ bl_region_type = 'TOOLS'
@@ -289,7 +289,7 @@ class MASK_PT_tools():
         col.operator("mask.shape_key_rekey", text="Re-Key Shape Points")
 
 
-class MASK_PT_add():
+class MASK_PT_add:
     # subclasses must define...
     #~ bl_space_type = 'CLIP_EDITOR'
     #~ bl_region_type = 'TOOLS'
index e3fcb0ef53ece2ba72144a6aaa9e5452523addad..20143b81d14323e0646c3c4375678c073faa1b62 100644 (file)
@@ -92,7 +92,7 @@ class MATERIAL_UL_matslots(UIList):
             layout.label(text="", icon_value=icon)
 
 
-class MaterialButtonsPanel():
+class MaterialButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "material"
@@ -875,7 +875,7 @@ class MATERIAL_PT_transp_game(MaterialButtonsPanel, Panel):
         layout.prop(mat, "alpha")
 
 
-class VolumeButtonsPanel():
+class VolumeButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "material"
index b822b65bc512ba46317394dc147a3d6d67b39792..3ff7a248c60c19f2083613e7c36b90cd1661cd86 100644 (file)
@@ -22,7 +22,7 @@ from bpy.types import Panel, Menu
 from rna_prop_ui import PropertyPanel
 
 
-class ObjectButtonsPanel():
+class ObjectButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "object"
index ba1947b0c66afeaffc37d2552b2991b38ffb9ea0..b0da65063d19416764908280a370b6c15a952a62 100644 (file)
@@ -20,7 +20,7 @@
 from bpy.types import Menu
 
 
-class UnifiedPaintPanel():
+class UnifiedPaintPanel:
     # subclass must set
     # bl_space_type = 'IMAGE_EDITOR'
     # bl_region_type = 'UI'
@@ -249,7 +249,7 @@ def brush_texture_settings(layout, brush, sculpt):
         col.prop(tex_slot, "angle", text="")
         if tex_slot.has_texture_angle_source:
             col.prop(tex_slot, "use_rake", text="Rake")
-            
+
             if brush.brush_capabilities.has_random_texture_angle and tex_slot.has_random_texture_angle:
                 if sculpt:
                     if brush.sculpt_capabilities.has_random_texture_angle:
@@ -296,7 +296,7 @@ def brush_mask_texture_settings(layout, brush):
         col.prop(mask_tex_slot, "angle", text="")
         if mask_tex_slot.has_texture_angle_source:
             col.prop(mask_tex_slot, "use_rake", text="Rake")
-            
+
             if brush.brush_capabilities.has_random_texture_angle and mask_tex_slot.has_random_texture_angle:
                 col.prop(mask_tex_slot, "use_random", text="Random")
                 if mask_tex_slot.use_random:
index 681898d1659d7c715f5239823ea068d3a39bc5fa..d1d6ee64598f6e1e10c41a4ce353a9ffd47caa2e 100644 (file)
@@ -88,7 +88,7 @@ class PARTICLE_MT_hair_dynamics_presets(Menu):
     draw = Menu.draw_preset
 
 
-class ParticleButtonsPanel():
+class ParticleButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "particle"
@@ -104,6 +104,7 @@ def find_modifier(ob, psys):
             if md.particle_system == psys:
                 return md
 
+
 class PARTICLE_UL_particle_systems(bpy.types.UIList):
     def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index, flt_flag):
         ob = data
index 45dd1bf5130ad5f90e6aba0100ecbe7e1bf10359..f141c0b1b2947583312a83f9b3a29b5d1867bc74 100644 (file)
@@ -37,7 +37,7 @@ class CLOTH_MT_presets(Menu):
     draw = Menu.draw_preset
 
 
-class PhysicButtonsPanel():
+class PhysicButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "physics"
index 4df8eab7d10de819a03c416bfa7e67625e2f66db..bb0f0cfc79625ba6e265b2a49cc2b1401071f105 100644 (file)
@@ -23,7 +23,7 @@ from bpy.types import Panel
 from bpy.app.translations import contexts as i18n_contexts
 
 
-class PhysicButtonsPanel():
+class PhysicButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "physics"
index f8cca01380ac88a54e4d73bae3f16eb02753deb0..01dcf837546f18a1ac384e497771f4a07e4011b1 100644 (file)
@@ -47,7 +47,7 @@ class PHYSICS_UL_dynapaint_surfaces(UIList):
             row.label(text="", icon_value=sticon)
 
 
-class PhysicButtonsPanel():
+class PhysicButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "physics"
index 4a5c16a5a552dfc031b3e1937efeeaf96f2f9fc4..348f66da1451b1929facc6ebfcc58e81c45ec1e3 100644 (file)
@@ -26,7 +26,7 @@ from bl_ui.properties_physics_common import (
         )
 
 
-class PhysicButtonsPanel():
+class PhysicButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "physics"
index 7b96d784fedbb3359cab05b8bb4daaea0323fa57..d6fd8f3792c640b2cfc3bffb36b6d1193d989b8f 100644 (file)
@@ -29,7 +29,7 @@ class FLUID_MT_presets(Menu):
     draw = Menu.draw_preset
 
 
-class PhysicButtonsPanel():
+class PhysicButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "physics"
index 5f589c499d38b21191cd4a6065ab572b33c58c0b..e7225d73e419dc6ed5221269b42e42172ac0b00b 100644 (file)
@@ -21,7 +21,7 @@ import bpy
 from bpy.types import Panel
 
 
-class PHYSICS_PT_rigidbody_panel():
+class PHYSICS_PT_rigidbody_panel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "physics"
index dcf63f25079fb0319e6e7311eb614fd0b823a23f..3f5e0f1fc9bc34949bd80e3ca8d1b4258ce24f0d 100644 (file)
@@ -21,7 +21,7 @@ import bpy
 from bpy.types import Panel
 
 
-class PHYSICS_PT_rigidbody_constraint_panel():
+class PHYSICS_PT_rigidbody_constraint_panel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "physics"
index 426bf858bdb6c1b72ff955b0550be5c9971246a1..63268bc6672fa6dc9f61a4b2068eee58995b9458 100644 (file)
@@ -26,7 +26,7 @@ from bl_ui.properties_physics_common import (
         )
 
 
-class PhysicButtonsPanel():
+class PhysicButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "physics"
index f96ab3f8cb1019db1c8efba4d809621278da9c7d..e74cac3d06bb2a02d6dc4b589ce0f5291aeac5b2 100644 (file)
@@ -30,7 +30,7 @@ def softbody_panel_enabled(md):
     return (md.point_cache.is_baked is False)
 
 
-class PhysicButtonsPanel():
+class PhysicButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "physics"
index 9ffd244d78fdbc496e4fc460bf7b041e46e5ac3a..b596fe48b49b3f771c682979de325d1e7340cd91 100644 (file)
@@ -43,7 +43,7 @@ class RENDER_MT_framerate_presets(Menu):
     draw = Menu.draw_preset
 
 
-class RenderButtonsPanel():
+class RenderButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "render"
index 554eef8f0f1c7cab76f4996008addf6cc5ffdd47..35032d38933ec5b4c335aed38de30575b2526027 100644 (file)
@@ -21,7 +21,7 @@ import bpy
 from bpy.types import Panel, UIList
 
 
-class RenderLayerButtonsPanel():
+class RenderLayerButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "render_layer"
index b3635acd392b19710779ab3cbcc28e6674713900..d601e5619a50df6060ac98d4b268a0011adea92a 100644 (file)
@@ -40,7 +40,7 @@ class SCENE_UL_keying_set_paths(UIList):
             layout.label(text="", icon_value=icon)
 
 
-class SceneButtonsPanel():
+class SceneButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "scene"
@@ -85,7 +85,7 @@ class SCENE_PT_unit(SceneButtonsPanel, Panel):
             row.prop(unit, "use_separate")
 
 
-class SceneKeyingSetsPanel():
+class SceneKeyingSetsPanel:
     def draw_keyframing_settings(self, context, layout, ks, ksp):
         self.draw_keyframing_setting(context, layout, ks, ksp, "Needed",
                                      "use_insertkey_override_needed", "use_insertkey_needed",
@@ -121,7 +121,7 @@ class SceneKeyingSetsPanel():
                 propname = prop
 
         row = layout.row(align=True)
-        row.prop(item, toggle_prop, text="", icon='STYLUS_PRESSURE', toggle=True) # XXX: needs dedicated icon
+        row.prop(item, toggle_prop, text="", icon='STYLUS_PRESSURE', toggle=True)  # XXX: needs dedicated icon
 
         subrow = row.row()
         subrow.active = getattr(item, toggle_prop)
index a0c4e0c92c38de8e3f5e22ec35935b8c49079084..23b5e5779f90bc1a09c386f00543498371670ac5 100644 (file)
@@ -116,7 +116,7 @@ def id_tex_datablock(bid):
     return bid
 
 
-class TextureButtonsPanel():
+class TextureButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "texture"
@@ -135,8 +135,8 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, Panel):
     @classmethod
     def poll(cls, context):
         engine = context.scene.render.engine
-        #if not (hasattr(context, "texture_slot") or hasattr(context, "texture_node")):
-            #return False
+        # if not (hasattr(context, "texture_slot") or hasattr(context, "texture_node")):
+        #     return False
         return ((context.material or
                  context.world or
                  context.lamp or
index 39a8986a20cbe86704d23fabca139d36d22e4de7..2c8a6fac967d23b03d41d5921e06939405b272eb 100644 (file)
@@ -22,7 +22,7 @@ from bpy.types import Panel
 from rna_prop_ui import PropertyPanel
 
 
-class WorldButtonsPanel():
+class WorldButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "world"
@@ -49,7 +49,6 @@ class WORLD_PT_context_world(WorldButtonsPanel, Panel):
         scene = context.scene
         world = context.world
         space = context.space_data
-        rd = context.scene.render
 
         texture_count = world and len(world.texture_slots.keys())
 
index f901d9d9262f2aac127563bbf7bcedfcfc3c4a87..caf1e73c5f695a562c18e73f0b97063ca0d5ec3b 100644 (file)
@@ -134,7 +134,6 @@ class DOPESHEET_HT_header(Header):
         row.operator("action.paste", text="", icon='PASTEFLIPDOWN').flipped = True
 
 
-
 class DOPESHEET_MT_editor_menus(Menu):
     bl_idname = "DOPESHEET_MT_editor_menus"
     bl_label = ""
index f1dd594aaf92d62b15cffff6f6a80e8c7fb1d7b7..44be2780c75e480eefddf109506a5d4a9a479d08 100644 (file)
@@ -1043,7 +1043,8 @@ class IMAGE_PT_tools_mask(MASK_PT_tools, Panel):
 
 # --- end mask ---
 
-class ImageScopesPanel():
+
+class ImageScopesPanel:
     @classmethod
     def poll(cls, context):
         sima = context.space_data
@@ -1057,6 +1058,7 @@ class ImageScopesPanel():
             return False
         return True
 
+
 class IMAGE_PT_view_histogram(ImageScopesPanel, Panel):
     bl_space_type = 'IMAGE_EDITOR'
     bl_region_type = 'TOOLS'
@@ -1150,6 +1152,7 @@ class IMAGE_PT_grease_pencil(GreasePencilDataPanel, Panel):
 
     # NOTE: this is just a wrapper around the generic GP Panel
 
+
 # Grease Pencil drawing tools
 class IMAGE_PT_tools_grease_pencil_draw(GreasePencilDrawingToolsPanel, Panel):
     bl_space_type = 'IMAGE_EDITOR'
index 4cc72f1dc4b5f5d954b32fe039a1c906bbd6963d..fadc00746112d727c07de51db48b65ecde662db1 100644 (file)
@@ -464,8 +464,8 @@ class NODE_PT_grease_pencil_tools(GreasePencilToolsPanel, Panel):
     bl_options = {'DEFAULT_CLOSED'}
 
     # NOTE: this is just a wrapper around the generic GP tools panel
-       # It contains access to some essential tools usually found only in
-       # toolbar, but which may not necessarily be open
+    # It contains access to some essential tools usually found only in
+    # toolbar, but which may not necessarily be open
 
 
 # Tool Shelf ------------------
@@ -484,6 +484,7 @@ class NODE_PT_tools_grease_pencil_edit(GreasePencilStrokeEditPanel, Panel):
 
 # -----------------------------
 
+
 def node_draw_tree_view(layout, context):
     pass
 
index 8852ff84fe0df499a6ccb91540d71e8880dc01ed..43cfa3666e6535f32f0206bf2798d217ee2ff741 100644 (file)
@@ -113,7 +113,7 @@ class SEQUENCER_HT_header(Header):
                 row.prop(toolsettings, "proportional_edit", icon_only=True)
                 if toolsettings.proportional_edit != 'DISABLED':
                     row.prop(toolsettings, "proportional_edit_falloff", icon_only=True)
-                                       
+
         row = layout.row(align=True)
         row.operator("render.opengl", text="", icon='RENDER_STILL').sequencer = True
         props = row.operator("render.opengl", text="", icon='RENDER_ANIMATION')
@@ -427,7 +427,7 @@ class SEQUENCER_MT_strip(Menu):
         layout.menu("SEQUENCER_MT_change")
 
 
-class SequencerButtonsPanel():
+class SequencerButtonsPanel:
     bl_space_type = 'SEQUENCE_EDITOR'
     bl_region_type = 'UI'
 
@@ -440,7 +440,7 @@ class SequencerButtonsPanel():
         return cls.has_sequencer(context) and (act_strip(context) is not None)
 
 
-class SequencerButtonsPanel_Output():
+class SequencerButtonsPanel_Output:
     bl_space_type = 'SEQUENCE_EDITOR'
     bl_region_type = 'UI'
 
@@ -929,7 +929,7 @@ class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel):
             row.prop(strip.proxy, "build_50")
             row.prop(strip.proxy, "build_75")
             row.prop(strip.proxy, "build_100")
-            layout.prop(strip.proxy, "use_overwrite");
+            layout.prop(strip.proxy, "use_overwrite")
 
             col = layout.column()
             col.label(text="Build JPEG quality")
@@ -1079,8 +1079,8 @@ class SEQUENCER_PT_grease_pencil_tools(GreasePencilToolsPanel, SequencerButtonsP
     bl_region_type = 'UI'
 
     # NOTE: this is just a wrapper around the generic GP tools panel
-       # It contains access to some essential tools usually found only in
-       # toolbar, which doesn't exist here...
+    # It contains access to some essential tools usually found only in
+    # toolbar, which doesn't exist here...
 
 
 if __name__ == "__main__":  # only for live edit.
index 1db3aa0d14482ea7c1e14c0cedcfca11cea3edd8..c0099a6895e92c9612208482dd045ed5d43407cc 100644 (file)
@@ -174,7 +174,7 @@ class VIEW3D_MT_editor_menus(Menu):
 # ********** Utilities **********
 
 
-class ShowHideMenu():
+class ShowHideMenu:
     bl_label = "Show/Hide"
     _operator_name = ""
 
@@ -2723,6 +2723,7 @@ class VIEW3D_MT_edit_armature_roll(Menu):
 
 # ********** Panel **********
 
+
 class VIEW3D_PT_grease_pencil(GreasePencilDataPanel, Panel):
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'UI'
index 9879ba8f4b92dbd70ab45c4605ed7149a6cf0c8f..2ce64d0e957c4ccd9e2723e276e93be1d20f4769 100644 (file)
@@ -31,7 +31,7 @@ from bl_ui.properties_paint_common import (
         )
 
 
-class View3DPanel():
+class View3DPanel:
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'TOOLS'
 
@@ -786,6 +786,7 @@ class View3DPaintPanel(UnifiedPaintPanel):
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'TOOLS'
 
+
 class VIEW3D_PT_imapaint_tools_missing(Panel, View3DPaintPanel):
     bl_category = "Tools"
     bl_label = "Missing Data"
@@ -806,14 +807,13 @@ class VIEW3D_PT_imapaint_tools_missing(Panel, View3DPaintPanel):
             col.label("Missing UVs", icon='INFO')
             col.label("Unwrap the mesh in edit mode or generate a simple UV layer")
             col.operator("paint.add_simple_uvs")
-    
+
         if toolsettings.mode == 'MATERIAL':
             if toolsettings.missing_materials:
                 col.separator()
                 col.label("Missing Materials", icon='INFO')
                 col.label("Add a material and paint slot below")
                 col.operator_menu_enum("paint.add_texture_paint_slot", "type", text="Add Paint Slot")
-                   
             elif toolsettings.missing_texture:
                 ob = context.active_object
                 mat = ob.active_material
@@ -827,7 +827,6 @@ class VIEW3D_PT_imapaint_tools_missing(Panel, View3DPaintPanel):
                     col.label("Missing Materials", icon='INFO')
                     col.label("Add a material and paint slot below")
                     col.operator_menu_enum("paint.add_texture_paint_slot", "type", text="Add Paint Slot")
 
         elif toolsettings.mode == 'IMAGE':
             if toolsettings.missing_texture:
@@ -846,6 +845,7 @@ class VIEW3D_PT_imapaint_tools_missing(Panel, View3DPaintPanel):
             col.template_ID(toolsettings, "stencil_image")
             col.operator("image.new", text="New").gen_context = 'PAINT_STENCIL'
 
+
 class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
     bl_category = "Tools"
     bl_label = "Brush"
@@ -1074,6 +1074,7 @@ class TEXTURE_UL_texpaintslots(UIList):
             layout.alignment = 'CENTER'
             layout.label(text="")
 
+
 class VIEW3D_MT_tools_projectpaint_uvlayer(Menu):
     bl_label = "Clone Layer"
 
@@ -1137,7 +1138,7 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel):
                     if slot:
                         col.prop(mat.texture_slots[slot.index], "blend_type")
                         col.separator()
-                
+
                 if slot and slot.index != -1:
                     col.label("UV Map")
                     col.prop_search(slot, "uv_layer", ob.data, "uv_textures", text="")
@@ -1189,7 +1190,6 @@ class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel):
         col.template_ID(ipaint, "stencil_image")
         col.operator("image.new", text="New").gen_context = 'PAINT_STENCIL'
 
         col.label("Visualization")
         row = col.row(align=True)
         row.prop(ipaint, "stencil_color", text="")
index 55f0a5c5f6a87da93e7a31aaaf6876a0b18e0e8f..aae907ec34007265aca056f1441230f4bf6de4f0 100755 (executable)
@@ -63,7 +63,7 @@ def image_from_file(filepath):
 
     try:
         import bpy
-    except:
+    except ImportError:
         bpy = None
 
     if bpy is not None:
index 7713ffeaaa4041027b46585a5f18f360392c9d70..551e2a87e9bdcde91e2e986f4d275126a8ffd4e6 100644 (file)
@@ -95,13 +95,23 @@ def main():
         print("    %s" % f)
 
     # strict imports
-    print("\n\n\n# running pep8...")
+    print("\n\n\n# checking imports...")
     import re
     import_check = re.compile(r"\s*from\s+[A-z\.]+\s+import \*\s*")
     for f, pep8_type in files:
         for i, l in enumerate(open(f, 'r', encoding='utf8')):
             if import_check.match(l):
                 print("%s:%d:0: global import bad practice" % (f, i + 1))
+    del re, import_check
+
+    print("\n\n\n# checking class definitions...")
+    import re
+    class_check = re.compile(r"\s*class\s+.*\(\):.*")
+    for f, pep8_type in files:
+        for i, l in enumerate(open(f, 'r', encoding='utf8')):
+            if class_check.match(l):
+                print("%s:%d:0: empty class (), remove" % (f, i + 1))
+    del re, class_check
 
     print("\n\n\n# running pep8...")