Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Mon, 17 Dec 2018 06:26:47 +0000 (17:26 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 17 Dec 2018 06:32:42 +0000 (17:32 +1100)
13 files changed:
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_toolsystem_common.py
release/scripts/startup/bl_ui/space_topbar.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py

index 0f098bcc1292f1331c5df62e49bfa16a23632194..8ba0ac6303c375433a266af9ecb3ea89757f7702 100644 (file)
@@ -33,7 +33,7 @@ def gpencil_stroke_placement_settings(context, layout):
     else:
         propname = "annotation_stroke_placement_view2d"
 
-    ts = context.tool_settings
+    tool_settings = context.tool_settings
 
     col = layout.column(align=True)
 
index 1bd95019a4570af55b93a535b56bac75a4399637..76eee82755322323ed5ef7c186a909154aa03dc0 100644 (file)
@@ -27,21 +27,21 @@ class UnifiedPaintPanel:
 
     @staticmethod
     def paint_settings(context):
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
 
         if context.sculpt_object:
-            return toolsettings.sculpt
+            return tool_settings.sculpt
         elif context.vertex_paint_object:
-            return toolsettings.vertex_paint
+            return tool_settings.vertex_paint
         elif context.weight_paint_object:
-            return toolsettings.weight_paint
+            return tool_settings.weight_paint
         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 toolsettings.particle_edit
+            return tool_settings.particle_edit
 
         return None
 
index 1ef4cf64680bbf132f55aedd835e3b87e7f10496..8da033b3a3f1e7cca310ee0fe86ef12397eb93ff 100644 (file)
@@ -231,7 +231,7 @@ class CLIP_HT_header(Header):
     def _draw_masking(self, context):
         layout = self.layout
 
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
         sc = context.space_data
         clip = sc.clip
 
@@ -249,10 +249,10 @@ class CLIP_HT_header(Header):
             layout.prop(sc, "pivot_point", text="", icon_only=True)
 
             row = layout.row(align=True)
-            row.prop(toolsettings, "use_proportional_edit_mask", text="", icon_only=True)
+            row.prop(tool_settings, "use_proportional_edit_mask", text="", icon_only=True)
             sub = row.row(align=True)
-            sub.active = toolsettings.use_proportional_edit_mask
-            sub.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True)
+            sub.active = tool_settings.use_proportional_edit_mask
+            sub.prop(tool_settings, "proportional_edit_falloff", text="", icon_only=True)
 
             row = layout.row()
             row.template_ID(sc, "mask", new="mask.new")
index b57a0b69539436a335055d8a5de9421da85d954a..f35dea678549f190dcd92994ce74282c33158911 100644 (file)
@@ -237,7 +237,7 @@ class DOPESHEET_HT_editor_buttons(Header):
     @staticmethod
     def draw_header(context, layout):
         st = context.space_data
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
 
         if st.mode in {'ACTION', 'SHAPEKEY'}:
             # TODO: These buttons need some tidying up - Probably by using a popover, and bypassing the template_id() here
@@ -284,10 +284,10 @@ class DOPESHEET_HT_editor_buttons(Header):
             layout.prop(st, "auto_snap", text="")
 
         row = layout.row(align=True)
-        row.prop(toolsettings, "use_proportional_action", text="", icon_only=True)
+        row.prop(tool_settings, "use_proportional_action", text="", icon_only=True)
         sub = row.row(align=True)
-        sub.active = toolsettings.use_proportional_action
-        sub.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True)
+        sub.active = tool_settings.use_proportional_action
+        sub.prop(tool_settings, "proportional_edit_falloff", text="", icon_only=True)
 
 
 class DOPESHEET_MT_editor_menus(Menu):
index ea418f37d47bc2bc8d705c854d168fb9af454176..ee3f5de0f09032928bf75af9004a00f31d455ec1 100644 (file)
@@ -31,7 +31,7 @@ class GRAPH_HT_header(Header):
 
     def draw(self, context):
         layout = self.layout
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
 
         st = context.space_data
 
@@ -68,10 +68,10 @@ class GRAPH_HT_header(Header):
         layout.prop(st, "auto_snap", text="")
 
         row = layout.row(align=True)
-        row.prop(toolsettings, "use_proportional_fcurve", text="", icon_only=True)
+        row.prop(tool_settings, "use_proportional_fcurve", text="", icon_only=True)
         sub = row.row(align=True)
