Cleanup: unused variables, enums, spelling
authorCampbell Barton <ideasman42@gmail.com>
Tue, 22 Oct 2019 15:34:30 +0000 (02:34 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 22 Oct 2019 15:34:30 +0000 (02:34 +1100)
release/scripts/startup/bl_ui/properties_object.py
release/scripts/startup/bl_ui/properties_paint_common.py
release/scripts/startup/bl_ui/space_filebrowser.py
release/scripts/startup/bl_ui/space_text.py
release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
source/blender/blenkernel/intern/mesh_remesh_voxel.c
source/blender/editors/include/ED_view3d.h
source/blender/makesrna/RNA_access.h
source/blender/windowmanager/intern/wm_event_system.c

index d2ba047e07ea9408a6b1e6dc9c0dfcc0d1170c8e..bb020084b03bfa5ec79aaf79b2084ce8e0c41b73 100644 (file)
@@ -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
 
index 23b2556eddb88cf52e85ac6fd2d140068915eb9a..d21a3456e61e1ffc3a965ef861e322636418c1d3 100644 (file)
@@ -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:
index e1097e8d51229960b48d575eebd992f671f3e3ef..2e0d47b7d4dbecefa995250506d27f2ceb67e30c 100644 (file)
@@ -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'
index e82c6bc5dc723fdddc28f4933916b7f27bce105a..9e9ddcf350547be12b1a6ace686629c58e9cd201 100644 (file)
@@ -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")
index 4bce8a9552862d8aa02df9edf72d5ea51bc22b10..9c3a3fd28fac7dca56aed63b9664639f93ef8a50 100644 (file)
@@ -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",
index 137691c10bac6e4f66535ddbb8cd6013ab0eb5d1..b65bdc19a14d63df7ee6bd72345ea4d8c44f0fdc 100644 (file)
@@ -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'
index 3aee14e0239bbb0c9c6742a7bf73336762a163aa..c6972b1543244b88bdc0ff4ee2645ca40037f08f 100644 (file)
@@ -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)
 
index b93fe157f2a3a3e77d3e1571975fca96ef6f0594..ba8ed5facadedb52e7a488f4326a386eb107d9cb 100644 (file)
@@ -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;
 }
index 28280fae3a854ca1a665da28645a4d77a7091b03..83caef29ca34242923699d78a1dd45b3b5d8c9e5 100644 (file)
@@ -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;
index 24e604179f2dd2e8c71fa1d14fd227300358c950..85bab0666ab15a38313699bfe6f66ef43fb33eb8 100644 (file)
@@ -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;
index a744cfb8c28eb6dbbcf1826fc0dc4a52c2149298..97fad9fcf59339375987bca094110ded4bfed5d2 100644 (file)
@@ -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;