diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-04-22 09:26:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-04-22 09:26:54 +0300 |
commit | e6ceecdf97f927a497d567f0f271d2c51964d193 (patch) | |
tree | 3675737ce2accfbeec4465ace02bc7105e5e0366 /release/scripts/startup | |
parent | 4da050674e2c6a0ecc7d50733f7de8df3e77ee73 (diff) |
Cleanup: pep8, spelling
Diffstat (limited to 'release/scripts/startup')
15 files changed, 31 insertions, 32 deletions
diff --git a/release/scripts/startup/bl_operators/__init__.py b/release/scripts/startup/bl_operators/__init__.py index 65f7bde1809..4047505652f 100644 --- a/release/scripts/startup/bl_operators/__init__.py +++ b/release/scripts/startup/bl_operators/__init__.py @@ -54,7 +54,7 @@ if bpy.app.build_options.freestyle: _modules.append("freestyle") __import__(name=__name__, fromlist=_modules) _namespace = globals() -_modules_loaded = {name: _namespace[name] for name in _modules if name != 'bpy'} +_modules_loaded = {name: _namespace[name] for name in _modules if name != "bpy"} del _namespace diff --git a/release/scripts/startup/bl_operators/add_mesh_torus.py b/release/scripts/startup/bl_operators/add_mesh_torus.py index dfb734e9b5b..82014c87be9 100644 --- a/release/scripts/startup/bl_operators/add_mesh_torus.py +++ b/release/scripts/startup/bl_operators/add_mesh_torus.py @@ -153,40 +153,40 @@ class AddTorus(Operator, object_utils.AddObjectHelper): col = layout.column(align=True) col.label(text="Location") - col.prop(self, 'location', text="") + col.prop(self, "location", text="") col = layout.column(align=True) col.label(text="Rotation") - col.prop(self, 'rotation', text="") + col.prop(self, "rotation", text="") col = layout.column(align=True) col.label(text="Major Segments") - col.prop(self, 'major_segments', text="") + col.prop(self, "major_segments", text="") col = layout.column(align=True) col.label(text="Minor Segments") - col.prop(self, 'minor_segments', text="") + col.prop(self, "minor_segments", text="") col = layout.column(align=True) col.label(text="Torus Dimensions") - col.row().prop(self, 'mode', expand=True) + col.row().prop(self, "mode", expand=True) if self.mode == 'MAJOR_MINOR': col = layout.column(align=True) col.label(text="Major Radius") - col.prop(self, 'major_radius', text="") + col.prop(self, "major_radius", text="") col = layout.column(align=True) col.label(text="Minor Radius") - col.prop(self, 'minor_radius', text="") + col.prop(self, "minor_radius", text="") else: col = layout.column(align=True) col.label(text="Exterior Radius") - col.prop(self, 'abso_major_rad', text="") + col.prop(self, "abso_major_rad", text="") col = layout.column(align=True) col.label(text="Interior Radius") - col.prop(self, 'abso_minor_rad', text="") + col.prop(self, "abso_minor_rad", text="") def invoke(self, context, event): object_utils.object_add_grid_scale_apply_operator(self, context) diff --git a/release/scripts/startup/bl_operators/clip.py b/release/scripts/startup/bl_operators/clip.py index 7e4e0ea9246..8049ba3bbe2 100644 --- a/release/scripts/startup/bl_operators/clip.py +++ b/release/scripts/startup/bl_operators/clip.py @@ -552,8 +552,8 @@ class CLIP_OT_setup_tracking_scene(Operator): world.light_settings.sample_method = 'ADAPTIVE_QMC' world.light_settings.samples = 7 world.light_settings.threshold = 0.005 - if hasattr(scene, 'cycles'): - world.light_settings.ao_factor = 0.05 + if hasattr(scene, "cycles"): + world.light_settings.ao_factor = 0.05 @staticmethod def _findOrCreateCamera(context): @@ -841,7 +841,7 @@ class CLIP_OT_setup_tracking_scene(Operator): self._offsetNodes(tree) scene.render.alpha_mode = 'TRANSPARENT' - if hasattr(scene, 'cycles'): + if hasattr(scene, "cycles"): scene.cycles.film_transparent = True @staticmethod diff --git a/release/scripts/startup/bl_operators/screen_play_rendered_anim.py b/release/scripts/startup/bl_operators/screen_play_rendered_anim.py index 5fe74eec709..a5565699364 100644 --- a/release/scripts/startup/bl_operators/screen_play_rendered_anim.py +++ b/release/scripts/startup/bl_operators/screen_play_rendered_anim.py @@ -122,7 +122,6 @@ class PlayRenderedAnim(Operator): if not os.path.exists(file): self.report({'WARNING'}, "File %r not found" % file) - cmd = [player_path] # extra options, fps controls etc. if scene.use_preview_range: diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py index 51117f68558..c110b429aad 100644 --- a/release/scripts/startup/bl_ui/__init__.py +++ b/release/scripts/startup/bl_ui/__init__.py @@ -86,7 +86,7 @@ if bpy.app.build_options.freestyle: _modules.append("properties_freestyle") __import__(name=__name__, fromlist=_modules) _namespace = globals() -_modules_loaded = {name: _namespace[name] for name in _modules if name != 'bpy'} +_modules_loaded = {name: _namespace[name] for name in _modules if name != "bpy"} del _namespace diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py index 6c87af8ad68..24a67a22c1f 100644 --- a/release/scripts/startup/bl_ui/properties_data_camera.py +++ b/release/scripts/startup/bl_ui/properties_data_camera.py @@ -142,12 +142,12 @@ class DATA_PT_camera_stereoscopy(CameraButtonsPanel, Panel): @classmethod def poll(cls, context): render = context.scene.render - return (super().poll(context) and render.use_multiview \ - and render.views_format == 'STEREO_3D') + return (super().poll(context) and render.use_multiview and + render.views_format == 'STEREO_3D') def draw(self, context): layout = self.layout - render = context.scene.render + # render = context.scene.render st = context.camera.stereo col = layout.column() diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py index 9277bbe20f9..eb8ffa1fb60 100644 --- a/release/scripts/startup/bl_ui/properties_data_curve.py +++ b/release/scripts/startup/bl_ui/properties_data_curve.py @@ -321,7 +321,7 @@ class DATA_PT_font(CurveButtonsPanelText, Panel): row.label(text="Bold & Italic") row.template_ID(text, "font_bold_italic", open="font.open", unlink="font.unlink") - #layout.prop(text, "font") + # layout.prop(text, "font") split = layout.split() diff --git a/release/scripts/startup/bl_ui/properties_freestyle.py b/release/scripts/startup/bl_ui/properties_freestyle.py index adc706569b1..8f8d8470fec 100644 --- a/release/scripts/startup/bl_ui/properties_freestyle.py +++ b/release/scripts/startup/bl_ui/properties_freestyle.py @@ -74,8 +74,8 @@ class RenderLayerFreestyleButtonsPanel: rd = context.scene.render with_freestyle = bpy.app.build_options.freestyle - return (scene and with_freestyle and rd.use_freestyle - and rd.layers.active and(scene.render.engine in cls.COMPAT_ENGINES)) + return (scene and with_freestyle and rd.use_freestyle and + rd.layers.active and(scene.render.engine in cls.COMPAT_ENGINES)) class RenderLayerFreestyleEditorButtonsPanel(RenderLayerFreestyleButtonsPanel): diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py index f39a73ec00b..616c5fdb854 100644 --- a/release/scripts/startup/bl_ui/properties_game.py +++ b/release/scripts/startup/bl_ui/properties_game.py @@ -542,7 +542,7 @@ class SCENE_PT_game_hysteresis(SceneButtonsPanel, Panel): row.prop(gs, "scene_hysteresis_percentage", text="") -class WorldButtonsPanel(): +class WorldButtonsPanel: bl_space_type = 'PROPERTIES' bl_region_type = 'WINDOW' bl_context = "world" diff --git a/release/scripts/startup/bl_ui/properties_mask_common.py b/release/scripts/startup/bl_ui/properties_mask_common.py index 9d94d5efa2e..f4836da50bc 100644 --- a/release/scripts/startup/bl_ui/properties_mask_common.py +++ b/release/scripts/startup/bl_ui/properties_mask_common.py @@ -190,7 +190,7 @@ class MASK_PT_point: col.prop_search(parent, "parent", tracking, "objects", icon='OBJECT_DATA', text="Object:") - tracks_list = "tracks" if parent.type == 'POINT_TRACK' else 'plane_tracks' + tracks_list = "tracks" if parent.type == 'POINT_TRACK' else "plane_tracks" if parent.parent in tracking.objects: object = tracking.objects[parent.parent] diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index 35f77e02834..6908668ec86 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -274,7 +274,7 @@ class RENDER_PT_performance(RenderButtonsPanel, Panel): col.prop(rd, "tile_y", text="Y") col.separator() - col.prop(rd, 'preview_start_resolution') + col.prop(rd, "preview_start_resolution") col = split.column() col.label(text="Memory:") diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py index 44dfe2a688e..8acf8cfaef3 100644 --- a/release/scripts/startup/bl_ui/space_filebrowser.py +++ b/release/scripts/startup/bl_ui/space_filebrowser.py @@ -84,7 +84,7 @@ class FILEBROWSER_HT_header(Header): class FILEBROWSER_UL_dir(bpy.types.UIList): def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): direntry = item - space = context.space_data + # space = context.space_data icon = 'NONE' if active_propname == "system_folders_active": icon = 'DISK_DRIVE' @@ -99,7 +99,7 @@ class FILEBROWSER_UL_dir(bpy.types.UIList): row = layout.row(align=True) row.enabled = direntry.is_valid # Non-editable entries would show grayed-out, which is bad in this specific case, so switch to mere label. - if direntry.is_property_readonly('name'): + if direntry.is_property_readonly("name"): row.label(text=direntry.name, icon=icon) else: row.prop(direntry, "name", text="", emboss=False, icon=icon) diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py index 27928ae3be1..2f5381e58c8 100644 --- a/release/scripts/startup/bl_ui/space_graph.py +++ b/release/scripts/startup/bl_ui/space_graph.py @@ -281,6 +281,7 @@ class GRAPH_MT_key_transform(Menu): layout.operator("transform.rotate", text="Rotate") layout.operator("transform.resize", text="Scale") + class GRAPH_MT_delete(Menu): bl_label = "Delete" diff --git a/release/scripts/startup/bl_ui/space_logic.py b/release/scripts/startup/bl_ui/space_logic.py index 1633a37169b..48b54feba17 100644 --- a/release/scripts/startup/bl_ui/space_logic.py +++ b/release/scripts/startup/bl_ui/space_logic.py @@ -54,11 +54,11 @@ class LOGIC_PT_properties(Panel): row.label("See Text Object") else: props = layout.operator("object.game_property_new", text="Add Text Game Property", icon='ZOOMIN') - props.name = 'Text' + props.name = "Text" props.type = 'STRING' props = layout.operator("object.game_property_new", text="Add Game Property", icon='ZOOMIN') - props.name = '' + props.name = "" for i, prop in enumerate(game.properties): @@ -74,10 +74,10 @@ class LOGIC_PT_properties(Panel): sub = row.row(align=True) props = sub.operator("object.game_property_move", text="", icon='TRIA_UP') props.index = i - props.direction = "UP" + props.direction = 'UP' props = sub.operator("object.game_property_move", text="", icon='TRIA_DOWN') props.index = i - props.direction = "DOWN" + props.direction = 'DOWN' row.operator("object.game_property_remove", text="", icon='X', emboss=False).index = i diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 4d8230e2f4d..07631f37339 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -935,7 +935,7 @@ class VIEW3D_MT_angle_control(Menu): settings = UnifiedPaintPanel.paint_settings(context) brush = settings.brush - sculpt = (context.sculpt_object != None) + sculpt = (context.sculpt_object is not None) tex_slot = brush.texture_slot @@ -3020,7 +3020,6 @@ class VIEW3D_PT_view3d_shading(Panel): if obj and obj.mode == 'EDIT': col.prop(view, "show_occlude_wire") - fx_settings = view.fx_settings sub = col.column() |