diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-05-28 09:22:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-05-28 09:37:29 +0300 |
commit | 1008d9c73567780ec22bea6a0b27f57e60ea403d (patch) | |
tree | 6ffdad7b0986a56d9e2adde307e3fbe7b5e6b398 | |
parent | 7bf8d8b3c89cfda3245c1e36e03279c1c970740b (diff) |
Cleanup: unused args/vars
10 files changed, 23 insertions, 38 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 2935b397326..327addab1dc 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -1261,7 +1261,7 @@ def km_markers(params): return keymap -def km_time_scrub(params): +def km_time_scrub(_params): items = [] keymap = ( "Time Scrub", @@ -1276,7 +1276,7 @@ def km_time_scrub(params): return keymap -def km_time_scrub_clip(params): +def km_time_scrub_clip(_params): items = [] keymap = ( "Clip Time Scrub", @@ -2060,7 +2060,7 @@ def km_nla_editor(params): return keymap -def km_text_generic(params): +def km_text_generic(_params): items = [] keymap = ( "Text Generic", @@ -2369,7 +2369,7 @@ def km_sequencerpreview(params): return keymap -def km_console(params): +def km_console(_params): items = [] keymap = ( "Console", 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 95e46e99b90..06131942505 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -794,8 +794,6 @@ class GreasePencilToolsPanel: def draw(self, context): layout = self.layout - gpd = context.gpencil_data - gpencil_active_brush_settings_simple(context, layout) layout.separator() diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index f3f8f92852b..e811619683e 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -1538,7 +1538,7 @@ class CLIP_MT_marker_pie(Menu): if track_active: # Use Normalization pie.prop(track_active, "use_normalization", text="Normalization") - # Use Brute Force + # Use Brute Force pie.prop(track_active, "use_brute", text="Use Brute Force") # Match Keyframe prop = pie.operator("wm.context_set_enum", text="Match Previous", icon='KEYFRAME_HLT') @@ -1559,12 +1559,9 @@ class CLIP_MT_tracking_pie(Menu): space = context.space_data return space.mode == 'TRACKING' and space.clip - def draw(self, context): - space = context.space_data - clip = space.clip - act_track = clip.tracking.tracks.active - + def draw(self, _context): layout = self.layout + pie = layout.menu_pie() # Track Backwards prop = pie.operator("clip.track_markers", icon='TRACKING_BACKWARDS') @@ -1641,7 +1638,7 @@ class CLIP_MT_reconstruction_pie(Menu): space = context.space_data return space.mode == 'TRACKING' and space.clip - def draw(self, context): + def draw(self, _context): layout = self.layout pie = layout.menu_pie() # Set Active Clip As Viewport Background diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 48ca0b89016..e8b997ad1ec 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -347,7 +347,6 @@ class IMAGE_MT_uvs(Menu): sima = context.space_data uv = sima.uv_editor - tool_settings = context.tool_settings layout.menu("IMAGE_MT_uvs_transform") layout.menu("IMAGE_MT_uvs_mirror") @@ -536,8 +535,6 @@ class IMAGE_HT_tool_header(Header): self.draw_tool_settings(context) - sima = context.space_data - layout.separator_spacer() IMAGE_HT_header.draw_xform_template(layout, context) diff --git a/release/scripts/startup/bl_ui/space_nla.py b/release/scripts/startup/bl_ui/space_nla.py index 3863912954b..d4d8fe2dae0 100644 --- a/release/scripts/startup/bl_ui/space_nla.py +++ b/release/scripts/startup/bl_ui/space_nla.py @@ -279,7 +279,7 @@ class NLA_MT_context_menu(Menu): class NLA_MT_channel_context_menu(Menu): bl_label = "NLA Channel Context Menu" - def draw(self, context): + def draw(self, _context): layout = self.layout layout.operator_menu_enum("anim.channels_move", "direction", text="Track Ordering...") diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 62ae500d3a0..94d0abfb3d2 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -97,7 +97,6 @@ class SEQUENCER_HT_header(Header): layout = self.layout st = context.space_data - scene = context.scene layout.template_header() @@ -181,7 +180,7 @@ class SEQUENCER_MT_view_cache(Menu): class SEQUENCER_MT_range(Menu): bl_label = "Range" - def draw(self, context): + def draw(self, _context): layout = self.layout layout.operator("anim.previewrange_set", text="Set Preview Range") @@ -286,7 +285,7 @@ class SEQUENCER_MT_view(Menu): class SEQUENCER_MT_select_handle(Menu): bl_label = "Select Handle" - def draw(self, context): + def draw(self, _context): layout = self.layout layout.operator("sequencer.select_handles", text="Both").side = 'BOTH' @@ -297,7 +296,7 @@ class SEQUENCER_MT_select_handle(Menu): class SEQUENCER_MT_select_channel(Menu): bl_label = "Select Channel" - def draw(self, context): + def draw(self, _context): layout = self.layout layout.operator("sequencer.select_active_side", text="Left").side = 'LEFT' @@ -307,7 +306,7 @@ class SEQUENCER_MT_select_channel(Menu): class SEQUENCER_MT_select_linked(Menu): bl_label = "Select Linked" - def draw(self, context): + def draw(self, _context): layout = self.layout layout.operator("sequencer.select_linked", text="All") @@ -318,7 +317,7 @@ class SEQUENCER_MT_select_linked(Menu): class SEQUENCER_MT_select_playhead(Menu): bl_label = "Select Playhead" - def draw(self, context): + def draw(self, _context): layout = self.layout props = layout.operator("sequencer.select", text="Left") @@ -397,7 +396,7 @@ class SEQUENCER_MT_change(Menu): class SEQUENCER_MT_navigation(Menu): bl_label = "Navigation" - def draw(self, context): + def draw(self, _context): layout = self.layout layout.operator("screen.animation_play") @@ -619,7 +618,7 @@ class SEQUENCER_MT_strip_lock_mute(Menu): class SEQUENCER_MT_strip_effect(Menu): bl_label = "Effect Strip" - def draw(self, context): + def draw(self, _context): layout = self.layout layout.operator_menu_enum("sequencer.change_effect_input", "swap") @@ -631,7 +630,7 @@ class SEQUENCER_MT_strip_effect(Menu): class SEQUENCER_MT_strip_movie(Menu): bl_label = "Movie Strip" - def draw(self, context): + def draw(self, _context): layout = self.layout layout.operator("sequencer.rendersize") @@ -818,7 +817,6 @@ class SEQUENCER_PT_info(SequencerButtonsPanel, Panel): layout.use_property_split = True layout.use_property_decorate = False - scene = context.scene strip = act_strip(context) row = layout.row(align=True) @@ -1076,7 +1074,6 @@ class SEQUENCER_PT_info_input(SequencerButtonsPanel, Panel): layout.use_property_split = True layout.use_property_decorate = False - st = context.space_data scene = context.scene strip = act_strip(context) seq_type = strip.type @@ -1161,7 +1158,6 @@ class SEQUENCER_PT_sound(SequencerButtonsPanel, Panel): layout.use_property_split = True layout.use_property_decorate = False - st = context.space_data strip = act_strip(context) sound = strip.sound diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 45e60793b2c..20bba30bb08 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -297,7 +297,6 @@ class _defs_transform: def draw_settings(context, layout, tool): if not layout.use_property_split: layout.label(text="Gizmos:") - tool_settings = context.tool_settings props = tool.gizmo_group_properties("VIEW3D_GGT_xform_gizmo") layout.prop(props, "drag_action") diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index 62488f9663f..e52d2fea276 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -171,9 +171,8 @@ class TOPBAR_MT_editor_menus(Menu): class TOPBAR_MT_app(Menu): bl_label = "Blender" - def draw(self, context): + def draw(self, _context): layout = self.layout - prefs = context.preferences layout.operator("wm.splash") @@ -309,7 +308,7 @@ class TOPBAR_MT_file_new(Menu): class TOPBAR_MT_file_recover(Menu): bl_label = "Recover" - def draw(self, context): + def draw(self, _context): layout = self.layout layout.operator("wm.recover_last_session", text="Last Session") @@ -351,7 +350,7 @@ class TOPBAR_MT_file_defaults(Menu): class TOPBAR_MT_app_about(Menu): bl_label = "About" - def draw(self, context): + def draw(self, _context): layout = self.layout layout.operator( @@ -377,7 +376,7 @@ class TOPBAR_MT_app_about(Menu): class TOPBAR_MT_app_support(Menu): bl_label = "Support Blender" - def draw(self, context): + def draw(self, _context): layout = self.layout layout.operator( diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 849934e2c55..d1d65d7d238 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -31,7 +31,7 @@ class USERPREF_HT_header(Header): bl_space_type = 'PREFERENCES' @staticmethod - def draw_buttons(layout, context, *, is_vertical=False): + def draw_buttons(layout, context): prefs = context.preferences layout.scale_x = 1.0 @@ -118,7 +118,7 @@ class USERPREF_PT_save_preferences(Panel): layout.scale_x = 1.3 layout.scale_y = 1.3 - USERPREF_HT_header.draw_buttons(layout, context, is_vertical=True) + USERPREF_HT_header.draw_buttons(layout, context) # Panel mix-in. diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 5665cd5c3cc..b79d5bf7aa2 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2234,7 +2234,6 @@ class VIEW3D_MT_object_context_menu(Menu): view = context.space_data obj = context.object - is_eevee = context.scene.render.engine == 'BLENDER_EEVEE' selected_objects_len = len(context.selected_objects) |