-        sub.active = toolsettings.use_proportional_fcurve
-        sub.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True)
+        sub.active = tool_settings.use_proportional_fcurve
+        sub.prop(tool_settings, "proportional_edit_falloff", text="", icon_only=True)
 
         layout.prop(st, "pivot_point", icon_only=True)
 
index aafe4f91fe8cc7c1255efdd9d04fb44045dcca57..986423a1c580a0e1ab3e9a7e231f643a863cec95 100644 (file)
@@ -49,8 +49,8 @@ class BrushButtonsPanel(UnifiedPaintPanel):
 
     @classmethod
     def poll(cls, context):
-        toolsettings = context.tool_settings.image_paint
-        return toolsettings.brush
+        tool_settings = context.tool_settings.image_paint
+        return tool_settings.brush
 
 
 class IMAGE_MT_view(Menu):
@@ -61,8 +61,8 @@ class IMAGE_MT_view(Menu):
 
         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
@@ -74,13 +74,13 @@ class IMAGE_MT_view(Menu):
 
         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_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()
 
@@ -169,8 +169,8 @@ class IMAGE_MT_brush(Menu):
 
     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
@@ -351,14 +351,14 @@ class IMAGE_MT_uvs(Menu):
 
         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(toolsettings, "use_uv_sculpt")
+        layout.prop(tool_settings, "use_uv_sculpt")
 
         layout.separator()
 
@@ -403,11 +403,11 @@ class IMAGE_MT_uvs_select_mode(Menu):
         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.
 
-        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"
@@ -514,7 +514,7 @@ class IMAGE_HT_header(Header):
         sima = context.space_data
         ima = sima.image
         iuser = sima.image_user
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
 
         show_render = sima.show_render
         show_uvedit = sima.show_uvedit
@@ -530,12 +530,12 @@ class IMAGE_HT_header(Header):
         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.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)
 
         MASK_MT_editor_menus.draw_collapsible(context, layout)
@@ -561,17 +561,17 @@ class IMAGE_HT_header(Header):
 
             # Snap.
             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="")
 
             row = layout.row(align=True)
-            row.prop(toolsettings, "proportional_edit", icon_only=True)
-            # if toolsettings.proportional_edit != 'DISABLED':
+            row.prop(tool_settings, "proportional_edit", icon_only=True)
+            # if tool_settings.proportional_edit != 'DISABLED':
             sub = row.row(align=True)
-            sub.active = toolsettings.proportional_edit != 'DISABLED'
-            sub.prop(toolsettings, "proportional_edit_falloff", icon_only=True)
+            sub.active = tool_settings.proportional_edit != 'DISABLED'
+            sub.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
 
         if show_uvedit or show_maskedit:
             layout.prop(sima, "pivot_point", icon_only=True)
@@ -867,8 +867,8 @@ class IMAGE_PT_tools_brush_overlay(BrushButtonsPanel, Panel):
     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
 
@@ -931,8 +931,8 @@ class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
     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)
@@ -967,8 +967,8 @@ class IMAGE_PT_paint_stroke(BrushButtonsPanel, Panel):
     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()
 
@@ -1024,7 +1024,7 @@ class IMAGE_PT_paint_stroke(BrushButtonsPanel, Panel):
 
             col.separator()
 
-        col.prop(toolsettings, "input_samples")
+        col.prop(tool_settings, "input_samples")
 
 
 class IMAGE_PT_paint_curve(BrushButtonsPanel, Panel):
@@ -1036,8 +1036,8 @@ class IMAGE_PT_paint_curve(BrushButtonsPanel, Panel):
     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")
 
@@ -1060,8 +1060,8 @@ class IMAGE_PT_tools_imagepaint_symmetry(BrushButtonsPanel, Panel):
     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)
@@ -1079,8 +1079,8 @@ class IMAGE_PT_tools_brush_appearance(BrushButtonsPanel, Panel):
     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")
@@ -1088,9 +1088,9 @@ class IMAGE_PT_tools_brush_appearance(BrushButtonsPanel, Panel):
 
         col = layout.column(align=True)
 
-        col.prop(toolsettings, "show_brush")
+        col.prop(tool_settings, "show_brush")
         sub = col.column()
-        sub.active = toolsettings.show_brush
+        sub.active = tool_settings.show_brush
         sub.prop(brush, "cursor_color_add", text="")
 
         col.separator()
@@ -1116,8 +1116,8 @@ class IMAGE_PT_uv_sculpt_curve(Panel):
     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")
@@ -1146,8 +1146,8 @@ class IMAGE_PT_uv_sculpt(Panel):
         from .properties_paint_common import UnifiedPaintPanel
         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 not self.is_popover:
