diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-05 01:41:05 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-05 01:41:05 +0400 |
commit | 2a140e93c173b4f358b15723c2d00f3c8bf292bb (patch) | |
tree | 1cd0ed6f759d3fb35946a64336442ba40efacf38 | |
parent | 9f22750422940681dba14839a762c6f8bf02dba6 (diff) |
style cleanup
-rw-r--r-- | release/scripts/modules/console_shell.py | 6 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/clip.py | 52 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/uvcalc_smart_project.py | 4 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 4 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_data_modifier.py | 4 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_game.py | 2 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_object.py | 2 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_particle.py | 2 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_console.py | 4 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_image.py | 12 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_sequencer.py | 4 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 8 | ||||
-rw-r--r-- | release/scripts/templates/addon_add_object.py | 2 | ||||
-rw-r--r-- | release/scripts/templates/gamelogic.py | 28 | ||||
-rw-r--r-- | release/scripts/templates/ui_panel_simple.py | 4 |
15 files changed, 69 insertions, 69 deletions
diff --git a/release/scripts/modules/console_shell.py b/release/scripts/modules/console_shell.py index c27524ffe44..8beff24eedb 100644 --- a/release/scripts/modules/console_shell.py +++ b/release/scripts/modules/console_shell.py @@ -24,8 +24,8 @@ language_id = "shell" 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 @@ def shell_run(text): add_scrollback(output, style) -PROMPT = '$ ' +PROMPT = "$ " def execute(context): diff --git a/release/scripts/startup/bl_operators/clip.py b/release/scripts/startup/bl_operators/clip.py index ffa66274f12..97cfadeb7b2 100644 --- a/release/scripts/startup/bl_operators/clip.py +++ b/release/scripts/startup/bl_operators/clip.py @@ -497,7 +497,7 @@ class CLIP_OT_setup_tracking_scene(Operator): 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 @@ class CLIP_OT_setup_tracking_scene(Operator): 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 @@ class CLIP_OT_setup_tracking_scene(Operator): 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 @@ class CLIP_OT_setup_tracking_scene(Operator): 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)) diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py index c9b41914419..9fa44cac812 100644 --- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py +++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py @@ -709,7 +709,7 @@ def packIslands(islandList): # 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 @@ def packIslands(islandList): # 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) diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 2ebc8e80b71..2977c5ccc2f 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -1395,8 +1395,8 @@ class WM_OT_keyconfig_export(Operator): 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 diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index abcd27c308e..7485e532bd4 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -971,8 +971,8 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): 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") diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py index 0b6e4154050..c25c0c7d40d 100644 --- a/release/scripts/startup/bl_ui/properties_game.py +++ b/release/scripts/startup/bl_ui/properties_game.py @@ -454,7 +454,7 @@ class SCENE_PT_game_navmesh(SceneButtonsPanel, Panel): 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:") diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py index 86fc1dac4fc..68b261cc1d5 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -219,7 +219,7 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel): 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... diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index a667125d4ea..8d220e5aae6 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -86,7 +86,7 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel): 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 --git a/release/scripts/startup/bl_ui/space_console.py b/release/scripts/startup/bl_ui/space_console.py index 5ec9d06ec89..7f9699f457b 100644 --- a/release/scripts/startup/bl_ui/space_console.py +++ b/release/scripts/startup/bl_ui/space_console.py @@ -74,7 +74,7 @@ class CONSOLE_MT_language(Menu): languages = [] for modname, mod in sys.modules.items(): if modname.startswith("console_") and hasattr(mod, "execute"): - languages.append(modname.split('_', 1)[-1]) + languages.append(modname.split("_", 1)[-1]) languages.sort() @@ -83,7 +83,7 @@ class CONSOLE_MT_language(Menu): def add_scrollback(text, text_type): - for l in text.split('\n'): + for l in text.split("\n"): bpy.ops.console.scrollback_append(text=l.replace('\t', ' '), type=text_type) diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 44fb429ffe7..cfe5d66740c 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -797,12 +797,12 @@ class IMAGE_UV_sculpt_curve(Panel): layout.template_curve_mapping(brush, "curve") row = layout.row(align=True) - row.operator("brush.curve_preset", icon="SMOOTHCURVE", text="").shape = 'SMOOTH' - row.operator("brush.curve_preset", icon="SPHERECURVE", text="").shape = 'ROUND' - row.operator("brush.curve_preset", icon="ROOTCURVE", text="").shape = 'ROOT' - row.operator("brush.curve_preset", icon="SHARPCURVE", text="").shape = 'SHARP' - row.operator("brush.curve_preset", icon="LINCURVE", text="").shape = 'LINE' - row.operator("brush.curve_preset", icon="NOCURVE", text="").shape = 'MAX' + row.operator("brush.curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH' + row.operator("brush.curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND' + row.operator("brush.curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT' + row.operator("brush.curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP' + row.operator("brush.curve_preset", icon='LINCURVE', text="").shape = 'LINE' + row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX' class IMAGE_UV_sculpt(Panel, ImagePaintPanel): diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 76053987843..a71a2870bee 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -117,7 +117,7 @@ class SEQUENCER_MT_view(Menu): layout.operator_context = 'INVOKE_DEFAULT' # # XXX, invokes in the header view - # layout.operator("sequencer.view_ghost_border", text='Overlay Border') + # layout.operator("sequencer.view_ghost_border", text="Overlay Border") layout.operator("sequencer.view_selected") @@ -820,7 +820,7 @@ class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel): col.label(text="Build JPEG quality") col.prop(strip.proxy, "quality") - if strip.type == "MOVIE": + if strip.type == 'MOVIE': col = layout.column() col.label(text="Use timecode index:") diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 3819ae60b49..55cc47d98d5 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -1121,7 +1121,7 @@ class VIEW3D_MT_brush(Menu): sculpt_tool = brush.sculpt_tool layout.separator() - layout.operator_menu_enum("brush.curve_preset", "shape", text='Curve Preset') + layout.operator_menu_enum("brush.curve_preset", "shape", text="Curve Preset") layout.separator() if sculpt_tool != 'GRAB': @@ -1772,7 +1772,7 @@ class VIEW3D_MT_edit_mesh_vertices(Menu): layout.operator("mesh.vertices_smooth") layout.operator("mesh.remove_doubles") - layout.operator("mesh.sort_elements", text="Sort Vertices").elements = {"VERT"} + layout.operator("mesh.sort_elements", text="Sort Vertices").elements = {'VERT'} layout.operator("mesh.select_vertex_path") @@ -1822,7 +1822,7 @@ class VIEW3D_MT_edit_mesh_edges(Menu): layout.operator("mesh.bevel") layout.operator("mesh.edge_split") layout.operator("mesh.bridge_edge_loops") - layout.operator("mesh.sort_elements", text="Sort Edges").elements = {"EDGE"} + layout.operator("mesh.sort_elements", text="Sort Edges").elements = {'EDGE'} layout.separator() @@ -1855,7 +1855,7 @@ class VIEW3D_MT_edit_mesh_faces(Menu): layout.operator("mesh.bevel") layout.operator("mesh.solidify") layout.operator("mesh.wireframe") - layout.operator("mesh.sort_elements", text="Sort Faces").elements = {"FACE"} + layout.operator("mesh.sort_elements", text="Sort Faces").elements = {'FACE'} layout.separator() diff --git a/release/scripts/templates/addon_add_object.py b/release/scripts/templates/addon_add_object.py index 3900f595584..a2d7315af4b 100644 --- a/release/scripts/templates/addon_add_object.py +++ b/release/scripts/templates/addon_add_object.py @@ -65,7 +65,7 @@ def add_object_button(self, context): self.layout.operator( OBJECT_OT_add_object.bl_idname, text="Add Object", - icon="PLUGIN") + icon='PLUGIN') def register(): diff --git a/release/scripts/templates/gamelogic.py b/release/scripts/templates/gamelogic.py index c6d15850a4e..01ac27c56cd 100644 --- a/release/scripts/templates/gamelogic.py +++ b/release/scripts/templates/gamelogic.py @@ -21,23 +21,23 @@ def main(): # Some example functions, remove to write your own script. # check for a positive sensor, will run on any object without errors. - print('Logic info for KX_GameObject', own.name) + print("Logic info for KX_GameObject", own.name) input = False for sens in cont.sensors: # The sensor can be on another object, we may want to use it own_sens = sens.owner - print(' sensor:', sens.name, end=' ') + print(" sensor:", sens.name, end=" ") if sens.positive: - print('(true)') + print("(true)") input = True else: - print('(false)') + print("(false)") for actu in cont.actuators: # The actuator can be on another object, we may want to use it own_actu = actu.owner - print(' actuator:', actu.name) + print(" actuator:", actu.name) # This runs the actuator or turns it off # note that actuators will continue to run unless explicitly turned off. @@ -49,25 +49,25 @@ def main(): # Its also good practice to get sensors and actuators by name # rather then index so any changes to their order wont break the script. - # sens_key = cont.sensors['key_sensor'] - # actu_motion = cont.actuators['motion'] + # sens_key = cont.sensors["key_sensor"] + # actu_motion = cont.actuators["motion"] # Loop through all other objects in the scene sce = bge.logic.getCurrentScene() - print('Scene Objects:', sce.name) + print("Scene Objects:", sce.name) for ob in sce.objects: - print(' ', ob.name, ob.worldPosition) + print(" ", ob.name, ob.worldPosition) # Example where collision objects are checked for their properties # adding to our objects "life" property """ - actu_collide = cont.sensors['collision_sens'] + actu_collide = cont.sensors["collision_sens"] for ob in actu_collide.objectHitList: # Check to see the object has this property - if ob.has_key('life'): - own['life'] += ob['life'] - ob['life'] = 0 - print(own['life']) + if "life" in ob: + own["life"] += ob["life"] + ob["life"] = 0 + print(own["life"]) """ main() diff --git a/release/scripts/templates/ui_panel_simple.py b/release/scripts/templates/ui_panel_simple.py index 6226240ff87..3fab7d92675 100644 --- a/release/scripts/templates/ui_panel_simple.py +++ b/release/scripts/templates/ui_panel_simple.py @@ -5,8 +5,8 @@ class HelloWorldPanel(bpy.types.Panel): """Creates a Panel in the Object properties window""" bl_label = "Hello World Panel" bl_idname = "OBJECT_PT_hello" - bl_space_type = "PROPERTIES" - bl_region_type = "WINDOW" + bl_space_type = 'PROPERTIES' + bl_region_type = 'WINDOW' bl_context = "object" def draw(self, context): |