[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48613] trunk/blender/release/scripts: style cleanup

Campbell Barton ideasman42 at gmail.com
Wed Jul 4 23:41:10 CEST 2012


Revision: 48613
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48613
Author:   campbellbarton
Date:     2012-07-04 21:41:05 +0000 (Wed, 04 Jul 2012)
Log Message:
-----------
style cleanup

Modified Paths:
--------------
    trunk/blender/release/scripts/modules/console_shell.py
    trunk/blender/release/scripts/startup/bl_operators/clip.py
    trunk/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py
    trunk/blender/release/scripts/startup/bl_operators/wm.py
    trunk/blender/release/scripts/startup/bl_ui/properties_data_modifier.py
    trunk/blender/release/scripts/startup/bl_ui/properties_game.py
    trunk/blender/release/scripts/startup/bl_ui/properties_object.py
    trunk/blender/release/scripts/startup/bl_ui/properties_particle.py
    trunk/blender/release/scripts/startup/bl_ui/space_console.py
    trunk/blender/release/scripts/startup/bl_ui/space_image.py
    trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py
    trunk/blender/release/scripts/startup/bl_ui/space_view3d.py
    trunk/blender/release/scripts/templates/addon_add_object.py
    trunk/blender/release/scripts/templates/gamelogic.py
    trunk/blender/release/scripts/templates/ui_panel_simple.py

Modified: trunk/blender/release/scripts/modules/console_shell.py
===================================================================
--- trunk/blender/release/scripts/modules/console_shell.py	2012-07-04 20:47:12 UTC (rev 48612)
+++ trunk/blender/release/scripts/modules/console_shell.py	2012-07-04 21:41:05 UTC (rev 48613)
@@ -24,8 +24,8 @@
 
 
 def add_scrollback(text, text_type):
-    for l in text.split('\n'):
-        bpy.ops.console.scrollback_append(text=l.replace('\t', '    '),
+    for l in text.split("\n"):
+        bpy.ops.console.scrollback_append(text=l.replace("\t", "    "),
             type=text_type)
 
 
@@ -40,7 +40,7 @@
 
     add_scrollback(output, style)
 
-PROMPT = '$ '
+PROMPT = "$ "
 
 
 def execute(context):

Modified: trunk/blender/release/scripts/startup/bl_operators/clip.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/clip.py	2012-07-04 20:47:12 UTC (rev 48612)
+++ trunk/blender/release/scripts/startup/bl_operators/clip.py	2012-07-04 21:41:05 UTC (rev 48613)
@@ -497,7 +497,7 @@
                 fg = rlayers[0]
                 fg.name = 'Foreground'
             else:
-                fg = scene.render.layers.new('Foreground')
+                fg = scene.render.layers.new("Foreground")
 
             fg.use_sky = False
             fg.layers = [True] + [False] * 19
@@ -505,7 +505,7 @@
             fg.use_pass_vector = True
 
         if not scene.render.layers.get("Background"):
-            bg = scene.render.layers.new('Background')
+            bg = scene.render.layers.new("Background")
             bg.use_pass_shadow = True
             bg.use_pass_ambient_occlusion = True
             bg.layers = [False] * 10 + [True] + [False] * 9
@@ -560,7 +560,7 @@
             space.show_backdrop = True
 
         CLIP_spaces_walk(context, True, 'NODE_EDITOR', 'NODE_EDITOR',
-                          setup_space)
+                         setup_space)
 
         sc = context.space_data
         scene = context.scene
@@ -612,46 +612,46 @@
         add_shadow.blend_type = 'ADD'
 
         mul_shadow.blend_type = 'MULTIPLY'
-        mul_shadow.inputs['Fac'].default_value = 0.8
+        mul_shadow.inputs["Fac"].default_value = 0.8
 
         mul_image.blend_type = 'MULTIPLY'
-        mul_image.inputs['Fac'].default_value = 0.8
+        mul_image.inputs["Fac"].default_value = 0.8
 
         vector_blur.factor = 0.75
 
         # create links
