Cleanup: use 'tool_settings' name everywhere in UI scripts
authorCampbell Barton <ideasman42@gmail.com>
Mon, 17 Dec 2018 06:20:24 +0000 (17:20 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 17 Dec 2018 06:22:50 +0000 (17:22 +1100)
12 files changed:
release/scripts/startup/bl_operators/wm.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_clip.py
release/scripts/startup/bl_ui/space_dopesheet.py
release/scripts/startup/bl_ui/space_graph.py
release/scripts/startup/bl_ui/space_image.py
release/scripts/startup/bl_ui/space_node.py
release/scripts/startup/bl_ui/space_sequencer.py
release/scripts/startup/bl_ui/space_time.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py

index 0f3052f64c25cf1a4788284389565fc777bbc3e5..cc40ca2cb669751789544b1f2d2163d1589e3e19 100644 (file)
@@ -171,10 +171,10 @@ class BRUSH_OT_active_index_set(Operator):
         if attr is None:
             return {'CANCELLED'}
 
         if attr is None:
             return {'CANCELLED'}
 
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
         for i, brush in enumerate((cur for cur in bpy.data.brushes if getattr(cur, attr))):
             if i == self.index:
         for i, brush in enumerate((cur for cur in bpy.data.brushes if getattr(cur, attr))):
             if i == self.index:
-                getattr(toolsettings, self.mode).brush = brush
+                getattr(tool_settings, self.mode).brush = brush
                 return {'FINISHED'}
 
         return {'CANCELLED'}
                 return {'FINISHED'}
 
         return {'CANCELLED'}
index 373e3797f71bf0a818a075d9a6902a5e90c726f6..099de6e5e42972f3b86a9b19d9d04d91846801ec 100644 (file)
@@ -33,30 +33,30 @@ def gpencil_stroke_placement_settings(context, layout):
     else:
         propname = "gpencil_stroke_placement_view2d"
 
     else:
         propname = "gpencil_stroke_placement_view2d"
 
-    ts = context.tool_settings
+    tool_settings = context.tool_settings
 
     col = layout.column(align=True)
 
     col.label(text="Stroke Placement:")
 
     row = col.row(align=True)
 
     col = layout.column(align=True)
 
     col.label(text="Stroke Placement:")
 
     row = col.row(align=True)
-    row.prop_enum(ts, propname, 'VIEW')
-    row.prop_enum(ts, propname, 'CURSOR')
+    row.prop_enum(tool_settings, propname, 'VIEW')
+    row.prop_enum(tool_settings, propname, 'CURSOR')
 
     if context.space_data.type == 'VIEW_3D':
         row = col.row(align=True)
 
     if context.space_data.type == 'VIEW_3D':
         row = col.row(align=True)
-        row.prop_enum(ts, propname, 'SURFACE')
-        row.prop_enum(ts, propname, 'STROKE')
+        row.prop_enum(tool_settings, propname, 'SURFACE')
+        row.prop_enum(tool_settings, propname, 'STROKE')
 
         row = col.row(align=False)
 
         row = col.row(align=False)
-        row.active = getattr(ts, propname) in {'SURFACE', 'STROKE'}
-        row.prop(ts, "use_gpencil_stroke_endpoints")
+        row.active = getattr(tool_settings, propname) in {'SURFACE', 'STROKE'}
+        row.prop(tool_settings, "use_gpencil_stroke_endpoints")
 
         if context.scene.tool_settings.gpencil_stroke_placement_view3d == 'CURSOR':
             row = col.row(align=True)
             row.label("Lock axis:")
             row = col.row(align=True)
 
         if context.scene.tool_settings.gpencil_stroke_placement_view3d == 'CURSOR':
             row = col.row(align=True)
             row.label("Lock axis:")
             row = col.row(align=True)
-            row.prop(ts.gpencil_sculpt, "lockaxis", expand=True)
+            row.prop(tool_settings.gpencil_sculpt, "lockaxis", expand=True)
 
 
 def gpencil_active_brush_settings_simple(context, layout):
 
 
 def gpencil_active_brush_settings_simple(context, layout):
@@ -313,12 +313,20 @@ class GreasePencilBrushPanel:
 
         row = layout.row()
         col = row.column()
 
         row = layout.row()
         col = row.column()
-        ts = context.scene.tool_settings
-        if len(ts.gpencil_brushes) >= 2:
+        tool_settings = context.scene.tool_settings
+        if len(tool_settings.gpencil_brushes) >= 2:
             brows = 3
         else:
             brows = 2
             brows = 3
         else:
             brows = 2
-        col.template_list("GPENCIL_UL_brush", "", ts, "gpencil_brushes", ts.gpencil_brushes, "active_index", rows=brows)
+        col.template_list(
+            "GPENCIL_UL_brush",
+            "",
+            tool_settings,
+            "gpencil_brushes",
+            tool_settings.gpencil_brushes,
+            "active_index",
+            rows=brows,
+        )
 
         col = row.column()
 
 
         col = row.column()
 
@@ -328,7 +336,7 @@ class GreasePencilBrushPanel:
         sub.menu("GPENCIL_MT_brush_specials", icon='DOWNARROW_HLT', text="")
         brush = context.active_gpencil_brush
         if brush:
         sub.menu("GPENCIL_MT_brush_specials", icon='DOWNARROW_HLT', text="")
         brush = context.active_gpencil_brush
         if brush:
-            if len(ts.gpencil_brushes) > 1:
+            if len(tool_settings.gpencil_brushes) > 1:
                 col.separator()
                 sub = col.column(align=True)
                 sub.operator("gpencil.brush_move", icon='TRIA_UP', text="").type = 'UP'
                 col.separator()
                 sub = col.column(align=True)
                 sub.operator("gpencil.brush_move", icon='TRIA_UP', text="").type = 'UP'
index b4049bf7b68b239d683bb4dab0c6b062ef5946b1..bda926f63db6719ff20037ad236762af8d9b1e81 100644 (file)
@@ -27,21 +27,21 @@ class UnifiedPaintPanel:
 
     @staticmethod
     def paint_settings(context):
 
     @staticmethod
     def paint_settings(context):
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
 
         if context.sculpt_object:
 
         if context.sculpt_object:
-            return toolsettings.sculpt
+            return tool_settings.sculpt
         elif context.vertex_paint_object:
         elif context.vertex_paint_object:
-            return toolsettings.vertex_paint
+            return tool_settings.vertex_paint
         elif context.weight_paint_object:
         elif context.weight_paint_object:
-            return toolsettings.weight_paint
+            return tool_settings.weight_paint
         elif context.image_paint_object:
         elif context.image_paint_object:
-            if (toolsettings.image_paint and toolsettings.image_paint.detect_data()):
-                return toolsettings.image_paint
+            if (tool_settings.image_paint and tool_settings.image_paint.detect_data()):
+                return tool_settings.image_paint
 
             return None
         elif context.particle_edit_object:
 
             return None
         elif context.particle_edit_object:
-            return toolsettings.particle_edit
+            return tool_settings.particle_edit
 
         return None
 
 
         return None
 
index acc91edc41096ceaaaad9cf69baf350f34fbeb61..d4a3f92423808d1c8a6fec14980ed3e6ca9f979a 100644 (file)
@@ -119,7 +119,7 @@ class CLIP_HT_header(Header):
     def _draw_masking(self, context):
         layout = self.layout
 
     def _draw_masking(self, context):
         layout = self.layout
 
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
         sc = context.space_data
         clip = sc.clip
 
         sc = context.space_data
         clip = sc.clip
 
@@ -140,10 +140,10 @@ class CLIP_HT_header(Header):
             layout.prop(sc, "pivot_point", text="", icon_only=True)
 
             row = layout.row(align=True)
             layout.prop(sc, "pivot_point", text="", icon_only=True)
 
             row = layout.row(align=True)
-            row.prop(toolsettings, "use_proportional_edit_mask",
+            row.prop(tool_settings, "use_proportional_edit_mask",
                      text="", icon_only=True)
                      text="", icon_only=True)
-            if toolsettings.use_proportional_edit_mask:
-                row.prop(toolsettings, "proportional_edit_falloff",
+            if tool_settings.use_proportional_edit_mask:
+                row.prop(tool_settings, "proportional_edit_falloff",
                          text="", icon_only=True)
 
     def draw(self, context):
                          text="", icon_only=True)
 
     def draw(self, context):
index 731032bafa82a31556b6d20af5259a28c45461b1..4683b108e37a9c6dd0916b4ed9130bf1c7cc8715 100644 (file)
@@ -114,7 +114,7 @@ class DOPESHEET_HT_header(Header):
         layout = self.layout
 
         st = context.space_data
         layout = self.layout
 
         st = context.space_data
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
 
         row = layout.row(align=True)
         row.template_header()
 
         row = layout.row(align=True)
         row.template_header()
@@ -158,10 +158,10 @@ class DOPESHEET_HT_header(Header):
                 row.prop(st.dopesheet, "use_multi_word_filter", text="")
 
         row = layout.row(align=True)
                 row.prop(st.dopesheet, "use_multi_word_filter", text="")
 
         row = layout.row(align=True)
-        row.prop(toolsettings, "use_proportional_action",
+        row.prop(tool_settings, "use_proportional_action",
                  text="", icon_only=True)
                  text="", icon_only=True)
-        if toolsettings.use_proportional_action:
-            row.prop(toolsettings, "proportional_edit_falloff",
+        if tool_settings.use_proportional_action:
+            row.prop(tool_settings, "proportional_edit_falloff",
                      text="", icon_only=True)
 
         # Grease Pencil mode doesn't need snapping, as it's frame-aligned only
                      text="", icon_only=True)
 
         # Grease Pencil mode doesn't need snapping, as it's frame-aligned only
index 5ed58a57e47c8092ea099baab600531aa98b3ec9..7a920435b183b99936be6b3f4c9b3d30ff79dfbd 100644 (file)
@@ -29,7 +29,7 @@ class GRAPH_HT_header(Header):
         from .space_dopesheet import dopesheet_filter
 
         layout = self.layout
         from .space_dopesheet import dopesheet_filter
 
         layout = self.layout
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
 
         st = context.space_data
 
 
         st = context.space_data
 
@@ -50,10 +50,10 @@ class GRAPH_HT_header(Header):
 
         row = layout.row(align=True)
 
 
         row = layout.row(align=True)
 
-        row.prop(toolsettings, "use_proportional_fcurve",
+        row.prop(tool_settings, "use_proportional_fcurve",
                  text="", icon_only=True)
                  text="", icon_only=True)
-        if toolsettings.use_proportional_fcurve:
-            row.prop(toolsettings, "proportional_edit_falloff",
+        if tool_settings.use_proportional_fcurve:
+            row.prop(tool_settings, "proportional_edit_falloff",
                      text="", icon_only=True)
 
         layout.prop(st, "auto_snap", text="")
                      text="", icon_only=True)
 
         layout.prop(st, "auto_snap", text="")
index 9a2215969cfb24c74ed244f395bfbb6948add4d3..eb903f25f79e5013655a91b7d6d4e6cedacd44f9 100644 (file)
@@ -50,8 +50,8 @@ class BrushButtonsPanel(UnifiedPaintPanel):
     @classmethod
     def poll(cls, context):
         sima = context.space_data
     @classmethod
     def poll(cls, context):
         sima = context.space_data
-        toolsettings = context.tool_settings.image_paint
-        return sima.show_paint and toolsettings.brush
+        tool_settings = context.tool_settings.image_paint
+        return sima.show_paint and tool_settings.brush
 
 
 class UVToolsPanel:
 
 
 class UVToolsPanel:
@@ -73,8 +73,8 @@ class IMAGE_MT_view(Menu):
 
         sima = context.space_data
         uv = sima.uv_editor
 
         sima = context.space_data
         uv = sima.uv_editor
-        toolsettings = context.tool_settings
-        paint = toolsettings.image_paint
+        tool_settings = context.tool_settings
+        paint = tool_settings.image_paint
 
         show_uvedit = sima.show_uvedit
         show_render = sima.show_render
 
         show_uvedit = sima.show_uvedit
         show_render = sima.show_render
@@ -86,13 +86,13 @@ class IMAGE_MT_view(Menu):
 
         layout.prop(sima, "use_realtime_update")
         if show_uvedit:
 
         layout.prop(sima, "use_realtime_update")
         if show_uvedit:
-            layout.prop(toolsettings, "show_uv_local_view")
+            layout.prop(tool_settings, "show_uv_local_view")
 
         layout.prop(uv, "show_other_objects")
         layout.prop(uv, "show_metadata")
         if paint.brush and (context.image_paint_object or sima.mode == 'PAINT'):
             layout.prop(uv, "show_texpaint")
 
         layout.prop(uv, "show_other_objects")
         layout.prop(uv, "show_metadata")
         if paint.brush and (context.image_paint_object or sima.mode == 'PAINT'):
             layout.prop(uv, "show_texpaint")
-            layout.prop(toolsettings, "show_uv_local_view", text="Show Same Material")
+            layout.prop(tool_settings, "show_uv_local_view", text="Show Same Material")
 
         layout.separator()
 
 
         layout.separator()
 
@@ -170,8 +170,8 @@ class IMAGE_MT_brush(Menu):
 
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
-        toolsettings = context.tool_settings
-        settings = toolsettings.image_paint
+        tool_settings = context.tool_settings
+        settings = tool_settings.image_paint
         brush = settings.brush
 
         ups = context.tool_settings.unified_paint_settings
         brush = settings.brush
 
         ups = context.tool_settings.unified_paint_settings
@@ -343,14 +343,14 @@ class IMAGE_MT_uvs(Menu):
 
         sima = context.space_data
         uv = sima.uv_editor
 
         sima = context.space_data
         uv = sima.uv_editor
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
 
         layout.prop(uv, "use_snap_to_pixels")
         layout.prop(uv, "lock_bounds")
 
         layout.separator()
 
 
         layout.prop(uv, "use_snap_to_pixels")
         layout.prop(uv, "lock_bounds")
 
         layout.separator()
 
-        layout.prop(toolsettings, "use_uv_sculpt")
+        layout.prop(tool_settings, "use_uv_sculpt")
 
         layout.separator()
 
 
         layout.separator()
 
@@ -393,11 +393,11 @@ class IMAGE_MT_uvs_select_mode(Menu):
         layout = self.layout
 
         layout.operator_context = 'INVOKE_REGION_WIN'
         layout = self.layout
 
         layout.operator_context = 'INVOKE_REGION_WIN'
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
 
         # do smart things depending on whether uv_select_sync is on
 
 
         # do smart things depending on whether uv_select_sync is on
 
-        if toolsettings.use_uv_select_sync:
+        if tool_settings.use_uv_select_sync:
             props = layout.operator("wm.context_set_value", text="Vertex", icon='VERTEXSEL')
             props.value = "(True, False, False)"
             props.data_path = "tool_settings.mesh_select_mode"
             props = layout.operator("wm.context_set_value", text="Vertex", icon='VERTEXSEL')
             props.value = "(True, False, False)"
             props.data_path = "tool_settings.mesh_select_mode"
@@ -437,7 +437,7 @@ class IMAGE_HT_header(Header):
         sima = context.space_data
         ima = sima.image
         iuser = sima.image_user
         sima = context.space_data
         ima = sima.image
         iuser = sima.image_user
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
         mode = sima.mode
 
         show_render = sima.show_render
         mode = sima.mode
 
         show_render = sima.show_render
@@ -465,24 +465,24 @@ class IMAGE_HT_header(Header):
         if show_uvedit:
             uvedit = sima.uv_editor
 
         if show_uvedit:
             uvedit = sima.uv_editor
 
-            layout.prop(toolsettings, "use_uv_select_sync", text="")
+            layout.prop(tool_settings, "use_uv_select_sync", text="")
 
 
-            if toolsettings.use_uv_select_sync:
+            if tool_settings.use_uv_select_sync:
                 layout.template_edit_mode_selection()
             else:
                 layout.template_edit_mode_selection()
             else:
-                layout.prop(toolsettings, "uv_select_mode", text="", expand=True)
+                layout.prop(tool_settings, "uv_select_mode", text="", expand=True)
                 layout.prop(uvedit, "sticky_select_mode", icon_only=True)
 
             row = layout.row(align=True)
                 layout.prop(uvedit, "sticky_select_mode", icon_only=True)
 
             row = layout.row(align=True)
-            row.prop(toolsettings, "proportional_edit", icon_only=True)
-            if toolsettings.proportional_edit != 'DISABLED':
-                row.prop(toolsettings, "proportional_edit_falloff", icon_only=True)
+            row.prop(tool_settings, "proportional_edit", icon_only=True)
+            if tool_settings.proportional_edit != 'DISABLED':
+                row.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
 
             row = layout.row(align=True)
 
             row = layout.row(align=True)
-            row.prop(toolsettings, "use_snap", text="")
-            row.prop(toolsettings, "snap_uv_element", icon_only=True)
-            if toolsettings.snap_uv_element != 'INCREMENT':
-                row.prop(toolsettings, "snap_target", text="")
+            row.prop(tool_settings, "use_snap", text="")
+            row.prop(tool_settings, "snap_uv_element", icon_only=True)
+            if tool_settings.snap_uv_element != 'INCREMENT':
+                row.prop(tool_settings, "snap_target", text="")
 
             mesh = context.edit_object.data
             layout.prop_search(mesh.uv_textures, "active", mesh, "uv_textures", text="")
 
             mesh = context.edit_object.data
             layout.prop_search(mesh.uv_textures, "active", mesh, "uv_textures", text="")
@@ -848,8 +848,8 @@ class IMAGE_PT_tools_brush_overlay(BrushButtonsPanel, Panel):
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
 
-        toolsettings = context.tool_settings.image_paint
-        brush = toolsettings.brush
+        tool_settings = context.tool_settings.image_paint
+        brush = tool_settings.brush
         tex_slot = brush.texture_slot
         tex_slot_mask = brush.mask_texture_slot
 
         tex_slot = brush.texture_slot
         tex_slot_mask = brush.mask_texture_slot
 
@@ -902,8 +902,8 @@ class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
 
-        toolsettings = context.tool_settings.image_paint
-        brush = toolsettings.brush
+        tool_settings = context.tool_settings.image_paint
+        brush = tool_settings.brush
 
         col = layout.column()
         col.template_ID_preview(brush, "texture", new="texture.new", rows=3, cols=8)
 
         col = layout.column()
         col.template_ID_preview(brush, "texture", new="texture.new", rows=3, cols=8)
@@ -935,8 +935,8 @@ class IMAGE_PT_tools_brush_tool(BrushButtonsPanel, Panel):
 
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
-        toolsettings = context.tool_settings.image_paint
-        brush = toolsettings.brush
+        tool_settings = context.tool_settings.image_paint
+        brush = tool_settings.brush
 
         layout.prop(brush, "image_tool", text="")
 
 
         layout.prop(brush, "image_tool", text="")
 
@@ -955,8 +955,8 @@ class IMAGE_PT_paint_stroke(BrushButtonsPanel, Panel):
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
 
-        toolsettings = context.tool_settings.image_paint
-        brush = toolsettings.brush
+        tool_settings = context.tool_settings.image_paint
+        brush = tool_settings.brush
 
         col = layout.column()
 
 
         col = layout.column()
 
@@ -1012,7 +1012,7 @@ class IMAGE_PT_paint_stroke(BrushButtonsPanel, Panel):
 
             col.separator()
 
 
             col.separator()
 
-        col.prop(toolsettings, "input_samples")
+        col.prop(tool_settings, "input_samples")
 
 
 class IMAGE_PT_paint_curve(BrushButtonsPanel, Panel):
 
 
 class IMAGE_PT_paint_curve(BrushButtonsPanel, Panel):
@@ -1023,8 +1023,8 @@ class IMAGE_PT_paint_curve(BrushButtonsPanel, Panel):
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
 
-        toolsettings = context.tool_settings.image_paint
-        brush = toolsettings.brush
+        tool_settings = context.tool_settings.image_paint
+        brush = tool_settings.brush
 
         layout.template_curve_mapping(brush, "curve")
 
 
         layout.template_curve_mapping(brush, "curve")
 
@@ -1047,8 +1047,8 @@ class IMAGE_PT_tools_imagepaint_symmetry(BrushButtonsPanel, Panel):
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
 
-        toolsettings = context.tool_settings
-        ipaint = toolsettings.image_paint
+        tool_settings = context.tool_settings
+        ipaint = tool_settings.image_paint
 
         col = layout.column(align=True)
         row = col.row(align=True)
 
         col = layout.column(align=True)
         row = col.row(align=True)
@@ -1064,8 +1064,8 @@ class IMAGE_PT_tools_brush_appearance(BrushButtonsPanel, Panel):
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
 
-        toolsettings = context.tool_settings.image_paint
-        brush = toolsettings.brush
+        tool_settings = context.tool_settings.image_paint
+        brush = tool_settings.brush
 
         if brush is None:  # unlikely but can happen
             layout.label(text="Brush Unset")
 
         if brush is None:  # unlikely but can happen
             layout.label(text="Brush Unset")
@@ -1073,9 +1073,9 @@ class IMAGE_PT_tools_brush_appearance(BrushButtonsPanel, Panel):
 
         col = layout.column(align=True)
 
 
         col = layout.column(align=True)
 
-        col.prop(toolsettings, "show_brush")
+        col.prop(tool_settings, "show_brush")
         sub = col.column()
         sub = col.column()
-        sub.active = toolsettings.show_brush
+        sub.active = tool_settings.show_brush
         sub.prop(brush, "cursor_color_add", text="")
 
         col.separator()
         sub.prop(brush, "cursor_color_add", text="")
 
         col.separator()
@@ -1093,10 +1093,10 @@ class IMAGE_PT_tools_paint_options(BrushButtonsPanel, Panel):
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
 
-        toolsettings = context.tool_settings
-        # brush = toolsettings.image_paint.brush
+        tool_settings = context.tool_settings
+        # brush = tool_settings.image_paint.brush
 
 
-        ups = toolsettings.unified_paint_settings
+        ups = tool_settings.unified_paint_settings
 
         col = layout.column(align=True)
         col.label(text="Unified Settings:")
 
         col = layout.column(align=True)
         col.label(text="Unified Settings:")
@@ -1116,14 +1116,14 @@ class IMAGE_PT_uv_sculpt_curve(Panel):
     @classmethod
     def poll(cls, context):
         sima = context.space_data
     @classmethod
     def poll(cls, context):
         sima = context.space_data
-        toolsettings = context.tool_settings.image_paint
-        return sima.show_uvedit and context.tool_settings.use_uv_sculpt and not (sima.show_paint and toolsettings.brush)
+        tool_settings = context.tool_settings.image_paint
+        return sima.show_uvedit and context.tool_settings.use_uv_sculpt and not (sima.show_paint and tool_settings.brush)
 
     def draw(self, context):
         layout = self.layout
 
 
     def draw(self, context):
         layout = self.layout
 
-        toolsettings = context.tool_settings
-        uvsculpt = toolsettings.uv_sculpt
+        tool_settings = context.tool_settings
+        uvsculpt = tool_settings.uv_sculpt
         brush = uvsculpt.brush
 
         layout.template_curve_mapping(brush, "curve")
         brush = uvsculpt.brush
 
         layout.template_curve_mapping(brush, "curve")
@@ -1146,14 +1146,14 @@ class IMAGE_PT_uv_sculpt(Panel, ImagePaintPanel):
     @classmethod
     def poll(cls, context):
         sima = context.space_data
     @classmethod
     def poll(cls, context):
         sima = context.space_data
-        toolsettings = context.tool_settings.image_paint
-        return sima.show_uvedit and context.tool_settings.use_uv_sculpt and not (sima.show_paint and toolsettings.brush)
+        tool_settings = context.tool_settings.image_paint
+        return sima.show_uvedit and context.tool_settings.use_uv_sculpt and not (sima.show_paint and tool_settings.brush)
 
     def draw(self, context):
         layout = self.layout
 
 
     def draw(self, context):
         layout = self.layout
 
-        toolsettings = context.tool_settings
-        uvsculpt = toolsettings.uv_sculpt
+        tool_settings = context.tool_settings
+        uvsculpt = tool_settings.uv_sculpt
         brush = uvsculpt.brush
 
         if brush:
         brush = uvsculpt.brush
 
         if brush:
@@ -1168,12 +1168,12 @@ class IMAGE_PT_uv_sculpt(Panel, ImagePaintPanel):
             self.prop_unified_strength(row, context, brush, "use_pressure_strength")
 
         col = layout.column()
             self.prop_unified_strength(row, context, brush, "use_pressure_strength")
 
         col = layout.column()
-        col.prop(toolsettings, "uv_sculpt_lock_borders")
-        col.prop(toolsettings, "uv_sculpt_all_islands")
+        col.prop(tool_settings, "uv_sculpt_lock_borders")
+        col.prop(tool_settings, "uv_sculpt_all_islands")
 
 
-        col.prop(toolsettings, "uv_sculpt_tool")
-        if toolsettings.uv_sculpt_tool == 'RELAX':
-            col.prop(toolsettings, "uv_relax_method")
+        col.prop(tool_settings, "uv_sculpt_tool")
+        if tool_settings.uv_sculpt_tool == 'RELAX':
+            col.prop(tool_settings, "uv_relax_method")
 
         col.prop(uvsculpt, "show_brush")
 
 
         col.prop(uvsculpt, "show_brush")
 
@@ -1192,10 +1192,10 @@ class IMAGE_PT_options_uvs(Panel, UVToolsPanel):
 
         sima = context.space_data
         uv = sima.uv_editor
 
         sima = context.space_data
         uv = sima.uv_editor
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
 
         col = layout.column(align=True)
 
         col = layout.column(align=True)
-        col.prop(toolsettings, "use_uv_sculpt")
+        col.prop(tool_settings, "use_uv_sculpt")
         col.prop(uv, "use_live_unwrap")
         col.prop(uv, "use_snap_to_pixels")
         col.prop(uv, "lock_bounds")
         col.prop(uv, "use_live_unwrap")
         col.prop(uv, "use_snap_to_pixels")
         col.prop(uv, "lock_bounds")
index c2735998d2c684e09b151464bdd31d6e81a4d3ef..e14708e651d22e8fb80a418b41869d9883e0cbe7 100644 (file)
@@ -43,7 +43,7 @@ class NODE_HT_header(Header):
         snode = context.space_data
         snode_id = snode.id
         id_from = snode.id_from
         snode = context.space_data
         snode_id = snode.id
         id_from = snode.id_from
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
 
         row = layout.row(align=True)
         row.template_header()
 
         row = layout.row(align=True)
         row.template_header()
@@ -123,10 +123,10 @@ class NODE_HT_header(Header):
 
         # Snap
         row = layout.row(align=True)
 
         # Snap
         row = layout.row(align=True)
-        row.prop(toolsettings, "use_snap", text="")
-        row.prop(toolsettings, "snap_node_element", icon_only=True)
-        if toolsettings.snap_node_element != 'GRID':
-            row.prop(toolsettings, "snap_target", text="")
+        row.prop(tool_settings, "use_snap", text="")
+        row.prop(tool_settings, "snap_node_element", icon_only=True)
+        if tool_settings.snap_node_element != 'GRID':
+            row.prop(tool_settings, "snap_target", text="")
 
         row = layout.row(align=True)
         row.operator("node.clipboard_copy", text="", icon='COPYDOWN')
 
         row = layout.row(align=True)
         row.operator("node.clipboard_copy", text="", icon='COPYDOWN')
index c3ca26efcb79f2fb34b7bedd2f7c556c0c3f0720..afdae718654bad8e01173135c4cbbfff6fb83b1c 100644 (file)
@@ -119,14 +119,14 @@ class SEQUENCER_HT_header(Header):
 
         if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
             gpd = context.gpencil_data
 
         if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
             gpd = context.gpencil_data
-            toolsettings = context.tool_settings
+            tool_settings = context.tool_settings
 
             # Proportional editing
             if gpd and gpd.use_stroke_edit_mode:
                 row = layout.row(align=True)
 
             # Proportional editing
             if gpd and gpd.use_stroke_edit_mode:
                 row = layout.row(align=True)
-                row.prop(toolsettings, "proportional_edit", icon_only=True)
-                if toolsettings.proportional_edit != 'DISABLED':
-                    row.prop(toolsettings, "proportional_edit_falloff", icon_only=True)
+                row.prop(tool_settings, "proportional_edit", icon_only=True)
+                if tool_settings.proportional_edit != 'DISABLED':
+                    row.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
 
         row = layout.row(align=True)
         row.operator("render.opengl", text="", icon='RENDER_STILL').sequencer = True
 
         row = layout.row(align=True)
         row.operator("render.opengl", text="", icon='RENDER_STILL').sequencer = True
index 9026a93aa998c236810224e395816318681a9ae7..89058b8535591c2745b7dfa77516d0ea1275ff20 100644 (file)
@@ -28,7 +28,7 @@ class TIME_HT_header(Header):
         layout = self.layout
 
         scene = context.scene
         layout = self.layout
 
         scene = context.scene
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
         screen = context.screen
         userprefs = context.user_preferences
 
         screen = context.screen
         userprefs = context.user_preferences
 
@@ -82,15 +82,15 @@ class TIME_HT_header(Header):
         layout.separator()
 
         row = layout.row(align=True)
         layout.separator()
 
         row = layout.row(align=True)
-        row.prop(toolsettings, "use_keyframe_insert_auto", text="", toggle=True)
-        if toolsettings.use_keyframe_insert_auto:
-            row.prop(toolsettings, "use_keyframe_insert_keyingset", text="", toggle=True)
+        row.prop(tool_settings, "use_keyframe_insert_auto", text="", toggle=True)
+        if tool_settings.use_keyframe_insert_auto:
+            row.prop(tool_settings, "use_keyframe_insert_keyingset", text="", toggle=True)
 
             if screen.is_animation_playing and not userprefs.edit.use_keyframe_insert_available:
                 subsub = row.row(align=True)
 
             if screen.is_animation_playing and not userprefs.edit.use_keyframe_insert_available:
                 subsub = row.row(align=True)
-                subsub.prop(toolsettings, "use_record_with_nla", toggle=True)
+                subsub.prop(tool_settings, "use_record_with_nla", toggle=True)
 
 
-        layout.prop(toolsettings, "keyframe_type", text="", icon_only=True)
+        layout.prop(tool_settings, "keyframe_type", text="", icon_only=True)
 
         row = layout.row(align=True)
         row.prop_search(scene.keying_sets_all, "active", scene, "keying_sets_all", text="")
 
         row = layout.row(align=True)
         row.prop_search(scene.keying_sets_all, "active", scene, "keying_sets_all", text="")
@@ -232,10 +232,10 @@ class TIME_MT_autokey(Menu):
 
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
 
 
-        layout.prop_enum(toolsettings, "auto_keying_mode", 'ADD_REPLACE_KEYS')
-        layout.prop_enum(toolsettings, "auto_keying_mode", 'REPLACE_KEYS')
+        layout.prop_enum(tool_settings, "auto_keying_mode", 'ADD_REPLACE_KEYS')
+        layout.prop_enum(tool_settings, "auto_keying_mode", 'REPLACE_KEYS')
 
 
 def marker_menu_generic(layout):
 
 
 def marker_menu_generic(layout):
@@ -266,8 +266,8 @@ def marker_menu_generic(layout):
     layout.operator("screen.marker_jump", text="Jump to Previous Marker").next = False
 
     layout.separator()
     layout.operator("screen.marker_jump", text="Jump to Previous Marker").next = False
 
     layout.separator()
-    ts = context.tool_settings
-    layout.prop(ts, "lock_markers")
+    tool_settings = context.tool_settings
+    layout.prop(tool_settings, "lock_markers")
 
 
 classes = (
 
 
 classes = (
index 2381309bc3d88beba884387ca598d81cceff28fe..528d5fb3e45d28b21ba1b761be4eab4ce93c78f0 100644 (file)
@@ -36,7 +36,7 @@ class VIEW3D_HT_header(Header):
         view = context.space_data
         # mode_string = context.mode
         obj = context.active_object
         view = context.space_data
         # mode_string = context.mode
         obj = context.active_object
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
 
         row = layout.row(align=True)
         row.template_header()
 
         row = layout.row(align=True)
         row.template_header()
@@ -51,7 +51,7 @@ class VIEW3D_HT_header(Header):
             mode = obj.mode
             # Particle edit
             if mode == 'PARTICLE_EDIT':
             mode = obj.mode
             # Particle edit
             if mode == 'PARTICLE_EDIT':
-                row.prop(toolsettings.particle_edit, "select_mode", text="", expand=True)
+                row.prop(tool_settings.particle_edit, "select_mode", text="", expand=True)
 
             # Occlude geometry
             if ((view.viewport_shade not in {'BOUNDBOX', 'WIREFRAME'} and (mode == 'PARTICLE_EDIT' or (mode == 'EDIT' and obj.type == 'MESH'))) or
 
             # Occlude geometry
             if ((view.viewport_shade not in {'BOUNDBOX', 'WIREFRAME'} and (mode == 'PARTICLE_EDIT' or (mode == 'EDIT' and obj.type == 'MESH'))) or
@@ -61,26 +61,26 @@ class VIEW3D_HT_header(Header):
             # Proportional editing
             if context.gpencil_data and context.gpencil_data.use_stroke_edit_mode:
                 row = layout.row(align=True)
             # Proportional editing
             if context.gpencil_data and context.gpencil_data.use_stroke_edit_mode:
                 row = layout.row(align=True)
-                row.prop(toolsettings, "proportional_edit", icon_only=True)
-                if toolsettings.proportional_edit != 'DISABLED':
-                    row.prop(toolsettings, "proportional_edit_falloff", icon_only=True)
+                row.prop(tool_settings, "proportional_edit", icon_only=True)
+                if tool_settings.proportional_edit != 'DISABLED':
+                    row.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
             elif mode in {'EDIT', 'PARTICLE_EDIT'}:
                 row = layout.row(align=True)
             elif mode in {'EDIT', 'PARTICLE_EDIT'}:
                 row = layout.row(align=True)
-                row.prop(toolsettings, "proportional_edit", icon_only=True)
-                if toolsettings.proportional_edit != 'DISABLED':
-                    row.prop(toolsettings, "proportional_edit_falloff", icon_only=True)
+                row.prop(tool_settings, "proportional_edit", icon_only=True)
+                if tool_settings.proportional_edit != 'DISABLED':
+                    row.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
             elif mode == 'OBJECT':
                 row = layout.row(align=True)
             elif mode == 'OBJECT':
                 row = layout.row(align=True)
-                row.prop(toolsettings, "use_proportional_edit_objects", icon_only=True)
-                if toolsettings.use_proportional_edit_objects:
-                    row.prop(toolsettings, "proportional_edit_falloff", icon_only=True)
+                row.prop(tool_settings, "use_proportional_edit_objects", icon_only=True)
+                if tool_settings.use_proportional_edit_objects:
+                    row.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
         else:
             # Proportional editing
             if context.gpencil_data and context.gpencil_data.use_stroke_edit_mode:
                 row = layout.row(align=True)
         else:
             # Proportional editing
             if context.gpencil_data and context.gpencil_data.use_stroke_edit_mode:
                 row = layout.row(align=True)
-                row.prop(toolsettings, "proportional_edit", icon_only=True)
-                if toolsettings.proportional_edit != 'DISABLED':
-                    row.prop(toolsettings, "proportional_edit_falloff", icon_only=True)
+                row.prop(tool_settings, "proportional_edit", icon_only=True)
+                if tool_settings.proportional_edit != 'DISABLED':
+                    row.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
 
         # Snap
         show_snap = False
 
         # Snap
         show_snap = False
@@ -97,29 +97,29 @@ class VIEW3D_HT_header(Header):
                         show_snap = True
 
         if show_snap:
                         show_snap = True
 
         if show_snap:
-            snap_element = toolsettings.snap_element
+            snap_element = tool_settings.snap_element
             row = layout.row(align=True)
             row = layout.row(align=True)
-            row.prop(toolsettings, "use_snap", text="")
-            row.prop(toolsettings, "snap_element", icon_only=True)
+            row.prop(tool_settings, "use_snap", text="")
+            row.prop(tool_settings, "snap_element", icon_only=True)
             if snap_element == 'INCREMENT':
             if snap_element == 'INCREMENT':
-                row.prop(toolsettings, "use_snap_grid_absolute", text="")
+                row.prop(tool_settings, "use_snap_grid_absolute", text="")
             else:
             else:
-                row.prop(toolsettings, "snap_target", text="")
+                row.prop(tool_settings, "snap_target", text="")
                 if obj:
                     if mode == 'EDIT':
                 if obj:
                     if mode == 'EDIT':
-                        row.prop(toolsettings, "use_snap_self", text="")
+                        row.prop(tool_settings, "use_snap_self", text="")
                     if mode in {'OBJECT', 'POSE', 'EDIT'} and snap_element != 'VOLUME':
                     if mode in {'OBJECT', 'POSE', 'EDIT'} and snap_element != 'VOLUME':
-                        row.prop(toolsettings, "use_snap_align_rotation", text="")
+                        row.prop(tool_settings, "use_snap_align_rotation", text="")
 
             if snap_element == 'VOLUME':
 
             if snap_element == 'VOLUME':
-                row.prop(toolsettings, "use_snap_peel_object", text="")
+                row.prop(tool_settings, "use_snap_peel_object", text="")
             elif snap_element == 'FACE':
             elif snap_element == 'FACE':
-                row.prop(toolsettings, "use_snap_project", text="")
+                row.prop(tool_settings, "use_snap_project", text="")
 
         # AutoMerge editing
         if obj:
             if (mode == 'EDIT' and obj.type == 'MESH'):
 
         # AutoMerge editing
         if obj:
             if (mode == 'EDIT' and obj.type == 'MESH'):
-                layout.prop(toolsettings, "use_mesh_automerge", text="", icon='AUTOMERGE_ON')
+                layout.prop(tool_settings, "use_mesh_automerge", text="", icon='AUTOMERGE_ON')
 
         # OpenGL render
         row = layout.row(align=True)
 
         # OpenGL render
         row = layout.row(align=True)
@@ -2032,8 +2032,8 @@ class VIEW3D_MT_sculpt(Menu):
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
 
-        toolsettings = context.tool_settings
-        sculpt = toolsettings.sculpt
+        tool_settings = context.tool_settings
+        sculpt = tool_settings.sculpt
 
         layout.menu("VIEW3D_MT_undo_redo")
 
 
         layout.menu("VIEW3D_MT_undo_redo")
 
@@ -2467,7 +2467,7 @@ class VIEW3D_MT_edit_mesh(Menu):
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
 
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
 
         layout.menu("VIEW3D_MT_undo_redo")
 
 
         layout.menu("VIEW3D_MT_undo_redo")
 
@@ -2510,7 +2510,7 @@ class VIEW3D_MT_edit_mesh(Menu):
 
         layout.separator()
 
 
         layout.separator()
 
-        layout.prop(toolsettings, "use_mesh_automerge")
+        layout.prop(tool_settings, "use_mesh_automerge")
         layout.menu("VIEW3D_MT_edit_proportional")
 
         layout.separator()
         layout.menu("VIEW3D_MT_edit_proportional")
 
         layout.separator()
@@ -3279,7 +3279,7 @@ class VIEW3D_MT_edit_gpencil(Menu):
     bl_label = "GPencil"
 
     def draw(self, context):
     bl_label = "GPencil"
 
     def draw(self, context):
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
 
         layout = self.layout
 
 
         layout = self.layout
 
@@ -3298,7 +3298,7 @@ class VIEW3D_MT_edit_gpencil(Menu):
         layout.separator()
 
         layout.operator("gpencil.brush_paint", text="Sculpt Strokes").wait_for_input = True
         layout.separator()
 
         layout.operator("gpencil.brush_paint", text="Sculpt Strokes").wait_for_input = True
-        layout.prop_menu_enum(toolsettings.gpencil_sculpt, "tool", text="Sculpt Brush")
+        layout.prop_menu_enum(tool_settings.gpencil_sculpt, "tool", text="Sculpt Brush")
 
         layout.separator()
 
 
         layout.separator()
 
@@ -3920,42 +3920,42 @@ class VIEW3D_PT_etch_a_ton(Panel):
 
     def draw_header(self, context):
         layout = self.layout
 
     def draw_header(self, context):
         layout = self.layout
-        toolsettings = context.scene.tool_settings
+        tool_settings = context.scene.tool_settings
 
 
-        layout.prop(toolsettings, "use_bone_sketching", text="")
+        layout.prop(tool_settings, "use_bone_sketching", text="")
 
     def draw(self, context):
         layout = self.layout
 
 
     def draw(self, context):
         layout = self.layout
 
-        toolsettings = context.scene.tool_settings
+        tool_settings = context.scene.tool_settings
 
         col = layout.column()
 
 
         col = layout.column()
 
-        col.prop(toolsettings, "use_etch_quick")
-        col.prop(toolsettings, "use_etch_overdraw")
+        col.prop(tool_settings, "use_etch_quick")
+        col.prop(tool_settings, "use_etch_overdraw")
 
         col.separator()
 
 
         col.separator()
 
-        col.prop(toolsettings, "etch_convert_mode")
+        col.prop(tool_settings, "etch_convert_mode")
 
 
-        if toolsettings.etch_convert_mode == 'LENGTH':
-            col.prop(toolsettings, "etch_length_limit")
-        elif toolsettings.etch_convert_mode == 'ADAPTIVE':
-            col.prop(toolsettings, "etch_adaptive_limit")
-        elif toolsettings.etch_convert_mode == 'FIXED':
-            col.prop(toolsettings, "etch_subdivision_number")
-        elif toolsettings.etch_convert_mode == 'RETARGET':
-            col.prop(toolsettings, "etch_template")
-            col.prop(toolsettings, "etch_roll_mode")
+        if tool_settings.etch_convert_mode == 'LENGTH':
+            col.prop(tool_settings, "etch_length_limit")
+        elif tool_settings.etch_convert_mode == 'ADAPTIVE':
+            col.prop(tool_settings, "etch_adaptive_limit")
+        elif tool_settings.etch_convert_mode == 'FIXED':
+            col.prop(tool_settings, "etch_subdivision_number")
+        elif tool_settings.etch_convert_mode == 'RETARGET':
+            col.prop(tool_settings, "etch_template")
+            col.prop(tool_settings, "etch_roll_mode")
 
             col.separator()
 
             colsub = col.column(align=True)
 
             col.separator()
 
             colsub = col.column(align=True)
-            colsub.prop(toolsettings, "use_etch_autoname")
+            colsub.prop(tool_settings, "use_etch_autoname")
             sub = colsub.column(align=True)
             sub = colsub.column(align=True)
-            sub.enabled = not toolsettings.use_etch_autoname
-            sub.prop(toolsettings, "etch_number")
-            sub.prop(toolsettings, "etch_side")
+            sub.enabled = not tool_settings.use_etch_autoname
+            sub.prop(tool_settings, "etch_number")
+            sub.prop(tool_settings, "etch_side")
 
         col.separator()
 
 
         col.separator()
 
index f868404cd2f7fb6cff2766258ce5972009592d45..38ea87316bab6a7f6154bebe18d347336871e0ec 100644 (file)
@@ -889,28 +889,28 @@ class VIEW3D_PT_imapaint_tools_missing(Panel, View3DPaintPanel):
 
     @classmethod
     def poll(cls, context):
 
     @classmethod
     def poll(cls, context):
-        toolsettings = context.tool_settings.image_paint
-        return context.image_paint_object and not toolsettings.detect_data()
+        tool_settings = context.tool_settings.image_paint
+        return context.image_paint_object and not tool_settings.detect_data()
 
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
-        toolsettings = context.tool_settings.image_paint
+        tool_settings = context.tool_settings.image_paint
 
         col = layout.column()
         col.label("Missing Data", icon='ERROR')
 
         col = layout.column()
         col.label("Missing Data", icon='ERROR')
-        if toolsettings.missing_uvs:
+        if tool_settings.missing_uvs:
             col.separator()
             col.label("Missing UVs", icon='INFO')
             col.label("Unwrap the mesh in edit mode or generate a simple UV layer")
             col.operator("paint.add_simple_uvs")
 
             col.separator()
             col.label("Missing UVs", icon='INFO')
             col.label("Unwrap the mesh in edit mode or generate a simple UV layer")
             col.operator("paint.add_simple_uvs")
 
-        if toolsettings.mode == 'MATERIAL':
-            if toolsettings.missing_materials:
+        if tool_settings.mode == 'MATERIAL':
+            if tool_settings.missing_materials:
                 col.separator()
                 col.label("Missing Materials", icon='INFO')
                 col.label("Add a material and paint slot below")
                 col.operator_menu_enum("paint.add_texture_paint_slot", "type", text="Add Paint Slot")
                 col.separator()
                 col.label("Missing Materials", icon='INFO')
                 col.label("Add a material and paint slot below")
                 col.operator_menu_enum("paint.add_texture_paint_slot", "type", text="Add Paint Slot")
-            elif toolsettings.missing_texture:
+            elif tool_settings.missing_texture:
                 ob = context.active_object
                 mat = ob.active_material
 
                 ob = context.active_object
                 mat = ob.active_material
 
@@ -924,23 +924,23 @@ class VIEW3D_PT_imapaint_tools_missing(Panel, View3DPaintPanel):
                     col.label("Add a material and paint slot below")
                     col.operator_menu_enum("paint.add_texture_paint_slot", "type", text="Add Paint Slot")
 
                     col.label("Add a material and paint slot below")
                     col.operator_menu_enum("paint.add_texture_paint_slot", "type", text="Add Paint Slot")
 
-        elif toolsettings.mode == 'IMAGE':
-            if toolsettings.missing_texture:
+        elif tool_settings.mode == 'IMAGE':
+            if tool_settings.missing_texture:
                 col.separator()
                 col.label("Missing Canvas", icon='INFO')
                 col.label("Add or assign a canvas image below")
                 col.label("Canvas Image:")
                 # todo this should be combinded into a single row
                 col.separator()
                 col.label("Missing Canvas", icon='INFO')
                 col.label("Add or assign a canvas image below")
                 col.label("Canvas Image:")
                 # todo this should be combinded into a single row
-                col.template_ID(toolsettings, "canvas", open="image.open")
+                col.template_ID(tool_settings, "canvas", open="image.open")
                 col.operator("image.new", text="New").gen_context = 'PAINT_CANVAS'
 
                 col.operator("image.new", text="New").gen_context = 'PAINT_CANVAS'
 
-        if toolsettings.missing_stencil:
+        if tool_settings.missing_stencil:
             col.separator()
             col.label("Missing Stencil", icon='INFO')
             col.label("Add or assign a stencil image below")
             col.label("Stencil Image:")
             # todo this should be combinded into a single row
             col.separator()
             col.label("Missing Stencil", icon='INFO')
             col.label("Add or assign a stencil image below")
             col.label("Stencil Image:")
             # todo this should be combinded into a single row
-            col.template_ID(toolsettings, "stencil_image", open="image.open")
+            col.template_ID(tool_settings, "stencil_image", open="image.open")
             col.operator("image.new", text="New").gen_context = 'PAINT_STENCIL'
 
 
             col.operator("image.new", text="New").gen_context = 'PAINT_STENCIL'
 
 
@@ -955,7 +955,7 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
 
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
         settings = self.paint_settings(context)
         brush = settings.brush
 
         settings = self.paint_settings(context)
         brush = settings.brush
 
@@ -998,7 +998,7 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
 
             row = col.row(align=True)
 
 
             row = col.row(align=True)
 
-            ups = toolsettings.unified_paint_settings
+            ups = tool_settings.unified_paint_settings
             if ((ups.use_unified_size and ups.use_locked_size) or
                     ((not ups.use_unified_size) and brush.use_locked_size)):
                 self.prop_unified_size(row, context, brush, "use_locked_size", icon='LOCKED')
             if ((ups.use_unified_size and ups.use_locked_size) or
                     ((not ups.use_unified_size) and brush.use_locked_size)):
                 self.prop_unified_size(row, context, brush, "use_locked_size", icon='LOCKED')
@@ -1148,8 +1148,8 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
             col.prop(brush, "use_projected")
 
             col = layout.column()
             col.prop(brush, "use_projected")
 
             col = layout.column()
-            col.prop(toolsettings, "use_auto_normalize", text="Auto Normalize")
-            col.prop(toolsettings, "use_multipaint", text="Multi-Paint")
+            col.prop(tool_settings, "use_auto_normalize", text="Auto Normalize")
+            col.prop(tool_settings, "use_multipaint", text="Multi-Paint")
 
         # Vertex Paint Mode #
         elif context.vertex_paint_object and brush:
 
         # Vertex Paint Mode #
         elif context.vertex_paint_object and brush:
@@ -1307,8 +1307,8 @@ class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel):
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
 
-        toolsettings = context.tool_settings
-        ipaint = toolsettings.image_paint
+        tool_settings = context.tool_settings
+        ipaint = tool_settings.image_paint
         ob = context.active_object
         mesh = ob.data
 
         ob = context.active_object
         mesh = ob.data
 
@@ -1591,8 +1591,8 @@ class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel):
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
 
-        toolsettings = context.tool_settings
-        sculpt = toolsettings.sculpt
+        tool_settings = context.tool_settings
+        sculpt = tool_settings.sculpt
         settings = self.paint_settings(context)
         brush = settings.brush
 
         settings = self.paint_settings(context)
         brush = settings.brush
 
@@ -1633,8 +1633,8 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
         layout = self.layout
         # scene = context.scene
 
         layout = self.layout
         # scene = context.scene
 
-        toolsettings = context.tool_settings
-        sculpt = toolsettings.sculpt
+        tool_settings = context.tool_settings
+        sculpt = tool_settings.sculpt
         capabilities = sculpt.brush.sculpt_capabilities
 
         col = layout.column(align=True)
         capabilities = sculpt.brush.sculpt_capabilities
 
         col = layout.column(align=True)
@@ -1763,8 +1763,8 @@ class VIEW3D_PT_tools_weightpaint_symmetry(Panel, View3DPaintPanel):
 
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
-        toolsettings = context.tool_settings
-        wpaint = toolsettings.weight_paint
+        tool_settings = context.tool_settings
+        wpaint = tool_settings.weight_paint
         draw_vpaint_symmetry(layout, wpaint)
 
 
         draw_vpaint_symmetry(layout, wpaint)
 
 
@@ -1807,7 +1807,7 @@ class VIEW3D_PT_tools_vertexpaint(Panel, View3DPaintPanel):
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
 
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
 
         col = layout.column()
 
 
         col = layout.column()
 
@@ -1822,8 +1822,8 @@ class VIEW3D_PT_tools_vertexpaint_symmetry(Panel, View3DPaintPanel):
 
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
-        toolsettings = context.tool_settings
-        vpaint = toolsettings.vertex_paint
+        tool_settings = context.tool_settings
+        vpaint = tool_settings.vertex_paint
         draw_vpaint_symmetry(layout, vpaint)
 
 
         draw_vpaint_symmetry(layout, vpaint)
 
 
@@ -1839,8 +1839,8 @@ class VIEW3D_PT_tools_imagepaint_external(Panel, View3DPaintPanel):
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
 
-        toolsettings = context.tool_settings
-        ipaint = toolsettings.image_paint
+        tool_settings = context.tool_settings
+        ipaint = tool_settings.image_paint
 
         col = layout.column()
         row = col.split(align=True, percentage=0.55)
 
         col = layout.column()
         row = col.split(align=True, percentage=0.55)
@@ -1861,8 +1861,8 @@ class VIEW3D_PT_tools_imagepaint_symmetry(Panel, View3DPaintPanel):
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
 
-        toolsettings = context.tool_settings
-        ipaint = toolsettings.image_paint
+        tool_settings = context.tool_settings
+        ipaint = tool_settings.image_paint
 
         col = layout.column(align=True)
         row = col.row(align=True)
 
         col = layout.column(align=True)
         row = col.row(align=True)
@@ -1884,8 +1884,8 @@ class VIEW3D_PT_tools_projectpaint(View3DPaintPanel, Panel):
     def draw(self, context):
         layout = self.layout
 
     def draw(self, context):
         layout = self.layout
 
-        toolsettings = context.tool_settings
-        ipaint = toolsettings.image_paint
+        tool_settings = context.tool_settings
+        ipaint = tool_settings.image_paint
 
         col = layout.column()
 
 
         col = layout.column()