@@ -1163,12 +1163,12 @@ class IMAGE_PT_uv_sculpt(Panel):
                 UnifiedPaintPanel.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")
 
index 00f54c82036d4f2c52a3b4f6a960b4c0d74106ad..750c01d28e5814a3570eeda9f0fa9475d256279d 100644 (file)
@@ -43,7 +43,7 @@ class NODE_HT_header(Header):
         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()
@@ -155,10 +155,10 @@ class NODE_HT_header(Header):
 
         # 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="")
 
 
 class NODE_MT_editor_menus(Menu):
index 199b1f98fa916134644efbc0cfa42bb6def01116..adac167a06d5d1d333898cd7c51cfe21d7dabf67 100644 (file)
@@ -121,14 +121,14 @@ class SEQUENCER_HT_header(Header):
 
         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)
-                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)
 
 
 class SEQUENCER_MT_editor_menus(Menu):
index 79c0c5264e1f74ed2c19cee13e7c8594be7cad2b..47c8381001ef7a95bf43641c3d6ee0b48a5f041a 100644 (file)
@@ -33,12 +33,12 @@ class TIME_HT_editor_buttons(Header):
     @staticmethod
     def draw_header(context, layout):
         scene = context.scene
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
         screen = context.screen
 
         layout.separator_spacer()
 
-        layout.prop(toolsettings, "use_keyframe_insert_auto", text="", toggle=True)
+        layout.prop(tool_settings, "use_keyframe_insert_auto", text="", toggle=True)
 
         row = layout.row(align=True)
         row.operator("screen.frame_jump", text="", icon='REW').end = False
@@ -208,8 +208,8 @@ def marker_menu_generic(layout):
     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")
 
 ###################################
 
@@ -276,7 +276,7 @@ class TIME_PT_keyframing_settings(TimelinePanelButtons, Panel):
         layout = self.layout
 
         scene = context.scene
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
         userprefs = context.user_preferences
 
         col = layout.column(align=True)
@@ -288,17 +288,17 @@ class TIME_PT_keyframing_settings(TimelinePanelButtons, Panel):
 
         col = layout.column(align=True)
         col.label(text="New Keyframe Type:")
-        col.prop(toolsettings, "keyframe_type", text="")
+        col.prop(tool_settings, "keyframe_type", text="")
 
         col = layout.column(align=True)
         col.label(text="Auto Keyframing:")
         row = col.row()
-        row.prop(toolsettings, "auto_keying_mode", text="")
-        row.prop(toolsettings, "use_keyframe_insert_keyingset", text="")
+        row.prop(tool_settings, "auto_keying_mode", text="")
+        row.prop(tool_settings, "use_keyframe_insert_keyingset", text="")
         if not userprefs.edit.use_keyframe_insert_available:
-            col.prop(toolsettings, "use_record_with_nla", text="Layered Recording")
+            col.prop(tool_settings, "use_record_with_nla", text="Layered Recording")
 
-        layout.prop(toolsettings, "use_keyframe_cycle_aware")
+        layout.prop(tool_settings, "use_keyframe_cycle_aware")
 
 
 ###################################
