forked from bartvdbraak/blender
Cleanup: unused args/vars
This commit is contained in:
parent
7bf8d8b3c8
commit
1008d9c735
@ -1261,7 +1261,7 @@ def km_markers(params):
|
|||||||
return keymap
|
return keymap
|
||||||
|
|
||||||
|
|
||||||
def km_time_scrub(params):
|
def km_time_scrub(_params):
|
||||||
items = []
|
items = []
|
||||||
keymap = (
|
keymap = (
|
||||||
"Time Scrub",
|
"Time Scrub",
|
||||||
@ -1276,7 +1276,7 @@ def km_time_scrub(params):
|
|||||||
|
|
||||||
return keymap
|
return keymap
|
||||||
|
|
||||||
def km_time_scrub_clip(params):
|
def km_time_scrub_clip(_params):
|
||||||
items = []
|
items = []
|
||||||
keymap = (
|
keymap = (
|
||||||
"Clip Time Scrub",
|
"Clip Time Scrub",
|
||||||
@ -2060,7 +2060,7 @@ def km_nla_editor(params):
|
|||||||
return keymap
|
return keymap
|
||||||
|
|
||||||
|
|
||||||
def km_text_generic(params):
|
def km_text_generic(_params):
|
||||||
items = []
|
items = []
|
||||||
keymap = (
|
keymap = (
|
||||||
"Text Generic",
|
"Text Generic",
|
||||||
@ -2369,7 +2369,7 @@ def km_sequencerpreview(params):
|
|||||||
return keymap
|
return keymap
|
||||||
|
|
||||||
|
|
||||||
def km_console(params):
|
def km_console(_params):
|
||||||
items = []
|
items = []
|
||||||
keymap = (
|
keymap = (
|
||||||
"Console",
|
"Console",
|
||||||
|
@ -794,8 +794,6 @@ class GreasePencilToolsPanel:
|
|||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
gpd = context.gpencil_data
|
|
||||||
|
|
||||||
gpencil_active_brush_settings_simple(context, layout)
|
gpencil_active_brush_settings_simple(context, layout)
|
||||||
|
|
||||||
layout.separator()
|
layout.separator()
|
||||||
|
@ -1559,12 +1559,9 @@ class CLIP_MT_tracking_pie(Menu):
|
|||||||
space = context.space_data
|
space = context.space_data
|
||||||
return space.mode == 'TRACKING' and space.clip
|
return space.mode == 'TRACKING' and space.clip
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, _context):
|
||||||
space = context.space_data
|
|
||||||
clip = space.clip
|
|
||||||
act_track = clip.tracking.tracks.active
|
|
||||||
|
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
pie = layout.menu_pie()
|
pie = layout.menu_pie()
|
||||||
# Track Backwards
|
# Track Backwards
|
||||||
prop = pie.operator("clip.track_markers", icon='TRACKING_BACKWARDS')
|
prop = pie.operator("clip.track_markers", icon='TRACKING_BACKWARDS')
|
||||||
@ -1641,7 +1638,7 @@ class CLIP_MT_reconstruction_pie(Menu):
|
|||||||
space = context.space_data
|
space = context.space_data
|
||||||
return space.mode == 'TRACKING' and space.clip
|
return space.mode == 'TRACKING' and space.clip
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, _context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
pie = layout.menu_pie()
|
pie = layout.menu_pie()
|
||||||
# Set Active Clip As Viewport Background
|
# Set Active Clip As Viewport Background
|
||||||
|
@ -347,7 +347,6 @@ class IMAGE_MT_uvs(Menu):
|
|||||||
|
|
||||||
sima = context.space_data
|
sima = context.space_data
|
||||||
uv = sima.uv_editor
|
uv = sima.uv_editor
|
||||||
tool_settings = context.tool_settings
|
|
||||||
|
|
||||||
layout.menu("IMAGE_MT_uvs_transform")
|
layout.menu("IMAGE_MT_uvs_transform")
|
||||||
layout.menu("IMAGE_MT_uvs_mirror")
|
layout.menu("IMAGE_MT_uvs_mirror")
|
||||||
@ -536,8 +535,6 @@ class IMAGE_HT_tool_header(Header):
|
|||||||
|
|
||||||
self.draw_tool_settings(context)
|
self.draw_tool_settings(context)
|
||||||
|
|
||||||
sima = context.space_data
|
|
||||||
|
|
||||||
layout.separator_spacer()
|
layout.separator_spacer()
|
||||||
|
|
||||||
IMAGE_HT_header.draw_xform_template(layout, context)
|
IMAGE_HT_header.draw_xform_template(layout, context)
|
||||||
|
@ -279,7 +279,7 @@ class NLA_MT_context_menu(Menu):
|
|||||||
class NLA_MT_channel_context_menu(Menu):
|
class NLA_MT_channel_context_menu(Menu):
|
||||||
bl_label = "NLA Channel Context Menu"
|
bl_label = "NLA Channel Context Menu"
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, _context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
layout.operator_menu_enum("anim.channels_move", "direction", text="Track Ordering...")
|
layout.operator_menu_enum("anim.channels_move", "direction", text="Track Ordering...")
|
||||||
|
@ -97,7 +97,6 @@ class SEQUENCER_HT_header(Header):
|
|||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
st = context.space_data
|
st = context.space_data
|
||||||
scene = context.scene
|
|
||||||
|
|
||||||
layout.template_header()
|
layout.template_header()
|
||||||
|
|
||||||
@ -181,7 +180,7 @@ class SEQUENCER_MT_view_cache(Menu):
|
|||||||
class SEQUENCER_MT_range(Menu):
|
class SEQUENCER_MT_range(Menu):
|
||||||
bl_label = "Range"
|
bl_label = "Range"
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, _context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
layout.operator("anim.previewrange_set", text="Set Preview Range")
|
layout.operator("anim.previewrange_set", text="Set Preview Range")
|
||||||
@ -286,7 +285,7 @@ class SEQUENCER_MT_view(Menu):
|
|||||||
class SEQUENCER_MT_select_handle(Menu):
|
class SEQUENCER_MT_select_handle(Menu):
|
||||||
bl_label = "Select Handle"
|
bl_label = "Select Handle"
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, _context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
layout.operator("sequencer.select_handles", text="Both").side = 'BOTH'
|
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):
|
class SEQUENCER_MT_select_channel(Menu):
|
||||||
bl_label = "Select Channel"
|
bl_label = "Select Channel"
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, _context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
layout.operator("sequencer.select_active_side", text="Left").side = 'LEFT'
|
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):
|
class SEQUENCER_MT_select_linked(Menu):
|
||||||
bl_label = "Select Linked"
|
bl_label = "Select Linked"
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, _context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
layout.operator("sequencer.select_linked", text="All")
|
layout.operator("sequencer.select_linked", text="All")
|
||||||
@ -318,7 +317,7 @@ class SEQUENCER_MT_select_linked(Menu):
|
|||||||
class SEQUENCER_MT_select_playhead(Menu):
|
class SEQUENCER_MT_select_playhead(Menu):
|
||||||
bl_label = "Select Playhead"
|
bl_label = "Select Playhead"
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, _context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
props = layout.operator("sequencer.select", text="Left")
|
props = layout.operator("sequencer.select", text="Left")
|
||||||
@ -397,7 +396,7 @@ class SEQUENCER_MT_change(Menu):
|
|||||||
class SEQUENCER_MT_navigation(Menu):
|
class SEQUENCER_MT_navigation(Menu):
|
||||||
bl_label = "Navigation"
|
bl_label = "Navigation"
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, _context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
layout.operator("screen.animation_play")
|
layout.operator("screen.animation_play")
|
||||||
@ -619,7 +618,7 @@ class SEQUENCER_MT_strip_lock_mute(Menu):
|
|||||||
class SEQUENCER_MT_strip_effect(Menu):
|
class SEQUENCER_MT_strip_effect(Menu):
|
||||||
bl_label = "Effect Strip"
|
bl_label = "Effect Strip"
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, _context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
layout.operator_menu_enum("sequencer.change_effect_input", "swap")
|
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):
|
class SEQUENCER_MT_strip_movie(Menu):
|
||||||
bl_label = "Movie Strip"
|
bl_label = "Movie Strip"
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, _context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
layout.operator("sequencer.rendersize")
|
layout.operator("sequencer.rendersize")
|
||||||
@ -818,7 +817,6 @@ class SEQUENCER_PT_info(SequencerButtonsPanel, Panel):
|
|||||||
layout.use_property_split = True
|
layout.use_property_split = True
|
||||||
layout.use_property_decorate = False
|
layout.use_property_decorate = False
|
||||||
|
|
||||||
scene = context.scene
|
|
||||||
strip = act_strip(context)
|
strip = act_strip(context)
|
||||||
|
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
@ -1076,7 +1074,6 @@ class SEQUENCER_PT_info_input(SequencerButtonsPanel, Panel):
|
|||||||
layout.use_property_split = True
|
layout.use_property_split = True
|
||||||
layout.use_property_decorate = False
|
layout.use_property_decorate = False
|
||||||
|
|
||||||
st = context.space_data
|
|
||||||
scene = context.scene
|
scene = context.scene
|
||||||
strip = act_strip(context)
|
strip = act_strip(context)
|
||||||
seq_type = strip.type
|
seq_type = strip.type
|
||||||
@ -1161,7 +1158,6 @@ class SEQUENCER_PT_sound(SequencerButtonsPanel, Panel):
|
|||||||
layout.use_property_split = True
|
layout.use_property_split = True
|
||||||
layout.use_property_decorate = False
|
layout.use_property_decorate = False
|
||||||
|
|
||||||
st = context.space_data
|
|
||||||
strip = act_strip(context)
|
strip = act_strip(context)
|
||||||
sound = strip.sound
|
sound = strip.sound
|
||||||
|
|
||||||
|
@ -297,7 +297,6 @@ class _defs_transform:
|
|||||||
def draw_settings(context, layout, tool):
|
def draw_settings(context, layout, tool):
|
||||||
if not layout.use_property_split:
|
if not layout.use_property_split:
|
||||||
layout.label(text="Gizmos:")
|
layout.label(text="Gizmos:")
|
||||||
tool_settings = context.tool_settings
|
|
||||||
|
|
||||||
props = tool.gizmo_group_properties("VIEW3D_GGT_xform_gizmo")
|
props = tool.gizmo_group_properties("VIEW3D_GGT_xform_gizmo")
|
||||||
layout.prop(props, "drag_action")
|
layout.prop(props, "drag_action")
|
||||||
|
@ -171,9 +171,8 @@ class TOPBAR_MT_editor_menus(Menu):
|
|||||||
class TOPBAR_MT_app(Menu):
|
class TOPBAR_MT_app(Menu):
|
||||||
bl_label = "Blender"
|
bl_label = "Blender"
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, _context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
prefs = context.preferences
|
|
||||||
|
|
||||||
layout.operator("wm.splash")
|
layout.operator("wm.splash")
|
||||||
|
|
||||||
@ -309,7 +308,7 @@ class TOPBAR_MT_file_new(Menu):
|
|||||||
class TOPBAR_MT_file_recover(Menu):
|
class TOPBAR_MT_file_recover(Menu):
|
||||||
bl_label = "Recover"
|
bl_label = "Recover"
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, _context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
layout.operator("wm.recover_last_session", text="Last Session")
|
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):
|
class TOPBAR_MT_app_about(Menu):
|
||||||
bl_label = "About"
|
bl_label = "About"
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, _context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
layout.operator(
|
layout.operator(
|
||||||
@ -377,7 +376,7 @@ class TOPBAR_MT_app_about(Menu):
|
|||||||
class TOPBAR_MT_app_support(Menu):
|
class TOPBAR_MT_app_support(Menu):
|
||||||
bl_label = "Support Blender"
|
bl_label = "Support Blender"
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, _context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
layout.operator(
|
layout.operator(
|
||||||
|
@ -31,7 +31,7 @@ class USERPREF_HT_header(Header):
|
|||||||
bl_space_type = 'PREFERENCES'
|
bl_space_type = 'PREFERENCES'
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def draw_buttons(layout, context, *, is_vertical=False):
|
def draw_buttons(layout, context):
|
||||||
prefs = context.preferences
|
prefs = context.preferences
|
||||||
|
|
||||||
layout.scale_x = 1.0
|
layout.scale_x = 1.0
|
||||||
@ -118,7 +118,7 @@ class USERPREF_PT_save_preferences(Panel):
|
|||||||
layout.scale_x = 1.3
|
layout.scale_x = 1.3
|
||||||
layout.scale_y = 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.
|
# Panel mix-in.
|
||||||
|
@ -2234,7 +2234,6 @@ class VIEW3D_MT_object_context_menu(Menu):
|
|||||||
view = context.space_data
|
view = context.space_data
|
||||||
|
|
||||||
obj = context.object
|
obj = context.object
|
||||||
is_eevee = context.scene.render.engine == 'BLENDER_EEVEE'
|
|
||||||
|
|
||||||
selected_objects_len = len(context.selected_objects)
|
selected_objects_len = len(context.selected_objects)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user