[Bf-blender-cvs] [532c8ac5838] master: Cleanup: pep8 function indentation

Campbell Barton noreply at git.blender.org
Tue Jun 26 19:59:34 CEST 2018


Commit: 532c8ac58384309e77791e32ab78f448ad2a76a6
Author: Campbell Barton
Date:   Tue Jun 26 19:41:37 2018 +0200
Branches: master
https://developer.blender.org/rB532c8ac58384309e77791e32ab78f448ad2a76a6

Cleanup: pep8 function indentation

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

M	doc/python_api/examples/bge.texture.2.py
M	doc/python_api/examples/bge.texture.py
M	doc/python_api/examples/blf.py
M	doc/python_api/examples/bmesh.ops.1.py
M	doc/python_api/examples/bpy.app.handlers.1.py
M	doc/python_api/examples/bpy.app.handlers.py
M	doc/python_api/examples/bpy.app.translations.py
M	doc/python_api/examples/bpy.props.2.py
M	doc/python_api/examples/bpy.props.3.py
M	doc/python_api/examples/bpy.props.4.py
M	doc/python_api/examples/bpy.props.5.py
M	doc/python_api/examples/bpy.types.AddonPreferences.1.py
M	doc/python_api/examples/bpy.types.Menu.2.py
M	doc/python_api/examples/bpy.types.Menu.3.py
M	doc/python_api/examples/bpy.types.Menu.4.py
M	doc/python_api/examples/bpy.types.NodeTree.py
M	doc/python_api/examples/bpy.types.Operator.1.py
M	doc/python_api/examples/bpy.types.Operator.2.py
M	doc/python_api/examples/bpy.types.Operator.4.py
M	doc/python_api/examples/bpy.types.Operator.py
M	doc/python_api/examples/bpy.types.PropertyGroup.py
M	doc/python_api/examples/bpy.types.WindowManager.popup_menu.py
M	doc/python_api/examples/bpy.types.bpy_struct.keyframe_insert.1.py
M	doc/python_api/examples/gpu.offscreen.1.py
M	release/scripts/startup/bl_operators/__init__.py
M	release/scripts/startup/bl_operators/add_mesh_torus.py
M	release/scripts/startup/bl_operators/anim.py
M	release/scripts/startup/bl_operators/clip.py
M	release/scripts/startup/bl_operators/console.py
M	release/scripts/startup/bl_operators/file.py
M	release/scripts/startup/bl_operators/freestyle.py
M	release/scripts/startup/bl_operators/image.py
M	release/scripts/startup/bl_operators/mesh.py
M	release/scripts/startup/bl_operators/node.py
M	release/scripts/startup/bl_operators/object.py
M	release/scripts/startup/bl_operators/object_align.py
M	release/scripts/startup/bl_operators/object_quick_effects.py
M	release/scripts/startup/bl_operators/object_randomize_transform.py
M	release/scripts/startup/bl_operators/presets.py
M	release/scripts/startup/bl_operators/rigidbody.py
M	release/scripts/startup/bl_operators/screen_play_rendered_anim.py
M	release/scripts/startup/bl_operators/sequencer.py
M	release/scripts/startup/bl_operators/uvcalc_follow_active.py
M	release/scripts/startup/bl_operators/uvcalc_lightmap.py
M	release/scripts/startup/bl_operators/uvcalc_smart_project.py
M	release/scripts/startup/bl_operators/vertexpaint_dirt.py
M	release/scripts/startup/bl_operators/view3d.py
M	release/scripts/startup/bl_operators/wm.py
M	release/scripts/templates_py/addon_add_object.py
M	release/scripts/templates_py/background_job.py
M	release/scripts/templates_py/batch_export.py
M	release/scripts/templates_py/custom_nodes.py
M	release/scripts/templates_py/gamelogic.py
M	release/scripts/templates_py/gamelogic_simple.py
M	release/scripts/templates_py/operator_file_export.py
M	release/scripts/templates_py/operator_file_import.py
M	release/scripts/templates_py/operator_mesh_add.py
M	release/scripts/templates_py/operator_modal_draw.py
M	release/scripts/templates_py/operator_modal_view3d.py
M	release/scripts/templates_py/ui_menu.py
M	release/scripts/templates_py/ui_menu_simple.py
M	release/scripts/templates_py/ui_previews_dynamic_enum.py

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

