Cleanup: unused variables, enums, spelling
This commit is contained in:
@@ -105,7 +105,6 @@ class OBJECT_PT_delta_transform(ObjectButtonsPanel, Panel):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=True, align=False)
|
||||
|
||||
ob = context.object
|
||||
|
||||
|
||||
@@ -109,8 +109,6 @@ class VIEW3D_MT_tools_projectpaint_clone(Menu):
|
||||
|
||||
|
||||
def brush_texpaint_common(panel, context, layout, brush, _settings, projpaint=False):
|
||||
capabilities = brush.image_paint_capabilities
|
||||
|
||||
col = layout.column()
|
||||
|
||||
if brush.image_tool == 'FILL' and not projpaint:
|
||||
|
||||
@@ -27,7 +27,6 @@ class FILEBROWSER_HT_header(Header):
|
||||
layout = self.layout
|
||||
|
||||
st = context.space_data
|
||||
params = st.params
|
||||
|
||||
if st.active_operator is None:
|
||||
layout.template_header()
|
||||
@@ -57,7 +56,6 @@ class FILEBROWSER_PT_display(Panel):
|
||||
|
||||
space = context.space_data
|
||||
params = space.params
|
||||
is_lib_browser = params.use_library_browsing
|
||||
|
||||
layout.label(text="Display as")
|
||||
layout.column().prop(params, "display_type", expand=True)
|
||||
@@ -435,7 +433,6 @@ class FILEBROWSER_MT_select(Menu):
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
st = context.space_data
|
||||
|
||||
layout.operator("file.select_all", text="All").action = 'SELECT'
|
||||
layout.operator("file.select_all", text="None").action = 'DESELECT'
|
||||
|
||||
@@ -193,11 +193,9 @@ class TEXT_PT_find(Panel):
|
||||
class TEXT_MT_view_navigation(Menu):
|
||||
bl_label = "Navigation"
|
||||
|
||||
def draw(self, context):
|
||||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
|
||||
st = context.space_data
|
||||
|
||||
layout.operator("text.move", text="Top").type = 'FILE_TOP'
|
||||
layout.operator("text.move", text="Bottom").type = 'FILE_BOTTOM'
|
||||
|
||||
@@ -384,9 +382,8 @@ class TEXT_MT_edit(Menu):
|
||||
def poll(cls, context):
|
||||
return context.space_data.text is not None
|
||||
|
||||
def draw(self, context):
|
||||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
st = context.space_data
|
||||
|
||||
layout.operator("ed.undo")
|
||||
layout.operator("ed.redo")
|
||||
|
||||
@@ -35,9 +35,6 @@ from bl_ui.space_toolsystem_common import (
|
||||
from bpy.app.translations import pgettext_tip as tip_
|
||||
|
||||
|
||||
I18N_CTX_OPERATOR = bpy.app.translations.contexts_C_to_py['BLT_I18NCONTEXT_OPERATOR_DEFAULT']
|
||||
|
||||
|
||||
def kmi_to_string_or_none(kmi):
|
||||
return kmi.to_string() if kmi else "<none>"
|
||||
|
||||
@@ -724,8 +721,8 @@ class _defs_edit_mesh:
|
||||
|
||||
@ToolDef.from_fn
|
||||
def shear():
|
||||
def draw_settings(context, layout, tool):
|
||||
props = tool.operator_properties("transform.shear")
|
||||
def draw_settings(context, layout, _tool):
|
||||
# props = tool.operator_properties("transform.shear")
|
||||
_template_widget.VIEW3D_GGT_xform_gizmo.draw_settings_with_index(context, layout, 2)
|
||||
return dict(
|
||||
idname="builtin.shear",
|
||||
|
||||
@@ -2921,7 +2921,7 @@ class VIEW3D_MT_mask(Menu):
|
||||
class VIEW3D_MT_sculpt_set_pivot(Menu):
|
||||
bl_label = "Sculpt Set Pivot"
|
||||
|
||||
def draw(self, context):
|
||||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
|
||||
props = layout.operator("sculpt.set_pivot_position", text="Pivot to Origin")
|
||||
@@ -6055,8 +6055,6 @@ class VIEW3D_PT_pivot_point(Panel):
|
||||
|
||||
def draw(self, context):
|
||||
tool_settings = context.tool_settings
|
||||
obj = context.active_object
|
||||
mode = context.mode
|
||||
|
||||
layout = self.layout
|
||||
col = layout.column()
|
||||
@@ -6453,8 +6451,6 @@ class VIEW3D_MT_gpencil_edit_context_menu(Menu):
|
||||
is_stroke_mode = context.tool_settings.gpencil_selectmode_edit == 'STROKE'
|
||||
is_segment_mode = context.tool_settings.gpencil_selectmode_edit == 'SEGMENT'
|
||||
|
||||
is_3d_view = context.space_data.type == 'VIEW_3D'
|
||||
|
||||
layout = self.layout
|
||||
|
||||
layout.operator_context = 'INVOKE_REGION_WIN'
|
||||
|
||||
@@ -43,7 +43,6 @@ class VIEW3D_MT_brush_context_menu(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
tool_settings = context.tool_settings
|
||||
settings = UnifiedPaintPanel.paint_settings(context)
|
||||
brush = getattr(settings, "brush", None)
|
||||
|
||||
|
||||
@@ -311,7 +311,7 @@ Mesh *BKE_mesh_remesh_voxel_to_mesh_nomain(Mesh *mesh,
|
||||
OpenVDBLevelSet_free(level_set);
|
||||
OpenVDBTransform_free(xform);
|
||||
#else
|
||||
UNUSED_VARS(mesh, voxel_size, adaptivity);
|
||||
UNUSED_VARS(mesh, voxel_size, adaptivity, isovalue);
|
||||
#endif
|
||||
return new_mesh;
|
||||
}
|
||||
|
||||
@@ -67,8 +67,6 @@ struct wmOperatorType;
|
||||
struct wmWindow;
|
||||
struct wmWindowManager;
|
||||
|
||||
enum eGPUFXFlags;
|
||||
|
||||
/* for derivedmesh drawing callbacks, for view3d_select, .... */
|
||||
typedef struct ViewContext {
|
||||
struct bContext *C;
|
||||
|
||||
@@ -266,7 +266,6 @@ extern StructRNA RNA_FreestyleLineStyle;
|
||||
extern StructRNA RNA_FreestyleModuleSettings;
|
||||
extern StructRNA RNA_FreestyleSettings;
|
||||
extern StructRNA RNA_Function;
|
||||
extern StructRNA RNA_GPUFXSettings;
|
||||
extern StructRNA RNA_GPencilFrame;
|
||||
extern StructRNA RNA_GPencilInterpolateSettings;
|
||||
extern StructRNA RNA_GPencilLayer;
|
||||
|
||||
@@ -3725,7 +3725,7 @@ wmEventHandler_Keymap *WM_event_add_keymap_handler(ListBase *handlers, wmKeyMap
|
||||
return handler;
|
||||
}
|
||||
|
||||
/** Follow #wmEventHandler_KeymapDynamicFn signiture. */
|
||||
/** Follow #wmEventHandler_KeymapDynamicFn signature. */
|
||||
wmKeyMap *WM_event_get_keymap_from_toolsystem(wmWindowManager *wm, wmEventHandler_Keymap *handler)
|
||||
{
|
||||
ScrArea *sa = handler->dynamic.user_data;
|
||||
|
||||
Reference in New Issue
Block a user