Cleanup: some variables had unused naming but were used
authorCampbell Barton <ideasman42@gmail.com>
Thu, 12 Dec 2019 02:43:37 +0000 (13:43 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 12 Dec 2019 04:50:26 +0000 (15:50 +1100)
release/scripts/presets/keyconfig/keymap_data/blender_default.py
release/scripts/startup/bl_ui/properties_grease_pencil_common.py
release/scripts/startup/bl_ui/properties_paint_common.py
release/scripts/startup/bl_ui/space_graph.py
release/scripts/startup/bl_ui/space_nla.py
release/scripts/startup/bl_ui/space_time.py

index 7a5f40de483c1bcede81297d175e09100b54c81e..5c69e47be382cc54760053c34987be89a82a85ce 100644 (file)
@@ -3237,7 +3237,7 @@ def km_grease_pencil_stroke_paint_erase(params):
     return keymap
 
 
-def km_grease_pencil_stroke_paint_fill(_params):
+def km_grease_pencil_stroke_paint_fill(params):
     items = []
     keymap = (
         "Grease Pencil Stroke Paint (Fill)",
@@ -3258,7 +3258,7 @@ def km_grease_pencil_stroke_paint_fill(_params):
         ("gpencil.draw", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True},
          {"properties": [("mode", 'DRAW'), ("wait_for_input", False), ("disable_straight", True), ("disable_fill", True)]}),
         # Lasso select
-        ("gpencil.select_lasso", {"type": _params.action_tweak, "value": 'ANY', "ctrl": True, "alt": True}, None),
+        ("gpencil.select_lasso", {"type": params.action_tweak, "value": 'ANY', "ctrl": True, "alt": True}, None),
     ])
 
     return keymap
index 5082400db734fdc3556bcb9f8c0a35767ac1424e..5fa98c533c320e5146ed2d8bb8ca02706595d3ef 100644 (file)
@@ -630,9 +630,9 @@ class GPENCIL_MT_gpencil_draw_delete(Menu):
 class GPENCIL_MT_cleanup(Menu):
     bl_label = "Clean Up"
 
-    def draw(self, _context):
+    def draw(self, context):
 
-        ob = _context.active_object
+        ob = context.active_object
 
         layout = self.layout
 
index 7c28095259e8f799741efd33d7ec1259d192ce13..d8d90fec583a8a4a58f6b95f614a200b81294c4b 100644 (file)
@@ -367,7 +367,7 @@ def brush_basic_sculpt_settings(layout, context, brush, *, compact=False):
         layout.row().prop(brush, "direction", expand=True, **({"text": ""} if compact else {}))
 
 
-def brush_basic_gpencil_paint_settings(layout, _context, brush, tool, *, compact=True, is_toolbar=False):
+def brush_basic_gpencil_paint_settings(layout, context, brush, tool, *, compact=True, is_toolbar=False):
     gp_settings = brush.gpencil_settings
 
     # Brush details
@@ -397,7 +397,7 @@ def brush_basic_gpencil_paint_settings(layout, _context, brush, tool, *, compact
         row.prop(gp_settings, "show_fill_boundary", text="", icon='GRID')
         # Fill options
         if is_toolbar:
-            settings = _context.tool_settings.gpencil_sculpt
+            settings = context.tool_settings.gpencil_sculpt
             row = layout.row(align=True)
             sub = row.row(align=True)
             sub.popover(
@@ -429,7 +429,7 @@ def brush_basic_gpencil_paint_settings(layout, _context, brush, tool, *, compact
             "builtin.circle",
             "builtin.polyline",
     }:
-        settings = _context.tool_settings.gpencil_sculpt
+        settings = context.tool_settings.gpencil_sculpt
         if is_toolbar:
             row = layout.row(align=True)
             row.prop(settings, "use_thickness_curve", text="", icon='CURVE_DATA')
index 752e1741984e97a601faf8b1a2b5e552816e6674..968492db374fdd03c85eed9f6a2a6022b2941b5c 100644 (file)
@@ -93,8 +93,8 @@ class GRAPH_MT_editor_menus(Menu):
     bl_idname = "GRAPH_MT_editor_menus"
     bl_label = ""
 
-    def draw(self, _context):
-        st = _context.space_data
+    def draw(self, context):
+        st = context.space_data
         layout = self.layout
         layout.menu("GRAPH_MT_view")
         layout.menu("GRAPH_MT_select")
index 24d6f65d9b95c1fec6fe5f2a4506f30a79781d55..28b67c93666ab6c0dcf4e2438f22d291ca62ea5c 100644 (file)
@@ -70,8 +70,8 @@ class NLA_MT_editor_menus(Menu):
     bl_idname = "NLA_MT_editor_menus"
     bl_label = ""
 
-    def draw(self, _context):
-        st = _context.space_data
+    def draw(self, context):
+        st = context.space_data
         layout = self.layout
         layout.menu("NLA_MT_view")
         layout.menu("NLA_MT_select")
index 6d60c67ded0d104e87087a671d2359fe0fa29abd..629958a783eedc4e08ae62ff56c3e3ec5f9c3501 100644 (file)
@@ -87,10 +87,10 @@ class TIME_MT_editor_menus(Menu):
     bl_idname = "TIME_MT_editor_menus"
     bl_label = ""
 
-    def draw(self, _context):
+    def draw(self, context):
         layout = self.layout
         horizontal = (layout.direction == 'VERTICAL')
-        st = _context.space_data
+        st = context.space_data
         if horizontal:
             row = layout.row()
             sub = row.row(align=True)