-        tree.links.new(movieclip.outputs['Image'], distortion.inputs['Image'])
+        tree.links.new(movieclip.outputs["Image"], distortion.inputs["Image"])
 
         if need_stabilization:
-            tree.links.new(distortion.outputs['Image'],
-                stabilize.inputs['Image'])
-            tree.links.new(stabilize.outputs['Image'], scale.inputs['Image'])
+            tree.links.new(distortion.outputs["Image"],
+                stabilize.inputs["Image"])
+            tree.links.new(stabilize.outputs["Image"], scale.inputs["Image"])
         else:
-            tree.links.new(distortion.outputs['Image'], scale.inputs['Image'])
+            tree.links.new(distortion.outputs["Image"], scale.inputs["Image"])
 
-        tree.links.new(rlayer_bg.outputs['Alpha'], invert.inputs['Color'])
+        tree.links.new(rlayer_bg.outputs["Alpha"], invert.inputs["Color"])
 
-        tree.links.new(invert.outputs['Color'], add_shadow.inputs[1])
-        tree.links.new(rlayer_bg.outputs['Shadow'], add_shadow.inputs[2])
+        tree.links.new(invert.outputs["Color"], add_shadow.inputs[1])
+        tree.links.new(rlayer_bg.outputs["Shadow"], add_shadow.inputs[2])
 
-        tree.links.new(invert.outputs['Color'], add_ao.inputs[1])
-        tree.links.new(rlayer_bg.outputs['AO'], add_ao.inputs[2])
+        tree.links.new(invert.outputs["Color"], add_ao.inputs[1])
+        tree.links.new(rlayer_bg.outputs["AO"], add_ao.inputs[2])
 
-        tree.links.new(add_ao.outputs['Image'], mul_shadow.inputs[1])
-        tree.links.new(add_shadow.outputs['Image'], mul_shadow.inputs[2])
+        tree.links.new(add_ao.outputs["Image"], mul_shadow.inputs[1])
+        tree.links.new(add_shadow.outputs["Image"], mul_shadow.inputs[2])
 
-        tree.links.new(scale.outputs['Image'], mul_image.inputs[1])
-        tree.links.new(mul_shadow.outputs['Image'], mul_image.inputs[2])
+        tree.links.new(scale.outputs["Image"], mul_image.inputs[1])
+        tree.links.new(mul_shadow.outputs["Image"], mul_image.inputs[2])
 
-        tree.links.new(rlayer_fg.outputs['Image'], vector_blur.inputs['Image'])
-        tree.links.new(rlayer_fg.outputs['Z'], vector_blur.inputs['Z'])
-        tree.links.new(rlayer_fg.outputs['Speed'], vector_blur.inputs['Speed'])
+        tree.links.new(rlayer_fg.outputs["Image"], vector_blur.inputs["Image"])
+        tree.links.new(rlayer_fg.outputs["Z"], vector_blur.inputs["Z"])
+        tree.links.new(rlayer_fg.outputs["Speed"], vector_blur.inputs["Speed"])
 
-        tree.links.new(mul_image.outputs['Image'], alphaover.inputs[1])
-        tree.links.new(vector_blur.outputs['Image'], alphaover.inputs[2])
+        tree.links.new(mul_image.outputs["Image"], alphaover.inputs[1])
+        tree.links.new(vector_blur.outputs["Image"], alphaover.inputs[2])
 
-        tree.links.new(alphaover.outputs['Image'], composite.inputs['Image'])
-        tree.links.new(alphaover.outputs['Image'], viewer.inputs['Image'])
+        tree.links.new(alphaover.outputs["Image"], composite.inputs["Image"])
+        tree.links.new(alphaover.outputs["Image"], viewer.inputs["Image"])
 
         # place nodes
         movieclip.location = Vector((-300.0, 350.0))

