diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-01-01 12:52:54 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-01-01 12:52:54 +0400 |
commit | c99975e24fe550e46c57639a1f236b89c4745a02 (patch) | |
tree | c9f9e793af6306eb14ddb5da70d848ea71c3cafe /release | |
parent | 418d66242fd00ffdbef5447d055811e5eb1bb46e (diff) |
pep8 edits
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/modules/animsys_refactor.py | 1 | ||||
-rw-r--r-- | release/scripts/modules/sys_info.py | 2 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/object_randomize_transform.py | 2 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 12 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_game.py | 10 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_particle.py | 2 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 2 |
7 files changed, 19 insertions, 12 deletions
diff --git a/release/scripts/modules/animsys_refactor.py b/release/scripts/modules/animsys_refactor.py index f97ba3c2a50..8db21e357d9 100644 --- a/release/scripts/modules/animsys_refactor.py +++ b/release/scripts/modules/animsys_refactor.py @@ -38,6 +38,7 @@ class DataPathBuilder(object): """ Dummy class used to parse fcurve and driver data paths. """ __slots__ = ("data_path", ) + def __init__(self, attrs): self.data_path = attrs diff --git a/release/scripts/modules/sys_info.py b/release/scripts/modules/sys_info.py index 64ff1c0f007..10aba96afd0 100644 --- a/release/scripts/modules/sys_info.py +++ b/release/scripts/modules/sys_info.py @@ -99,7 +99,7 @@ def write_sysinfo(op): ffmpeg = bpy.app.ffmpeg if ffmpeg.supported: for lib in ['avcodec', 'avdevice', 'avformat', 'avutil', 'swscale']: - output.write('{}:{}{}\n'.format(lib, " "*(10-len(lib)), + output.write('{}:{}{}\n'.format(lib, " " * (10 - len(lib)), getattr(ffmpeg, lib + '_version_string'))) else: output.write('Blender was built without FFmpeg support\n') diff --git a/release/scripts/startup/bl_operators/object_randomize_transform.py b/release/scripts/startup/bl_operators/object_randomize_transform.py index fa36e48d47b..d3d70f892b8 100644 --- a/release/scripts/startup/bl_operators/object_randomize_transform.py +++ b/release/scripts/startup/bl_operators/object_randomize_transform.py @@ -49,7 +49,7 @@ def randomize_selected(seed, delta, loc, rot, scale, scale_even, scale_min): rotation_mode = obj.rotation_mode if rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}: obj.rotation_mode = 'XYZ' - + if delta: obj.delta_rotation_euler[0] += vec[0] obj.delta_rotation_euler[1] += vec[1] diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index cf6d62a330b..fa3b84ed8d7 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -32,6 +32,7 @@ from rna_prop_ui import rna_idprop_ui_prop_get, rna_idprop_ui_prop_clear import subprocess import os + class MESH_OT_delete_edgeloop(Operator): '''Delete an edge loop by merging the faces on each side to a single face loop''' bl_idname = "mesh.delete_edgeloop" @@ -1176,27 +1177,29 @@ class WM_OT_copy_prev_settings(Operator): return {'CANCELLED'} + class WM_OT_blenderplayer_start(bpy.types.Operator): '''Launch the Blenderplayer with the current blendfile''' bl_idname = "wm.blenderplayer_start" bl_label = "Start" - + blender_bin_path = bpy.app.binary_path blender_bin_dir = os.path.dirname(blender_bin_path) ext = os.path.splitext(blender_bin_path)[-1] player_path = os.path.join(blender_bin_dir, "blenderplayer" + ext) - + def execute(self, context): import sys if sys.platform == "darwin": self.player_path = os.path.join(self.blender_bin_dir, "../../../blenderplayer.app/Contents/MacOS/blenderplayer") - + filepath = bpy.app.tempdir + "game.blend" bpy.ops.wm.save_as_mainfile(filepath=filepath, check_existing=False, copy=True) subprocess.call([self.player_path, filepath]) return {'FINISHED'} + class WM_OT_keyconfig_test(Operator): "Test keyconfig for conflicts" bl_idname = "wm.keyconfig_test" @@ -1462,6 +1465,7 @@ class WM_OT_operator_cheat_sheet(Operator): self.report({'INFO'}, "See OperatorList.txt textblock") return {'FINISHED'} + # ----------------------------------------------------------------------------- # Addon Operators @@ -1809,7 +1813,7 @@ class WM_OT_theme_export(Operator, ExportHelper): def execute(self, context): import rna_xml - + filepath = self.filepath file = open(filepath, 'w', encoding='utf-8') diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py index 355a6771022..b7b2acc6b08 100644 --- a/release/scripts/startup/bl_ui/properties_game.py +++ b/release/scripts/startup/bl_ui/properties_game.py @@ -247,6 +247,7 @@ class RenderButtonsPanel(): class RENDER_PT_embedded(RenderButtonsPanel, bpy.types.Panel): bl_label = "Embedded Player" COMPAT_ENGINES = {'BLENDER_GAME'} + def draw(self, context): layout = self.layout @@ -270,17 +271,17 @@ class RENDER_PT_game_player(RenderButtonsPanel, Panel): layout = self.layout gs = context.scene.game_settings - + row = layout.row() row.operator("wm.blenderplayer_start", text="Start") row.prop(gs, "show_fullscreen") - + row = layout.row() row.label(text="Resolution:") row = layout.row(align=True) row.prop(gs, "resolution_x", slider=False, text="X") row.prop(gs, "resolution_y", slider=False, text="Y") - + col = layout.column() col.label(text="Quality:") col = layout.column(align=True) @@ -288,7 +289,6 @@ class RENDER_PT_game_player(RenderButtonsPanel, Panel): col.prop(gs, "frequency", text="Refresh Rate", slider=False) - class RENDER_PT_game_stereo(RenderButtonsPanel, Panel): bl_label = "Stereo" COMPAT_ENGINES = {'BLENDER_GAME'} @@ -476,6 +476,7 @@ class SCENE_PT_game_navmesh(SceneButtonsPanel, Panel): row.prop(rd, "sample_dist") row.prop(rd, "sample_max_error") + class RENDER_PT_game_sound(RenderButtonsPanel, Panel): bl_label = "Sound" COMPAT_ENGINES = {'BLENDER_GAME'} @@ -491,6 +492,7 @@ class RENDER_PT_game_sound(RenderButtonsPanel, Panel): col.prop(scene, "audio_doppler_speed", text="Speed") col.prop(scene, "audio_doppler_factor") + class WorldButtonsPanel(): bl_space_type = 'PROPERTIES' bl_region_type = 'WINDOW' diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index b19cf0032af..5e68351d9e6 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -85,7 +85,7 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel): def draw(self, context): layout = self.layout - + 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_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 46a569c71d4..84d207f4e45 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2248,7 +2248,7 @@ class VIEW3D_PT_view3d_meshdisplay(Panel): col.prop(mesh, "show_extra_face_angle") col.prop(mesh, "show_extra_face_area") if bpy.app.debug: - col.prop(mesh, "show_extra_indices") + col.prop(mesh, "show_extra_indices") class VIEW3D_PT_view3d_curvedisplay(Panel): |