diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-09-17 12:36:17 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-09-17 12:36:17 +0400 |
commit | 0e0e528ea4f9529a549ab50a6a2da7a3187258a8 (patch) | |
tree | 665ad9cb332268f7639e00ad665bbdf8d14a7a8b /release/scripts | |
parent | f0f398dcf3101079f4965185eb82c23c54fc6923 (diff) |
Cleanup: pep8
Diffstat (limited to 'release/scripts')
19 files changed, 18 insertions, 30 deletions
diff --git a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py index ad2a70b84e8..8874ecceb77 100644 --- a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py +++ b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py @@ -343,10 +343,10 @@ def dump_rna_messages(msgs, reports, settings, verbose=False): process_msg(msgs, default_context, cls.__doc__, msgsrc, reports, check_ctxt_rna_tip, settings) # Panels' "tabs" system. - if hasattr(bl_rna, 'bl_category') and bl_rna.bl_category: + if hasattr(bl_rna, 'bl_category') and bl_rna.bl_category: process_msg(msgs, default_context, bl_rna.bl_category, msgsrc, reports, check_ctxt_rna, settings) - if hasattr(bl_rna, 'bl_label') and bl_rna.bl_label: + if hasattr(bl_rna, 'bl_label') and bl_rna.bl_label: process_msg(msgs, msgctxt, bl_rna.bl_label, msgsrc, reports, check_ctxt_rna, settings) walk_properties(cls) diff --git a/release/scripts/modules/bl_i18n_utils/utils.py b/release/scripts/modules/bl_i18n_utils/utils.py index 85977642bbb..911e1764698 100644 --- a/release/scripts/modules/bl_i18n_utils/utils.py +++ b/release/scripts/modules/bl_i18n_utils/utils.py @@ -1343,7 +1343,7 @@ class I18n: #key = self.settings.PO_HEADER_KEY #for uid, trans in self.trans.items(): #if key not in trans.msgs: - #trans.msgs[key] + #trans.msgs[key] self.unescape() def write(self, kind, langs=set()): diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index bc2e9368b71..e19766310ec 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -694,7 +694,7 @@ class _GenericUI: draw_funcs = cls._dyn_ui_initialize() try: draw_funcs.remove(draw_func) - except: + except ValueError: pass diff --git a/release/scripts/modules/rna_xml.py b/release/scripts/modules/rna_xml.py index 9776993b74b..41f890de51f 100644 --- a/release/scripts/modules/rna_xml.py +++ b/release/scripts/modules/rna_xml.py @@ -92,7 +92,6 @@ def rna2xml(fw=print_ln, bpy.types.Sequence, ) - def number_to_str(val, val_type): if val_type == int: return "%d" % val @@ -245,13 +244,13 @@ def xml2rna(root_xml, ): def rna2xml_node(xml_node, value): -# print("evaluating:", xml_node.nodeName) + # print("evaluating:", xml_node.nodeName) # --------------------------------------------------------------------- # Simple attributes for attr in xml_node.attributes.keys(): -# print(" ", attr) + # print(" ", attr) subvalue = getattr(value, attr, Ellipsis) if subvalue is Ellipsis: diff --git a/release/scripts/startup/bl_operators/__init__.py b/release/scripts/startup/bl_operators/__init__.py index 4f6863a590c..e44fce63acd 100644 --- a/release/scripts/startup/bl_operators/__init__.py +++ b/release/scripts/startup/bl_operators/__init__.py @@ -9,7 +9,7 @@ # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -#, +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/release/scripts/startup/bl_operators/anim.py b/release/scripts/startup/bl_operators/anim.py index 42ab99ed399..756b75b8d03 100644 --- a/release/scripts/startup/bl_operators/anim.py +++ b/release/scripts/startup/bl_operators/anim.py @@ -306,7 +306,8 @@ class UpdateAnimatedTransformConstraint(Operator): paths = from_paths | to_paths def update_cb(base, class_name, old_path, fcurve, options): - print(options) + # print(options) + def handle_deg2rad(fcurve): if fcurve is not None: if hasattr(fcurve, "keyframes"): diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py index 32688299b76..c79ff303dfb 100644 --- a/release/scripts/startup/bl_operators/object_quick_effects.py +++ b/release/scripts/startup/bl_operators/object_quick_effects.py @@ -289,8 +289,8 @@ def obj_bb_minmax(obj, min_co, max_co): max_co[0] = max(bb_vec[0], max_co[0]) max_co[1] = max(bb_vec[1], max_co[1]) max_co[2] = max(bb_vec[2], max_co[2]) - - + + def grid_location(x, y): return (x * 200, y * 150) diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 5c3f94a8739..8d04cb132e6 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -1934,7 +1934,6 @@ class WM_OT_addon_install(Operator): try: os.makedirs(path_addons, exist_ok=True) except: - import traceback traceback.print_exc() # Check if we are installing from a target path, diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index 5dd1f94747c..4789d119192 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -47,4 +47,3 @@ class GreasePencilPanel(): col.label(text="Measure:") col.operator("view3d.ruler") - diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py index e6d6a3952ea..25367a58a54 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -151,6 +151,7 @@ class OBJECT_PT_relations(ObjectButtonsPanel, Panel): sub.prop_search(ob, "parent_bone", parent.data, "bones", text="") sub.active = (parent is not None) + class GROUP_MT_specials(Menu): bl_label = "Group Specials" diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 5c758b6568b..113fee19e2c 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -183,14 +183,10 @@ def brush_texpaint_common(panel, context, layout, brush, settings, projpaint=Fal col.template_ID(settings, "clone_image") col.label("UV Map") col.menu("VIEW3D_MT_tools_projectpaint_clone", text=clone_text, translate=False) - - else: col.prop(brush, "clone_image", text="Image") col.prop(brush, "clone_alpha", text="Alpha") - - col.separator() if capabilities.has_radius: diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 13aad4c3888..3382633af60 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -260,7 +260,7 @@ class CLIP_PT_tools_marker(CLIP_PT_tracking_panel, Panel): def draw(self, context): layout = self.layout - sc = context.space_data + # sc = context.space_data # clip = sc.clip col = layout.column(align=True) diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index bbb1e41beb1..ce00d4eb8e7 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -215,7 +215,7 @@ class SEQUENCER_MT_select(Menu): op = layout.operator("sequencer.select", text="All strips to the Right") op.left_right = 'RIGHT' op.linked_time = True - + layout.separator() layout.operator("sequencer.select_handles", text="Surrounding Handles").side = 'BOTH' layout.operator("sequencer.select_handles", text="Left Handle").side = 'LEFT' @@ -259,6 +259,7 @@ class SEQUENCER_MT_frame(Menu): layout.operator("anim.previewrange_clear") layout.operator("anim.previewrange_set") + class SEQUENCER_MT_add(Menu): bl_label = "Add" @@ -607,7 +608,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel): col = layout.column(align=True) if strip.type == 'SPEED': col.prop(strip, "multiply_speed") - elif strip.type in {'CROSS', 'GAMMA_CROSS', 'WIPE', 'ALPHA_OVER','ALPHA_UNDER','OVER_DROP'}: + elif strip.type in {'CROSS', 'GAMMA_CROSS', 'WIPE', 'ALPHA_OVER', 'ALPHA_UNDER', 'OVER_DROP'}: col.prop(strip, "use_default_fade", "Default fade") if not strip.use_default_fade: col.prop(strip, "effect_fader", text="Effect fader") diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 999e41e17f7..59b842a7a5b 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -424,7 +424,6 @@ class USERPREF_PT_system(Panel): col.prop(system, "use_gpu_mipmap") col.prop(system, "use_16bit_textures") - if system.is_occlusion_query_supported(): col.separator() col.label(text="Selection") diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 61d359ebdac..1e2fac17e90 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2198,7 +2198,6 @@ class VIEW3D_MT_edit_mesh_edges(Menu): layout = self.layout with_freestyle = bpy.app.build_options.freestyle - scene = context.scene layout.operator_context = 'INVOKE_REGION_WIN' @@ -2254,7 +2253,6 @@ class VIEW3D_MT_edit_mesh_faces(Menu): layout = self.layout with_freestyle = bpy.app.build_options.freestyle - scene = context.scene layout.operator_context = 'INVOKE_REGION_WIN' @@ -2951,7 +2949,7 @@ class VIEW3D_PT_view3d_meshdisplay(Panel): sub = row.row(align=True) sub.active = mesh.show_normal_vertex or mesh.show_normal_face or mesh.show_normal_loop - sub.prop(context.scene.tool_settings, "normal_size", text="Size") + sub.prop(scene.tool_settings, "normal_size", text="Size") col.separator() split = layout.split() diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 6b0c5b1e993..a483a097e8f 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1027,7 +1027,7 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel): col = layout.column() col.label("Painting Mode") - col.prop(settings, "mode", text = "") + col.prop(settings, "mode", text="") col.separator() if settings.mode == 'MATERIAL': @@ -1064,7 +1064,6 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel): col.operator("image.save_dirty", text="Save All Images") - class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel): bl_context = "imagepaint" bl_label = "Stencil" diff --git a/release/scripts/templates_py/operator_modal_view3d_raycast.py b/release/scripts/templates_py/operator_modal_view3d_raycast.py index 4d0355047f4..6c59603239b 100644 --- a/release/scripts/templates_py/operator_modal_view3d_raycast.py +++ b/release/scripts/templates_py/operator_modal_view3d_raycast.py @@ -1,5 +1,4 @@ import bpy -from mathutils import Vector from bpy_extras import view3d_utils @@ -106,4 +105,3 @@ def unregister(): if __name__ == "__main__": register() - diff --git a/release/scripts/templates_py/script_stub.py b/release/scripts/templates_py/script_stub.py index 3f56749f3b3..5505ca64078 100644 --- a/release/scripts/templates_py/script_stub.py +++ b/release/scripts/templates_py/script_stub.py @@ -11,4 +11,3 @@ filepath = os.path.join(os.path.dirname(bpy.data.filepath), filename) global_namespace = {"__file__": filepath, "__name__": "__main__"} with open(filepath, 'rb') as file: exec(compile(file.read(), filepath, 'exec'), global_namespace) - diff --git a/release/scripts/templates_py/ui_pie_menu.py b/release/scripts/templates_py/ui_pie_menu.py index 87500b682d6..0c431ca50ff 100644 --- a/release/scripts/templates_py/ui_pie_menu.py +++ b/release/scripts/templates_py/ui_pie_menu.py @@ -29,4 +29,3 @@ if __name__ == "__main__": register() bpy.ops.wm.call_menu_pie(name="VIEW3D_PIE_template") - |