Modified: trunk/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py	2012-07-04 20:47:12 UTC (rev 48612)
+++ trunk/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py	2012-07-04 21:41:05 UTC (rev 48613)
@@ -709,7 +709,7 @@
     # with the islands.
 
     #print '\tPacking UV Islands...'
-#XXX	Window.DrawProgressBar(0.7, 'Packing %i UV Islands...' % len(packBoxes) )
+#XXX	Window.DrawProgressBar(0.7, "Packing %i UV Islands..." % len(packBoxes) )
 
     # time1 = time.time()
     packWidth, packHeight = geometry.box_pack_2d(packBoxes)
@@ -720,7 +720,7 @@
     #	raise "Error packed boxes differs from original length"
 
     #print '\tWriting Packed Data to faces'
-#XXX	Window.DrawProgressBar(0.8, 'Writing Packed Data to faces')
+#XXX	Window.DrawProgressBar(0.8, "Writing Packed Data to faces")
 
     # Sort by ID, so there in sync again
     islandIdx = len(islandList)

Modified: trunk/blender/release/scripts/startup/bl_operators/wm.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/wm.py	2012-07-04 20:47:12 UTC (rev 48612)
+++ trunk/blender/release/scripts/startup/bl_operators/wm.py	2012-07-04 21:41:05 UTC (rev 48613)
@@ -1395,8 +1395,8 @@
         if not self.filepath:
             raise Exception("Filepath not set")
 
-        if not self.filepath.endswith('.py'):
-            self.filepath += '.py'
+        if not self.filepath.endswith(".py"):
+            self.filepath += ".py"
 
         wm = context.window_manager
 

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_data_modifier.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_data_modifier.py	2012-07-04 20:47:12 UTC (rev 48612)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_data_modifier.py	2012-07-04 21:41:05 UTC (rev 48613)
@@ -971,8 +971,8 @@
         split = layout.split()
 
         col = split.column(align=True)
-        col.operator("object.skin_loose_mark_clear", text="Mark Loose").action = "MARK"
-        col.operator("object.skin_loose_mark_clear", text="Clear Loose").action = "CLEAR"
+        col.operator("object.skin_loose_mark_clear", text="Mark Loose").action = 'MARK'
+        col.operator("object.skin_loose_mark_clear", text="Clear Loose").action = 'CLEAR'
 
         col = split.column()
         col.operator("object.skin_root_mark", text="Mark Root")

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_game.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_game.py	2012-07-04 20:47:12 UTC (rev 48612)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_game.py	2012-07-04 21:41:05 UTC (rev 48613)
@@ -454,7 +454,7 @@
 
         rd = context.scene.game_settings.recast_data
 
-        layout.operator("mesh.navmesh_make", text='Build navigation mesh')
+        layout.operator("mesh.navmesh_make", text="Build navigation mesh")
 
         col = layout.column()
         col.label(text="Rasterization:")

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_object.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_object.py	2012-07-04 20:47:12 UTC (rev 48612)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_object.py	2012-07-04 21:41:05 UTC (rev 48613)
@@ -219,7 +219,7 @@
         col = split.column()
         col.prop(ob, "show_name", text="Name")
         col.prop(ob, "show_axis", text="Axis")
-        if ob.type in {"MESH", "CURVE", "SURFACE", "META", "FONT"}:
+        if ob.type in {'MESH', 'CURVE', 'SURFACE', 'META', 'FONT'}:
             # Makes no sense for cameras, armtures, etc.!
             col.prop(ob, "show_wire", text="Wire")
             # Only useful with object having faces/materials...

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_particle.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_particle.py	2012-07-04 20:47:12 UTC (rev 48612)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_particle.py	2012-07-04 21:41:05 UTC (rev 48613)
@@ -86,7 +86,7 @@
     def draw(self, context):
         layout = self.layout
 
-        if context.scene.render.engine == "BLENDER_GAME":
+        if context.scene.render.engine == 'BLENDER_GAME':
             layout.label("Not available in the Game Engine")
             return
 


@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list