diff options
Diffstat (limited to 'release/scripts')
19 files changed, 43 insertions, 42 deletions
diff --git a/release/scripts/startup/bl_operators/geometry_nodes.py b/release/scripts/startup/bl_operators/geometry_nodes.py index 9652f23aadb..c66f0ada955 100644 --- a/release/scripts/startup/bl_operators/geometry_nodes.py +++ b/release/scripts/startup/bl_operators/geometry_nodes.py @@ -19,7 +19,7 @@ import bpy -def geometry_node_group_empty_new(context): +def geometry_node_group_empty_new(): group = bpy.data.node_groups.new("Geometry Nodes", 'GeometryNodeTree') group.inputs.new('NodeSocketGeometry', "Geometry") group.outputs.new('NodeSocketGeometry', "Geometry") @@ -85,7 +85,7 @@ class NewGeometryNodeTreeAssign(bpy.types.Operator): if not modifier: return {'CANCELLED'} - group = geometry_node_group_empty_new(context) + group = geometry_node_group_empty_new() modifier.node_group = group return {'FINISHED'} diff --git a/release/scripts/startup/bl_operators/view3d.py b/release/scripts/startup/bl_operators/view3d.py index 3442e189d14..ff5bcdb034f 100644 --- a/release/scripts/startup/bl_operators/view3d.py +++ b/release/scripts/startup/bl_operators/view3d.py @@ -169,7 +169,7 @@ class VIEW3D_OT_edit_mesh_extrude_manifold_normal(Operator): obj = context.active_object return (obj is not None and obj.mode == 'EDIT') - def execute(self, context): + def execute(self, _context): bpy.ops.mesh.extrude_manifold( 'INVOKE_REGION_WIN', MESH_OT_extrude_region={ diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py index e8c62368239..e835e577953 100644 --- a/release/scripts/startup/bl_ui/properties_constraint.py +++ b/release/scripts/startup/bl_ui/properties_constraint.py @@ -42,7 +42,7 @@ class OBJECT_PT_constraints(ObjectConstraintPanel, Panel): bl_label = "Object Constraints" bl_options = {'HIDE_HEADER'} - def draw(self, context): + def draw(self, _context): layout = self.layout layout.operator_menu_enum("object.constraint_add", "type", text="Add Object Constraint") @@ -56,7 +56,7 @@ class BONE_PT_constraints(BoneConstraintPanel, Panel): bl_label = "Bone Constraints" bl_options = {'HIDE_HEADER'} - def draw(self, context): + def draw(self, _context): layout = self.layout layout.operator_menu_enum("pose.constraint_add", "type", text="Add Bone Constraint") @@ -122,7 +122,7 @@ class ConstraintButtonsPanel: elif con.target.type in {'MESH', 'LATTICE'}: col.prop_search(con, "subtarget", con.target, "vertex_groups", text="Vertex Group") - def get_constraint(self, context): + def get_constraint(self, _context): con = self.custom_data self.layout.context_pointer_set("constraint", con) return con @@ -844,7 +844,7 @@ class ConstraintButtonsPanel: self.draw_influence(layout, con) - def draw_python_constraint(self, context): + def draw_python_constraint(self, _context): layout = self.layout layout.label(text="Blender 2.6 doesn't support python constraints yet") @@ -976,7 +976,7 @@ class ConstraintButtonsSubPanel: bl_label = "" bl_options = {'DRAW_BOX'} - def get_constraint(self, context): + def get_constraint(self, _context): con = self.custom_data self.layout.context_pointer_set("constraint", con) return con diff --git a/release/scripts/startup/bl_ui/properties_data_hair.py b/release/scripts/startup/bl_ui/properties_data_hair.py index 4964316ad0f..7f95fad9a9e 100644 --- a/release/scripts/startup/bl_ui/properties_data_hair.py +++ b/release/scripts/startup/bl_ui/properties_data_hair.py @@ -81,7 +81,7 @@ class HAIR_MT_add_attribute(Menu): class HAIR_UL_attributes(UIList): - def draw_item(self, context, layout, data, attribute, icon, active_data, active_propname, index): + def draw_item(self, _context, layout, _data, attribute, _icon, _active_data, _active_propname, _index): data_type = attribute.bl_rna.properties['data_type'].enum_items[attribute.data_type] domain = attribute.bl_rna.properties['domain'].enum_items[attribute.domain] diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index d464a3ffc6b..833cd94d2ea 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -37,7 +37,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): ob = context.object return ob and ob.type != 'GPENCIL' - def draw(self, context): + def draw(self, _context): layout = self.layout layout.operator_menu_enum("object.modifier_add", "type") layout.template_modifiers() @@ -51,7 +51,7 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): ob = context.object return ob and ob.type == 'GPENCIL' - def draw(self, context): + def draw(self, _context): layout = self.layout layout.operator_menu_enum("object.gpencil_modifier_add", "type") layout.template_grease_pencil_modifiers() diff --git a/release/scripts/startup/bl_ui/properties_data_pointcloud.py b/release/scripts/startup/bl_ui/properties_data_pointcloud.py index eca59ea4aaf..f0584c81c0c 100644 --- a/release/scripts/startup/bl_ui/properties_data_pointcloud.py +++ b/release/scripts/startup/bl_ui/properties_data_pointcloud.py @@ -83,7 +83,7 @@ class POINTCLOUD_MT_add_attribute(Menu): class POINTCLOUD_UL_attributes(UIList): - def draw_item(self, context, layout, data, attribute, icon, active_data, active_propname, index): + def draw_item(self, _context, layout, _data, attribute, _icon, _active_data, _active_propname, _index): data_type = attribute.bl_rna.properties['data_type'].enum_items[attribute.data_type] split = layout.split(factor=0.75) diff --git a/release/scripts/startup/bl_ui/properties_data_shaderfx.py b/release/scripts/startup/bl_ui/properties_data_shaderfx.py index a96fef018c7..576910697ad 100644 --- a/release/scripts/startup/bl_ui/properties_data_shaderfx.py +++ b/release/scripts/startup/bl_ui/properties_data_shaderfx.py @@ -37,7 +37,7 @@ class DATA_PT_shader_fx(ShaderFxButtonsPanel, Panel): # ob = context.object # return ob and ob.type == 'GPENCIL' - def draw(self, context): + def draw(self, _context): layout = self.layout layout.operator_menu_enum("object.shaderfx_add", "type") layout.template_shaderfx() diff --git a/release/scripts/startup/bl_ui/properties_data_volume.py b/release/scripts/startup/bl_ui/properties_data_volume.py index e7bf9adb876..70056b1d27c 100644 --- a/release/scripts/startup/bl_ui/properties_data_volume.py +++ b/release/scripts/startup/bl_ui/properties_data_volume.py @@ -84,7 +84,7 @@ class DATA_PT_volume_file(DataButtonsPanel, Panel): class VOLUME_UL_grids(UIList): - def draw_item(self, context, layout, data, grid, icon, active_data, active_propname, index): + def draw_item(self, _context, layout, _data, grid, _icon, _active_data, _active_propname, _index): name = grid.name data_type = grid.bl_rna.properties['data_type'].enum_items[grid.data_type] diff --git a/release/scripts/startup/bl_ui/properties_mask_common.py b/release/scripts/startup/bl_ui/properties_mask_common.py index 4d25b8ca309..09a1f40d3a9 100644 --- a/release/scripts/startup/bl_ui/properties_mask_common.py +++ b/release/scripts/startup/bl_ui/properties_mask_common.py @@ -26,7 +26,7 @@ from bpy.app.translations import contexts as i18n_contexts # Use by both image & clip context menus. -def draw_mask_context_menu(layout, context): +def draw_mask_context_menu(layout, _context): layout.operator_menu_enum("mask.handle_type_set", "type") layout.operator("mask.switch_direction") layout.operator("mask.cyclic_toggle") diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 1f1d407bd10..9620666858f 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -1282,7 +1282,7 @@ def brush_basic_gpencil_paint_settings(layout, context, brush, *, compact=False) layout.template_curve_mapping(settings, "thickness_primitive_curve", brush=True) -def brush_basic_gpencil_sculpt_settings(layout, context, brush, *, compact=False): +def brush_basic_gpencil_sculpt_settings(layout, _context, brush, *, compact=False): gp_settings = brush.gpencil_settings tool = brush.gpencil_sculpt_tool diff --git a/release/scripts/startup/bl_ui/properties_view_layer.py b/release/scripts/startup/bl_ui/properties_view_layer.py index ae6cc56b730..ad7d6008238 100644 --- a/release/scripts/startup/bl_ui/properties_view_layer.py +++ b/release/scripts/startup/bl_ui/properties_view_layer.py @@ -21,7 +21,7 @@ from bpy.types import Panel, UIList class VIEWLAYER_UL_aov(UIList): - def draw_item(self, context, layout, data, item, icon, active_data, active_propname): + def draw_item(self, _context, layout, _data, item, icon, _active_data, _active_propname): row = layout.row() split = row.split(factor=0.65) icon = 'NONE' if item.is_valid else 'ERROR' diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 73cc674858c..9b5942cbaa9 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -375,7 +375,7 @@ class IMAGE_MT_uvs_split(Menu): class IMAGE_MT_uvs_unwrap(Menu): bl_label = "Unwrap" - def draw(self, context): + def draw(self, _context): layout = self.layout layout.operator("uv.unwrap") diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py index 012ab038569..2805e2147cb 100644 --- a/release/scripts/startup/bl_ui/space_outliner.py +++ b/release/scripts/startup/bl_ui/space_outliner.py @@ -257,7 +257,7 @@ class OUTLINER_MT_collection_new(Menu): bl_label = "Collection" @staticmethod - def draw_without_context_menu(context, layout): + def draw_without_context_menu(_context, layout): layout.operator("outliner.collection_new", text="New Collection").nested = True layout.operator("outliner.id_paste", text="Paste Data-Blocks", icon='PASTEDOWN') diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py index 12ec863327c..25f2a740f7c 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_common.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py @@ -1022,7 +1022,7 @@ def activate_by_id(context, space_type, idname, *, as_fallback=False): return True -def activate_by_id_or_cycle(context, space_type, idname, *, offset=1, as_fallback=False): +def activate_by_id_or_cycle(context, space_type, idname, *, offset=1, _as_fallback=False): # Only cycle when the active tool is activated again. cls = ToolSelectPanelHelper._tool_class_from_space_type(space_type) diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 913fa7ea48a..46c2c24cb6f 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1096,7 +1096,7 @@ class _defs_edit_curve: @ToolDef.from_fn def draw(): - def draw_settings(context, layout, tool, *, extra=False): + def draw_settings(context, layout, _tool, *, extra=False): # Tool settings initialize operator options. tool_settings = context.tool_settings cps = tool_settings.curve_paint_settings @@ -1589,7 +1589,7 @@ class _defs_weight_paint: @ToolDef.from_fn def sample_weight(): - def draw_settings(context, layout, tool): + def draw_settings(context, layout, _tool): if context.tool_settings.unified_paint_settings.use_unified_weight: weight = context.tool_settings.unified_paint_settings.weight elif context.tool_settings.weight_paint.brush: @@ -1869,7 +1869,7 @@ class _defs_image_uv_sculpt: class _defs_gpencil_paint: @staticmethod - def gpencil_primitive_toolbar(context, layout, tool, props): + def gpencil_primitive_toolbar(context, layout, _tool, props): paint = context.tool_settings.gpencil_paint brush = paint.brush @@ -1907,7 +1907,7 @@ class _defs_gpencil_paint: @ToolDef.from_fn def cutter(): - def draw_settings(context, layout, tool): + def draw_settings(_context, layout, tool): props = tool.operator_properties("gpencil.stroke_cutter") row = layout.row() row.use_property_split = False @@ -2020,7 +2020,7 @@ class _defs_gpencil_paint: @ToolDef.from_fn def eyedropper(): - def draw_settings(context, layout, tool): + def draw_settings(_context, layout, tool): props = tool.operator_properties("ui.eyedropper_gpencil_color") row = layout.row() row.use_property_split = False @@ -2037,7 +2037,7 @@ class _defs_gpencil_paint: @ToolDef.from_fn def interpolate(): - def draw_settings(context, layout, tool): + def draw_settings(_context, layout, tool): props = tool.operator_properties("gpencil.interpolate") layout.prop(props, "layers") layout.prop(props, "flip") @@ -2201,7 +2201,7 @@ class _defs_gpencil_edit: @ToolDef.from_fn def transform_fill(): - def draw_settings(context, layout, tool): + def draw_settings(_context, layout, tool): props = tool.operator_properties("gpencil.transform_fill") row = layout.row() row.use_property_split = False @@ -2219,7 +2219,7 @@ class _defs_gpencil_edit: @ToolDef.from_fn def interpolate(): - def draw_settings(context, layout, tool): + def draw_settings(_context, layout, tool): props = tool.operator_properties("gpencil.interpolate") layout.prop(props, "layers") layout.prop(props, "interpolate_selected_only") @@ -2412,7 +2412,7 @@ class _defs_sequencer_generic: @ToolDef.from_fn def sample(): def draw_settings(_context, layout, tool): - tool.operator_properties("sequencer.sample") + props = tool.operator_properties("sequencer.sample") return dict( idname="builtin.sample", label="Sample", diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index 45460a1a5de..7219922c379 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -244,7 +244,7 @@ class TOPBAR_MT_app(Menu): class TOPBAR_MT_file_cleanup(Menu): bl_label = "Clean Up" - def draw(self, context): + def draw(self, _context): layout = self.layout layout.separator() @@ -475,7 +475,7 @@ class TOPBAR_MT_file_export(Menu): bl_label = "Export" bl_owner_use_filter = False - def draw(self, context): + def draw(self, _context): if bpy.app.build_options.collada: self.layout.operator("wm.collada_export", text="Collada (Default) (.dae)") diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index b61daf0e472..b214dc0c245 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -96,7 +96,7 @@ class USERPREF_MT_editor_menus(Menu): class USERPREF_MT_view(Menu): bl_label = "View" - def draw(self, context): + def draw(self, _context): layout = self.layout layout.menu("INFO_MT_area") @@ -241,7 +241,7 @@ class USERPREF_PT_interface_translation(InterfacePanel, CenterAlignMixIn, Panel) bl_translation_context = i18n_contexts.id_windowmanager @classmethod - def poll(cls, context): + def poll(cls, _context): return bpy.app.build_options.international def draw_centered(self, context, layout): @@ -581,7 +581,7 @@ class USERPREF_PT_system_cycles_devices(SystemPanel, CenterAlignMixIn, Panel): bl_label = "Cycles Render Devices" @classmethod - def poll(cls, context): + def poll(cls, _context): # No GPU rendering on macOS currently. import sys return bpy.app.build_options.cycles and sys.platform != "darwin" @@ -2185,7 +2185,7 @@ class ExperimentalPanel: url_prefix = "https://developer.blender.org/" @classmethod - def poll(cls, context): + def poll(cls, _context): return bpy.app.version_cycle == 'alpha' def _draw_items(self, context, items): @@ -2260,7 +2260,7 @@ class USERPREF_PT_experimental_debugging(ExperimentalPanel, Panel): bl_label = "Debugging" @classmethod - def poll(cls, context): + def poll(cls, _context): # Unlike the other experimental panels, the debugging one is always visible # even in beta or release. return True diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 08d128b6023..26e0c128f7c 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -1068,7 +1068,7 @@ class VIEW3D_MT_snap(Menu): class VIEW3D_MT_uv_map(Menu): bl_label = "UV Mapping" - def draw(self, context): + def draw(self, _context): layout = self.layout layout.operator("uv.unwrap") @@ -1822,7 +1822,7 @@ class VIEW3D_MT_select_edit_armature(Menu): class VIEW3D_MT_paint_gpencil(Menu): bl_label = "Paint" - def draw(self, context): + def draw(self, _context): layout = self.layout layout.operator("gpencil.vertex_color_set", text="Set Vertex Colors") @@ -2238,7 +2238,7 @@ class VIEW3D_MT_object(Menu): bl_context = "objectmode" bl_label = "Object" - def draw(self, context): + def draw(self, _context): layout = self.layout layout.menu("VIEW3D_MT_transform_object") @@ -2717,7 +2717,7 @@ class VIEW3D_MT_object_constraints(Menu): class VIEW3D_MT_object_quick_effects(Menu): bl_label = "Quick Effects" - def draw(self, context): + def draw(self, _context): layout = self.layout layout.operator("object.quick_fur") diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 725075fb143..83ab5bf3100 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1488,7 +1488,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_stroke(Panel, View3DPanel): brush = context.tool_settings.gpencil_paint.brush return brush is not None and brush.gpencil_tool == 'DRAW' - def draw(self, context): + def draw(self, _context): # layout = self.layout pass @@ -1847,7 +1847,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_weight_falloff(GreasePencilBrushFallof ts = context.tool_settings settings = ts.gpencil_weight_paint brush = settings.brush - return (brush and brush.curve) + return (settings and settings.brush and settings.brush.curve) # Grease Pencil vertex painting tools @@ -1939,6 +1939,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_vertex_color(View3DPanel, Panel): ts = context.tool_settings settings = ts.gpencil_vertex_paint brush = settings.brush + gp_settings = brush.gpencil_settings col = layout.column() |