Merge branch 'blender-v3.3-release'
This commit is contained in:
@@ -490,16 +490,13 @@ def _template_items_tool_select(
|
|||||||
]
|
]
|
||||||
|
|
||||||
if params.select_mouse == 'LEFTMOUSE':
|
if params.select_mouse == 'LEFTMOUSE':
|
||||||
# By default use 'PRESS' for immediate select without quick delay.
|
# Use 'PRESS' for immediate select without delay.
|
||||||
# Fallback key-maps 'CLICK' since 'PRESS' events passes through (allowing either click or drag).
|
# Tools that allow dragging anywhere should _NOT_ enable the fallback tool
|
||||||
#
|
# unless it is expected that the tool should operate on the selection (click-drag to rip for e.g.).
|
||||||
# NOTE: When the active (non-fallback) tool uses a key-map that activates it's primary tool on drag,
|
|
||||||
# it's important that this key-map uses click and not press. Otherwise it becomes impossible to use
|
|
||||||
# the tool without selecting elements under the cursor.
|
|
||||||
return [
|
return [
|
||||||
(operator, {"type": 'LEFTMOUSE', "value": 'CLICK' if fallback else 'PRESS'},
|
(operator, {"type": 'LEFTMOUSE', "value": 'PRESS'},
|
||||||
{"properties": [("deselect_all", True), *operator_props]}),
|
{"properties": [("deselect_all", True), *operator_props]}),
|
||||||
(operator, {"type": 'LEFTMOUSE', "value": 'CLICK' if fallback else 'PRESS', "shift": True},
|
(operator, {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True},
|
||||||
{"properties": [("toggle", True), *operator_props]}),
|
{"properties": [("toggle", True), *operator_props]}),
|
||||||
|
|
||||||
# Fallback key-map must transform as the primary tool is expected
|
# Fallback key-map must transform as the primary tool is expected
|
||||||
|
|||||||
@@ -125,7 +125,6 @@ class _defs_view3d_generic:
|
|||||||
icon="ops.view3d.ruler",
|
icon="ops.view3d.ruler",
|
||||||
widget="VIEW3D_GGT_ruler",
|
widget="VIEW3D_GGT_ruler",
|
||||||
keymap="3D View Tool: Measure",
|
keymap="3D View Tool: Measure",
|
||||||
options={'KEYMAP_FALLBACK'},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -529,7 +528,6 @@ class _defs_view3d_add:
|
|||||||
widget="VIEW3D_GGT_placement",
|
widget="VIEW3D_GGT_placement",
|
||||||
keymap="3D View Tool: Object, Add Primitive",
|
keymap="3D View Tool: Object, Add Primitive",
|
||||||
draw_settings=draw_settings,
|
draw_settings=draw_settings,
|
||||||
options={'KEYMAP_FALLBACK'},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@ToolDef.from_fn
|
@ToolDef.from_fn
|
||||||
@@ -556,7 +554,6 @@ class _defs_view3d_add:
|
|||||||
widget="VIEW3D_GGT_placement",
|
widget="VIEW3D_GGT_placement",
|
||||||
keymap="3D View Tool: Object, Add Primitive",
|
keymap="3D View Tool: Object, Add Primitive",
|
||||||
draw_settings=draw_settings,
|
draw_settings=draw_settings,
|
||||||
options={'KEYMAP_FALLBACK'},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@ToolDef.from_fn
|
@ToolDef.from_fn
|
||||||
@@ -582,7 +579,6 @@ class _defs_view3d_add:
|
|||||||
widget="VIEW3D_GGT_placement",
|
widget="VIEW3D_GGT_placement",
|
||||||
keymap="3D View Tool: Object, Add Primitive",
|
keymap="3D View Tool: Object, Add Primitive",
|
||||||
draw_settings=draw_settings,
|
draw_settings=draw_settings,
|
||||||
options={'KEYMAP_FALLBACK'},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@ToolDef.from_fn
|
@ToolDef.from_fn
|
||||||
@@ -608,7 +604,6 @@ class _defs_view3d_add:
|
|||||||
widget="VIEW3D_GGT_placement",
|
widget="VIEW3D_GGT_placement",
|
||||||
keymap="3D View Tool: Object, Add Primitive",
|
keymap="3D View Tool: Object, Add Primitive",
|
||||||
draw_settings=draw_settings,
|
draw_settings=draw_settings,
|
||||||
options={'KEYMAP_FALLBACK'},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@ToolDef.from_fn
|
@ToolDef.from_fn
|
||||||
@@ -633,7 +628,6 @@ class _defs_view3d_add:
|
|||||||
widget="VIEW3D_GGT_placement",
|
widget="VIEW3D_GGT_placement",
|
||||||
keymap="3D View Tool: Object, Add Primitive",
|
keymap="3D View Tool: Object, Add Primitive",
|
||||||
draw_settings=draw_settings,
|
draw_settings=draw_settings,
|
||||||
options={'KEYMAP_FALLBACK'},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user