index a52b9d07c2af264ec0492a1e80f6883081a2211c..d8a8c2a268e9586ffcd6389263c57b2340aa5f44 100644 (file)
@@ -87,7 +87,7 @@ ToolDef = namedtuple(
         "data_block",
         # Optional primary operator (for introspection only).
         "operator",
-        # Optional draw settings (operator options, toolsettings).
+        # Optional draw settings (operator options, tool_settings).
         "draw_settings",
         # Optional draw cursor.
         "draw_cursor",
index 0f8aaa89667596db5eb17fe9e2e879f227ac4d2d..ee5bdb38db74c728ab95668613fc784da4ea3bf8 100644 (file)
@@ -110,7 +110,7 @@ class TOPBAR_HT_lower_bar(Header):
         # Object Mode Options
         # -------------------
 
-        # Example of how toolsettings can be accessed as pop-overs.
+        # Example of how tool_settings can be accessed as pop-overs.
 
         # TODO(campbell): editing options should be after active tool options
         # (obviously separated for from the users POV)
@@ -339,8 +339,8 @@ class _draw_left_context_mode:
                 row.prop(gp_settings, "use_material_pin", text="")
 
             row = layout.row(align=True)
-            ts = context.scene.tool_settings
-            settings = ts.gpencil_paint
+            tool_settings = context.scene.tool_settings
+            settings = tool_settings.gpencil_paint
             row.template_ID_preview(settings, "brush", rows=3, cols=8, hide_buttons=True)
 
             if brush.gpencil_tool == 'ERASE':
index b3c52adff2bfaf01dffa23f136fb64e4ddb58719..8791e2713a061eaf5376f19ca0e276c61effda9d 100644 (file)
@@ -5010,20 +5010,20 @@ class VIEW3D_PT_pivot_point(Panel):
     bl_ui_units_x = 8
 
     def draw(self, context):
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
         obj = context.active_object
         mode = context.mode
 
         layout = self.layout
         col = layout.column()
         col.label(text="Pivot Point")
-        col.prop(toolsettings, "transform_pivot_point", expand=True)
+        col.prop(tool_settings, "transform_pivot_point", expand=True)
 
         if (obj is None) or (mode in {'OBJECT', 'POSE', 'WEIGHT_PAINT'}):
             col.separator()
 
             col.prop(
-                toolsettings,
+                tool_settings,
                 "use_transform_pivot_point_align",
                 text="Only Origins",
             )
@@ -5035,36 +5035,36 @@ class VIEW3D_PT_snapping(Panel):
     bl_label = "Snapping"
 
     def draw(self, context):
-        toolsettings = context.tool_settings
-        snap_elements = toolsettings.snap_elements
+        tool_settings = context.tool_settings
+        snap_elements = tool_settings.snap_elements
         obj = context.active_object
         object_mode = 'OBJECT' if obj is None else obj.mode
 
         layout = self.layout
         col = layout.column()
         col.label(text="Snapping")
-        col.prop(toolsettings, "snap_elements", expand=True)
+        col.prop(tool_settings, "snap_elements", expand=True)
 
         col.separator()
         if 'INCREMENT' in snap_elements:
-            col.prop(toolsettings, "use_snap_grid_absolute")
+            col.prop(tool_settings, "use_snap_grid_absolute")
 
         if snap_elements != {'INCREMENT'}:
             col.label(text="Target")
             row = col.row(align=True)
-            row.prop(toolsettings, "snap_target", expand=True)
+            row.prop(tool_settings, "snap_target", expand=True)
 
             if obj:
                 if object_mode == 'EDIT':
-                    col.prop(toolsettings, "use_snap_self")
+                    col.prop(tool_settings, "use_snap_self")
                 if object_mode in {'OBJECT', 'POSE', 'EDIT'}:
-                    col.prop(toolsettings, "use_snap_align_rotation")
+                    col.prop(tool_settings, "use_snap_align_rotation")
 
             if 'FACE' in snap_elements:
-                col.prop(toolsettings, "use_snap_project")
+                col.prop(tool_settings, "use_snap_project")
 
             if 'VOLUME' in snap_elements:
-                col.prop(toolsettings, "use_snap_peel_object")
+                col.prop(tool_settings, "use_snap_peel_object")
 
 
 class VIEW3D_PT_transform_orientations(Panel):
@@ -5098,26 +5098,26 @@ class VIEW3D_PT_gpencil_origin(Panel):
 
     def draw(self, context):
         layout = self.layout
-        ts = context.tool_settings
+        tool_settings = context.tool_settings
         gpd = context.gpencil_data
 
         layout.label(text="Stroke Placement")
 
         row = layout.row()
         col = row.column()
-        col.prop(ts, "gpencil_stroke_placement_view3d", expand=True)
+        col.prop(tool_settings, "gpencil_stroke_placement_view3d", expand=True)
 
-        if ts.gpencil_stroke_placement_view3d == 'SURFACE':
+        if tool_settings.gpencil_stroke_placement_view3d == 'SURFACE':
             row = layout.row()
             row.label(text="Offset")
             row = layout.row()
             row.prop(gpd, "zdepth_offset", text="")
 
-        if ts.gpencil_stroke_placement_view3d == 'STROKE':
+        if tool_settings.gpencil_stroke_placement_view3d == 'STROKE':
             row = layout.row()
             row.label(text="Target")
             row = layout.row()
-            row.prop(ts, "gpencil_stroke_snap_mode", expand=True)
+            row.prop(tool_settings, "gpencil_stroke_snap_mode", expand=True)
 
 
 class VIEW3D_PT_gpencil_lock(Panel):
index 65de2e1c0ff5c15ca1c7110a25fa51643483e785..24ce5c5788db41369b4202795b6b30d529a1fb0a 100644 (file)
@@ -222,7 +222,7 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
     def draw(self, context):
         layout = self.layout
 
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
         settings = self.paint_settings(context)
         brush = settings.brush
 
@@ -265,7 +265,7 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
 
             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')
@@ -415,8 +415,8 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
             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:
@@ -575,8 +575,8 @@ class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel):
         layout.use_property_split = True
         layout.use_property_decorate = False
 
