[Bf-blender-cvs] [a7c944e50d3] sculpt-dev: Merge branch 'master' into sculpt-dev

Joseph Eagar noreply at git.blender.org
Thu Feb 24 11:06:05 CET 2022


Commit: a7c944e50d3a59bbc211ab8a194b5b3db8ae295b
Author: Joseph Eagar
Date:   Thu Feb 24 02:05:52 2022 -0800
Branches: sculpt-dev
https://developer.blender.org/rBa7c944e50d3a59bbc211ab8a194b5b3db8ae295b

Merge branch 'master' into sculpt-dev

===================================================================



===================================================================

diff --cc release/scripts/addons
index 089aef61deb,bb62f10715a..bdfb44b4256
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit 089aef61debbece2baff6516e33fc7491629b1d0
 -Subproject commit bb62f10715a871d7069d2b2c74b2efc97c3c350c
++Subproject commit bdfb44b4256c683360f05f5bde7159660f82c7b5
diff --cc release/scripts/presets/keyconfig/keymap_data/blender_default.py
index b115a644bdb,ba0521d1317..2b360375edf
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@@ -373,11 -382,18 +357,16 @@@ def _template_items_editmode_mesh_selec
  
  def _template_items_uv_select_mode(params):
      if params.legacy:
 -        return [
 -            op_menu("IMAGE_MT_uvs_select_mode", {"type": 'TAB', "value": 'PRESS', "ctrl": True}),
 -        ]
 +        return [op_menu("IMAGE_MT_uvs_select_mode", {"type": 'TAB', "value": 'PRESS', "ctrl": True}),]
      else:
-         return [*_template_items_editmode_mesh_select_mode(params),
-             # Hack to prevent fall-through, when sync select isn't enabled (and
-             # the island button isn't visible).
+         return [
+             # TODO(@campbellbarton): should this be kept?
+             # Seems it was included in the new key-map by accident, check on removing
+             # although it's not currently used for anything else.
+             op_menu("IMAGE_MT_uvs_select_mode", {"type": 'TAB', "value": 'PRESS', "ctrl": True}),
+ 
+             *_template_items_editmode_mesh_select_mode(params),
+             # Hack to prevent fall-through, when sync select isn't enabled (and the island button isn't visible).
              ("mesh.select_mode", {"type": 'FOUR', "value": 'PRESS'}, None),
              *(("wm.context_set_enum", {"type": NUMBERS_1[i], "value": 'PRESS'},
                 {"properties": [("data_path", 'tool_settings.uv_select_mode'), ("value", ty)]})
@@@ -1110,17 -1204,22 +1098,18 @@@ def km_uv_editor(params)
          ("uv.pin", {"type": 'P', "value": 'PRESS', "alt": True},
           {"properties": [("clear", True)]}),
          op_menu("IMAGE_MT_uvs_unwrap", {"type": 'U', "value": 'PRESS'}),
 -        (
 -            op_menu_pie("IMAGE_MT_uvs_snap_pie", {"type": 'S', "value": 'PRESS', "shift": True})
 +        (op_menu_pie("IMAGE_MT_uvs_snap_pie", {"type": 'S', "value": 'PRESS', "shift": True})
              if not params.legacy else
-             op_menu("IMAGE_MT_uvs_snap", {"type": 'S', "value": 'PRESS', "shift": True})),
-         op_menu("IMAGE_MT_uvs_select_mode", {"type": 'TAB', "value": 'PRESS', "ctrl": True}),
-         *_template_items_proportional_editing(params, connected=False, toggle_data_path='tool_settings.use_proportional_edit'),
+             op_menu("IMAGE_MT_uvs_snap", {"type": 'S', "value": 'PRESS', "shift": True})
+         ),
+         *_template_items_proportional_editing(
+             params, connected=False, toggle_data_path='tool_settings.use_proportional_edit'),
          ("transform.translate", {"type": params.select_tweak, "value": 'ANY'}, None),
 -        op_tool_optional(
 -            ("transform.translate", {"type": 'G', "value": 'PRESS'}, None),
 +        op_tool_optional(("transform.translate", {"type": 'G', "value": 'PRESS'}, None),
              (op_tool_cycle, "builtin.move"), params),
 -        op_tool_optional(
 -            ("transform.rotate", {"type": 'R', "value": 'PRESS'}, None),
 +        op_tool_optional(("transform.rotate", {"type": 'R', "value": 'PRESS'}, None),
              (op_tool_cycle, "builtin.rotate"), params),
 -        op_tool_optional(
 -            ("transform.resize", {"type": 'S', "value": 'PRESS'}, None),
 +        op_tool_optional(("transform.resize", {"type": 'S', "value": 'PRESS'}, None),
              (op_tool_cycle, "builtin.scale"), params),
          ("transform.shear", {"type": 'S', "value": 'PRESS', "shift": True, "ctrl": True, "alt": True}, None),
          ("transform.mirror", {"type": 'M', "value": 'PRESS', "ctrl": True}, None),
@@@ -4252,35 -4658,16 +4247,38 @@@ def _template_paint_radial_control(pain
  
      return items
  
- 
++# Radial controls for the paint and sculpt modes.
 +def _template_paint_radial_control_channels(paint, rotation=False, secondary_rotation=False, color=False, zoom=False):
-     items = []
- 
-     items.extend([("wm.radial_control", {"type": 'F', "value": 'PRESS'},
-          radial_control_properties_channels(paint, 'radius', 'use_unified_size', type="float", secondary_rotation=secondary_rotation, color=color, zoom=zoom)),
-         ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
-          radial_control_properties_channels(paint, 'strength', 'use_unified_strength', type="factor", secondary_rotation=secondary_rotation, color=color)),])
- 
-     """
-     if rotation:
-         items.extend([
-             ("wm.radial_control", {"type": 'F', "value": 'PRESS', "ctrl": True},
-              radial_control_properties_channels(paint, 'texture_slot_angle', None, color=color)),
-         ])
- 
-     if secondary_rotation:
-         items.extend([
-             ("wm.radial_control", {"type": 'F', "value": 'PRESS', "ctrl": True, "alt": True},
-              radial_control_properties_channels(paint, 'mask_texture_slot_angle', None, secondary_rotation=secondary_rotation, color=color)),
-         ])
-     """
- 
-     return items
- 
- def _template_view3d_select(*, type, value, legacy):
-     return [("view3d.select",
++     items = []
++
++     items.extend([("wm.radial_control", {"type": 'F', "value": 'PRESS'},
++          radial_control_properties_channels(paint, 'radius', 'use_unified_size', type="float", secondary_rotation=secondary_rotation, color=color, zoom=zoom)),
++         ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
++          radial_control_properties_channels(paint, 'strength', 'use_unified_strength', type="factor", secondary_rotation=secondary_rotation, color=color)),])
++
++     """
++     if rotation:
++         items.extend([
++             ("wm.radial_control", {"type": 'F', "value": 'PRESS', "ctrl": True},
++              radial_control_properties_channels(paint, 'texture_slot_angle', None, color=color)),
++         ])
++
++     if secondary_rotation:
++         items.extend([
++             ("wm.radial_control", {"type": 'F', "value": 'PRESS', "ctrl": True, "alt": True},
++              radial_control_properties_channels(paint, 'mask_texture_slot_angle', None, secondary_rotation=secondary_rotation, color=color)),
++         ])
++     """
++
++     return items
+ 
+ def _template_view3d_select(*, type, value, legacy, exclude_mod=None):
+     # NOTE: `exclude_mod` is needed since we don't want this tool to exclude Control-RMB actions when this is used
+     # as a tool key-map with RMB-select and `use_fallback_tool_rmb` is enabled. See T92467.
+     return [(
+         "view3d.select",
          {"type": type, "value": value, **{m: True for m in mods}},
 -        {"properties": [(c, True) for c in props]},
 -    ) for props, mods in (
 -        (("deselect_all",) if not legacy else (), ()),
 +        {"properties": [(c, True) for c in props]},) for props, mods in ((("deselect_all",) if not legacy else (), ()),
          (("toggle",), ("shift",)),
          (("center", "object"), ("ctrl",)),
          (("enumerate",), ("alt",)),
@@@ -4982,14 -5459,33 +4981,30 @@@ def km_font(params)
      return keymap
  
  
+ def km_sculpt_curves(params):
+     items = []
+     keymap = (
+         "Sculpt Curves",
+         {"space_type": 'EMPTY', "region_type": 'WINDOW'},
+         {"items": items},
+     )
+ 
+     items.extend([
+         ("sculpt_curves.brush_stroke", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
+         *_template_paint_radial_control("curves_sculpt"),
+     ])
+ 
+     return keymap
+ 
+ 
  def km_object_non_modal(params):
      items = []
 -    keymap = (
 -        "Object Non-modal",
 +    keymap = ("Object Non-modal",
          {"space_type": 'EMPTY', "region_type": 'WINDOW'},
 -        {"items": items},
 -    )
 +        {"items": items},)
  
      if params.legacy:
 -        items.extend([
 -            ("object.mode_set", {"type": 'TAB', "value": 'PRESS'},
 +        items.extend([("object.mode_set", {"type": 'TAB', "value": 'PRESS'},
               {"properties": [("mode", 'EDIT'), ("toggle", True)]}),
              ("object.mode_set", {"type": 'TAB', "value": 'PRESS', "ctrl": True},
               {"properties": [("mode", 'POSE'), ("toggle", True)]}),
diff --cc release/scripts/startup/bl_ui/properties_paint_common.py
index b6e8778371c,9e40a8d364a..f0c6df1a792
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@@ -1,298 -1,7 +1,282 @@@
- # ##### BEGIN GPL LICENSE BLOCK #####
- #
- #  This program is free software; you can redistribute it and/or
- #  modify it under the terms of the GNU General Public License
- #  as published by the Free Software Foundation; either version 2
- #  of the License, or (at your option) any later version.
- #
- #  This program is distributed in the hope that it will be useful,
- #  but WITHOUT ANY WARRANTY; without even the implied warranty of
- #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- #  GNU General Public License for more details.
- #
- #  You should have received a copy of the GNU General Public License
- #  along with this program; if not, write to the Free Software Foundation,
- #  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- #
- # ##### END GPL LICENSE BLOCK #####
+ # SPDX-License-Identifier: GPL-2.0-or-later
  
  # <pep8 compliant>
 -from bpy.types import Menu
 +from bpy.types import Operator
 +from bpy.props import IntProperty, StringProperty
 +from bpy.types import Menu, Panel
 +
 +classes = []
 +
 +builtin_channel_categories = ["Cloth Tool",
 +    "Color",
 +    "Clay",
 +    "Pose Tool",
 +    "Smear",
 +    "Basic",
 +    "Smoothing",
 +    "Stroke",
 +    "Automasking"]
 +
 +channel_name_map = {
 +    "size": "radius",
 +    "autosmooth_fset_slide": "fset_slide",
 +    "auto_smooth_factor": "autosmooth",
 +    "

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list