diff --git a/doc/python_api/examples/bge.texture.2.py b/doc/python_api/examples/bge.texture.2.py
index 96619007fba..5125c3d1957 100644
--- a/doc/python_api/examples/bge.texture.2.py
+++ b/doc/python_api/examples/bge.texture.2.py
@@ -185,16 +185,16 @@ FragmentShader_v210 = """
 # Only use those for greater efficiency and compatiblity.
 #
 fg_shaders = {
-    '2vuy'       :FragmentShader_2vuy,
-    '8BitYUV'    :FragmentShader_2vuy,
-    'v210'       :FragmentShader_v210,
-    '10BitYUV'   :FragmentShader_v210,
-    '8BitBGRA'   :FragmentShader_R10l,
-    'BGRA'       :FragmentShader_R10l,
-    '8BitARGB'   :FragmentShader_R10l,
-    '10BitRGBXLE':FragmentShader_R10l,
-    'R10l'       :FragmentShader_R10l
-    }
+    '2vuy': FragmentShader_2vuy,
+    '8BitYUV': FragmentShader_2vuy,
+    'v210': FragmentShader_v210,
+    '10BitYUV': FragmentShader_v210,
+    '8BitBGRA': FragmentShader_R10l,
+    'BGRA': FragmentShader_R10l,
+    '8BitARGB': FragmentShader_R10l,
+    '10BitRGBXLE': FragmentShader_R10l,
+    'R10l': FragmentShader_R10l
+}
 
 
 #
@@ -220,6 +220,8 @@ def config_video(obj, format, pixel, is3D=False, mat=0, card=0):
 # Attach this function to an object that has a material with texture
 # and call it once to initialize the object
 #
+
+
 def init(cont):
     # config_video(cont.owner, 'HD720p5994', '8BitBGRA')
     # config_video(cont.owner, 'HD720p5994', '8BitYUV')
diff --git a/doc/python_api/examples/bge.texture.py b/doc/python_api/examples/bge.texture.py
index 8b24530b10a..510736805a2 100644
--- a/doc/python_api/examples/bge.texture.py
+++ b/doc/python_api/examples/bge.texture.py
@@ -34,7 +34,7 @@ if not hasattr(logic, 'video'):
     logic.mySources[0] = texture.VideoFFmpeg('movie1.avi')
     logic.mySources[1] = texture.VideoFFmpeg('movie2.avi')
 
-    #And then assign (and reassign) the source during the game
+    # And then assign (and reassign) the source during the game
     logic.video.source = logic.mySources[movieSel]
 
     # quick off the movie, but it wont play in the background
diff --git a/doc/python_api/examples/blf.py b/doc/python_api/examples/blf.py
index e288ac9db66..5e1a2ef64a7 100644
--- a/doc/python_api/examples/blf.py
+++ b/doc/python_api/examples/blf.py
@@ -15,6 +15,7 @@ font_info = {
     "handler": None,
 }
 
+
 def init():
     """init function - runs once"""
     import os
diff --git a/doc/python_api/examples/bmesh.ops.1.py b/doc/python_api/examples/bmesh.ops.1.py
index b307624467f..d6a5b1222d8 100644
--- a/doc/python_api/examples/bmesh.ops.1.py
+++ b/doc/python_api/examples/bmesh.ops.1.py
@@ -10,22 +10,22 @@ bm = bmesh.new()
 
 # Add a circle XXX, should return all geometry created, not just verts.
 bmesh.ops.create_circle(
-        bm,
-        cap_ends=False,
-        radius=0.2,
-        segments=8)
+    bm,
+    cap_ends=False,
+    radius=0.2,
+    segments=8)
 
 
 # Spin and deal with geometry on side 'a'
 edges_start_a = bm.edges[:]
 geom_start_a = bm.verts[:] + edges_start_a
 ret = bmesh.ops.spin(
-        bm,
-        geom=geom_start_a,
-        angle=math.radians(180.0),
-        steps=8,
-        axis=(1.0, 0.0, 0.0),
-        cent=(0.0, 1.0, 0.0))
+    bm,
+    geom=geom_start_a,
+    angle=math.radians(180.0),
+    steps=8,
+    axis=(1.0, 0.0, 0.0),
+    cent=(0.0, 1.0, 0.0))
 edges_end_a = [ele for ele in ret["geom_last"]
                if isinstance(ele, bmesh.types.BMEdge)]
 del ret
@@ -33,8 +33,8 @@ del ret
 
 # Extrude and create geometry on side 'b'
 ret = bmesh.ops.extrude_edge_only(
-        bm,
-        edges=edges_start_a)
+    bm,
+    edges=edges_start_a)
 geom_extrude_mid = ret["geom"]
 del ret
 
@@ -45,19 +45,19 @@ verts_extrude_b = [ele for ele in geom_extrude_mid
 edges_extrude_b = [ele for ele in geom_extrude_mid
                    if isinstance(ele, bmesh.types.BMEdge) and ele.is_boundary]
 bmesh.ops.translate(
-        bm,
-        verts=verts_extrude_b,
-        vec=(0.0, 0.0, 1.0))
+    bm,
+    verts=verts_extrude_b,
+    vec=(0.0, 0.0, 1.0))
 
 
 # Create the circle on side 'b'
 ret = bmesh.ops.spin(
-        bm,
-        geom=verts_extrude_b + edges_extrude_b,
-        angle=-math.radians(180.0),
-        steps=8,
-        axis=(1.0, 0.0, 0.0),
-        cent=(0.0, 1.0, 1.0))
+    bm,
+    geom=verts_extrude_b + edges_extrude_b,
+    angle=-math.radians(180.0),
+    steps=8,
+    axis=(1.0, 0.0, 0.0),
+    cent=(0.0, 1.0, 1.0))
 edges_end_b = [ele for ele in ret["geom_last"]
                if isinstance(ele, bmesh.types.BMEdge)]
 del ret
@@ -65,30 +65,30 @@ del ret
 
 # Bridge the resulting edge loops of both spins 'a & b'
 bmesh.ops.bridge_loops(
-        bm,
-        edges=edges_end_a + edges_end_b)
+    bm,
+    edges=edges_end_a + edges_end_b)
 
 
 # Now we have made a links of the chain, make a copy and rotate it
 # (so this looks something like a chain)
 
 ret = bmesh.ops.duplicate(
-        bm,
-        geom=bm.verts[:] + bm.edges[:] + bm.faces[:])
+    bm,
+    geom=bm.verts[:] + bm.edges[:] + bm.faces[:])
 geom_dupe = ret["geom"]
 verts_dupe = [ele for ele in geom_dupe if isinstance(ele, bmesh.types.BMVert)]
 del ret
 
 # position the new link
 bmesh.ops.translate(
-        bm,
-        verts=verts_dupe,
-        vec=(0.0, 0.0, 2.0))
+    bm,
+    verts=verts_dupe,
+    vec=(0.0, 0.0, 2.0))
 bmesh.ops.rotate(
-        bm,
-        verts=verts_dupe,
-        cent=(0.0, 1.0, 0.0),
-        matrix=mathutils.Matrix.Rotation(math.radians(90.0), 3, 'Z'))
+    bm,
+    verts=verts_dupe,
+    cent=(0.0, 1.0, 0.0),
+    matrix=mathutils.Matrix.Rotation(math.radians(90.0), 3, 'Z'))
 
 # Done with creating the mesh, simply link it into the scene so we can see it
 
diff --git a/doc/python_api/examples/bpy.app.handlers.1.py b/doc/python_api/examples/bpy.app.handlers.1.py
index 245ac199d58..34b16c27b86 100644
--- a/doc/python_api/examples/bpy.app.handlers.1.py
+++ b/doc/python_api/examples/bpy.app.handlers.1.py
@@ -17,4 +17,5 @@ from bpy.app.handlers import persistent
 def load_handler(dummy):
     print("Load Handler:", bpy.data.filepath)
 
+
 bpy.app.handlers.load_post.append(load_handler)
diff --git a/doc/python_api/examples/bpy.app.handlers.py b/doc/python_api/examples/bpy.app.handlers.py
index 078f9df77f2..808115119b9 100644
--- a/doc/python_api/examples/bpy.app.handlers.py
+++ b/doc/python_api/examples/bpy.app.handlers.py
@@ -11,4 +11,5 @@ import bpy
 def my_handler(scene):
     print("Frame Change", scene.frame_current)
 
+
 bpy.app.handlers.frame_change_pre.append(my_handler)
diff --git a/doc/python_api/examples/bpy.app.translations.py b/doc/python_api/examples/bpy.app.translations.py
index 4256147ef31..d18344f43be 100644
--- a/doc/python_api/examples/bpy.app.translations.py
+++ b/doc/python_api/examples/bpy.app.translations.py
@@ -54,19 +54,19 @@ translations_tuple = (
                  "Copyright (C) 2013 The Blender Foundation.",
                  "This file is distributed under the same license as the Blender package.",
                  "FIRST AUTHOR <EMAIL at ADDRESS>, YEAR."))),
-    ),
+     ),
     (("Operator", "Render: Copy Settings"),
      (("bpy.types.SCENE_OT_render_copy_settings",),
       ()),
      ("fr_FR", "Rendu : copier réglages",
                (False, ())),
-    ),
+     ),
     (("*", "Copy render settings from current scene to others"),
      (("bpy.types.SCENE_OT_render_copy_settings",),
       ()),
      ("fr_FR", "Copier les réglages de rendu depuis la scène courante vers d’autres",
                (False, ())),
-    ),
+     ),
     # ... etc, all messages from your addon.
 )
 
@@ -81,6 +81,7 @@ for msg in translations_tuple:
 
 # Define remaining addon (operators, UI...) here.
 
+
 def register():
    # Usual operator/UI/etc. registration...
 
diff --git a/doc/python_api/examples/bpy.props.2.py b/doc/python_api/examples/bpy.props.2.py
index ec9c838f5f2..aeb3bab65b4 100644
--- a/doc/python_api/examples/bpy.props.2.py
+++ b/doc/python_api/examples/bpy.props.2.py
@@ -14,6 +14,7 @@ class MaterialSettings(bpy.types.PropertyGroup):
     my_float = bpy.props.FloatProperty()
     my_string = bpy.props.StringProperty()
 
+
 bpy.utils.register_class(MaterialSettings)
 
 bpy.types.Material.my_settings = \
diff --git a/doc/python_api/examples/bpy.props.3.py b/doc/python_api/examples/bpy.props.3.py
index 807edde8f58..340618e5ca4 100644
--- a/doc/python_api/examples/bpy.props.3.py
+++ b/doc/python_api/examples/bpy.props.3.py
@@ -14,6 +14,7 @@ class SceneSettingItem(bpy.types.PropertyGroup):
     name = bpy.props.StringProperty(name="Test Prop", default="Unknown")
     value = bpy.props.IntProperty(name="Test Prop", default=22)
 
+
 bpy.utils.register_class(SceneSettingItem)
 
 bpy.types.Scene.my_settings = \
diff --git a/doc/python_api/examples/bpy.props.4.py b/doc/python_api/examples/bpy.props.4.py
index 2b44d94f72a..daab18c8986 100644
--- a/doc/python_api/examples/bpy.props.4.py
+++ b/doc/python_api/examples/bpy.props.4.py
@@ -14,6 +14,7 @@ import bpy
 def update_func(self, context):
     print("my test function", self)
 
+
 bpy.types.Scene.testprop = bpy.props.FloatProperty(update=update_func)
 
 bpy.context.scene.testprop = 11.0
diff --git a/doc/python_api/examples/bpy.props.5.py b/doc/python_api/examples/bpy.props.5.py
index a9e79fa0272..c428b4743f8 100644
--- a/doc/python_api/examples/bpy.props.5.py
+++ b/doc/python_api/examples/bpy.props.5.py
@@ -19,6 +19,7 @@ def get_float(self):
 def set_float(self, value):
     self["testprop"] = value
 
+
 bpy.types.Scene.test_float = bpy.props.FloatProperty(get=get_float, set=set_float)
 
 
@@ -27,6 +28,7 @@ def get_date(self):
     import datetime
     return str(datetime.datetime.now())
 
+
 bpy.types.Scene.test_date = bpy.props.StringProperty(get=get_date)
 
 
@@ -40,6 +42,7 @@ def get_array(self):
 def set_array(self, values):
     self["somebool"] = values[0] and values[1]
 
+
 bpy.types.Scene.test_array = bpy.props.BoolVectorProperty(size=2, get=get_array, set=set_array)
 
 
@@ -50,7 +53,7 @@ test_items = [
     ("GREEN", "Green", "", 2),
     ("BLUE", "Blue", "", 3),
     ("YELLOW", "Yellow", "", 4),
-    ]
+]
 
 
 def get_enum(self):
@@ -61,6 +64,7 @@ def get_enum(self):
 def set_enum(self, value):
     print("setting value", value)
 
+
 bpy.types.Scene.test_enum = bpy.props.EnumProperty(ite

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list