-        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
 
@@ -870,8 +870,8 @@ class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel):
         layout.use_property_split = True
         layout.use_property_decorate = False
 
-        toolsettings = context.tool_settings
-        sculpt = toolsettings.sculpt
+        tool_settings = context.tool_settings
+        sculpt = tool_settings.sculpt
         settings = self.paint_settings(context)
         brush = settings.brush
 
@@ -906,8 +906,8 @@ class VIEW3D_PT_sculpt_dyntopo_remesh(Panel, View3DPaintPanel):
         layout.use_property_split = True
         layout.use_property_decorate = False
 
-        toolsettings = context.tool_settings
-        sculpt = toolsettings.sculpt
+        tool_settings = context.tool_settings
+        sculpt = tool_settings.sculpt
 
         col = layout.column()
         col.active = context.sculpt_object.use_dynamic_topology_sculpting
@@ -939,8 +939,8 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
         layout.use_property_split = True
         layout.use_property_decorate = False
 
-        toolsettings = context.tool_settings
-        sculpt = toolsettings.sculpt
+        tool_settings = context.tool_settings
+        sculpt = tool_settings.sculpt
 
         flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
 
@@ -986,8 +986,8 @@ class VIEW3D_PT_sculpt_options_gravity(Panel, View3DPaintPanel):
         layout.use_property_split = True
         layout.use_property_decorate = False
 
-        toolsettings = context.tool_settings
-        sculpt = toolsettings.sculpt
+        tool_settings = context.tool_settings
+        sculpt = tool_settings.sculpt
         capabilities = sculpt.brush.sculpt_capabilities
 
         col = layout.column()
@@ -1150,8 +1150,8 @@ class VIEW3D_PT_tools_weightpaint_symmetry(Panel, View3DPaintPanel):
 
     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)
 
 
@@ -1203,8 +1203,8 @@ class VIEW3D_PT_tools_vertexpaint_symmetry(Panel, View3DPaintPanel):
 
     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)
 
 
@@ -1222,8 +1222,8 @@ class VIEW3D_PT_tools_imagepaint_external(Panel, View3DPaintPanel):
         layout.use_property_split = True
         layout.use_property_decorate = False
 
-        toolsettings = context.tool_settings
-        ipaint = toolsettings.image_paint
+        tool_settings = context.tool_settings
+        ipaint = tool_settings.image_paint
 
         layout.prop(ipaint, "screen_grab_size", text="Screen Grab Size")
 
@@ -1247,8 +1247,8 @@ class VIEW3D_PT_tools_imagepaint_symmetry(Panel, View3DPaintPanel):
     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
 
         split = layout.split()
 
@@ -1281,8 +1281,8 @@ class VIEW3D_PT_tools_projectpaint(View3DPaintPanel, Panel):
         layout.use_property_split = True
         layout.use_property_decorate = False
 
-        toolsettings = context.tool_settings
-        ipaint = toolsettings.image_paint
+        tool_settings = context.tool_settings
+        ipaint = tool_settings.image_paint
 
         row = layout.row()
         row.prop(ipaint, "use_normal_falloff")
@@ -1321,16 +1321,16 @@ class VIEW3D_PT_tools_projectpaint_cavity(View3DPaintPanel, Panel):
     bl_options = {'DEFAULT_CLOSED'}
 
     def draw_header(self, context):
-        toolsettings = context.tool_settings
-        ipaint = toolsettings.image_paint
+        tool_settings = context.tool_settings
+        ipaint = tool_settings.image_paint
 
         self.layout.prop(ipaint, "use_cavity", text="")
 
     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
 
         layout.active = ipaint.use_cavity
 
@@ -1446,10 +1446,10 @@ class VIEW3D_PT_tools_normal(View3DPanel, Panel):
         layout.use_property_split = True
         layout.use_property_decorate = False  # No animation.
 
-        toolsettings = context.tool_settings
+        tool_settings = context.tool_settings
 
-        layout.prop(toolsettings, "normal_vector", text="Normal Vector")
-        layout.prop(toolsettings, "face_strength", text="Face Strength")
+        layout.prop(tool_settings, "normal_vector", text="Normal Vector")
+        layout.prop(tool_settings, "face_strength", text="Face Strength")
 
 # ********** grease pencil object tool panels ****************