Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Eagar <joeedh@gmail.com>2022-04-05 19:47:10 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-04-05 19:47:10 +0300
commit7748dd4ec735535f53f61d6aa4a2f6b9db9abdc1 (patch)
tree65f854f448a2503bef50781212355b74fa616839 /release
parent9e12a731db6f6647d5e6dfdaa32fc4d8117a523d (diff)
parentb84255f590c07b129f726eadbfec72c73bfc2ee1 (diff)
Merge remote-tracking branch 'origin/master' into temp-sculpt-colorstemp-sculpt-colors
Diffstat (limited to 'release')
-rw-r--r--release/datafiles/icons/ops.curves.sculpt_grow_shrink.dat (renamed from release/datafiles/icons/ops.curves.sculpt_grow.dat)bin1736 -> 1736 bytes
-rw-r--r--release/datafiles/userdef/userdef_default.c3
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/blender_default.py88
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py13
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py7
5 files changed, 86 insertions, 25 deletions
diff --git a/release/datafiles/icons/ops.curves.sculpt_grow.dat b/release/datafiles/icons/ops.curves.sculpt_grow_shrink.dat
index 9b3453085e4..9b3453085e4 100644
--- a/release/datafiles/icons/ops.curves.sculpt_grow.dat
+++ b/release/datafiles/icons/ops.curves.sculpt_grow_shrink.dat
Binary files differ
diff --git a/release/datafiles/userdef/userdef_default.c b/release/datafiles/userdef/userdef_default.c
index 7cf8158c42d..fba3c7882c6 100644
--- a/release/datafiles/userdef/userdef_default.c
+++ b/release/datafiles/userdef/userdef_default.c
@@ -23,7 +23,8 @@ const UserDef U_default = {
USER_SCRIPT_AUTOEXEC_DISABLE | USER_NONEGFRAMES),
.dupflag = USER_DUP_MESH | USER_DUP_CURVE | USER_DUP_SURF | USER_DUP_LATTICE | USER_DUP_FONT |
USER_DUP_MBALL | USER_DUP_LAMP | USER_DUP_ARM | USER_DUP_CAMERA | USER_DUP_SPEAKER |
- USER_DUP_ACT | USER_DUP_LIGHTPROBE | USER_DUP_GPENCIL,
+ USER_DUP_ACT | USER_DUP_LIGHTPROBE | USER_DUP_GPENCIL | USER_DUP_CURVES |
+ USER_DUP_POINTCLOUD,
.pref_flag = USER_PREF_FLAG_SAVE,
.savetime = 2,
.tempdir = "",
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index cc764be6a2c..399c4519635 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -31,6 +31,12 @@ class Params:
"context_menu_event",
"cursor_set_event",
"cursor_tweak_event",
+ # NOTE: this is intended to be used so pressing a button can then drag the current selection.
+ # This should not be used for button release values such as `CLICK` or `RELEASE` which should
+ # instead be bound to a binding that doesn't de-select all, this way:
+ # - Click-drag moves the current selection.
+ # - Click selects only the item at the cursor position.
+ # See: T97032.
"use_tweak_select_passthrough",
"use_tweak_tool_lmb_interaction",
"use_mouse_emulate_3_button",
@@ -451,7 +457,36 @@ def _template_items_change_frame(params):
# Tool System Templates
-def _template_items_tool_select(params, operator, cursor_operator, fallback):
+def _template_items_tool_select(
+ params, operator, cursor_operator, *,
+ # Always use the cursor operator where possible,
+ # needed for time-line views where we always want to be able to scrub time.
+ cursor_prioritize=False,
+ fallback=False,
+):
+ if not params.legacy and not fallback:
+ # Experimental support for LMB interaction for the tweak tool. see: T96544.
+ # NOTE: For RMB-select this is a much bigger change as it disables 3D cursor placement on LMB.
+ # For LMB-select this means an LMB -drag will not first de-select all (similar to node/graph editor).
+ select_passthrough = False
+ if params.select_mouse == 'LEFTMOUSE':
+ select_passthrough = params.use_tweak_select_passthrough
+ else:
+ if not cursor_prioritize:
+ select_passthrough = params.use_tweak_tool_lmb_interaction
+
+ if select_passthrough:
+ return [
+ (operator, {"type": 'LEFTMOUSE', "value": 'PRESS'},
+ {"properties": [("deselect_all", True), ("select_passthrough", True)]}),
+ (operator, {"type": 'LEFTMOUSE', "value": 'CLICK'},
+ {"properties": [("deselect_all", True)]}),
+ (operator, {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True},
+ {"properties": [("deselect_all", False), ("toggle", True)]}),
+ ("transform.translate", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG'},
+ {"properties": [("release_confirm", True)]}),
+ ]
+
if params.select_mouse == 'LEFTMOUSE':
# By default use 'PRESS' for immediate select without quick delay.
# Fallback key-maps 'CLICK' since 'PRESS' events passes through (allowing either click or drag).
@@ -464,21 +499,15 @@ def _template_items_tool_select(params, operator, cursor_operator, fallback):
{"properties": [("deselect_all", True)]}),
(operator, {"type": 'LEFTMOUSE', "value": 'CLICK' if fallback else 'PRESS', "shift": True},
{"properties": [("toggle", True)]}),
- ]
- else:
- # Experimental support for LMB interaction for the tweak tool.
- if params.use_tweak_tool_lmb_interaction and not fallback:
- return [
- (operator, {"type": 'LEFTMOUSE', "value": 'PRESS'},
- {"properties": [("deselect_all", True), ("select_passthrough", True)]}),
- (operator, {"type": 'LEFTMOUSE', "value": 'CLICK'},
- {"properties": [("deselect_all", True)]}),
- (operator, {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True},
- {"properties": [("deselect_all", False), ("toggle", True)]}),
+
+ # Fallback key-map must transform as the primary tool is expected
+ # to be accessed via gizmos in this case. See: T96885.
+ *(() if not fallback else (
("transform.translate", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG'},
{"properties": [("release_confirm", True)]}),
- ]
-
+ ))
+ ]
+ else:
# For right mouse, set the cursor.
return [
(cursor_operator, {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
@@ -2898,7 +2927,7 @@ def km_sequencer(params):
("transform.seq_slide", {"type": params.select_mouse, "value": 'CLICK_DRAG'},
{"properties": [("view2d_edge_pan", True)]}),
("transform.transform", {"type": 'E', "value": 'PRESS'},
- {"properties": [("mode", 'TIME_EXTEND'), ("view2d_edge_pan", True)]}),
+ {"properties": [("mode", 'TIME_EXTEND')]}),
("marker.add", {"type": 'M', "value": 'PRESS'}, None),
("marker.rename", {"type": 'M', "value": 'PRESS', "ctrl": True}, None),
("sequencer.select_side_of_frame", {"type": 'LEFT_BRACKET', "value": 'PRESS'},
@@ -4705,6 +4734,11 @@ def _template_paint_radial_control(paint, rotation=False, secondary_rotation=Fal
def _template_view3d_select(*, type, value, legacy, select_passthrough, 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.
+
+ # See: `use_tweak_select_passthrough` doc-string.
+ if select_passthrough and (value in {'CLICK', 'RELEASE'}):
+ select_passthrough = False
+
items = [(
"view3d.select",
{"type": type, "value": value, **{m: True for m in mods}},
@@ -4721,7 +4755,7 @@ def _template_view3d_select(*, type, value, legacy, select_passthrough, exclude_
(("toggle", "center", "enumerate"), ("shift", "ctrl", "alt")),
) if exclude_mod is None or exclude_mod not in mods]
- if select_passthrough and (value == 'PRESS'):
+ if select_passthrough:
# Add an additional click item to de-select all other items,
# needed so pass-through is able to de-select other items.
items.append((
@@ -4749,6 +4783,11 @@ def _template_view3d_gpencil_select(*, type, value, legacy, use_select_mouse=Tru
def _template_uv_select(*, type, value, select_passthrough, legacy):
+
+ # See: `use_tweak_select_passthrough` doc-string.
+ if select_passthrough and (value in {'CLICK', 'RELEASE'}):
+ select_passthrough = False
+
items = [
("uv.select", {"type": type, "value": value},
{"properties": [
@@ -4759,7 +4798,7 @@ def _template_uv_select(*, type, value, select_passthrough, legacy):
{"properties": [("toggle", True)]}),
]
- if select_passthrough and (value == 'PRESS'):
+ if select_passthrough:
# Add an additional click item to de-select all other items,
# needed so pass-through is able to de-select other items.
items.append((
@@ -5537,7 +5576,10 @@ def km_sculpt_curves(params):
)
items.extend([
- ("sculpt_curves.brush_stroke", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
+ ("sculpt_curves.brush_stroke", {"type": 'LEFTMOUSE', "value": 'PRESS'},
+ {"properties": [("mode", 'NORMAL')]}),
+ ("sculpt_curves.brush_stroke", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True},
+ {"properties": [("mode", 'INVERT')]}),
*_template_paint_radial_control("curves_sculpt"),
])
@@ -6376,7 +6418,7 @@ def km_image_editor_tool_uv_select(params, *, fallback):
{"space_type": 'IMAGE_EDITOR', "region_type": 'WINDOW'},
{"items": [
*([] if (fallback and (params.select_mouse == 'RIGHTMOUSE')) else _template_items_tool_select(
- params, "uv.select", "uv.cursor_set", fallback)),
+ params, "uv.select", "uv.cursor_set", fallback=fallback)),
*([] if (not params.use_fallback_tool_rmb) else _template_uv_select(
type=params.select_mouse,
value=params.select_mouse_value,
@@ -6587,7 +6629,7 @@ def km_3d_view_tool_select(params, *, fallback):
{"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
{"items": [
*([] if (fallback and (params.select_mouse == 'RIGHTMOUSE')) else _template_items_tool_select(
- params, "view3d.select", "view3d.cursor3d", fallback)),
+ params, "view3d.select", "view3d.cursor3d", fallback=fallback)),
*([] if (not params.use_fallback_tool_rmb) else _template_view3d_select(
type=params.select_mouse,
value=params.select_mouse_value,
@@ -7524,7 +7566,7 @@ def km_3d_view_tool_edit_gpencil_select(params, *, fallback):
{"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
{"items": [
*([] if (fallback and (params.select_mouse == 'RIGHTMOUSE')) else _template_items_tool_select(
- params, "gpencil.select", "view3d.cursor3d", fallback)),
+ params, "gpencil.select", "view3d.cursor3d", fallback=fallback)),
*([] if (not params.use_fallback_tool_rmb) else _template_view3d_gpencil_select(
type=params.select_mouse, value=params.select_mouse_value, legacy=params.legacy)),
]},
@@ -7662,7 +7704,7 @@ def km_3d_view_tool_sculpt_gpencil_select(params):
return (
"3D View Tool: Sculpt Gpencil, Tweak",
{"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
- {"items": _template_items_tool_select(params, "gpencil.select", "view3d.cursor3d", False)},
+ {"items": _template_items_tool_select(params, "gpencil.select", "view3d.cursor3d")},
)
@@ -7702,7 +7744,7 @@ def km_sequencer_editor_tool_generic_select(params, *, fallback):
{"space_type": 'SEQUENCE_EDITOR', "region_type": 'WINDOW'},
{"items": [
*([] if (fallback and (params.select_mouse == 'RIGHTMOUSE')) else _template_items_tool_select(
- params, "sequencer.select", "sequencer.cursor_set", fallback)),
+ params, "sequencer.select", "sequencer.cursor_set", cursor_prioritize=True, fallback=fallback)),
*([] if (not params.use_fallback_tool_rmb) else _template_sequencer_preview_select(
type=params.select_mouse, value=params.select_mouse_value, legacy=params.legacy)),
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index b0b618ada11..035c4fd1352 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -2261,7 +2261,6 @@ class USERPREF_PT_experimental_new_features(ExperimentalPanel, Panel):
context, (
({"property": "use_sculpt_tools_tilt"}, "T82877"),
({"property": "use_sculpt_texture_paint"}, "T96225"),
- ({"property": "use_select_nearest_on_first_click"}, "T96752"),
({"property": "use_extended_asset_browser"}, ("project/view/130/", "Project Page")),
({"property": "use_override_templates"}, ("T73318", "Milestone 4")),
({"property": "use_named_attribute_nodes"}, ("T91742")),
@@ -2283,6 +2282,17 @@ class USERPREF_PT_experimental_prototypes(ExperimentalPanel, Panel):
)
+class USERPREF_PT_experimental_tweaks(ExperimentalPanel, Panel):
+ bl_label = "Tweaks"
+
+ def draw(self, context):
+ self._draw_items(
+ context, (
+ ({"property": "use_select_nearest_on_first_click"}, "T96752"),
+ ),
+ )
+
+
class USERPREF_PT_experimental_debugging(ExperimentalPanel, Panel):
bl_label = "Debugging"
@@ -2403,6 +2413,7 @@ classes = (
USERPREF_PT_experimental_new_features,
USERPREF_PT_experimental_prototypes,
+ USERPREF_PT_experimental_tweaks,
USERPREF_PT_experimental_debugging,
# Add dynamically generated editor theme panels last,
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 0808b7fadae..41c1f3d0683 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -518,6 +518,13 @@ class _draw_tool_settings_context_mode:
layout.prop(tool_settings.curves_sculpt, "interpolate_length")
layout.prop(tool_settings.curves_sculpt, "interpolate_shape")
+ if brush.curves_sculpt_tool == 'GROW_SHRINK':
+ layout.prop(brush, "direction", expand=True, text="")
+ layout.prop(brush, "falloff_shape", expand=True)
+ layout.prop(brush.curves_sculpt_settings, "scale_uniform")
+ layout.prop(brush.curves_sculpt_settings, "minimum_length")
+ layout.prop(brush, "curve_preset")
+
if brush.curves_sculpt_tool == 'SNAKE_HOOK':
layout.prop(brush, "falloff_shape", expand=True)
layout.prop(brush, "curve_preset")