From fe37fac49fb3d9e7710db5c0df99451a04e4374c Mon Sep 17 00:00:00 2001 From: Lukas Sneyd Date: Sun, 9 Apr 2023 22:37:16 -0700 Subject: [PATCH 1/6] blender 3.50 custom build --- intern/ghost/GHOST_Types.h | 2 + intern/ghost/intern/GHOST_WindowWin32.cpp | 6 + release/datafiles/userdef/userdef_default.c | 1 + release/windows/icons/winblender.rc | 2 + scripts/modules/rna_keymap_ui.py | 19 +- scripts/startup/bl_operators/userpref.py | 110 ++ .../startup/bl_ui/space_toolsystem_toolbar.py | 61 + scripts/startup/bl_ui/space_userpref.py | 13 + scripts/startup/bl_ui/space_view3d.py | 262 ++- scripts/startup/bl_ui/space_view3d_toolbar.py | 38 +- source/blender/blenlib/BLI_lasso_2d.h | 3 +- source/blender/blenlib/intern/lasso_2d.c | 35 +- .../blenloader/intern/versioning_defaults.cc | 48 + .../blenloader/intern/versioning_userdef.c | 7 +- .../editors/curves/intern/curves_selection.cc | 3 +- source/blender/editors/include/ED_transform.h | 5 +- source/blender/editors/include/ED_view3d.h | 11 +- .../blender/editors/mesh/editmesh_select.cc | 37 +- source/blender/editors/screen/screen_ops.c | 56 + .../editors/space_view3d/view3d_edit.c | 208 +++ .../editors/space_view3d/view3d_intern.h | 2 + .../editors/space_view3d/view3d_iterators.cc | 151 +- .../editors/space_view3d/view3d_navigate.c | 44 +- .../editors/space_view3d/view3d_navigate.h | 2 + .../space_view3d/view3d_navigate_zoom.c | 10 +- .../blender/editors/space_view3d/view3d_ops.c | 2 + .../editors/space_view3d/view3d_select.cc | 1452 ++++++++++++++--- .../transform/transform_orientations.c | 120 +- source/blender/editors/uvedit/uvedit_select.c | 8 +- source/blender/makesdna/DNA_scene_defaults.h | 48 + source/blender/makesdna/DNA_scene_types.h | 143 +- source/blender/makesdna/DNA_userdef_types.h | 33 +- source/blender/makesrna/intern/rna_scene.c | 453 +++++ source/blender/makesrna/intern/rna_userdef.c | 60 + source/blender/makesrna/intern/rna_wm_api.c | 60 + source/blender/windowmanager/WM_api.h | 3 +- .../blender/windowmanager/intern/wm_cursors.c | 10 +- .../windowmanager/intern/wm_event_query.c | 77 +- .../windowmanager/intern/wm_event_system.cc | 8 +- .../windowmanager/intern/wm_gesture_ops.c | 119 +- .../windowmanager/intern/wm_operator_props.c | 262 ++- 41 files changed, 3653 insertions(+), 341 deletions(-) diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index e950f9bc679..8e8ca667e5f 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -235,6 +235,8 @@ typedef enum { GHOST_kStandardCursorCrosshairA, GHOST_kStandardCursorCrosshairB, GHOST_kStandardCursorCrosshairC, + GHOST_kStandardCursorCrosshairD, + GHOST_kStandardCursorCrosshairE, GHOST_kStandardCursorPencil, GHOST_kStandardCursorUpArrow, GHOST_kStandardCursorDownArrow, diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 3e82f55c583..183af447f9b 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -772,6 +772,12 @@ HCURSOR GHOST_WindowWin32::getStandardCursor(GHOST_TStandardCursor shape) const case GHOST_kStandardCursorCrosshairC: cursor = ::LoadImage(module, "crossC_cursor", IMAGE_CURSOR, cx, cy, flags); break; /* Minimal Crosshair C */ + case GHOST_kStandardCursorCrosshairD: + cursor = ::LoadImage(module, "crossD_cursor", IMAGE_CURSOR, cx, cy, flags); + break; /* Alternate Crosshair D */ + case GHOST_kStandardCursorCrosshairE: + cursor = ::LoadImage(module, "crossE_cursor", IMAGE_CURSOR, cx, cy, flags); + break; /* Large Crosshair E */ case GHOST_kStandardCursorBottomSide: case GHOST_kStandardCursorUpDown: cursor = ::LoadImage(module, "movens_cursor", IMAGE_CURSOR, cx, cy, flags); diff --git a/release/datafiles/userdef/userdef_default.c b/release/datafiles/userdef/userdef_default.c index cbcd99d4b3f..794104af6f6 100644 --- a/release/datafiles/userdef/userdef_default.c +++ b/release/datafiles/userdef/userdef_default.c @@ -185,6 +185,7 @@ const UserDef U_default = { .render_display_type = USER_RENDER_DISPLAY_WINDOW, .filebrowser_display_type = USER_TEMP_SPACE_DISPLAY_WINDOW, .viewport_aa = 8, + .selection_radius = 75.0f, .walk_navigation = { diff --git a/release/windows/icons/winblender.rc b/release/windows/icons/winblender.rc index a0dff81b711..fcd2a66b0cd 100644 --- a/release/windows/icons/winblender.rc +++ b/release/windows/icons/winblender.rc @@ -23,6 +23,8 @@ cross_cursor CURSOR "cursors/cross.cur" crossA_cursor CURSOR "cursors/crossa.cur" crossB_cursor CURSOR "cursors/crossb.cur" crossC_cursor CURSOR "cursors/crossc.cur" +crossD_cursor CURSOR "cursors/crossd.cur" +crossE_cursor CURSOR "cursors/crosse.cur" eraser_cursor CURSOR "cursors/eraser.cur" eyedropper_cursor CURSOR "cursors/eyedropper.cur" handopen_cursor CURSOR "cursors/handopen.cur" diff --git a/scripts/modules/rna_keymap_ui.py b/scripts/modules/rna_keymap_ui.py index 8daacc2e12e..2aa004bbb7d 100644 --- a/scripts/modules/rna_keymap_ui.py +++ b/scripts/modules/rna_keymap_ui.py @@ -182,7 +182,24 @@ def draw_kmi(display_keymaps, kc, km, kmi, layout, level): if map_type in {'KEYBOARD', 'MOUSE'} and kmi.value == 'CLICK_DRAG': subrow = sub.row() - subrow.prop(kmi, "direction") + if bpy.context.preferences.inputs.click_drag_direction == 'LEFT_RIGHT': + if kmi.direction == 'ANY' or kmi.direction == 'EAST' or kmi.direction == 'WEST': + subrow.label(text="Direction:") + else: + subrow.label(text="WARNING - No Direction:") + subrow.operator("preferences.set_direction_any", text="Any", depress= kmi.direction == 'ANY').item_id = kmi.id + subrow.operator("preferences.set_direction_left", text="Left", depress= kmi.direction == 'WEST').item_id = kmi.id + subrow.operator("preferences.set_direction_right", text="Right", depress= kmi.direction == 'EAST').item_id = kmi.id + elif bpy.context.preferences.inputs.click_drag_direction == 'UP_DOWN': + if kmi.direction == 'ANY' or kmi.direction == 'NORTH' or kmi.direction == 'SOUTH': + subrow.label(text="Direction:") + else: + subrow.label(text="WARNING - No Direction:") + subrow.operator("preferences.set_direction_any", text="Any", depress= kmi.direction == 'ANY').item_id = kmi.id + subrow.operator("preferences.set_direction_up", text="Up", depress= kmi.direction == 'NORTH').item_id = kmi.id + subrow.operator("preferences.set_direction_down", text="Down", depress= kmi.direction == 'SOUTH').item_id = kmi.id + else: + subrow.prop(kmi, "direction") subrow = sub.row() subrow.scale_x = 0.75 diff --git a/scripts/startup/bl_operators/userpref.py b/scripts/startup/bl_operators/userpref.py index d0134bd076f..f2d9d5cb428 100644 --- a/scripts/startup/bl_operators/userpref.py +++ b/scripts/startup/bl_operators/userpref.py @@ -400,6 +400,111 @@ class PREFERENCES_OT_keyitem_remove(Operator): return {'FINISHED'} +class PREFERENCES_OT_set_direction_any(Operator): + """Drag in any direction""" + bl_idname = "preferences.set_direction_any" + bl_label = "Set Direction Any" + + item_id: IntProperty( + name="Item Identifier", + description="Identifier of the item to remove", + ) + + @classmethod + def poll(cls, context): + return hasattr(context, "keymap") + + def execute(self, context): + km = context.keymap + kmi = km.keymap_items.from_id(self.item_id) + km.keymap_items.set_direction_any(kmi) + return {'FINISHED'} + + +class PREFERENCES_OT_set_direction_left(Operator): + """Drag to the left""" + bl_idname = "preferences.set_direction_left" + bl_label = "Set Direction Left" + + item_id: IntProperty( + name="Item Identifier", + description="Identifier of the item to remove", + ) + + @classmethod + def poll(cls, context): + return hasattr(context, "keymap") + + def execute(self, context): + km = context.keymap + kmi = km.keymap_items.from_id(self.item_id) + km.keymap_items.set_direction_left(kmi) + return {'FINISHED'} + + +class PREFERENCES_OT_set_direction_right(Operator): + """Drag to the right""" + bl_idname = "preferences.set_direction_right" + bl_label = "Set Direction Right" + + item_id: IntProperty( + name="Item Identifier", + description="Identifier of the item to remove", + ) + + @classmethod + def poll(cls, context): + return hasattr(context, "keymap") + + def execute(self, context): + km = context.keymap + kmi = km.keymap_items.from_id(self.item_id) + km.keymap_items.set_direction_right(kmi) + return {'FINISHED'} + + +class PREFERENCES_OT_set_direction_up(Operator): + """Drag upwards""" + bl_idname = "preferences.set_direction_up" + bl_label = "Set Direction Up" + + item_id: IntProperty( + name="Item Identifier", + description="Identifier of the item to remove", + ) + + @classmethod + def poll(cls, context): + return hasattr(context, "keymap") + + def execute(self, context): + km = context.keymap + kmi = km.keymap_items.from_id(self.item_id) + km.keymap_items.set_direction_up(kmi) + return {'FINISHED'} + + +class PREFERENCES_OT_set_direction_down(Operator): + """Drag downwards""" + bl_idname = "preferences.set_direction_down" + bl_label = "Set Direction Down" + + item_id: IntProperty( + name="Item Identifier", + description="Identifier of the item to remove", + ) + + @classmethod + def poll(cls, context): + return hasattr(context, "keymap") + + def execute(self, context): + km = context.keymap + kmi = km.keymap_items.from_id(self.item_id) + km.keymap_items.set_direction_down(kmi) + return {'FINISHED'} + + class PREFERENCES_OT_keyconfig_remove(Operator): """Remove key config""" bl_idname = "preferences.keyconfig_remove" @@ -1156,6 +1261,11 @@ classes = ( PREFERENCES_OT_keyconfig_test, PREFERENCES_OT_keyitem_add, PREFERENCES_OT_keyitem_remove, + PREFERENCES_OT_set_direction_any, + PREFERENCES_OT_set_direction_left, + PREFERENCES_OT_set_direction_right, + PREFERENCES_OT_set_direction_up, + PREFERENCES_OT_set_direction_down, PREFERENCES_OT_keyitem_restore, PREFERENCES_OT_keymap_restore, PREFERENCES_OT_theme_install, diff --git a/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/scripts/startup/bl_ui/space_toolsystem_toolbar.py index aa448aeca56..e735b9f797b 100644 --- a/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -386,10 +386,37 @@ class _defs_view3d_select: @ToolDef.from_fn def box(): def draw_settings(_context, layout, tool): + tool_settings = _context.tool_settings props = tool.operator_properties("view3d.select_box") row = layout.row() row.use_property_split = False row.prop(props, "mode", text="", expand=True, icon_only=True) + + if _context.mode == 'OBJECT' and bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': + layout.prop(tool_settings, "select_origin_box") + if _context.mode == 'EDIT_MESH' and bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': + layout.prop(tool_settings, "show_box_options", toggle=True) + if tool_settings.show_box_options: + row = layout.row(align=True) + row.prop(tool_settings, "box_drag_direction") + row = layout.row(align=True) + if tool_settings.box_drag_direction == 'MESH_DIRECTION_ANY': + row.prop(tool_settings, "box_edge") + row = layout.row(align=True) + row.prop(tool_settings, "box_face") + elif tool_settings.box_drag_direction == 'MESH_DIRECTION_LEFT_RIGHT': + row.prop(tool_settings, "box_edge_left", icon='TRIA_LEFT') + row.prop(tool_settings, "box_edge_right", text="", icon='TRIA_RIGHT') + row = layout.row(align=True) + row.prop(tool_settings, "box_face_left", icon='TRIA_LEFT') + row.prop(tool_settings, "box_face_right", text="", icon='TRIA_RIGHT') + else: + row.prop(tool_settings, "box_edge_up", icon='TRIA_UP') + row.prop(tool_settings, "box_edge_down", text="", icon='TRIA_DOWN') + row = layout.row(align=True) + row.prop(tool_settings, "box_face_up", icon='TRIA_UP') + row.prop(tool_settings, "box_face_down", text="", icon='TRIA_DOWN') + return dict( idname="builtin.select_box", label="Select Box", @@ -402,10 +429,33 @@ class _defs_view3d_select: @ToolDef.from_fn def lasso(): def draw_settings(_context, layout, tool): + tool_settings = _context.tool_settings props = tool.operator_properties("view3d.select_lasso") row = layout.row() row.use_property_split = False row.prop(props, "mode", text="", expand=True, icon_only=True) + if _context.mode == 'EDIT_MESH' and bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': + layout.prop(tool_settings, "show_lasso_options", toggle=True) + if tool_settings.show_lasso_options: + row = layout.row(align=True) + row.prop(tool_settings, "lasso_drag_direction") + row = layout.row(align=True) + if tool_settings.lasso_drag_direction == 'MESH_DIRECTION_ANY': + row.prop(tool_settings, "lasso_edge") + row = layout.row(align=True) + row.prop(tool_settings, "lasso_face") + elif tool_settings.lasso_drag_direction == 'MESH_DIRECTION_LEFT_RIGHT': + row.prop(tool_settings, "lasso_edge_left", icon='TRIA_LEFT') + row.prop(tool_settings, "lasso_edge_right", text="", icon='TRIA_RIGHT') + row = layout.row(align=True) + row.prop(tool_settings, "lasso_face_left", icon='TRIA_LEFT') + row.prop(tool_settings, "lasso_face_right", text="", icon='TRIA_RIGHT') + else: + row.prop(tool_settings, "lasso_edge_up", icon='TRIA_UP') + row.prop(tool_settings, "lasso_edge_down", text="", icon='TRIA_DOWN') + row = layout.row(align=True) + row.prop(tool_settings, "lasso_face_up", icon='TRIA_UP') + row.prop(tool_settings, "lasso_face_down", text="", icon='TRIA_DOWN') return dict( idname="builtin.select_lasso", label="Select Lasso", @@ -418,12 +468,23 @@ class _defs_view3d_select: @ToolDef.from_fn def circle(): def draw_settings(_context, layout, tool): + tool_settings = _context.tool_settings props = tool.operator_properties("view3d.select_circle") row = layout.row() row.use_property_split = False row.prop(props, "mode", text="", expand=True, icon_only=True) layout.prop(props, "radius") + if _context.mode == 'OBJECT' and bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': + layout.prop(tool_settings, "select_origin_circle") + if _context.mode == 'EDIT_MESH' and bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': + layout.prop(tool_settings, "show_circle_options", toggle=True) + if tool_settings.show_circle_options: + row = layout.row(align=True) + row.prop(tool_settings, "circle_edge") + row = layout.row(align=True) + row.prop(tool_settings, "circle_face") + def draw_cursor(_context, tool, xy): from gpu_extras.presets import draw_circle_2d props = tool.operator_properties("view3d.select_circle") diff --git a/scripts/startup/bl_ui/space_userpref.py b/scripts/startup/bl_ui/space_userpref.py index f0c09db2372..7e35b0607a6 100644 --- a/scripts/startup/bl_ui/space_userpref.py +++ b/scripts/startup/bl_ui/space_userpref.py @@ -496,6 +496,17 @@ class USERPREF_PT_edit_misc(EditingPanel, CenterAlignMixIn, Panel): col = layout.column() col.prop(edit, "sculpt_paint_overlay_color", text="Sculpt Overlay Color") col.prop(edit, "node_margin", text="Node Auto-Offset Margin") + col.prop(edit, "adjustable_click_select") + colsub = col.column(align=True) + colsub.active = edit.adjustable_click_select + colsub.prop(edit, "select_unbiased") + colsub.prop(edit, "selection_radius") + col = layout.column() + col.prop(edit, "alternate_cursor") + colsub = col.column(align=True) + colsub.active = edit.alternate_cursor + colsub.prop(edit, "alternate_cursor_large") + # ----------------------------------------------------------------------------- @@ -1559,6 +1570,8 @@ class USERPREF_PT_input_mouse(InputPanel, CenterAlignMixIn, Panel): flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) + flow.prop(inputs, "click_drag_direction") + flow.prop(inputs, "drag_select_control") flow.prop(inputs, "use_mouse_emulate_3_button") if sys.platform[:3] != "win": rowsub = flow.row() diff --git a/scripts/startup/bl_ui/space_view3d.py b/scripts/startup/bl_ui/space_view3d.py index fe1c4ee2984..0f935ce00fc 100644 --- a/scripts/startup/bl_ui/space_view3d.py +++ b/scripts/startup/bl_ui/space_view3d.py @@ -889,9 +889,47 @@ class VIEW3D_HT_header(Header): sub.active = overlay.show_overlays sub.popover(panel="VIEW3D_PT_overlay", text="") - row = layout.row() + row = layout.row(align=True) row.active = (object_mode == 'EDIT') or (shading.type in {'WIREFRAME', 'SOLID'}) + from bl_ui.space_toolsystem_common import ToolSelectPanelHelper + _cls = ToolSelectPanelHelper._tool_class_from_space_type('VIEW_3D') + + if tool_settings.workspace_tool_type == 'FALLBACK': + tool = _cls._tool_get_by_id_active(context, _cls.tool_fallback_id)[0].idname + else: + tool = ToolSelectPanelHelper.tool_active_from_context(context).idname + + if object_mode in 'EDIT': + mode_match_auto_xray = tool_settings.auto_xray_edit and tool_settings.auto_xray + mode_match_select_through = tool_settings.select_through_edit and tool_settings.select_through + elif object_mode in 'OBJECT': + mode_match_auto_xray = tool_settings.auto_xray_object and tool_settings.auto_xray + mode_match_select_through = tool_settings.select_through_object and tool_settings.select_through + else: + mode_match_auto_xray = False + mode_match_select_through = False + + if tool == "builtin.select_box": + depress_auto_xray = mode_match_auto_xray and tool_settings.auto_xray_box + depress_select_through = mode_match_select_through and tool_settings.select_through_box + elif tool == "builtin.select_lasso": + depress_auto_xray = mode_match_auto_xray and tool_settings.auto_xray_lasso + depress_select_through = mode_match_select_through and tool_settings.select_through_lasso + elif tool == "builtin.select_circle": + depress_auto_xray = mode_match_auto_xray and tool_settings.auto_xray_circle + depress_select_through = mode_match_select_through and tool_settings.select_through_circle + else: + depress_auto_xray = False + depress_select_through = False + + if object_mode in 'EDIT' or object_mode in 'OBJECT': + if bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': + if tool_settings.auto_xray_button: + row.operator("view3d.toggle_auto_xray", text="", icon='XRAY', depress=depress_auto_xray) + if tool_settings.select_through_button: + row.operator("view3d.toggle_select_through", text="", icon='XRAY', depress=depress_select_through) + # While exposing `shading.show_xray(_wireframe)` is correct. # this hides the key shortcut from users: #70433. if has_pose_mode: @@ -900,15 +938,29 @@ class VIEW3D_HT_header(Header): draw_depressed = shading.show_xray_wireframe else: draw_depressed = shading.show_xray - row.operator( - "view3d.toggle_xray", - text="", - icon='XRAY', - depress=draw_depressed, - ) + + if bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': + if tool_settings.xray_button: + row.operator("view3d.toggle_xray", text="", icon='XRAY', depress=draw_depressed) + elif not tool_settings.auto_xray_button and not tool_settings.select_through_button: + row.operator("view3d.toggle_xray", text="", icon='XRAY', depress=draw_depressed) + else: + row.operator("view3d.toggle_xray", text="", icon='XRAY', depress=draw_depressed) + row.popover(panel="VIEW3D_PT_xray", text="") row = layout.row(align=True) - row.prop(shading, "type", text="", expand=True) + if tool_settings.shrink_shading_header: + if shading.type == 'SOLID': + shadicon = 'SHADING_SOLID' + elif shading.type == 'MATERIAL': + shadicon = 'SHADING_TEXTURE' + elif shading.type == 'RENDERED': + shadicon = 'SHADING_RENDERED' + else: + shadicon = 'SHADING_WIRE' + row.operator("view3d.toggle_xray", text="", icon=shadicon, depress=draw_depressed) + else: + row.prop(shading, "type", text="", expand=True) sub = row.row(align=True) # TODO, currently render shading type ignores mesh two-side, until it's supported # show the shading popover which shows double-sided option. @@ -1025,6 +1077,99 @@ class ShowHideMenu: layout.operator("%s.hide" % self._operator_name, text="Hide Unselected").unselected = True +# Custom Operators +class VIEW3D_gizmo_tweak(bpy.types.Operator): + """tweak based on gizmo shown""" + bl_idname = "view3d.gizmo_tweak" + bl_label = "gizmo tweak" + + from bpy.props import StringProperty, BoolProperty + + tmode: StringProperty(name="Transform Mode") + release: BoolProperty(name="Confirm on Release") + + def modal(self, context, event): + if event.type == 'MOUSEMOVE': + bpy.ops.transform.transform( + 'INVOKE_DEFAULT', + mode=self.tmode, + release_confirm=self.release) + return {'FINISHED'} + + return {'RUNNING_MODAL'} + + def invoke(self, context, event): + if context.object: + if context.space_data.show_gizmo_object_translate==True: + self.tmode = 'TRANSLATION' + elif context.space_data.show_gizmo_object_rotate==True: + self.tmode = 'ROTATION' + elif context.space_data.show_gizmo_object_scale==True: + self.tmode = 'RESIZE' + else: self.tmode = 'TRANSLATION' + + context.window_manager.modal_handler_add(self) + return {'RUNNING_MODAL'} + else: + self.report({'WARNING'}, "No active object, could not finish") + return {'CANCELLED'} + +class VIEW3D_gizmo_move(bpy.types.Operator): + bl_idname = "view3d.gizmo_move" + bl_label = "gizmo move" + + def invoke(self, context, event): + areas = bpy.context.workspace.screens[0].areas + for area in areas: + for space in area.spaces: + if space.type == 'VIEW_3D': + space.show_gizmo_object_translate^= True + space.show_gizmo_object_rotate = False + space.show_gizmo_object_scale = False + return {'FINISHED'} + +class VIEW3D_gizmo_scale(bpy.types.Operator): + bl_idname = "view3d.gizmo_scale" + bl_label = "gizmo scale" + + def invoke(self, context, event): + areas = bpy.context.workspace.screens[0].areas + for area in areas: + for space in area.spaces: + if space.type == 'VIEW_3D': + space.show_gizmo_object_translate = False + space.show_gizmo_object_rotate = False + space.show_gizmo_object_scale ^= True + return {'FINISHED'} + +class VIEW3D_gizmo_rotate(bpy.types.Operator): + bl_idname = "view3d.gizmo_rotate" + bl_label = "gizmo rotate" + + def invoke(self, context, event): + areas = bpy.context.workspace.screens[0].areas + for area in areas: + for space in area.spaces: + if space.type == 'VIEW_3D': + space.show_gizmo_object_translate = False + space.show_gizmo_object_rotate ^= True + space.show_gizmo_object_scale = False + return {'FINISHED'} + +class VIEW3D_box_lasso(bpy.types.Operator): + bl_idname = "view3d.box_lasso" + bl_label = "box lasso" + + def invoke(self, context, event): + from bl_ui.space_toolsystem_common import ToolSelectPanelHelper + tool = ToolSelectPanelHelper.tool_active_from_context(context) + if tool.idname == "builtin.select_box": + bpy.ops.wm.tool_set_by_id(name="builtin.select_lasso") + else: + bpy.ops.wm.tool_set_by_id(name="builtin.select_box") + return {'FINISHED'} + + # Standard transforms which apply to all cases (mix-in class, not used directly). class VIEW3D_MT_transform_base: bl_label = "Transform" @@ -5888,6 +6033,12 @@ class VIEW3D_PT_shading(Panel): def draw(self, _context): layout = self.layout layout.label(text="Viewport Shading") + tool_settings = _context.tool_settings + shading = VIEW3D_PT_shading.get_shading(_context) + + layout.prop(tool_settings, "shrink_shading_header") + if tool_settings.shrink_shading_header: + layout.prop(shading, "type", text="", expand=True) class VIEW3D_PT_shading_lighting(Panel): @@ -6068,17 +6219,7 @@ class VIEW3D_PT_shading_options(Panel): row = col.row(align=True) - if shading.type == 'WIREFRAME': - row.prop(shading, "show_xray_wireframe", text="") - sub = row.row() - sub.active = shading.show_xray_wireframe - sub.prop(shading, "xray_alpha_wireframe", text="X-Ray") - elif shading.type == 'SOLID': - row.prop(shading, "show_xray", text="") - sub = row.row() - sub.active = shading.show_xray - sub.prop(shading, "xray_alpha", text="X-Ray") - # X-ray mode is off when alpha is 1.0 + if shading.type == 'SOLID': xray_active = shading.show_xray and shading.xray_alpha != 1 row = col.row(align=True) @@ -6263,6 +6404,83 @@ class VIEW3D_PT_gizmo_display(Panel): col.prop(view, "show_gizmo_camera_dof_distance", text="Focus Distance") +class VIEW3D_PT_xray(Panel): + bl_space_type = 'VIEW_3D' + bl_region_type = 'HEADER' + bl_label = "X-Ray Settings" + bl_ui_units_x = 14 + + def draw(self, context): + layout = self.layout + layout.label(text="X-Ray Settings") + shading = VIEW3D_PT_shading.get_shading(context) + + col = layout.column() + row = col.row(align=True) + if shading.type == 'WIREFRAME': + row.prop(shading, "show_xray_wireframe", text="") + sub = row.row() + sub.active = shading.show_xray_wireframe + sub.prop(shading, "xray_alpha_wireframe", text="X-Ray Wireframe") + elif shading.type == 'SOLID': + row.prop(shading, "show_xray", text="") + sub = row.row() + sub.active = shading.show_xray + sub.prop(shading, "xray_alpha", text="X-Ray Solid") + + if bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': + tool_settings = context.tool_settings + + row = layout.row(align=True) + row = layout.row(align=True) + row = layout.row(align=True) + + row = layout.row(heading="Automatic X-Ray") + row.prop(tool_settings, "ui_prop", text="", emboss=False) + row = layout.row(align=True) + row.prop(tool_settings, "auto_xray", text="Enable") + sub = row.row(align=True) + sub.active = tool_settings.auto_xray + sub.prop(tool_settings, "auto_xray_object", text="Object") + sub.prop(tool_settings, "auto_xray_edit", text="Edit") + row = layout.row(align=True) + sub = row.row(align=True) + sub.active = tool_settings.auto_xray + sub.prop(tool_settings, "auto_xray_box", text="Box", toggle=True) + sub.prop(tool_settings, "auto_xray_lasso", text="Lasso", toggle=True) + sub.prop(tool_settings, "auto_xray_circle", text="Circle", toggle=True) + + row = layout.row(align=True) + row = layout.row(align=True) + row = layout.row(align=True) + + row = layout.row(heading="Select Through") + row.prop(tool_settings, "ui_prop", text="", emboss=False) + row = layout.row(align=True) + row.prop(tool_settings, "select_through", text="Enable") + sub = row.row(align=True) + sub.active = tool_settings.select_through + sub.prop(tool_settings, "select_through_object", text="Object") + sub.prop(tool_settings, "select_through_edit", text="Edit") + row = layout.row(align=True) + sub = row.row(align=True) + sub.active = tool_settings.select_through + sub.prop(tool_settings, "select_through_box", text="Box", toggle=True) + sub.prop(tool_settings, "select_through_lasso", text="Lasso", toggle=True) + sub.prop(tool_settings, "select_through_circle", text="Circle", toggle=True) + + row = layout.row(align=True) + row = layout.row(align=True) + row = layout.row(align=True) + + row = layout.row(heading="Header Buttons") + row.prop(tool_settings, "ui_prop", text="", emboss=False) + row = layout.row(align=True) + row.prop(tool_settings, "auto_xray_button", text="Auto X-Ray", toggle=True) + row.prop(tool_settings, "select_through_button", text="Select Through", toggle=True) + row.prop(tool_settings, "xray_button", text="X-Ray", toggle=True) + + class VIEW3D_PT_overlay(Panel): bl_space_type = 'VIEW_3D' bl_region_type = 'HEADER' @@ -8185,6 +8403,11 @@ classes = ( VIEW3D_MT_sculpt_gpencil_automasking_pie, VIEW3D_MT_wpaint_vgroup_lock_pie, VIEW3D_MT_sculpt_face_sets_edit_pie, + VIEW3D_gizmo_tweak, + VIEW3D_gizmo_move, + VIEW3D_gizmo_scale, + VIEW3D_gizmo_rotate, + VIEW3D_box_lasso, VIEW3D_MT_sculpt_curves, VIEW3D_PT_active_tool, VIEW3D_PT_active_tool_duplicate, @@ -8209,6 +8432,7 @@ classes = ( VIEW3D_PT_shading_render_pass, VIEW3D_PT_shading_compositor, VIEW3D_PT_gizmo_display, + VIEW3D_PT_xray, VIEW3D_PT_overlay, VIEW3D_PT_overlay_guides, VIEW3D_PT_overlay_object, diff --git a/scripts/startup/bl_ui/space_view3d_toolbar.py b/scripts/startup/bl_ui/space_view3d_toolbar.py index c6d6a77eec2..29631c411e7 100644 --- a/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1,4 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later +import bpy from bpy.types import Menu, Panel, UIList, WindowManager from bl_ui.properties_grease_pencil_common import ( GreasePencilSculptAdvancedPanel, @@ -153,7 +154,7 @@ class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel): bl_context = ".mesh_edit" # dot on purpose (access from topbar) bl_label = "Options" bl_options = {'DEFAULT_CLOSED'} - bl_ui_units_x = 12 + bl_ui_units_x = 15 @classmethod def poll(cls, context): @@ -169,6 +170,7 @@ class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel): ob = context.active_object mesh = ob.data + row = layout.row(align=True) row = layout.row(align=True, heading="Transform") row.prop(tool_settings, "use_transform_correct_face_attributes") @@ -220,6 +222,39 @@ class VIEW3D_PT_tools_meshedit_options_automerge(View3DPanel, Panel): col.prop(tool_settings, "double_threshold", text="Threshold") +class VIEW3D_PT_tools_meshedit_options_viewport_facing_select(View3DPanel, Panel): + bl_category = "Tool" + bl_context = ".mesh_edit" # dot on purpose (access from topbar) + bl_label = "Viewport Facing Select" + bl_parent_id = "VIEW3D_PT_tools_meshedit_options" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + return context.active_object + + def draw_header(self, context): + tool_settings = context.tool_settings + + self.layout.prop(tool_settings, "viewport_facing_select", text="", toggle=False) + + def draw(self, context): + layout = self.layout + + tool_settings = context.tool_settings + + layout.use_property_split = True + layout.use_property_decorate = False + + col = layout.column() + col.active = tool_settings.viewport_facing_select + col.prop(tool_settings, "viewport_facing_select_mode") + col.prop(tool_settings, "viewport_facing_select_threshold", text="Threshold") + col.prop(tool_settings, "viewport_facing_select_vert") + col.prop(tool_settings, "viewport_facing_select_edge") + col.prop(tool_settings, "viewport_facing_select_face") + + # ********** default tools for editmode_armature **************** @@ -2364,6 +2399,7 @@ classes = ( VIEW3D_PT_tools_object_options_transform, VIEW3D_PT_tools_meshedit_options, VIEW3D_PT_tools_meshedit_options_automerge, + VIEW3D_PT_tools_meshedit_options_viewport_facing_select, VIEW3D_PT_tools_armatureedit_options, VIEW3D_PT_tools_posemode_options, diff --git a/source/blender/blenlib/BLI_lasso_2d.h b/source/blender/blenlib/BLI_lasso_2d.h index 69625a9da83..1e2bbb1e1b2 100644 --- a/source/blender/blenlib/BLI_lasso_2d.h +++ b/source/blender/blenlib/BLI_lasso_2d.h @@ -25,7 +25,8 @@ bool BLI_lasso_is_edge_inside(const int mcoords[][2], int y0, int x1, int y1, - int error_value); + int error_value, + bool fully_inside); #ifdef __cplusplus } diff --git a/source/blender/blenlib/intern/lasso_2d.c b/source/blender/blenlib/intern/lasso_2d.c index 4752864ea3a..04978febdae 100644 --- a/source/blender/blenlib/intern/lasso_2d.c +++ b/source/blender/blenlib/intern/lasso_2d.c @@ -55,7 +55,8 @@ bool BLI_lasso_is_edge_inside(const int mcoords[][2], int y0, int x1, int y1, - const int error_value) + const int error_value, + bool fully_inside) { if (x0 == error_value || x1 == error_value || mcoords_len == 0) { @@ -64,23 +65,31 @@ bool BLI_lasso_is_edge_inside(const int mcoords[][2], const int v1[2] = {x0, y0}, v2[2] = {x1, y1}; - /* check points in lasso */ - if (BLI_lasso_is_point_inside(mcoords, mcoords_len, v1[0], v1[1], error_value)) { - return true; - } - if (BLI_lasso_is_point_inside(mcoords, mcoords_len, v2[0], v2[1], error_value)) { + /* enclosed faces only checks for both points inside selection area */ + if (BLI_lasso_is_point_inside(mcoords, mcoords_len, v1[0], v1[1], error_value) && + BLI_lasso_is_point_inside(mcoords, mcoords_len, v2[0], v2[1], error_value)) { return true; } - /* no points in lasso, so we have to intersect with lasso edge */ - - if (isect_seg_seg_v2_int(mcoords[0], mcoords[mcoords_len - 1], v1, v2) > 0) { - return true; - } - for (uint a = 0; a < mcoords_len - 1; a++) { - if (isect_seg_seg_v2_int(mcoords[a], mcoords[a + 1], v1, v2) > 0) { + if (!fully_inside) { + /* check points in lasso */ + if (BLI_lasso_is_point_inside(mcoords, mcoords_len, v1[0], v1[1], error_value)) { return true; } + if (BLI_lasso_is_point_inside(mcoords, mcoords_len, v2[0], v2[1], error_value)) { + return true; + } + + /* no points in lasso, so we have to intersect with lasso edge */ + + if (isect_seg_seg_v2_int(mcoords[0], mcoords[mcoords_len - 1], v1, v2) > 0) { + return true; + } + for (unsigned int a = 0; a < mcoords_len - 1; a++) { + if (isect_seg_seg_v2_int(mcoords[a], mcoords[a + 1], v1, v2) > 0) { + return true; + } + } } return false; diff --git a/source/blender/blenloader/intern/versioning_defaults.cc b/source/blender/blenloader/intern/versioning_defaults.cc index d19616223cd..b324a516f10 100644 --- a/source/blender/blenloader/intern/versioning_defaults.cc +++ b/source/blender/blenloader/intern/versioning_defaults.cc @@ -373,6 +373,54 @@ static void blo_update_defaults_scene(Main *bmain, Scene *scene) if (idprop) { IDP_ClearProperty(idprop); } + + /* Mesh select. */ + ts->box_drag_direction = 1; + ts->lasso_drag_direction = 1; + ts->box_edge = 1; + ts->box_edge_left = 1; + ts->box_edge_right = 1; + ts->box_edge_up = 1; + ts->box_edge_down = 1; + ts->box_face = 1; + ts->box_face_left = 1; + ts->box_face_right = 1; + ts->box_face_up = 1; + ts->box_face_down = 1; + ts->lasso_edge = 1; + ts->lasso_edge_left = 1; + ts->lasso_edge_right = 1; + ts->lasso_edge_up = 1; + ts->lasso_edge_down = 1; + ts->lasso_face = 1; + ts->lasso_face_left = 1; + ts->lasso_face_right = 1; + ts->lasso_face_up = 1; + ts->lasso_face_down = 1; + ts->circle_edge = 2; + ts->circle_face = 1; + + /* X-Ray. */ + ts->xray_button = true; + ts->auto_xray_object = true; + ts->auto_xray_edit = true; + ts->auto_xray_box = true; + ts->auto_xray_lasso = true; + ts->auto_xray_circle = true; + ts->select_through = true; + ts->select_through_object = true; + ts->select_through_box = true; + ts->select_through_lasso = true; + ts->select_through_circle = true; + + /* Viewport-Facing Select */ + ts->viewport_facing_select_mode = 1; + ts->viewport_facing_select_vert = 1; + ts->viewport_facing_select_edge = 1; + ts->viewport_facing_select_face = 1; + + /* Object Origin Select */ + ts->select_origin_circle = true; } void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template) diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c index 4b2acfa7205..a4c765d9e61 100644 --- a/source/blender/blenloader/intern/versioning_userdef.c +++ b/source/blender/blenloader/intern/versioning_userdef.c @@ -434,9 +434,8 @@ void blo_do_versions_userdef(UserDef *userdef) if (!USER_VERSION_ATLEAST(278, 6)) { /* Clear preference flags for re-use. */ - userdef->flag &= ~(USER_FLAG_NUMINPUT_ADVANCED | USER_FLAG_UNUSED_2 | USER_FLAG_UNUSED_3 | - USER_FLAG_UNUSED_6 | USER_FLAG_UNUSED_7 | USER_FLAG_UNUSED_9 | - USER_DEVELOPER_UI); + userdef->flag &= ~(USER_FLAG_NUMINPUT_ADVANCED | USER_FLAG_UNUSED_7 | + USER_FLAG_UNUSED_9 | USER_DEVELOPER_UI); userdef->uiflag &= ~(USER_HEADER_BOTTOM); userdef->transopts &= ~(USER_TR_UNUSED_2 | USER_TR_UNUSED_3 | USER_TR_UNUSED_4 | USER_TR_UNUSED_6 | USER_TR_UNUSED_7); @@ -525,8 +524,6 @@ void blo_do_versions_userdef(UserDef *userdef) copy_v3_fl3(userdef->light_ambient, 0.025000, 0.025000, 0.025000); - userdef->flag &= ~(USER_FLAG_UNUSED_4); - userdef->uiflag &= ~(USER_HEADER_FROM_PREF | USER_UIFLAG_UNUSED_12 | USER_UIFLAG_UNUSED_22); } diff --git a/source/blender/editors/curves/intern/curves_selection.cc b/source/blender/editors/curves/intern/curves_selection.cc index 35afb6e1ed4..2af85ee1d7b 100644 --- a/source/blender/editors/curves/intern/curves_selection.cc +++ b/source/blender/editors/curves/intern/curves_selection.cc @@ -688,7 +688,8 @@ bool select_lasso(const ViewContext &vc, int(pos1_proj.y), int(pos2_proj.x), int(pos2_proj.y), - IS_CLIPPED)) { + IS_CLIPPED, + false)) { apply_selection_operation_at_index(selection.span, curve_i, sel_op); changed = true; break; diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index d7fb108809f..b447630f98b 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -100,7 +100,10 @@ void ED_getTransformOrientationMatrix(const struct Scene *scene, struct Object *ob, struct Object *obedit, short around, - float r_orientation_mat[3][3]); + float r_orientation_mat[3][3], + struct BMVert *eve, + struct BMEdge *eed, + struct BMFace *efa); int BIF_countTransformOrientation(const struct bContext *C); diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 9507ab4d476..f1dfc564208 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -391,11 +391,20 @@ void mesh_foreachScreenEdge_clip_bb_segment(struct ViewContext *vc, void *userData, eV3DProjTest clip_flag); -void mesh_foreachScreenFace( +void mesh_foreachScreenFaceCenter( struct ViewContext *vc, void (*func)(void *userData, struct BMFace *efa, const float screen_co[2], int index), void *userData, eV3DProjTest clip_flag); +void mesh_foreachScreenFaceVerts(struct ViewContext *vc, + void (*func)(void *userData, + struct BMFace *efa, + const float screen_co[][2], + int total_count, + struct rctf *poly_rect, + bool *face_hit), + void *userData, + const eV3DProjTest clip_flag); void nurbs_foreachScreenVert(struct ViewContext *vc, void (*func)(void *userData, struct Nurb *nu, diff --git a/source/blender/editors/mesh/editmesh_select.cc b/source/blender/editors/mesh/editmesh_select.cc index 94c2e3352b3..c8ec4ab78c2 100644 --- a/source/blender/editors/mesh/editmesh_select.cc +++ b/source/blender/editors/mesh/editmesh_select.cc @@ -233,7 +233,8 @@ static void findnearestvert__doClosest(void *userData, dist_test = dist_test_bias = len_manhattan_v2v2(data->mval_fl, screen_co); - if (data->use_select_bias && BM_elem_flag_test(eve, BM_ELEM_SELECT)) { + if (!(U.flag & USER_ADJUSTABLE_CLICK_SELECT && U.flag & USER_SELECT_UNBIASED) && + data->use_select_bias && BM_elem_flag_test(eve, BM_ELEM_SELECT)) { dist_test_bias += FIND_NEAR_SELECT_BIAS; } @@ -438,7 +439,8 @@ static void find_nearest_edge__doClosest( dist_test = dist_test_bias = len_manhattan_v2v2(data->mval_fl, screen_co); - if (data->use_select_bias && BM_elem_flag_test(eed, BM_ELEM_SELECT)) { + if (!(U.flag & USER_ADJUSTABLE_CLICK_SELECT && U.flag & USER_SELECT_UNBIASED) && + data->use_select_bias && BM_elem_flag_test(eed, BM_ELEM_SELECT)) { dist_test_bias += FIND_NEAR_SELECT_BIAS; } @@ -670,7 +672,8 @@ static void findnearestface__doClosest(void *userData, dist_test = dist_test_bias = len_manhattan_v2v2(data->mval_fl, screen_co); - if (data->use_select_bias && BM_elem_flag_test(efa, BM_ELEM_SELECT)) { + if (!(U.flag & USER_ADJUSTABLE_CLICK_SELECT && U.flag & USER_SELECT_UNBIASED) && + data->use_select_bias && BM_elem_flag_test(efa, BM_ELEM_SELECT)) { dist_test_bias += FIND_NEAR_SELECT_BIAS; } @@ -706,27 +709,26 @@ BMFace *EDBM_face_find_nearest_ex(ViewContext *vc, uint base_index = 0; if (!XRAY_FLAG_ENABLED(vc->v3d)) { - float dist_test; + float dist_test = 0.0f; uint index; BMFace *efa; + uint dist_px_manhattan_test = 0; { - uint dist_px_manhattan_test = 0; - if (*dist_px_manhattan_p != 0.0f && (use_zbuf_single_px == false)) { - dist_px_manhattan_test = uint( - ED_view3d_backbuf_sample_size_clamp(vc->region, *dist_px_manhattan_p)); + if (U.flag & USER_ADJUSTABLE_CLICK_SELECT || + *dist_px_manhattan_p != 0.0f && (use_zbuf_single_px == false)) { + dist_px_manhattan_test = (uint)ED_view3d_backbuf_sample_size_clamp(vc->region, + *dist_px_manhattan_p); } DRW_select_buffer_context_create(bases, bases_len, SCE_SELECT_FACE); - if (dist_px_manhattan_test == 0) { + if (!(U.flag & USER_ADJUSTABLE_CLICK_SELECT) && dist_px_manhattan_test == 0) { index = DRW_select_buffer_sample_point(vc->depsgraph, vc->region, vc->v3d, vc->mval); - dist_test = 0.0f; } else { index = DRW_select_buffer_find_nearest_to_point( vc->depsgraph, vc->region, vc->v3d, vc->mval, 1, UINT_MAX, &dist_px_manhattan_test); - dist_test = dist_px_manhattan_test; } if (index) { @@ -752,7 +754,7 @@ BMFace *EDBM_face_find_nearest_ex(ViewContext *vc, ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); - mesh_foreachScreenFace( + mesh_foreachScreenFaceCenter( vc, find_nearest_face_center__doZBuf, &data, V3D_PROJ_TEST_CLIP_DEFAULT); *r_dist_center = data.dist_px_manhattan; @@ -760,7 +762,14 @@ BMFace *EDBM_face_find_nearest_ex(ViewContext *vc, /* end exception */ if (efa) { - if (dist_test < *dist_px_manhattan_p) { + if (U.flag & USER_ADJUSTABLE_CLICK_SELECT && dist_px_manhattan_test < *dist_px_manhattan_p) { + if (r_base_index) { + *r_base_index = base_index; + } + *dist_px_manhattan_p = dist_px_manhattan_test; + return efa; + } + else if (!(U.flag & USER_ADJUSTABLE_CLICK_SELECT) && dist_test < *dist_px_manhattan_p) { if (r_base_index) { *r_base_index = base_index; } @@ -804,7 +813,7 @@ BMFace *EDBM_face_find_nearest_ex(ViewContext *vc, *dist_px_manhattan_p; ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); - mesh_foreachScreenFace(vc, findnearestface__doClosest, &data, clip_flag); + mesh_foreachScreenFaceCenter(vc, findnearestface__doClosest, &data, clip_flag); hit = (data.use_cycle && data.hit_cycle.face) ? &data.hit_cycle : &data.hit; diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 80e5da43423..689275a4d79 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -3847,6 +3847,61 @@ static void SCREEN_OT_repeat_history(wmOperatorType *ot) /** \} */ +/* -------------------------------------------------------------------- */ +/** \name Repeat Tool Operator + * \{ */ + +static int repeat_tool_exec(bContext *C, wmOperator *UNUSED(op)) +{ + wmWindowManager *wm = CTX_wm_manager(C); + wmOperator *lastop = wm->operators.last; + + /* Seek last registered operator */ + while (lastop) { + if (lastop->type->flag & OPTYPE_REGISTER) { + if (STREQ(lastop->idname, "MESH_OT_delete") || STREQ(lastop->idname, "MESH_OT_select_all") || + STREQ(lastop->idname, "MESH_OT_select_mode") || + STREQ(lastop->idname, "OBJECT_OT_editmode_toggle") || + STREQ(lastop->idname, "OBJECT_OT_select_all") || + STREQ(lastop->idname, "TRANSFORM_OT_resize") || + STREQ(lastop->idname, "TRANSFORM_OT_rotate") || + STREQ(lastop->idname, "TRANSFORM_OT_trackball") || + STREQ(lastop->idname, "TRANSFORM_OT_translate")) { + lastop = lastop->prev; + } + else { + printf(lastop->idname, "\n"); + break; + } + } + else { + lastop = lastop->prev; + } + } + + if (lastop) { + WM_operator_free_all_after(wm, lastop); + WM_operator_repeat_tool(C, lastop); + } + + return OPERATOR_CANCELLED; +} + +static void SCREEN_OT_repeat_tool(wmOperatorType *ot) +{ + /* identifiers */ + ot->name = "Repeat Tool"; + ot->description = "Repeat last tool"; + ot->idname = "SCREEN_OT_repeat_tool"; + + /* api callbacks */ + ot->exec = repeat_tool_exec; + + ot->poll = ED_operator_screenactive; +} + +/** \} */ + /* -------------------------------------------------------------------- */ /** \name Redo Operator * \{ */ @@ -5679,6 +5734,7 @@ void ED_operatortypes_screen(void) WM_operatortype_append(SCREEN_OT_actionzone); WM_operatortype_append(SCREEN_OT_repeat_last); WM_operatortype_append(SCREEN_OT_repeat_history); + WM_operatortype_append(SCREEN_OT_repeat_tool); WM_operatortype_append(SCREEN_OT_redo_last); /* Screen tools. */ diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index d5b96e03f13..aa239596e8d 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -1235,3 +1235,211 @@ void VIEW3D_OT_toggle_xray(wmOperatorType *ot) } /** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Toggle Automatic XRay + * \{ */ + +static int toggle_auto_xray_exec(bContext *C, wmOperator *op) +{ + ScrArea *area = CTX_wm_area(C); + ToolSettings *ts = CTX_data_tool_settings(C); + Object *obedit = CTX_data_edit_object(C); + bToolRef *tref = area->runtime.tool; + const bool mode_match = obedit ? ts->auto_xray_edit : ts->auto_xray_object; + + if (STREQ(tref->idname, "builtin.select_box") || + STREQ(tref->idname_fallback, "builtin.select_box")) { + if (mode_match && ts->auto_xray && ts->auto_xray_box) { + ts->auto_xray ^= true; + } + else { + if (!mode_match) { + if (obedit) { + ts->auto_xray_edit ^= true; + } + else { + ts->auto_xray_object ^= true; + } + } + + if (!ts->auto_xray) { + ts->auto_xray ^= true; + } + + if (!ts->auto_xray_box) { + ts->auto_xray_box ^= true; + } + } + } + else if (STREQ(tref->idname, "builtin.select_lasso") || + STREQ(tref->idname_fallback, "builtin.select_lasso")) { + if (mode_match && ts->auto_xray && ts->auto_xray_lasso) { + ts->auto_xray ^= true; + } + else { + if (!mode_match) { + if (obedit) { + ts->auto_xray_edit ^= true; + } + else { + ts->auto_xray_object ^= true; + } + } + + if (!ts->auto_xray) { + ts->auto_xray ^= true; + } + + if (!ts->auto_xray_lasso) { + ts->auto_xray_lasso ^= true; + } + } + } + else if (STREQ(tref->idname, "builtin.select_circle") || + STREQ(tref->idname_fallback, "builtin.select_circle")) { + if (mode_match && ts->auto_xray && ts->auto_xray_circle) { + ts->auto_xray ^= true; + } + else { + if (!mode_match) { + if (obedit) { + ts->auto_xray_edit ^= true; + } + else { + ts->auto_xray_object ^= true; + } + } + + if (!ts->auto_xray) { + ts->auto_xray ^= true; + } + + if (!ts->auto_xray_circle) { + ts->auto_xray_circle ^= true; + } + } + } + + ED_area_tag_redraw(area); + + return OPERATOR_FINISHED; +} + +void VIEW3D_OT_toggle_auto_xray(wmOperatorType *ot) +{ + /* identifiers */ + ot->name = "Toggle Automatic X-Ray"; + ot->idname = "VIEW3D_OT_toggle_auto_xray"; + ot->description = "Transparent scene display during box, lasso, and circle select"; + + /* api callbacks */ + ot->exec = toggle_auto_xray_exec; + ot->poll = ED_operator_view3d_active; +} + +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Toggle Select Through + * \{ */ + +static int toggle_select_through_exec(bContext *C, wmOperator *op) +{ + ScrArea *area = CTX_wm_area(C); + ToolSettings *ts = CTX_data_tool_settings(C); + Object *obedit = CTX_data_edit_object(C); + bToolRef *tref = area->runtime.tool; + const bool mode_match = obedit ? ts->select_through_edit : ts->select_through_object; + + if (STREQ(tref->idname, "builtin.select_box") || + STREQ(tref->idname_fallback, "builtin.select_box")) { + if (mode_match && ts->select_through && ts->select_through_box) { + ts->select_through ^= true; + } + else { + if (!mode_match) { + if (obedit) { + ts->select_through_edit ^= true; + } + else { + ts->select_through_object ^= true; + } + } + + if (!ts->select_through) { + ts->select_through ^= true; + } + + if (!ts->select_through_box) { + ts->select_through_box ^= true; + } + } + } + else if (STREQ(tref->idname, "builtin.select_lasso") || + STREQ(tref->idname_fallback, "builtin.select_lasso")) { + if (mode_match && ts->select_through && ts->select_through_lasso) { + ts->select_through ^= true; + } + else { + if (!mode_match) { + if (obedit) { + ts->select_through_edit ^= true; + } + else { + ts->select_through_object ^= true; + } + } + + if (!ts->select_through) { + ts->select_through ^= true; + } + + if (!ts->select_through_lasso) { + ts->select_through_lasso ^= true; + } + } + } + else if (STREQ(tref->idname, "builtin.select_circle") || + STREQ(tref->idname_fallback, "builtin.select_circle")) { + if (mode_match && ts->select_through && ts->select_through_circle) { + ts->select_through ^= true; + } + else { + if (!mode_match) { + if (obedit) { + ts->select_through_edit ^= true; + } + else { + ts->select_through_object ^= true; + } + } + + if (!ts->select_through) { + ts->select_through ^= true; + } + + if (!ts->select_through_circle) { + ts->select_through_circle ^= true; + } + } + } + + ED_area_tag_redraw(area); + + return OPERATOR_FINISHED; +} + +void VIEW3D_OT_toggle_select_through(wmOperatorType *ot) +{ + /* identifiers */ + ot->name = "Toggle Select Through"; + ot->idname = "VIEW3D_OT_toggle_select_through"; + ot->description = "Select occluded objects and mesh elements with box, lasso, and circle select"; + + /* api callbacks */ + ot->exec = toggle_select_through_exec; + ot->poll = ED_operator_view3d_active; +} + +/** \} */ diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index b94833dd276..f85453b7a96 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -55,6 +55,8 @@ void VIEW3D_OT_render_border(struct wmOperatorType *ot); void VIEW3D_OT_clear_render_border(struct wmOperatorType *ot); void VIEW3D_OT_toggle_shading(struct wmOperatorType *ot); void VIEW3D_OT_toggle_xray(struct wmOperatorType *ot); +void VIEW3D_OT_toggle_auto_xray(struct wmOperatorType *ot); +void VIEW3D_OT_toggle_select_through(struct wmOperatorType *ot); /* view3d_draw.c */ diff --git a/source/blender/editors/space_view3d/view3d_iterators.cc b/source/blender/editors/space_view3d/view3d_iterators.cc index e7e8eb5b275..d5e560331c4 100644 --- a/source/blender/editors/space_view3d/view3d_iterators.cc +++ b/source/blender/editors/space_view3d/view3d_iterators.cc @@ -13,6 +13,7 @@ #include "DNA_object_types.h" #include "DNA_scene_types.h" +#include "BLI_bitmap.h" #include "BLI_math_geom.h" #include "BLI_rect.h" #include "BLI_utildefines.h" @@ -38,6 +39,8 @@ #include "ED_screen.h" #include "ED_view3d.h" +#include "MEM_guardedalloc.h" + /* -------------------------------------------------------------------- */ /** \name Internal Clipping Utilities * \{ */ @@ -238,7 +241,7 @@ struct foreachScreenEdge_userData { int content_planes_len; }; -struct foreachScreenFace_userData { +struct foreachScreenFaceCenter_userData { void (*func)(void *userData, BMFace *efa, const float screen_co_b[2], int index); void *userData; ViewContext vc; @@ -536,12 +539,12 @@ void mesh_foreachScreenEdge_clip_bb_segment(ViewContext *vc, /** \name Edit-Mesh: For Each Screen Face Center * \{ */ -static void mesh_foreachScreenFace__mapFunc(void *userData, +static void mesh_foreachScreenFaceCenter__mapFunc(void *userData, int index, const float cent[3], const float /*no*/[3]) { - foreachScreenFace_userData *data = static_cast(userData); + foreachScreenFaceCenter_userData *data = static_cast(userData); BMFace *efa = BM_face_at_index(data->vc.em->bm, index); if (UNLIKELY(BM_elem_flag_test(efa, BM_ELEM_HIDDEN))) { return; @@ -556,14 +559,14 @@ static void mesh_foreachScreenFace__mapFunc(void *userData, data->func(data->userData, efa, screen_co, index); } -void mesh_foreachScreenFace( +void mesh_foreachScreenFaceCenter( ViewContext *vc, void (*func)(void *userData, BMFace *efa, const float screen_co_b[2], int index), void *userData, const eV3DProjTest clip_flag) { BLI_assert((clip_flag & V3D_PROJ_TEST_CLIP_CONTENT) == 0); - foreachScreenFace_userData data; + foreachScreenFaceCenter_userData data; Mesh *me = editbmesh_get_eval_cage_from_orig( vc->depsgraph, vc->scene, vc->obedit, &CD_MASK_BAREMESH); @@ -580,16 +583,150 @@ void mesh_foreachScreenFace( const int face_dot_tags_num = me->runtime->subsurf_face_dot_tags.size(); if (face_dot_tags_num && (face_dot_tags_num != me->totvert)) { BKE_mesh_foreach_mapped_subdiv_face_center( - me, mesh_foreachScreenFace__mapFunc, &data, MESH_FOREACH_NOP); + me, mesh_foreachScreenFaceCenter__mapFunc, &data, MESH_FOREACH_NOP); } else { BKE_mesh_foreach_mapped_face_center( - me, mesh_foreachScreenFace__mapFunc, &data, MESH_FOREACH_NOP); + me, mesh_foreachScreenFaceCenter__mapFunc, &data, MESH_FOREACH_NOP); } } /** \} */ +/* -------------------------------------------------------------------- */ +/** \name Edit-Mesh: For Each Screen Face Verts + * \{ */ + +void mesh_foreachScreenFaceVerts(ViewContext *vc, + void (*func)(void *userData, + struct BMFace *efa, + const float screen_co[][2], + int total_count, + rctf *screen_rect, + bool *face_hit), + void *userData, + const eV3DProjTest clip_flag) +{ + ED_view3d_check_mats_rv3d(vc->rv3d); + BM_mesh_elem_table_ensure(vc->em->bm, BM_FACE); + + BMFace *efa; + const BMesh *bm = vc->em->bm; + + float temp_screen_co[2]; + int total_length = 0; + + float(*screen_coords)[2] = static_cast( + MEM_mallocN(sizeof(float) * 2 * bm->totvert, __func__)); + int face_screen_verts_size = 4; + float(*face_screen_verts)[2] = static_cast( + MEM_mallocN(sizeof(int) * 2 * face_screen_verts_size, __func__)); + + /* This makes only sense on subdivided meshes.*/ + BLI_bitmap *faces_visited; + int cage_index = BKE_modifiers_get_cage_index(vc->scene, vc->obedit, NULL, 1); + const bool cage_display = cage_index != -1; + if (cage_display) { + faces_visited = BLI_BITMAP_NEW((size_t)bm->totface, __func__); + } + + /* Transform and store all visible verts into screen coords. */ + for (int i = 0; i < bm->totvert; i++) { + BMVert *bmvert = BM_vert_at_index(vc->em->bm, i); + + if (BM_elem_flag_test_bool(bmvert, BM_ELEM_HIDDEN)) { + continue; + } + + if (ED_view3d_project_float_object(vc->region, bmvert->co, temp_screen_co, clip_flag) == + V3D_PROJ_RET_OK) { + screen_coords[i][0] = temp_screen_co[0]; + screen_coords[i][1] = temp_screen_co[1]; + } + else { + screen_coords[i][0] = 0.0f; + screen_coords[i][1] = 0.0f; + } + } + + const int *poly_index = static_cast(CustomData_get_layer(&bm->pdata, CD_ORIGINDEX)); + const bool use_original_index = poly_index != 0; + + rctf poly_rect_data; + rctf *poly_rect = &poly_rect_data; + bool face_hit = false; + + /* Collect polygon verts and send off per poly callback. */ + for (int i = 0; i < bm->totface; i++) { + int original_index = i; + if (use_original_index) { + original_index = *poly_index++; + if (original_index == ORIGINDEX_NONE) { + continue; + } + } + + if (cage_display && BLI_BITMAP_TEST(faces_visited, original_index)) { + continue; + } + + efa = BM_face_at_index(vc->em->bm, original_index); + if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) { + + if (bm->totvert > face_screen_verts_size) { + face_screen_verts_size = bm->totvert; + MEM_freeN(face_screen_verts); + face_screen_verts = static_cast( + MEM_mallocN(sizeof(float) * 2 * face_screen_verts_size, __func__)); + } + + total_length = 0; + BLI_rctf_init_minmax(poly_rect); + + bool skip = false; + + BMLoop *l_first, *l_iter; + int j = 0; + l_iter = l_first = BM_FACE_FIRST_LOOP(efa); + do { + const int k = BM_elem_index_get(l_iter->v); + face_screen_verts[j][0] = screen_coords[k][0]; + face_screen_verts[j][1] = screen_coords[k][1]; + + /* Ignore polygons with invalid screen coords.*/ + if (face_screen_verts[j][0] == 0.0f && face_screen_verts[j][1] == 0.0f) { + skip = true; + break; + } + + total_length++, j++; + BLI_rctf_do_minmax_v(poly_rect, screen_coords[k]); + } while ((l_iter = l_iter->next) != l_first); + + if (skip) { + continue; + } + + face_hit = false; + + func( + userData, efa, (const float(*)[2])face_screen_verts, total_length, poly_rect, &face_hit); + + if (cage_display && face_hit) { + BLI_BITMAP_ENABLE(faces_visited, original_index); + } + } + } + + if (cage_display) { + MEM_freeN(faces_visited); + } + MEM_freeN(screen_coords); + MEM_freeN(face_screen_verts); +} + +/** \} */ + /* -------------------------------------------------------------------- */ /** \name Edit-Nurbs: For Each Screen Vertex * \{ */ diff --git a/source/blender/editors/space_view3d/view3d_navigate.c b/source/blender/editors/space_view3d/view3d_navigate.c index d47f7325cc5..54ffc020477 100644 --- a/source/blender/editors/space_view3d/view3d_navigate.c +++ b/source/blender/editors/space_view3d/view3d_navigate.c @@ -99,6 +99,26 @@ void view3d_operator_properties_common(wmOperatorType *ot, const enum eV3D_OpPro if (flag & V3D_OP_PROP_USE_MOUSE_INIT) { WM_operator_properties_use_cursor_init(ot); } + + if (flag & V3D_OP_PROP_FRAME_SELECTED_DISTANCE) { + PropertyRNA *prop; + prop = RNA_def_int(ot->srna, + "frame_selected_distance", + 0, + 0, + 1000, + "Camera Offset", + "Distance to put camera from selected", + 0, + 1000); + + } + + if (flag & V3D_OP_PROP_ZOOM_SPEED) { + PropertyRNA *prop; + prop = RNA_def_float( + ot->srna, "zoom_speed", 1.2f, 1.001, 10, "Zoom Speed", "Speed to zoom camera", 1.001f, 10); + } } /** \} */ @@ -665,7 +685,8 @@ static void view3d_from_minmax(bContext *C, const float min[3], const float max[3], bool ok_dist, - const int smooth_viewtx) + const int smooth_viewtx, + const int view_dist) { RegionView3D *rv3d = region->regiondata; float afm[3]; @@ -708,7 +729,7 @@ static void view3d_from_minmax(bContext *C, v3d, region, depsgraph, persp, true, (size / 2) * VIEW3D_MARGIN); if (rv3d->is_persp) { /* don't zoom closer than the near clipping plane */ - new_dist = max_ff(new_dist, v3d->clip_start * 1.5f); + new_dist = max_ff(new_dist, v3d->clip_start * 1.5f + view_dist); } } } @@ -754,7 +775,8 @@ static void view3d_from_minmax_multi(bContext *C, const float min[3], const float max[3], const bool ok_dist, - const int smooth_viewtx) + const int smooth_viewtx, + const int view_dist) { ScrArea *area = CTX_wm_area(C); ARegion *region; @@ -764,7 +786,7 @@ static void view3d_from_minmax_multi(bContext *C, /* when using all regions, don't jump out of camera view, * but _do_ allow locked cameras to be moved */ if ((rv3d->persp != RV3D_CAMOB) || ED_view3d_camera_lock_check(v3d, rv3d)) { - view3d_from_minmax(C, v3d, region, min, max, ok_dist, smooth_viewtx); + view3d_from_minmax(C, v3d, region, min, max, ok_dist, smooth_viewtx, view_dist); } } } @@ -844,10 +866,10 @@ static int view3d_all_exec(bContext *C, wmOperator *op) ED_view3d_smooth_view_undo_begin(C, area); if (use_all_regions) { - view3d_from_minmax_multi(C, v3d, min, max, true, smooth_viewtx); + view3d_from_minmax_multi(C, v3d, min, max, true, smooth_viewtx, 0); } else { - view3d_from_minmax(C, v3d, region, min, max, true, smooth_viewtx); + view3d_from_minmax(C, v3d, region, min, max, true, smooth_viewtx, 0); } ED_view3d_smooth_view_undo_end(C, area, op->type->name, false); @@ -906,6 +928,7 @@ static int viewselected_exec(bContext *C, wmOperator *op) /* any one of the regions may be locked */ (use_all_regions && v3d->flag2 & V3D_LOCK_CAMERA)); const int smooth_viewtx = WM_operator_smooth_viewtx_get(op); + const int view_dist = RNA_int_get(op->ptr, "frame_selected_distance"); INIT_MINMAX(min, max); if (is_face_map) { @@ -1020,10 +1043,10 @@ static int viewselected_exec(bContext *C, wmOperator *op) ED_view3d_smooth_view_undo_begin(C, area); if (use_all_regions) { - view3d_from_minmax_multi(C, v3d, min, max, ok_dist, smooth_viewtx); + view3d_from_minmax_multi(C, v3d, min, max, ok_dist, smooth_viewtx, view_dist); } else { - view3d_from_minmax(C, v3d, region, min, max, ok_dist, smooth_viewtx); + view3d_from_minmax(C, v3d, region, min, max, ok_dist, smooth_viewtx, view_dist); } ED_view3d_smooth_view_undo_end(C, area, op->type->name, false); @@ -1046,7 +1069,8 @@ void VIEW3D_OT_view_selected(wmOperatorType *ot) ot->flag = 0; /* properties */ - view3d_operator_properties_common(ot, V3D_OP_PROP_USE_ALL_REGIONS); + view3d_operator_properties_common( + ot, V3D_OP_PROP_USE_ALL_REGIONS | V3D_OP_PROP_FRAME_SELECTED_DISTANCE); } /** \} */ @@ -1205,7 +1229,7 @@ static int view_axis_exec(bContext *C, wmOperator *op) Object *obedit = CTX_data_edit_object(C); /* same as transform gizmo when normal is set */ ED_getTransformOrientationMatrix( - scene, view_layer, v3d, obact, obedit, V3D_AROUND_ACTIVE, twmat); + scene, view_layer, v3d, obact, obedit, V3D_AROUND_ACTIVE, twmat, NULL, NULL, NULL); align_quat = align_quat_buf; mat3_to_quat(align_quat, twmat); invert_qt_normalized(align_quat); diff --git a/source/blender/editors/space_view3d/view3d_navigate.h b/source/blender/editors/space_view3d/view3d_navigate.h index 46dacbc606f..a641a3748fa 100644 --- a/source/blender/editors/space_view3d/view3d_navigate.h +++ b/source/blender/editors/space_view3d/view3d_navigate.h @@ -34,6 +34,8 @@ enum eV3D_OpPropFlag { V3D_OP_PROP_DELTA = (1 << 1), V3D_OP_PROP_USE_ALL_REGIONS = (1 << 2), V3D_OP_PROP_USE_MOUSE_INIT = (1 << 3), + V3D_OP_PROP_FRAME_SELECTED_DISTANCE = (1 << 4), + V3D_OP_PROP_ZOOM_SPEED = (1 << 5), }; enum { diff --git a/source/blender/editors/space_view3d/view3d_navigate_zoom.c b/source/blender/editors/space_view3d/view3d_navigate_zoom.c index 51aab367959..a5f8341dd27 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_zoom.c +++ b/source/blender/editors/space_view3d/view3d_navigate_zoom.c @@ -506,9 +506,10 @@ static int viewzoom_exec(bContext *C, wmOperator *op) } ED_view3d_dist_range_get(v3d, dist_range); + const float zoom_speed = RNA_float_get(op->ptr, "zoom_speed"); if (delta < 0) { - const float step = 1.2f; + const float step = zoom_speed; if (use_cam_zoom) { view_zoom_to_window_xy_camera(scene, depsgraph, v3d, region, step, zoom_xy); } @@ -519,7 +520,7 @@ static int viewzoom_exec(bContext *C, wmOperator *op) } } else { - const float step = 1.0f / 1.2f; + const float step = 1.0f / zoom_speed; if (use_cam_zoom) { view_zoom_to_window_xy_camera(scene, depsgraph, v3d, region, step, zoom_xy); } @@ -631,8 +632,9 @@ void VIEW3D_OT_zoom(wmOperatorType *ot) ot->flag = OPTYPE_BLOCKING | OPTYPE_GRAB_CURSOR_XY; /* properties */ - view3d_operator_properties_common( - ot, V3D_OP_PROP_DELTA | V3D_OP_PROP_MOUSE_CO | V3D_OP_PROP_USE_MOUSE_INIT); + view3d_operator_properties_common(ot, + V3D_OP_PROP_DELTA | V3D_OP_PROP_MOUSE_CO | + V3D_OP_PROP_USE_MOUSE_INIT | V3D_OP_PROP_ZOOM_SPEED); } /** \} */ diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c index ad12aef6d67..c8fdbd8f044 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -200,6 +200,8 @@ void view3d_operatortypes(void) WM_operatortype_append(VIEW3D_OT_toggle_shading); WM_operatortype_append(VIEW3D_OT_toggle_xray); WM_operatortype_append(VIEW3D_OT_toggle_matcap_flip); + WM_operatortype_append(VIEW3D_OT_toggle_auto_xray); + WM_operatortype_append(VIEW3D_OT_toggle_select_through); WM_operatortype_append(VIEW3D_OT_ruler_add); WM_operatortype_append(VIEW3D_OT_ruler_remove); diff --git a/source/blender/editors/space_view3d/view3d_select.cc b/source/blender/editors/space_view3d/view3d_select.cc index 51c6517c1d1..568d6bbe18a 100644 --- a/source/blender/editors/space_view3d/view3d_select.cc +++ b/source/blender/editors/space_view3d/view3d_select.cc @@ -81,6 +81,7 @@ #include "ED_screen.h" #include "ED_sculpt.h" #include "ED_select_utils.h" +#include "ED_transform.h" #include "UI_interface.h" #include "UI_resources.h" @@ -104,7 +105,12 @@ float ED_view3d_select_dist_px(void) { - return 75.0f * U.pixelsize; + if (U.flag & USER_ADJUSTABLE_CLICK_SELECT) { + return U.selection_radius * U.pixelsize; + } + else { + return 75.0f * U.pixelsize; + } } void ED_view3d_viewcontext_init(bContext *C, ViewContext *vc, Depsgraph *depsgraph) @@ -240,15 +246,406 @@ static void editselect_buf_cache_init_with_generic_userdata(wmGenericUserData *w /** \name Internal Edit-Mesh Utilities * \{ */ -static bool edbm_backbuf_check_and_select_verts(EditSelectBuf_Cache *esel, +struct BoxSelectUserData { + ViewContext *vc; + const rcti *rect; + const rctf *rect_fl; + rctf _rect_fl; + eSelectOp sel_op; + eBezTriple_Flag select_flag; + int edge_style; + int face_style; + bool check_mesh_direction; + + /* runtime */ + bool is_done; + bool is_changed; +}; + +struct LassoSelectUserData { + ViewContext *vc; + const rcti *rect; + const rctf *rect_fl; + rctf _rect_fl; + const int (*mcoords)[2]; + int mcoords_len; + eSelectOp sel_op; + eBezTriple_Flag select_flag; + int edge_style; + int face_style; + bool check_mesh_direction; + + /* runtime */ + int pass; + bool is_done; + bool is_changed; +}; + +struct CircleSelectUserData { + ViewContext *vc; + bool select; + int mval[2]; + float mval_fl[2]; + float radius; + float radius_squared; + eBezTriple_Flag select_flag; + int edge_style; + int face_style; + bool check_mesh_direction; + + /* runtime */ + bool is_changed; +}; + +bool edbm_normal_facing_viewport(ViewContext *vc, + struct BMVert *eve, + struct BMEdge *eed, + struct BMFace *efa, + bool use_direction) +{ + ToolSettings *ts = vc->scene->toolsettings; + float meshmat[3][3]; + bool backface = false; + int direction = 0; + if (eve != NULL) { + ED_getTransformOrientationMatrix(vc->scene, + vc->view_layer, + vc->v3d, + vc->obact, + vc->obedit, + V3D_AROUND_ACTIVE, + meshmat, + eve, + NULL, + NULL); + direction = ts->viewport_facing_select_vert; + if (use_direction && (direction == 4 || direction == 8)) { + backface = true; + } + } + else if (eed != NULL) { + ED_getTransformOrientationMatrix(vc->scene, + vc->view_layer, + vc->v3d, + vc->obact, + vc->obedit, + V3D_AROUND_ACTIVE, + meshmat, + NULL, + eed, + NULL); + direction = ts->viewport_facing_select_edge; + if (use_direction && (direction == 4 || direction == 8)) { + backface = true; + } + } + else if (efa != NULL) { + ED_getTransformOrientationMatrix(vc->scene, + vc->view_layer, + vc->v3d, + vc->obact, + vc->obedit, + V3D_AROUND_ACTIVE, + meshmat, + NULL, + NULL, + efa); + direction = ts->viewport_facing_select_face; + if (use_direction && (direction == 4 || direction == 8)) { + backface = true; + } + } + normalize_m3(meshmat); + invert_m3(meshmat); + float meshcol3[3] = {0, 0, 0}; + meshcol3[0] = meshmat[0][2]; + meshcol3[1] = meshmat[1][2]; + meshcol3[2] = meshmat[2][2]; + float viewcol3[3] = {0, 0, 0}; + viewcol3[0] = vc->rv3d->viewmat[0][2]; + viewcol3[1] = vc->rv3d->viewmat[1][2]; + viewcol3[2] = vc->rv3d->viewmat[2][2]; + bool mesh_facing; + if (backface) { + mesh_facing = dot_v3v3(meshcol3, viewcol3) < -ts->viewport_facing_select_threshold; + } + else { + mesh_facing = dot_v3v3(meshcol3, viewcol3) > ts->viewport_facing_select_threshold; + } + return mesh_facing; +} + +bool edbm_facing_viewport_precheck(ToolSettings *ts, int style, bool xray) +{ + if (!ts->viewport_facing_select) { + return false; + } + const bool mode_match = xray ? ts->viewport_facing_select_mode == 1 || + ts->viewport_facing_select_mode == 4 : + ts->viewport_facing_select_mode < 4; + const bool check_mesh_facing = mode_match && style > 0 && style < 16; + return check_mesh_facing; +} + +bool edbm_facing_viewport(ViewContext *vc, BMVert *eve, BMEdge *eed, BMFace *efa, int style) +{ + BMIter iter; + bool mesh_facing = false; + if (eve != NULL) { + /* viewport-facing or rear-facing vert */ + mesh_facing = edbm_normal_facing_viewport(vc, eve, NULL, NULL, true); + if (!mesh_facing && eve->e && eve->e->l && (style == 2 || style == 8)) { + BM_ITER_ELEM (efa, &iter, eve, BM_FACES_OF_VERT) { + const bool eve_efa_facing = edbm_normal_facing_viewport(vc, NULL, NULL, efa, false); + /* vert of a viewport-facing face */ + if (style == 2) { + if (eve_efa_facing) { + mesh_facing = true; + break; + } + } + /* vert of a rear-facing face */ + else if (!eve_efa_facing) { + mesh_facing = true; + break; + } + } + } + } + else if (eed != NULL) { + /* viewport-facing or rear-facing edge */ + mesh_facing = edbm_normal_facing_viewport(vc, NULL, eed, NULL, true); + if (!mesh_facing && eed->l && (style == 2 || style == 8)) { + BM_ITER_ELEM (efa, &iter, eed, BM_FACES_OF_EDGE) { + const bool eed_efa_facing = edbm_normal_facing_viewport(vc, NULL, NULL, efa, false); + /* edge of a viewport-facing face */ + if (style == 2) { + if (eed_efa_facing) { + mesh_facing = true; + break; + } + } + /* edge of a rear-facing face */ + else if (!eed_efa_facing) { + mesh_facing = true; + break; + } + } + } + } + else if (efa != NULL) { + /* viewport-facing or rear-facing face */ + mesh_facing = edbm_normal_facing_viewport(vc, NULL, NULL, efa, true); + if (!mesh_facing && (style == 2 || style == 8)) { + BM_ITER_ELEM (eve, &iter, efa, BM_VERTS_OF_FACE) { + const bool efa_eve_facing = edbm_normal_facing_viewport(vc, eve, NULL, NULL, false); + /* face has a viewport-facing vert */ + if (style == 2) { + if (efa_eve_facing) { + mesh_facing = true; + break; + } + } + /* face has a rear-facing vert */ + else if (!efa_eve_facing) { + mesh_facing = true; + break; + } + } + } + } + return mesh_facing; +} + +int edbm_select_style(ToolSettings *ts, int style[2], const bool box, const bool lasso, wmOperator *op) +{ + if (U.drag_select_control & USER_DRAG_SELECT_KEYMAP) { + style[0] = RNA_enum_get(op->ptr, "edge_type"); + style[1] = RNA_enum_get(op->ptr, "face_type"); + } + else { + if (box) { + if (ts->box_drag_direction > 1) { + if (ts->box_drag_direction == 2) { + if (ts->box_direction_upright) { + style[0] = ts->box_edge_right; + style[1] = ts->box_face_right; + } + else { + style[0] = ts->box_edge_left; + style[1] = ts->box_face_left; + } + } + else if (ts->box_direction_upright) { + style[0] = ts->box_edge_up; + style[1] = ts->box_face_up; + } + else { + style[0] = ts->box_edge_down; + style[1] = ts->box_face_down; + } + } + else { + style[0] = ts->box_edge; + style[1] = ts->box_face; + } + } + else if (lasso) { + if (ts->lasso_drag_direction > 1) { + if (ts->lasso_drag_direction == 2) { + if (ts->lasso_direction_upright) { + style[0] = ts->lasso_edge_right; + style[1] = ts->lasso_face_right; + } + else { + style[0] = ts->lasso_edge_left; + style[1] = ts->lasso_face_left; + } + } + else if (ts->lasso_direction_upright) { + style[0] = ts->lasso_edge_up; + style[1] = ts->lasso_face_up; + } + else { + style[0] = ts->lasso_edge_down; + style[1] = ts->lasso_face_down; + } + } + else { + style[0] = ts->lasso_edge; + style[1] = ts->lasso_face; + } + } + else { + style[0] = ts->circle_edge; + style[1] = ts->circle_face; + } + } + return style[2]; +} + +bool edbm_circle_enclose_mesh(BMEdge *eed, BMFace *efa, struct CircleSelectUserData *data) +{ + BMVert *eve; + BMIter iter; + bool enclose = false; + + if (eed != NULL) { + BM_ITER_ELEM (eve, &iter, eed, BM_VERTS_OF_EDGE) { + float vertv3[3] = {eve->co[0], eve->co[1], eve->co[2]}; + float vertv2[2] = {0.0f, 0.0f}; + ED_view3d_project_float_object( + data->vc->region, vertv3, vertv2, V3D_PROJ_TEST_CLIP_NEAR | V3D_PROJ_TEST_CLIP_BB); + enclose = len_squared_v2v2(data->mval_fl, vertv2) <= data->radius_squared; + if (!enclose) { + break; + } + } + } + else if (efa != NULL) { + BM_ITER_ELEM (eve, &iter, efa, BM_VERTS_OF_FACE) { + float vertv3[3] = {eve->co[0], eve->co[1], eve->co[2]}; + float vertv2[2] = {0.0f, 0.0f}; + ED_view3d_project_float_object( + data->vc->region, vertv3, vertv2, V3D_PROJ_TEST_CLIP_NEAR | V3D_PROJ_TEST_CLIP_BB); + enclose = len_squared_v2v2(data->mval_fl, vertv2) <= data->radius_squared; + if (!enclose) { + break; + } + } + } + return enclose; +} + +bool edbm_center_face(ViewContext *vc, + BMFace *efa, + const rctf *rect, + struct LassoSelectUserData *lassoData, + struct CircleSelectUserData *circleData) +{ + BMVert *eve; + BMIter iter; + float centerv3[3] = {0.0f, 0.0f, 0.0f}; + float centerv2[2] = {0.0f, 0.0f}; + bool center_face = false; + + /* tri */ + if (efa->len == 3) { + float tri_vco[3][3] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + int tri_index = 0; + BM_ITER_ELEM (eve, &iter, efa, BM_VERTS_OF_FACE) { + tri_vco[tri_index][0] = eve->co[0]; + tri_vco[tri_index][1] = eve->co[1]; + tri_vco[tri_index][2] = eve->co[2]; + tri_index++; + } + float triv1[3] = {tri_vco[0][0], tri_vco[0][1], tri_vco[0][2]}; + float triv2[3] = {tri_vco[1][0], tri_vco[1][1], tri_vco[1][2]}; + float triv3[3] = {tri_vco[2][0], tri_vco[2][1], tri_vco[2][2]}; + mid_v3_v3v3v3(centerv3, triv1, triv2, triv3); + } + /* quad */ + else if (efa->len == 4) { + float quad_vco[4][3] = { + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + int quad_index = 0; + BM_ITER_ELEM (eve, &iter, efa, BM_VERTS_OF_FACE) { + quad_vco[quad_index][0] = eve->co[0]; + quad_vco[quad_index][1] = eve->co[1]; + quad_vco[quad_index][2] = eve->co[2]; + quad_index++; + } + float quadv1[3] = {quad_vco[0][0], quad_vco[0][1], quad_vco[0][2]}; + float quadv2[3] = {quad_vco[1][0], quad_vco[1][1], quad_vco[1][2]}; + float quadv3[3] = {quad_vco[2][0], quad_vco[2][1], quad_vco[2][2]}; + float quadv4[3] = {quad_vco[3][0], quad_vco[3][1], quad_vco[3][2]}; + mid_v3_v3v3v3v3(centerv3, quadv1, quadv2, quadv3, quadv4); + } + /* ngon */ + else { + const float w = 1.0f / (float)efa->len; + BM_ITER_ELEM (eve, &iter, efa, BM_VERTS_OF_FACE) { + madd_v3_v3fl(centerv3, eve->co, w); + } + } + ED_view3d_project_float_object( + vc->region, centerv3, centerv2, V3D_PROJ_TEST_CLIP_NEAR | V3D_PROJ_TEST_CLIP_BB); + + /* lasso center */ + if (lassoData != NULL) { + center_face = BLI_rctf_isect_pt_v(rect, centerv2) && + BLI_lasso_is_point_inside(lassoData->mcoords, + lassoData->mcoords_len, + centerv2[0], + centerv2[1], + IS_CLIPPED); + } + /* circle center */ + else if (circleData != NULL) { + center_face = (len_squared_v2v2(circleData->mval_fl, centerv2) <= circleData->radius_squared); + } + /* box center */ + else { + center_face = BLI_rctf_isect_pt_v(rect, centerv2); + } + return center_face; +} + + + +static bool edbm_backbuf_check_and_select_verts(ViewContext *vc, + EditSelectBuf_Cache *esel, Depsgraph *depsgraph, Object *ob, BMEditMesh *em, const eSelectOp sel_op) { + ToolSettings *ts = vc->scene->toolsettings; BMVert *eve; BMIter iter; bool changed = false; + const int style = ts->viewport_facing_select_vert; + const bool check_mesh_facing = edbm_facing_viewport_precheck(ts, style, false); const BLI_bitmap *select_bitmap = esel->select_bitmap; uint index = DRW_select_buffer_context_offset_for_object_elem(depsgraph, ob, SCE_SELECT_VERTEX); @@ -261,7 +658,12 @@ static bool edbm_backbuf_check_and_select_verts(EditSelectBuf_Cache *esel, if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) { const bool is_select = BM_elem_flag_test(eve, BM_ELEM_SELECT); const bool is_inside = BLI_BITMAP_TEST_BOOL(select_bitmap, index); - const int sel_op_result = ED_select_op_action_deselected(sel_op, is_select, is_inside); + bool mesh_facing = true; + if (is_inside && check_mesh_facing) { + mesh_facing = edbm_facing_viewport(vc, eve, NULL, NULL, style); + } + const int sel_op_result = ED_select_op_action_deselected( + sel_op, is_select, is_inside && mesh_facing); if (sel_op_result != -1) { BM_vert_select_set(em->bm, eve, sel_op_result); changed = true; @@ -272,15 +674,20 @@ static bool edbm_backbuf_check_and_select_verts(EditSelectBuf_Cache *esel, return changed; } -static bool edbm_backbuf_check_and_select_edges(EditSelectBuf_Cache *esel, +static bool edbm_backbuf_check_and_select_edges(void *userData, + EditSelectBuf_Cache *esel, Depsgraph *depsgraph, Object *ob, BMEditMesh *em, const eSelectOp sel_op) { + CircleSelectUserData *data = static_cast(userData); + ToolSettings *ts = data->vc->scene->toolsettings; BMEdge *eed; BMIter iter; bool changed = false; + const int style = ts->viewport_facing_select_edge; + const bool check_mesh_facing = edbm_facing_viewport_precheck(ts, style, false); const BLI_bitmap *select_bitmap = esel->select_bitmap; uint index = DRW_select_buffer_context_offset_for_object_elem(depsgraph, ob, SCE_SELECT_EDGE); @@ -293,7 +700,19 @@ static bool edbm_backbuf_check_and_select_edges(EditSelectBuf_Cache *esel, if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) { const bool is_select = BM_elem_flag_test(eed, BM_ELEM_SELECT); const bool is_inside = BLI_BITMAP_TEST_BOOL(select_bitmap, index); - const int sel_op_result = ED_select_op_action_deselected(sel_op, is_select, is_inside); + bool enclose_edge = true; + bool mesh_facing = true; + + if (data->edge_style == 4 && is_inside) { + enclose_edge = edbm_circle_enclose_mesh(eed, NULL, data); + } + + if (check_mesh_facing && is_inside) { + mesh_facing = edbm_facing_viewport(data->vc, NULL, eed, NULL, style); + } + + const int sel_op_result = ED_select_op_action_deselected( + sel_op, is_select, is_inside && enclose_edge && mesh_facing); if (sel_op_result != -1) { BM_edge_select_set(em->bm, eed, sel_op_result); changed = true; @@ -304,28 +723,74 @@ static bool edbm_backbuf_check_and_select_edges(EditSelectBuf_Cache *esel, return changed; } -static bool edbm_backbuf_check_and_select_faces(EditSelectBuf_Cache *esel, +static bool edbm_backbuf_check_and_select_faces(ViewContext *vc, + EditSelectBuf_Cache *esel, Depsgraph *depsgraph, Object *ob, BMEditMesh *em, - const eSelectOp sel_op) + const eSelectOp sel_op, + const rcti *rect, + const int face_style, + void *ldata, + void *cdata) { + ToolSettings *ts = vc->scene->toolsettings; + BMIter iter, viter; BMFace *efa; - BMIter iter; + BMVert *eve; + rctf rectf; bool changed = false; - + const int style = ts->viewport_facing_select_face; + const bool check_mesh_facing = edbm_facing_viewport_precheck(ts, style, false); const BLI_bitmap *select_bitmap = esel->select_bitmap; + LassoSelectUserData *lassoData = static_cast(ldata); + CircleSelectUserData *circleData = static_cast(cdata); uint index = DRW_select_buffer_context_offset_for_object_elem(depsgraph, ob, SCE_SELECT_FACE); - if (index == 0) { + uint vindex = DRW_select_buffer_context_offset_for_object_elem(depsgraph, ob, SCE_SELECT_VERTEX); + + if (rect != NULL) { + BLI_rctf_rcti_copy(&rectf, rect); + } + + if (index == 0 || vindex == 0) { return false; } index -= 1; + vindex -= 1; BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) { if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) { const bool is_select = BM_elem_flag_test(efa, BM_ELEM_SELECT); const bool is_inside = BLI_BITMAP_TEST_BOOL(select_bitmap, index); - const int sel_op_result = ED_select_op_action_deselected(sel_op, is_select, is_inside); + bool enclose_face = true; + bool center_face = true; + bool mesh_facing = true; + + if (face_style > 2 && is_inside) { + if (face_style == 4) { + if (circleData != NULL) { + enclose_face = edbm_circle_enclose_mesh(NULL, efa, circleData); + } + else { + BM_ITER_ELEM (eve, &viter, efa, BM_VERTS_OF_FACE) { + enclose_face = BLI_BITMAP_TEST_BOOL(select_bitmap, vindex + BM_elem_index_get(eve)); + if (!enclose_face) { + break; + } + } + } + } + else { + center_face = edbm_center_face(vc, efa, &rectf, lassoData, circleData); + } + } + + if (check_mesh_facing && is_inside) { + mesh_facing = edbm_facing_viewport(vc, NULL, NULL, efa, style); + } + + const int sel_op_result = ED_select_op_action_deselected( + sel_op, is_select, is_inside && enclose_face && center_face && mesh_facing); if (sel_op_result != -1) { BM_face_select_set(em->bm, efa, sel_op_result); changed = true; @@ -404,28 +869,14 @@ static bool edbm_backbuf_check_and_select_faces_obmode(Mesh *me, /** \name Lasso Select * \{ */ -struct LassoSelectUserData { - ViewContext *vc; - const rcti *rect; - const rctf *rect_fl; - rctf _rect_fl; - const int (*mcoords)[2]; - int mcoords_len; - eSelectOp sel_op; - eBezTriple_Flag select_flag; - - /* runtime */ - int pass; - bool is_done; - bool is_changed; -}; - static void view3d_userdata_lassoselect_init(LassoSelectUserData *r_data, ViewContext *vc, const rcti *rect, const int (*mcoords)[2], const int mcoords_len, - const eSelectOp sel_op) + const eSelectOp sel_op, + const int edge_style, + const int face_style) { r_data->vc = vc; @@ -438,6 +889,9 @@ static void view3d_userdata_lassoselect_init(LassoSelectUserData *r_data, r_data->sel_op = sel_op; /* SELECT by default, but can be changed if needed (only few cases use and respect this). */ r_data->select_flag = (eBezTriple_Flag)SELECT; + r_data->edge_style = edge_style; + r_data->face_style = face_style; + r_data->check_mesh_direction = false; /* runtime */ r_data->pass = 0; @@ -527,8 +981,12 @@ static void do_lasso_select_pose__do_tag(void *userData, } if (BLI_rctf_isect_segment(data->rect_fl, screen_co_a, screen_co_b) && - BLI_lasso_is_edge_inside( - data->mcoords, data->mcoords_len, UNPACK2(screen_co_a), UNPACK2(screen_co_b), INT_MAX)) { + BLI_lasso_is_edge_inside(data->mcoords, + data->mcoords_len, + UNPACK2(screen_co_a), + UNPACK2(screen_co_b), + INT_MAX, + false)) { pchan->bone->flag |= BONE_DONE; data->is_changed = true; } @@ -552,7 +1010,7 @@ static void do_lasso_tag_pose(ViewContext *vc, BLI_lasso_boundbox(&rect, mcoords, mcoords_len); view3d_userdata_lassoselect_init( - &data, vc, &rect, mcoords, mcoords_len, static_cast(0)); + &data, vc, &rect, mcoords, mcoords_len, static_cast(0), 0, 0); ED_view3d_init_mats_rv3d(vc_tmp.obact, vc->rv3d); @@ -563,42 +1021,227 @@ static void do_lasso_tag_pose(ViewContext *vc, V3D_PROJ_TEST_CLIP_DEFAULT | V3D_PROJ_TEST_CLIP_CONTENT_DEFAULT); } +/** + * Compare result of 'GPU_select': 'GPUSelectResult', + * Needed for stable sorting, so cycling through all items near the cursor behaves predictably. + */ +static int gpu_select_buffer_depth_id_cmp(const void *sel_a_p, const void *sel_b_p) +{ + GPUSelectResult *a = (GPUSelectResult *)sel_a_p; + GPUSelectResult *b = (GPUSelectResult *)sel_b_p; + + if (a->depth < b->depth) { + return -1; + } + if (a->depth > b->depth) { + return 1; + } + + /* Depths match, sort by id. */ + uint sel_a = a->id; + uint sel_b = b->id; + +#ifdef __BIG_ENDIAN__ + BLI_endian_switch_uint32(&sel_a); + BLI_endian_switch_uint32(&sel_b); +#endif + + if (sel_a < sel_b) { + return -1; + } + if (sel_a > sel_b) { + return 1; + } + return 0; +} + static bool do_lasso_select_objects(ViewContext *vc, const int mcoords[][2], const int mcoords_len, - const eSelectOp sel_op) + const eSelectOp sel_op, + wmOperator *op, + int circle_data[3]) { View3D *v3d = vc->v3d; + int totobj = MAXPICKELEMS; /* XXX solve later */ + /* Selection buffer has bones potentially too, so we add #MAXPICKELEMS. */ + GPUSelectResult *buffer = static_cast( + MEM_mallocN((totobj + MAXPICKELEMS) * sizeof(GPUSelectResult), __func__)); + ToolSettings *ts = vc->scene->toolsettings; - bool changed = false; - if (SEL_OP_USE_PRE_DESELECT(sel_op)) { - changed |= object_deselect_all_visible(vc->scene, vc->view_layer, vc->v3d); + const int select_through_int = RNA_enum_get(op->ptr, "select_through"); + const bool select_through = U.drag_select_control & USER_DRAG_SELECT_KEYMAP ? + select_through_int == 2 || select_through_int == 8 : + circle_data == NULL ? + ts->select_through && ts->select_through_object && + ts->select_through_lasso : + ts->select_through && ts->select_through_object && + ts->select_through_circle; + float region_co[2]; + float mval_fl[2]; + if (circle_data != NULL) { + mval_fl[0] = circle_data[0]; + mval_fl[1] = circle_data[1]; } - BKE_view_layer_synced_ensure(vc->scene, vc->view_layer); - LISTBASE_FOREACH (Base *, base, BKE_view_layer_object_bases_get(vc->view_layer)) { - if (BASE_SELECTABLE(v3d, base)) { /* Use this to avoid unnecessary lasso look-ups. */ - float region_co[2]; - const bool is_select = base->flag & BASE_SELECTED; - const bool is_inside = (ED_view3d_project_base(vc->region, base, region_co) == - V3D_PROJ_RET_OK) && - BLI_lasso_is_point_inside(mcoords, - mcoords_len, - int(region_co[0]), - int(region_co[1]), - /* Dummy value. */ - INT_MAX); - const int sel_op_result = ED_select_op_action_deselected(sel_op, is_select, is_inside); - if (sel_op_result != -1) { - ED_object_base_select(base, sel_op_result ? BA_SELECT : BA_DESELECT); - changed = true; + bool changed = false; + + if (select_through && circle_data == NULL) { + if (SEL_OP_USE_PRE_DESELECT(sel_op)) { + changed |= object_deselect_all_visible(vc->scene, vc->view_layer, vc->v3d); + } + BKE_view_layer_synced_ensure(vc->scene, vc->view_layer); + LISTBASE_FOREACH (Base *, base, BKE_view_layer_object_bases_get(vc->view_layer)) { + if (BASE_SELECTABLE(v3d, base)) { /* Use this to avoid unnecessary lasso look-ups. */ + float region_co[2]; + const bool is_select = base->flag & BASE_SELECTED; + const bool is_inside = (ED_view3d_project_base(vc->region, base, region_co) == + V3D_PROJ_RET_OK) && + BLI_lasso_is_point_inside(mcoords, + mcoords_len, + int(region_co[0]), + int(region_co[1]), + /* Dummy value. */ + INT_MAX); + const int sel_op_result = ED_select_op_action_deselected(sel_op, is_select, is_inside); + if (sel_op_result != -1) { + ED_object_base_select(base, sel_op_result ? BA_SELECT : BA_DESELECT); + changed = true; + } } } + + if (changed) { + DEG_id_tag_update(&vc->scene->id, ID_RECALC_SELECT); + WM_main_add_notifier(NC_SCENE | ND_OB_SELECT, vc->scene); + } } - if (changed) { - DEG_id_tag_update(&vc->scene->id, ID_RECALC_SELECT); - WM_main_add_notifier(NC_SCENE | ND_OB_SELECT, vc->scene); + else { + int hits = 0; + rcti rect_data; + rcti *rect = &rect_data; + blender::Vector bases; + + if (circle_data != NULL) { + int point[4][2] = {}; + + for (int i = 0; i < 4; i++) { + float angle = 6.28f * (i + 1) / 4; + point[i][0] = circle_data[0] + circle_data[2] * cosf(angle); + point[i][1] = circle_data[1] + circle_data[2] * sinf(angle); + } + rect->xmin = rect->xmax = point[0][0]; + rect->ymin = rect->ymax = point[0][1]; + uint a; + for (a = 1; a < 4; a++) { + if (point[a][0] < rect->xmin) { + rect->xmin = point[a][0]; + } + else if (point[a][0] > rect->xmax) { + rect->xmax = point[a][0]; + } + if (point[a][1] < rect->ymin) { + rect->ymin = point[a][1]; + } + else if (point[a][1] > rect->ymax) { + rect->ymax = point[a][1]; + } + } + } + else { + BLI_lasso_boundbox(rect, mcoords, mcoords_len); + } + const eV3DSelectObjectFilter select_filter = ED_view3d_select_filter_from_mode(vc->scene, + vc->obact); + if (XRAY_FLAG_ENABLED(vc->v3d) || select_through) { + hits = view3d_opengl_select( + vc, buffer, (totobj + MAXPICKELEMS), rect, VIEW3D_SELECT_ALL, select_filter); + } + else { + hits = view3d_opengl_select( + vc, buffer, (totobj + MAXPICKELEMS), rect, VIEW3D_SELECT_PICK_NEAREST, select_filter); + } + BKE_view_layer_synced_ensure(vc->scene, vc->view_layer); + LISTBASE_FOREACH (Base *, base, BKE_view_layer_object_bases_get(vc->view_layer)) { + base->object->id.tag &= ~LIB_TAG_DOIT; + } + if (SEL_OP_USE_PRE_DESELECT(sel_op)) { + changed |= object_deselect_all_visible(vc->scene, vc->view_layer, vc->v3d); + } + + ListBase *object_bases = BKE_view_layer_object_bases_get(vc->view_layer); + if ((hits == -1) && !SEL_OP_USE_OUTSIDE(sel_op)) { + goto finally; + } + + LISTBASE_FOREACH (Base *, base, object_bases) { + if (BASE_SELECTABLE(v3d, base)) { + if ((base->object->runtime.select_id & 0x0000FFFF) != 0) { + bases.append(base); + } + } + } + + /* The draw order doesn't always match the order we populate the engine, see: T51695. */ + qsort(buffer, hits, sizeof(GPUSelectResult), gpu_select_buffer_depth_id_cmp); + + for (const GPUSelectResult *buf_iter = buffer, *buf_end = buf_iter + hits; buf_iter < buf_end; + buf_iter++) { + bPoseChannel *pchan_dummy; + Base *base = ED_armature_base_and_pchan_from_select_buffer( + bases.data(), bases.size(), buf_iter->id, &pchan_dummy); + if (base != nullptr) { + base->object->id.tag |= LIB_TAG_DOIT; + } + } + + for (Base *base = static_cast(object_bases->first); base && hits; base = base->next) { + if (BASE_SELECTABLE(v3d, base)) { + const bool is_select = base->flag & BASE_SELECTED; + bool is_inside = false; + + if (circle_data == NULL) { + is_inside = base->object->id.tag & LIB_TAG_DOIT && + (ED_view3d_project_base(vc->region, base, region_co) == V3D_PROJ_RET_OK) && + BLI_lasso_is_point_inside(mcoords, + mcoords_len, + int(region_co[0]), + int(region_co[1]), + /* Dummy value. */ + INT_MAX); + } + else { + is_inside = base->object->id.tag & LIB_TAG_DOIT ? + ts->select_origin_circle ? + (ED_view3d_project_float_global(vc->region, + base->object->object_to_world[3], + region_co, + V3D_PROJ_TEST_CLIP_DEFAULT) == + V3D_PROJ_RET_OK) ? + len_squared_v2v2(mval_fl, region_co) <= circle_data[2] * circle_data[2] : + false : + true : + false; + } + + const int sel_op_result = ED_select_op_action_deselected(sel_op, is_select, is_inside); + if (sel_op_result != -1) { + ED_object_base_select(base, sel_op_result ? BA_SELECT : BA_DESELECT); + changed = true; + } + } + } + + finally: + + MEM_freeN(buffer); + + if (changed) { + DEG_id_tag_update(&vc->scene->id, ID_RECALC_SELECT); + WM_event_add_notifier(vc->C, NC_SCENE | ND_OB_SELECT, vc->scene); + } } + return changed; } @@ -712,7 +1355,15 @@ static void do_lasso_select_mesh__doSelectVert(void *userData, (BLI_rctf_isect_pt_v(data->rect_fl, screen_co) && BLI_lasso_is_point_inside( data->mcoords, data->mcoords_len, screen_co[0], screen_co[1], IS_CLIPPED)); - const int sel_op_result = ED_select_op_action_deselected(data->sel_op, is_select, is_inside); + bool mesh_facing = true; + + if (is_inside && data->check_mesh_direction) { + mesh_facing = edbm_facing_viewport( + data->vc, eve, NULL, NULL, data->vc->scene->toolsettings->viewport_facing_select_vert); + } + + const int sel_op_result = ED_select_op_action_deselected( + data->sel_op, is_select, is_inside && mesh_facing); if (sel_op_result != -1) { BM_vert_select_set(data->vc->em->bm, eve, sel_op_result); data->is_changed = true; @@ -733,6 +1384,7 @@ static void do_lasso_select_mesh__doSelectEdge_pass0(void *user_data, user_data); LassoSelectUserData *data = data_for_edge->data; bool is_visible = true; + bool mesh_facing = true; if (data_for_edge->backbuf_offset) { uint bitmap_inedx = data_for_edge->backbuf_offset + index - 1; is_visible = BLI_BITMAP_TEST_BOOL(data_for_edge->esel->select_bitmap, bitmap_inedx); @@ -745,7 +1397,14 @@ static void do_lasso_select_mesh__doSelectEdge_pass0(void *user_data, data->mcoords, data->mcoords_len, UNPACK2(screen_co_a), IS_CLIPPED) && BLI_lasso_is_point_inside( data->mcoords, data->mcoords_len, UNPACK2(screen_co_b), IS_CLIPPED)); - const int sel_op_result = ED_select_op_action_deselected(data->sel_op, is_select, is_inside); + + if (is_inside && data->check_mesh_direction) { + mesh_facing = edbm_facing_viewport( + data->vc, NULL, eed, NULL, data->vc->scene->toolsettings->viewport_facing_select_edge); + } + + const int sel_op_result = ED_select_op_action_deselected( + data->sel_op, is_select, is_inside && mesh_facing); if (sel_op_result != -1) { BM_edge_select_set(data->vc->em->bm, eed, sel_op_result); data->is_done = true; @@ -762,6 +1421,7 @@ static void do_lasso_select_mesh__doSelectEdge_pass1(void *user_data, user_data); LassoSelectUserData *data = data_for_edge->data; bool is_visible = true; + bool mesh_facing = true; if (data_for_edge->backbuf_offset) { uint bitmap_inedx = data_for_edge->backbuf_offset + index - 1; is_visible = BLI_BITMAP_TEST_BOOL(data_for_edge->esel->select_bitmap, bitmap_inedx); @@ -772,15 +1432,23 @@ static void do_lasso_select_mesh__doSelectEdge_pass1(void *user_data, data->mcoords_len, UNPACK2(screen_co_a), UNPACK2(screen_co_b), - IS_CLIPPED)); - const int sel_op_result = ED_select_op_action_deselected(data->sel_op, is_select, is_inside); + IS_CLIPPED, + false)); + + if (is_inside && data->check_mesh_direction) { + mesh_facing = edbm_facing_viewport( + data->vc, NULL, eed, NULL, data->vc->scene->toolsettings->viewport_facing_select_edge); + } + + const int sel_op_result = ED_select_op_action_deselected( + data->sel_op, is_select, is_inside && mesh_facing); if (sel_op_result != -1) { BM_edge_select_set(data->vc->em->bm, eed, sel_op_result); data->is_changed = true; } } -static void do_lasso_select_mesh__doSelectFace(void *userData, +static void do_lasso_select_mesh__doSelectFaceCenter(void *userData, BMFace *efa, const float screen_co[2], int /*index*/) @@ -791,7 +1459,86 @@ static void do_lasso_select_mesh__doSelectFace(void *userData, (BLI_rctf_isect_pt_v(data->rect_fl, screen_co) && BLI_lasso_is_point_inside( data->mcoords, data->mcoords_len, screen_co[0], screen_co[1], IS_CLIPPED)); - const int sel_op_result = ED_select_op_action_deselected(data->sel_op, is_select, is_inside); + bool mesh_facing = true; + + if (is_inside && data->check_mesh_direction) { + mesh_facing = edbm_facing_viewport( + data->vc, NULL, NULL, efa, data->vc->scene->toolsettings->viewport_facing_select_face); + } + + const int sel_op_result = ED_select_op_action_deselected( + data->sel_op, is_select, is_inside && mesh_facing); + if (sel_op_result != -1) { + BM_face_select_set(data->vc->em->bm, efa, sel_op_result); + data->is_changed = true; + } +} + +static void do_lasso_select_mesh__doSelectFace(void *user_data, + BMFace *efa, + const float screen_co[][2], + int total_count, + rctf *screen_rect, + bool *face_hit) +{ + LassoSelectUserData *data = static_cast(user_data); + int style = data->face_style; + + if (!BLI_rctf_isect(data->rect_fl, screen_rect, NULL)) + return; + + bool inside = false; + bool mesh_facing = true; + for (int i = 0; i < total_count; i++) { + + int a = i; + int b = (i + 1) % total_count; + + /* enclose */ + if (style == 4) { + inside = BLI_lasso_is_edge_inside(data->mcoords, + data->mcoords_len, + UNPACK2(screen_co[a]), + UNPACK2(screen_co[b]), + IS_CLIPPED, + true); + if (!inside) { + break; + } + } + /* touch */ + else { + inside = BLI_lasso_is_edge_inside(data->mcoords, + data->mcoords_len, + UNPACK2(screen_co[a]), + UNPACK2(screen_co[b]), + IS_CLIPPED, + false); + if (inside) { + break; + } + } + } + + /* touch interior of face */ + if (style == 2) { + if (!inside) { + float point[2] = {static_cast(data->mcoords[0][0]), static_cast(data->mcoords[0][1])}; + inside = isect_point_poly_v2(point, screen_co, total_count, true); + } + } + + *face_hit = inside; + + const bool is_select = BM_elem_flag_test(efa, BM_ELEM_SELECT); + + if (inside && data->check_mesh_direction) { + mesh_facing = edbm_facing_viewport( + data->vc, NULL, NULL, efa, data->vc->scene->toolsettings->viewport_facing_select_face); + } + + const int sel_op_result = ED_select_op_action_deselected(data->sel_op, is_select, inside && mesh_facing); + if (sel_op_result != -1) { BM_face_select_set(data->vc->em->bm, efa, sel_op_result); data->is_changed = true; @@ -802,18 +1549,23 @@ static bool do_lasso_select_mesh(ViewContext *vc, wmGenericUserData *wm_userdata, const int mcoords[][2], const int mcoords_len, - const eSelectOp sel_op) + const eSelectOp sel_op, + wmOperator *op) { LassoSelectUserData data; ToolSettings *ts = vc->scene->toolsettings; rcti rect; + int select_style[2] = {0, 0}; /* set editmesh */ vc->em = BKE_editmesh_from_object(vc->obedit); BLI_lasso_boundbox(&rect, mcoords, mcoords_len); - view3d_userdata_lassoselect_init(&data, vc, &rect, mcoords, mcoords_len, sel_op); + edbm_select_style(ts, select_style, false, true, op); + + view3d_userdata_lassoselect_init( + &data, vc, &rect, mcoords, mcoords_len, sel_op, select_style[0], select_style[1]); if (SEL_OP_USE_PRE_DESELECT(sel_op)) { if (vc->em->bm->totvertsel) { @@ -827,12 +1579,25 @@ static bool do_lasso_select_mesh(ViewContext *vc, GPU_matrix_set(vc->rv3d->viewmat); - const bool use_zbuf = !XRAY_FLAG_ENABLED(vc->v3d); + const int select_through_int = RNA_enum_get(op->ptr, "select_through"); + const bool select_through = U.drag_select_control & USER_DRAG_SELECT_KEYMAP ? + select_through_int > 2 : + ts->select_through && ts->select_through_edit && + ts->select_through_lasso; + const bool use_zbuf = !XRAY_FLAG_ENABLED(vc->v3d) && !select_through; EditSelectBuf_Cache *esel = static_cast(wm_userdata->data); if (use_zbuf) { if (wm_userdata->data == nullptr) { - editselect_buf_cache_init_with_generic_userdata(wm_userdata, vc, ts->selectmode); + /* for near enclose face */ + if (data.face_style == 4 && ts->selectmode & SCE_SELECT_FACE && + !(ts->selectmode & SCE_SELECT_VERTEX)) { + editselect_buf_cache_init_with_generic_userdata( + wm_userdata, vc, ts->selectmode | SCE_SELECT_VERTEX); + } + else { + editselect_buf_cache_init_with_generic_userdata(wm_userdata, vc, ts->selectmode); + } esel = static_cast(wm_userdata->data); esel->select_bitmap = DRW_select_buffer_bitmap_from_poly( vc->depsgraph, vc->region, vc->v3d, mcoords, mcoords_len, &rect, nullptr); @@ -842,9 +1607,12 @@ static bool do_lasso_select_mesh(ViewContext *vc, if (ts->selectmode & SCE_SELECT_VERTEX) { if (use_zbuf) { data.is_changed |= edbm_backbuf_check_and_select_verts( - esel, vc->depsgraph, vc->obedit, vc->em, sel_op); + vc, esel, vc->depsgraph, vc->obedit, vc->em, sel_op); } else { + data.check_mesh_direction = edbm_facing_viewport_precheck( + ts, ts->viewport_facing_select_vert, true); + mesh_foreachScreenVert( vc, do_lasso_select_mesh__doSelectVert, &data, V3D_PROJ_TEST_CLIP_DEFAULT); } @@ -860,12 +1628,20 @@ static bool do_lasso_select_mesh(ViewContext *vc, const eV3DProjTest clip_flag = V3D_PROJ_TEST_CLIP_NEAR | (use_zbuf ? (eV3DProjTest)0 : V3D_PROJ_TEST_CLIP_BB); - /* Fully inside. */ - mesh_foreachScreenEdge_clip_bb_segment( - vc, do_lasso_select_mesh__doSelectEdge_pass0, &data_for_edge, clip_flag); - if (data.is_done == false) { - /* Fall back to partially inside. - * Clip content to account for edges partially behind the view. */ + + data.check_mesh_direction = use_zbuf ? + edbm_facing_viewport_precheck( + ts, ts->viewport_facing_select_edge, false) : + data.check_mesh_direction = edbm_facing_viewport_precheck( + ts, ts->viewport_facing_select_edge, true); + + /* Fully inside, hybrid and enclose edge */ + if (data.edge_style != 2) { + mesh_foreachScreenEdge_clip_bb_segment( + vc, do_lasso_select_mesh__doSelectEdge_pass0, &data_for_edge, clip_flag); + } + /* Partially inside, hybrid and touch edge */ + if (data.edge_style == 2 || data.edge_style == 1 && data.is_done == false) { mesh_foreachScreenEdge_clip_bb_segment(vc, do_lasso_select_mesh__doSelectEdge_pass1, &data_for_edge, @@ -875,12 +1651,33 @@ static bool do_lasso_select_mesh(ViewContext *vc, if (ts->selectmode & SCE_SELECT_FACE) { if (use_zbuf) { - data.is_changed |= edbm_backbuf_check_and_select_faces( - esel, vc->depsgraph, vc->obedit, vc->em, sel_op); + data.is_changed |= edbm_backbuf_check_and_select_faces(vc, + esel, + vc->depsgraph, + vc->obedit, + vc->em, + sel_op, + &rect, + data.face_style, + &data, + NULL); } else { - mesh_foreachScreenFace( - vc, do_lasso_select_mesh__doSelectFace, &data, V3D_PROJ_TEST_CLIP_DEFAULT); + data.check_mesh_direction = edbm_facing_viewport_precheck( + ts, ts->viewport_facing_select_face, true); + + /* xray center and auto face with fallback for touch and enclose intersect */ + if (data.face_style == 1 || data.face_style == 8 || SEL_OP_USE_OUTSIDE(sel_op)) { + mesh_foreachScreenFaceCenter( + vc, do_lasso_select_mesh__doSelectFaceCenter, &data, V3D_PROJ_TEST_CLIP_DEFAULT); + } + /* xray touch and enclose face - doesn't work for intersect */ + else { + mesh_foreachScreenFaceVerts(vc, + do_lasso_select_mesh__doSelectFace, + &data, + V3D_PROJ_TEST_CLIP_NEAR | V3D_PROJ_TEST_CLIP_BB); + } } } @@ -944,7 +1741,7 @@ static bool do_lasso_select_curve(ViewContext *vc, BLI_lasso_boundbox(&rect, mcoords, mcoords_len); - view3d_userdata_lassoselect_init(&data, vc, &rect, mcoords, mcoords_len, sel_op); + view3d_userdata_lassoselect_init(&data, vc, &rect, mcoords, mcoords_len, sel_op, 0, 0); Curve *curve = (Curve *)vc->obedit->data; ListBase *nurbs = BKE_curve_editNurbs_get(curve); @@ -993,7 +1790,7 @@ static bool do_lasso_select_lattice(ViewContext *vc, BLI_lasso_boundbox(&rect, mcoords, mcoords_len); - view3d_userdata_lassoselect_init(&data, vc, &rect, mcoords, mcoords_len, sel_op); + view3d_userdata_lassoselect_init(&data, vc, &rect, mcoords, mcoords_len, sel_op, 0, 0); if (SEL_OP_USE_PRE_DESELECT(sel_op)) { data.is_changed |= ED_lattice_flags_set(vc->obedit, 0); @@ -1022,7 +1819,8 @@ static void do_lasso_select_armature__doSelectBone(void *userData, if (screen_co_a[0] != IS_CLIPPED) { if (BLI_rcti_isect_pt(data->rect, UNPACK2(screen_co_a)) && BLI_lasso_is_point_inside( - data->mcoords, data->mcoords_len, UNPACK2(screen_co_a), INT_MAX)) { + data->mcoords, data->mcoords_len, UNPACK2(screen_co_a), INT_MAX), + false) { is_inside_flag |= BONESEL_ROOT; } } @@ -1033,7 +1831,8 @@ static void do_lasso_select_armature__doSelectBone(void *userData, if (screen_co_b[0] != IS_CLIPPED) { if (BLI_rcti_isect_pt(data->rect, UNPACK2(screen_co_b)) && BLI_lasso_is_point_inside( - data->mcoords, data->mcoords_len, UNPACK2(screen_co_b), INT_MAX)) { + data->mcoords, data->mcoords_len, UNPACK2(screen_co_b), INT_MAX), + false) { is_inside_flag |= BONESEL_TIP; } } @@ -1047,7 +1846,8 @@ static void do_lasso_select_armature__doSelectBone(void *userData, data->mcoords_len, UNPACK2(screen_co_a), UNPACK2(screen_co_b), - INT_MAX)) { + INT_MAX, + false)) { is_inside_flag |= BONESEL_BONE; } } @@ -1076,7 +1876,7 @@ static void do_lasso_select_armature__doSelectBone_clip_content(void *userData, } if (BLI_lasso_is_edge_inside( - data->mcoords, data->mcoords_len, UNPACK2(screen_co_a), UNPACK2(screen_co_b), INT_MAX)) { + data->mcoords, data->mcoords_len, UNPACK2(screen_co_a), UNPACK2(screen_co_b), INT_MAX, false)) { is_inside_flag |= BONESEL_BONE; } @@ -1093,7 +1893,7 @@ static bool do_lasso_select_armature(ViewContext *vc, BLI_lasso_boundbox(&rect, mcoords, mcoords_len); - view3d_userdata_lassoselect_init(&data, vc, &rect, mcoords, mcoords_len, sel_op); + view3d_userdata_lassoselect_init(&data, vc, &rect, mcoords, mcoords_len, sel_op, 0, 0); if (SEL_OP_USE_PRE_DESELECT(sel_op)) { data.is_changed |= ED_armature_edit_deselect_all_visible(vc->obedit); @@ -1153,7 +1953,7 @@ static bool do_lasso_select_meta(ViewContext *vc, BLI_lasso_boundbox(&rect, mcoords, mcoords_len); - view3d_userdata_lassoselect_init(&data, vc, &rect, mcoords, mcoords_len, sel_op); + view3d_userdata_lassoselect_init(&data, vc, &rect, mcoords, mcoords_len, sel_op, 0, 0); if (SEL_OP_USE_PRE_DESELECT(sel_op)) { data.is_changed |= BKE_mball_deselect_all(mb); @@ -1237,7 +2037,8 @@ static bool do_lasso_select_paintvert(ViewContext *vc, LassoSelectUserData_ForMeshVert data; data.select_vert = select_vert.span; - view3d_userdata_lassoselect_init(&data.lasso_data, vc, &rect, mcoords, mcoords_len, sel_op); + view3d_userdata_lassoselect_init( + &data.lasso_data, vc, &rect, mcoords, mcoords_len, sel_op, 0, 0); ED_view3d_init_mats_rv3d(vc->obact, vc->rv3d); @@ -1302,7 +2103,8 @@ static bool view3d_lasso_select(bContext *C, ViewContext *vc, const int mcoords[][2], const int mcoords_len, - const eSelectOp sel_op) + const eSelectOp sel_op, + wmOperator *op) { using namespace blender; Object *ob = CTX_data_active_object(C); @@ -1332,7 +2134,7 @@ static bool view3d_lasso_select(bContext *C, } } else { - changed_multi |= do_lasso_select_objects(vc, mcoords, mcoords_len, sel_op); + changed_multi |= do_lasso_select_objects(vc, mcoords, mcoords_len, sel_op, op, NULL); if (changed_multi) { ED_outliner_select_sync_from_object_tag(C); } @@ -1346,7 +2148,7 @@ static bool view3d_lasso_select(bContext *C, switch (vc->obedit->type) { case OB_MESH: - changed = do_lasso_select_mesh(vc, wm_userdata, mcoords, mcoords_len, sel_op); + changed = do_lasso_select_mesh(vc, wm_userdata, mcoords, mcoords_len, sel_op, op); break; case OB_CURVES_LEGACY: case OB_SURF: @@ -1417,7 +2219,7 @@ static int view3d_lasso_select_exec(bContext *C, wmOperator *op) ED_view3d_viewcontext_init(C, &vc, depsgraph); eSelectOp sel_op = static_cast(RNA_enum_get(op->ptr, "mode")); - bool changed_multi = view3d_lasso_select(C, &vc, mcoords, mcoords_len, sel_op); + bool changed_multi = view3d_lasso_select(C, &vc, mcoords, mcoords_len, sel_op, op); MEM_freeN((void *)mcoords); @@ -2140,40 +2942,6 @@ static int mixed_bones_object_selectbuffer_extended(ViewContext *vc, return hits; } -/** - * Compare result of 'GPU_select': 'GPUSelectResult', - * Needed for stable sorting, so cycling through all items near the cursor behaves predictably. - */ -static int gpu_select_buffer_depth_id_cmp(const void *sel_a_p, const void *sel_b_p) -{ - GPUSelectResult *a = (GPUSelectResult *)sel_a_p; - GPUSelectResult *b = (GPUSelectResult *)sel_b_p; - - if (a->depth < b->depth) { - return -1; - } - if (a->depth > b->depth) { - return 1; - } - - /* Depths match, sort by id. */ - uint sel_a = a->id; - uint sel_b = b->id; - -#ifdef __BIG_ENDIAN__ - BLI_endian_switch_uint32(&sel_a); - BLI_endian_switch_uint32(&sel_b); -#endif - - if (sel_a < sel_b) { - return -1; - } - if (sel_a > sel_b) { - return 1; - } - return 0; -} - /** * \param has_bones: When true, skip non-bone hits, also allow bases to be used * that are visible but not select-able, @@ -3277,23 +4045,12 @@ void VIEW3D_OT_select(wmOperatorType *ot) /** \name Box Select * \{ */ -struct BoxSelectUserData { - ViewContext *vc; - const rcti *rect; - const rctf *rect_fl; - rctf _rect_fl; - eSelectOp sel_op; - eBezTriple_Flag select_flag; - - /* runtime */ - bool is_done; - bool is_changed; -}; - static void view3d_userdata_boxselect_init(BoxSelectUserData *r_data, ViewContext *vc, const rcti *rect, - const eSelectOp sel_op) + const eSelectOp sel_op, + const int edge_style, + const int face_style) { r_data->vc = vc; @@ -3304,6 +4061,9 @@ static void view3d_userdata_boxselect_init(BoxSelectUserData *r_data, r_data->sel_op = sel_op; /* SELECT by default, but can be changed if needed (only few cases use and respect this). */ r_data->select_flag = (eBezTriple_Flag)SELECT; + r_data->edge_style = edge_style; + r_data->face_style = face_style; + r_data->check_mesh_direction = false; /* runtime */ r_data->is_done = false; @@ -3379,7 +4139,7 @@ static bool do_paintvert_box_select(ViewContext *vc, BoxSelectUserData_ForMeshVert data; data.select_vert = select_vert.span; - view3d_userdata_boxselect_init(&data.box_data, vc, rect, sel_op); + view3d_userdata_boxselect_init(&data.box_data, vc, rect, sel_op, 0, 0); ED_view3d_init_mats_rv3d(vc->obact, vc->rv3d); @@ -3485,7 +4245,7 @@ static bool do_nurbs_box_select(ViewContext *vc, rcti *rect, const eSelectOp sel const bool deselect_all = (sel_op == SEL_OP_SET); BoxSelectUserData data; - view3d_userdata_boxselect_init(&data, vc, rect, sel_op); + view3d_userdata_boxselect_init(&data, vc, rect, sel_op, 0, 0); Curve *curve = (Curve *)vc->obedit->data; ListBase *nurbs = BKE_curve_editNurbs_get(curve); @@ -3524,7 +4284,7 @@ static bool do_lattice_box_select(ViewContext *vc, rcti *rect, const eSelectOp s { BoxSelectUserData data; - view3d_userdata_boxselect_init(&data, vc, rect, sel_op); + view3d_userdata_boxselect_init(&data, vc, rect, sel_op, 0, 0); if (SEL_OP_USE_PRE_DESELECT(sel_op)) { data.is_changed |= ED_lattice_flags_set(vc->obedit, 0); @@ -3545,7 +4305,15 @@ static void do_mesh_box_select__doSelectVert(void *userData, BoxSelectUserData *data = static_cast(userData); const bool is_select = BM_elem_flag_test(eve, BM_ELEM_SELECT); const bool is_inside = BLI_rctf_isect_pt_v(data->rect_fl, screen_co); - const int sel_op_result = ED_select_op_action_deselected(data->sel_op, is_select, is_inside); + + bool mesh_facing = true; + if (is_inside && data->check_mesh_direction) { + mesh_facing = edbm_facing_viewport( + data->vc, eve, NULL, NULL, data->vc->scene->toolsettings->viewport_facing_select_vert); + } + + const int sel_op_result = ED_select_op_action_deselected( + data->sel_op, is_select, is_inside && mesh_facing); if (sel_op_result != -1) { BM_vert_select_set(data->vc->em->bm, eve, sel_op_result); data->is_changed = true; @@ -3566,6 +4334,7 @@ static void do_mesh_box_select__doSelectEdge_pass0( userData); BoxSelectUserData *data = data_for_edge->data; bool is_visible = true; + bool mesh_facing = true; if (data_for_edge->backbuf_offset) { uint bitmap_inedx = data_for_edge->backbuf_offset + index - 1; is_visible = BLI_BITMAP_TEST_BOOL(data_for_edge->esel->select_bitmap, bitmap_inedx); @@ -3574,7 +4343,14 @@ static void do_mesh_box_select__doSelectEdge_pass0( const bool is_select = BM_elem_flag_test(eed, BM_ELEM_SELECT); const bool is_inside = (is_visible && edge_fully_inside_rect(data->rect_fl, screen_co_a, screen_co_b)); - const int sel_op_result = ED_select_op_action_deselected(data->sel_op, is_select, is_inside); + + if (is_inside && data->check_mesh_direction) { + mesh_facing = edbm_facing_viewport( + data->vc, NULL, eed, NULL, data->vc->scene->toolsettings->viewport_facing_select_edge); + } + + const int sel_op_result = ED_select_op_action_deselected( + data->sel_op, is_select, is_inside && mesh_facing); if (sel_op_result != -1) { BM_edge_select_set(data->vc->em->bm, eed, sel_op_result); data->is_done = true; @@ -3591,6 +4367,7 @@ static void do_mesh_box_select__doSelectEdge_pass1( userData); BoxSelectUserData *data = data_for_edge->data; bool is_visible = true; + bool mesh_facing = true; if (data_for_edge->backbuf_offset) { uint bitmap_inedx = data_for_edge->backbuf_offset + index - 1; is_visible = BLI_BITMAP_TEST_BOOL(data_for_edge->esel->select_bitmap, bitmap_inedx); @@ -3598,13 +4375,79 @@ static void do_mesh_box_select__doSelectEdge_pass1( const bool is_select = BM_elem_flag_test(eed, BM_ELEM_SELECT); const bool is_inside = (is_visible && edge_inside_rect(data->rect_fl, screen_co_a, screen_co_b)); - const int sel_op_result = ED_select_op_action_deselected(data->sel_op, is_select, is_inside); + + if (is_inside && data->check_mesh_direction) { + mesh_facing = edbm_facing_viewport( + data->vc, NULL, eed, NULL, data->vc->scene->toolsettings->viewport_facing_select_edge); + } + + const int sel_op_result = ED_select_op_action_deselected( + data->sel_op, is_select, is_inside && mesh_facing); if (sel_op_result != -1) { BM_edge_select_set(data->vc->em->bm, eed, sel_op_result); data->is_changed = true; } } + static void do_mesh_box_select__doSelectFace(void *userData, + BMFace *efa, + const float screen_co[][2], + int total_count, + rctf *screen_rect, + bool *face_hit) +{ + BoxSelectUserData *data = static_cast(userData); + + if (!BLI_rctf_isect(data->rect_fl, screen_rect, NULL)) + return; + + bool inside = false; + bool mesh_facing = true; + for (int i = 0; i < total_count; i++) { + + int a = i; + int b = (i + 1) % total_count; + + /* enclose */ + if (data->face_style == 4) { + inside = edge_fully_inside_rect(data->rect_fl, screen_co[a], screen_co[b]); + if (!inside) { + break; + } + } + /* touch */ + else { + inside = edge_inside_rect(data->rect_fl, screen_co[a], screen_co[b]); + if (inside) { + break; + } + } + } + + /* touch interior of face */ + if (data->face_style == 2 && !inside) { + float point[2] = {data->rect_fl->xmax, data->rect_fl->ymax}; + inside = isect_point_poly_v2(point, screen_co, total_count, true); + } + + *face_hit = inside; + + const bool is_select = BM_elem_flag_test(efa, BM_ELEM_SELECT); + + if (inside && data->check_mesh_direction) { + mesh_facing = edbm_facing_viewport( + data->vc, NULL, NULL, efa, data->vc->scene->toolsettings->viewport_facing_select_face); + } + + const int sel_op_result = ED_select_op_action_deselected(data->sel_op, is_select, inside && mesh_facing); + + if (sel_op_result != -1) { + BM_face_select_set(data->vc->em->bm, efa, sel_op_result); + data->is_changed = true; + } +} + +static void do_mesh_box_select__doSelectFaceCenter(void *userData, BMFace *efa, const float screen_co[2], int /*index*/) @@ -3612,7 +4455,15 @@ static void do_mesh_box_select__doSelectFace(void *userData, BoxSelectUserData *data = static_cast(userData); const bool is_select = BM_elem_flag_test(efa, BM_ELEM_SELECT); const bool is_inside = BLI_rctf_isect_pt_v(data->rect_fl, screen_co); - const int sel_op_result = ED_select_op_action_deselected(data->sel_op, is_select, is_inside); + bool mesh_facing = true; + + if (is_inside && data->check_mesh_direction) { + mesh_facing = edbm_facing_viewport( + data->vc, NULL, NULL, efa, data->vc->scene->toolsettings->viewport_facing_select_face); + } + + const int sel_op_result = ED_select_op_action_deselected( + data->sel_op, is_select, is_inside && mesh_facing); if (sel_op_result != -1) { BM_face_select_set(data->vc->em->bm, efa, sel_op_result); data->is_changed = true; @@ -3621,12 +4472,16 @@ static void do_mesh_box_select__doSelectFace(void *userData, static bool do_mesh_box_select(ViewContext *vc, wmGenericUserData *wm_userdata, const rcti *rect, - const eSelectOp sel_op) + const eSelectOp sel_op, + wmOperator *op) { BoxSelectUserData data; ToolSettings *ts = vc->scene->toolsettings; + int select_style[2] = {0, 0}; - view3d_userdata_boxselect_init(&data, vc, rect, sel_op); + edbm_select_style(ts, select_style, true, false, op); + + view3d_userdata_boxselect_init(&data, vc, rect, sel_op, select_style[0], select_style[1]); if (SEL_OP_USE_PRE_DESELECT(sel_op)) { if (vc->em->bm->totvertsel) { @@ -3640,12 +4495,25 @@ static bool do_mesh_box_select(ViewContext *vc, GPU_matrix_set(vc->rv3d->viewmat); - const bool use_zbuf = !XRAY_FLAG_ENABLED(vc->v3d); + const int select_through_int = RNA_enum_get(op->ptr, "select_through"); + const bool select_through = U.drag_select_control & USER_DRAG_SELECT_KEYMAP ? + select_through_int > 2 : + ts->select_through && ts->select_through_edit && + ts->select_through_box; + const bool use_zbuf = !XRAY_FLAG_ENABLED(vc->v3d) && !select_through; EditSelectBuf_Cache *esel = static_cast(wm_userdata->data); if (use_zbuf) { if (wm_userdata->data == nullptr) { - editselect_buf_cache_init_with_generic_userdata(wm_userdata, vc, ts->selectmode); + /* for near enclose face */ + if (data.face_style == 4 && ts->selectmode & SCE_SELECT_FACE && + !(ts->selectmode & SCE_SELECT_VERTEX)) { + editselect_buf_cache_init_with_generic_userdata( + wm_userdata, vc, ts->selectmode | SCE_SELECT_VERTEX); + } + else { + editselect_buf_cache_init_with_generic_userdata(wm_userdata, vc, ts->selectmode); + } esel = static_cast(wm_userdata->data); esel->select_bitmap = DRW_select_buffer_bitmap_from_rect( vc->depsgraph, vc->region, vc->v3d, rect, nullptr); @@ -3655,9 +4523,12 @@ static bool do_mesh_box_select(ViewContext *vc, if (ts->selectmode & SCE_SELECT_VERTEX) { if (use_zbuf) { data.is_changed |= edbm_backbuf_check_and_select_verts( - esel, vc->depsgraph, vc->obedit, vc->em, sel_op); + vc, esel, vc->depsgraph, vc->obedit, vc->em, sel_op); } else { + data.check_mesh_direction = edbm_facing_viewport_precheck( + ts, ts->viewport_facing_select_vert, true); + mesh_foreachScreenVert( vc, do_mesh_box_select__doSelectVert, &data, V3D_PROJ_TEST_CLIP_DEFAULT); } @@ -3674,12 +4545,19 @@ static bool do_mesh_box_select(ViewContext *vc, const eV3DProjTest clip_flag = V3D_PROJ_TEST_CLIP_NEAR | (use_zbuf ? (eV3DProjTest)0 : V3D_PROJ_TEST_CLIP_BB); - /* Fully inside. */ - mesh_foreachScreenEdge_clip_bb_segment( - vc, do_mesh_box_select__doSelectEdge_pass0, &cb_data, clip_flag); - if (data.is_done == false) { - /* Fall back to partially inside. - * Clip content to account for edges partially behind the view. */ + + data.check_mesh_direction = use_zbuf ? + edbm_facing_viewport_precheck( + ts, ts->viewport_facing_select_edge, false) : + data.check_mesh_direction = edbm_facing_viewport_precheck( + ts, ts->viewport_facing_select_edge, true); + /* Fully inside, hybrid and enclose edge */ + if (data.edge_style != 2) { + mesh_foreachScreenEdge_clip_bb_segment( + vc, do_mesh_box_select__doSelectEdge_pass0, &cb_data, clip_flag); + } + /* Partially inside, hybrid and touch edge */ + if (data.edge_style == 2 || data.edge_style == 1 && data.is_done == false) { mesh_foreachScreenEdge_clip_bb_segment(vc, do_mesh_box_select__doSelectEdge_pass1, &cb_data, @@ -3690,11 +4568,24 @@ static bool do_mesh_box_select(ViewContext *vc, if (ts->selectmode & SCE_SELECT_FACE) { if (use_zbuf) { data.is_changed |= edbm_backbuf_check_and_select_faces( - esel, vc->depsgraph, vc->obedit, vc->em, sel_op); + vc, esel, vc->depsgraph, vc->obedit, vc->em, sel_op, rect, data.face_style, NULL, NULL); } else { - mesh_foreachScreenFace( - vc, do_mesh_box_select__doSelectFace, &data, V3D_PROJ_TEST_CLIP_DEFAULT); + data.check_mesh_direction = edbm_facing_viewport_precheck( + ts, ts->viewport_facing_select_face, true); + + /* xray center and auto face with fallback for touch and enclose intersect */ + if (data.face_style == 1 || data.face_style == 8 || SEL_OP_USE_OUTSIDE(sel_op)) { + mesh_foreachScreenFaceCenter( + vc, do_mesh_box_select__doSelectFaceCenter, &data, V3D_PROJ_TEST_CLIP_DEFAULT); + } + /* xray touch and enclose face - doesn't work with intersect */ + else { + mesh_foreachScreenFaceVerts(vc, + do_mesh_box_select__doSelectFace, + &data, + V3D_PROJ_TEST_CLIP_NEAR | V3D_PROJ_TEST_CLIP_BB); + } } } @@ -3855,18 +4746,39 @@ static int opengl_bone_select_buffer_cmp(const void *sel_a_p, const void *sel_b_ return 0; } -static bool do_object_box_select(bContext *C, ViewContext *vc, rcti *rect, const eSelectOp sel_op) +static bool do_object_box_select( + bContext *C, ViewContext *vc, rcti *rect, const eSelectOp sel_op, wmOperator *op) { View3D *v3d = vc->v3d; int totobj = MAXPICKELEMS; /* XXX solve later */ + ToolSettings *ts = vc->scene->toolsettings; + rctf rect_f_data; + rctf *rect_f = &rect_f_data; + BLI_rctf_rcti_copy(rect_f, rect); + float region_co[2]; /* Selection buffer has bones potentially too, so we add #MAXPICKELEMS. */ GPUSelectResult *buffer = static_cast( MEM_mallocN((totobj + MAXPICKELEMS) * sizeof(GPUSelectResult), __func__)); const eV3DSelectObjectFilter select_filter = ED_view3d_select_filter_from_mode(vc->scene, vc->obact); - const int hits = view3d_opengl_select( - vc, buffer, (totobj + MAXPICKELEMS), rect, VIEW3D_SELECT_ALL, select_filter); + const bool select_origin = U.drag_select_control & USER_DRAG_SELECT_KEYMAP ? + RNA_boolean_get(op->ptr, "select_origin_box") : + ts->select_origin_box; + const bool select_through_int = RNA_enum_get(op->ptr, "select_through"); + const bool select_through = U.drag_select_control & USER_DRAG_SELECT_KEYMAP ? + select_through_int == 2 || select_through_int == 8 : + ts->select_through && ts->select_through_object && + ts->select_through_box; + int hits = 0; + if (XRAY_FLAG_ENABLED(vc->v3d) || select_through) { + hits = view3d_opengl_select( + vc, buffer, (totobj + MAXPICKELEMS), rect, VIEW3D_SELECT_ALL, select_filter); + } + else { + hits = view3d_opengl_select( + vc, buffer, (totobj + MAXPICKELEMS), rect, VIEW3D_SELECT_PICK_NEAREST, select_filter); + } BKE_view_layer_synced_ensure(vc->scene, vc->view_layer); LISTBASE_FOREACH (Base *, base, BKE_view_layer_object_bases_get(vc->view_layer)) { base->object->id.tag &= ~LIB_TAG_DOIT; @@ -3908,7 +4820,13 @@ static bool do_object_box_select(bContext *C, ViewContext *vc, rcti *rect, const for (Base *base = static_cast(object_bases->first); base && hits; base = base->next) { if (BASE_SELECTABLE(v3d, base)) { const bool is_select = base->flag & BASE_SELECTED; - const bool is_inside = base->object->id.tag & LIB_TAG_DOIT; + const bool is_inside = base->object->id.tag & LIB_TAG_DOIT ? + select_origin ? + (ED_view3d_project_base(vc->region, base, region_co) == + V3D_PROJ_RET_OK) && + BLI_rctf_isect_pt_v(rect_f, region_co) : + true : + false; const int sel_op_result = ED_select_op_action_deselected(sel_op, is_select, is_inside); if (sel_op_result != -1) { ED_object_base_select(base, sel_op_result ? BA_SELECT : BA_DESELECT); @@ -4034,7 +4952,7 @@ static int view3d_box_select_exec(bContext *C, wmOperator *op) switch (vc.obedit->type) { case OB_MESH: vc.em = BKE_editmesh_from_object(vc.obedit); - changed = do_mesh_box_select(&vc, wm_userdata, &rect, sel_op); + changed = do_mesh_box_select(&vc, wm_userdata, &rect, sel_op, op); if (changed) { DEG_id_tag_update(static_cast(vc.obedit->data), ID_RECALC_SELECT); WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc.obedit->data); @@ -4108,7 +5026,7 @@ static int view3d_box_select_exec(bContext *C, wmOperator *op) } } else { /* object mode with none active */ - changed_multi = do_object_box_select(C, &vc, &rect, sel_op); + changed_multi = do_object_box_select(C, &vc, &rect, sel_op, op); if (changed_multi) { ED_outliner_select_sync_from_object_tag(C); } @@ -4151,24 +5069,13 @@ void VIEW3D_OT_select_box(wmOperatorType *ot) /** \name Circle Select * \{ */ -struct CircleSelectUserData { - ViewContext *vc; - bool select; - int mval[2]; - float mval_fl[2]; - float radius; - float radius_squared; - eBezTriple_Flag select_flag; - - /* runtime */ - bool is_changed; -}; - static void view3d_userdata_circleselect_init(CircleSelectUserData *r_data, ViewContext *vc, const bool select, const int mval[2], - const float rad) + const float rad, + const int edge_style, + const int face_style) { r_data->vc = vc; r_data->select = select; @@ -4181,6 +5088,9 @@ static void view3d_userdata_circleselect_init(CircleSelectUserData *r_data, /* SELECT by default, but can be changed if needed (only few cases use and respect this). */ r_data->select_flag = (eBezTriple_Flag)SELECT; + r_data->edge_style = edge_style; + r_data->face_style = face_style; + r_data->check_mesh_direction = false; /* runtime */ r_data->is_changed = false; @@ -4194,8 +5104,16 @@ static void mesh_circle_doSelectVert(void *userData, CircleSelectUserData *data = static_cast(userData); if (len_squared_v2v2(data->mval_fl, screen_co) <= data->radius_squared) { - BM_vert_select_set(data->vc->em->bm, eve, data->select); + bool mesh_facing = true; data->is_changed = true; + if (data->check_mesh_direction) { + mesh_facing = edbm_facing_viewport( + data->vc, eve, NULL, NULL, data->vc->scene->toolsettings->viewport_facing_select_vert); + } + if (mesh_facing) { + BM_vert_select_set(data->vc->em->bm, eve, data->select); + data->is_changed = true; + } } } static void mesh_circle_doSelectEdge(void *userData, @@ -4205,22 +5123,91 @@ static void mesh_circle_doSelectEdge(void *userData, int /*index*/) { CircleSelectUserData *data = static_cast(userData); - + + bool enclose_edge = true; + bool mesh_facing = true; if (edge_inside_circle(data->mval_fl, data->radius, screen_co_a, screen_co_b)) { - BM_edge_select_set(data->vc->em->bm, eed, data->select); + if (data->edge_style == 4) { + enclose_edge = edbm_circle_enclose_mesh(eed, NULL, data); + } + + if (data->check_mesh_direction) { + mesh_facing = edbm_facing_viewport( + data->vc, NULL, eed, NULL, data->vc->scene->toolsettings->viewport_facing_select_edge); + } + + if (enclose_edge && mesh_facing) { + BM_edge_select_set(data->vc->em->bm, eed, data->select); + data->is_changed = true; + } + } +} + +static void mesh_circle_doSelectFace(void *userData, + BMFace *efa, + const float screen_co[][2], + int total_count, + rctf *screen_rect, + bool *face_hit) +{ + CircleSelectUserData *data = static_cast(userData); + + if (!BLI_rctf_isect_circle(screen_rect, data->mval_fl, data->radius)) { + return; + } + + bool inside = false; + bool enclose_face = true; + bool mesh_facing = true; + for (int i = 0; i < total_count; i++) { + + int a = i; + int b = (i + 1) % total_count; + + inside = edge_inside_circle(data->mval_fl, data->radius, screen_co[a], screen_co[b]); + if (inside) + break; + } + + if (!inside) { + inside = isect_point_poly_v2(data->mval_fl, screen_co, total_count, true); + } + + *face_hit = inside; + + if (data->face_style == 4 && inside) { + enclose_face = edbm_circle_enclose_mesh(NULL, efa, data); + } + + if (data->check_mesh_direction) { + mesh_facing = edbm_facing_viewport( + data->vc, NULL, NULL, efa, data->vc->scene->toolsettings->viewport_facing_select_face); + } + + if (inside && enclose_face && mesh_facing) { + BM_face_select_set(data->vc->em->bm, efa, data->select); data->is_changed = true; } } -static void mesh_circle_doSelectFace(void *userData, + +static void mesh_circle_doSelectFaceCenter(void *userData, BMFace *efa, const float screen_co[2], int /*index*/) { CircleSelectUserData *data = static_cast(userData); + bool mesh_facing = true; if (len_squared_v2v2(data->mval_fl, screen_co) <= data->radius_squared) { - BM_face_select_set(data->vc->em->bm, efa, data->select); - data->is_changed = true; + if (data->check_mesh_direction) { + mesh_facing = edbm_facing_viewport( + data->vc, NULL, NULL, efa, data->vc->scene->toolsettings->viewport_facing_select_face); + } + + if (mesh_facing) { + BM_face_select_set(data->vc->em->bm, efa, data->select); + data->is_changed = true; + } } } @@ -4228,10 +5215,12 @@ static bool mesh_circle_select(ViewContext *vc, wmGenericUserData *wm_userdata, eSelectOp sel_op, const int mval[2], - float rad) + float rad, + wmOperator *op) { ToolSettings *ts = vc->scene->toolsettings; CircleSelectUserData data; + int select_style[2] = {0, 0}; vc->em = BKE_editmesh_from_object(vc->obedit); bool changed = false; @@ -4248,9 +5237,16 @@ static bool mesh_circle_select(ViewContext *vc, ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* for foreach's screen/vert projection */ - view3d_userdata_circleselect_init(&data, vc, select, mval, rad); + edbm_select_style(ts, select_style, false, false, op); - const bool use_zbuf = !XRAY_FLAG_ENABLED(vc->v3d); + view3d_userdata_circleselect_init(&data, vc, select, mval, rad, select_style[0], select_style[1]); + + const int select_through_int = RNA_enum_get(op->ptr, "select_through"); + const bool select_through = U.drag_select_control & USER_DRAG_SELECT_KEYMAP ? + select_through_int > 2 : + ts->select_through && ts->select_through_edit && + ts->select_through_circle; + const bool use_zbuf = !XRAY_FLAG_ENABLED(vc->v3d) && !select_through; if (use_zbuf) { if (wm_userdata->data == nullptr) { @@ -4270,10 +5266,13 @@ static bool mesh_circle_select(ViewContext *vc, if (use_zbuf) { if (esel->select_bitmap != nullptr) { changed |= edbm_backbuf_check_and_select_verts( - esel, vc->depsgraph, vc->obedit, vc->em, select ? SEL_OP_ADD : SEL_OP_SUB); + vc, esel, vc->depsgraph, vc->obedit, vc->em, select ? SEL_OP_ADD : SEL_OP_SUB); } } else { + data.check_mesh_direction = edbm_facing_viewport_precheck( + ts, ts->viewport_facing_select_vert, true); + mesh_foreachScreenVert(vc, mesh_circle_doSelectVert, &data, V3D_PROJ_TEST_CLIP_DEFAULT); } } @@ -4282,10 +5281,13 @@ static bool mesh_circle_select(ViewContext *vc, if (use_zbuf) { if (esel->select_bitmap != nullptr) { changed |= edbm_backbuf_check_and_select_edges( - esel, vc->depsgraph, vc->obedit, vc->em, select ? SEL_OP_ADD : SEL_OP_SUB); + &data, esel, vc->depsgraph, vc->obedit, vc->em, select ? SEL_OP_ADD : SEL_OP_SUB); } } else { + data.check_mesh_direction = edbm_facing_viewport_precheck( + ts, ts->viewport_facing_select_edge, true); + mesh_foreachScreenEdge_clip_bb_segment( vc, mesh_circle_doSelectEdge, @@ -4296,13 +5298,33 @@ static bool mesh_circle_select(ViewContext *vc, if (ts->selectmode & SCE_SELECT_FACE) { if (use_zbuf) { - if (esel->select_bitmap != nullptr) { - changed |= edbm_backbuf_check_and_select_faces( - esel, vc->depsgraph, vc->obedit, vc->em, select ? SEL_OP_ADD : SEL_OP_SUB); + if (esel->select_bitmap != NULL) { + changed |= edbm_backbuf_check_and_select_faces(vc, + esel, + vc->depsgraph, + vc->obedit, + vc->em, + select ? SEL_OP_ADD : SEL_OP_SUB, + NULL, + data.face_style, + NULL, + &data); } } else { - mesh_foreachScreenFace(vc, mesh_circle_doSelectFace, &data, V3D_PROJ_TEST_CLIP_DEFAULT); + data.check_mesh_direction = edbm_facing_viewport_precheck( + ts, ts->viewport_facing_select_face, true); + + /* xray center and auto face */ + if (data.face_style == 1 || data.face_style == 8) { + mesh_foreachScreenFaceCenter( + vc, mesh_circle_doSelectFaceCenter, &data, V3D_PROJ_TEST_CLIP_DEFAULT); + } + /* xray touch and enclose face */ + else { + mesh_foreachScreenFaceVerts( + vc, mesh_circle_doSelectFace, &data, V3D_PROJ_TEST_CLIP_NEAR | V3D_PROJ_TEST_CLIP_BB); + } } } @@ -4416,7 +5438,7 @@ static bool paint_vertsel_circle_select(ViewContext *vc, ED_view3d_init_mats_rv3d(vc->obact, vc->rv3d); /* for foreach's screen/vert projection */ - view3d_userdata_circleselect_init(&data.circle_data, vc, select, mval, rad); + view3d_userdata_circleselect_init(&data.circle_data, vc, select, mval, rad, 0, 0); meshobject_foreachScreenVert( vc, paint_vertsel_circle_select_doSelectVert, &data, V3D_PROJ_TEST_CLIP_DEFAULT); changed |= data.circle_data.is_changed; @@ -4470,7 +5492,7 @@ static bool nurbscurve_circle_select(ViewContext *vc, const bool deselect_all = (sel_op == SEL_OP_SET); CircleSelectUserData data; - view3d_userdata_circleselect_init(&data, vc, select, mval, rad); + view3d_userdata_circleselect_init(&data, vc, select, mval, rad, 0, 0); Curve *curve = (Curve *)vc->obedit->data; ListBase *nurbs = BKE_curve_editNurbs_get(curve); @@ -4511,7 +5533,7 @@ static bool lattice_circle_select(ViewContext *vc, CircleSelectUserData data; const bool select = (sel_op != SEL_OP_SUB); - view3d_userdata_circleselect_init(&data, vc, select, mval, rad); + view3d_userdata_circleselect_init(&data, vc, select, mval, rad, 0, 0); if (SEL_OP_USE_PRE_DESELECT(sel_op)) { data.is_changed |= ED_lattice_flags_set(vc->obedit, 0); @@ -4602,7 +5624,7 @@ static bool pose_circle_select(ViewContext *vc, CircleSelectUserData data; const bool select = (sel_op != SEL_OP_SUB); - view3d_userdata_circleselect_init(&data, vc, select, mval, rad); + view3d_userdata_circleselect_init(&data, vc, select, mval, rad, 0, 0); if (SEL_OP_USE_PRE_DESELECT(sel_op)) { data.is_changed |= ED_pose_deselect_all(vc->obact, SEL_DESELECT, false); @@ -4739,7 +5761,7 @@ static bool armature_circle_select(ViewContext *vc, const bool select = (sel_op != SEL_OP_SUB); - view3d_userdata_circleselect_init(&data, vc, select, mval, rad); + view3d_userdata_circleselect_init(&data, vc, select, mval, rad, 0, 0); if (SEL_OP_USE_PRE_DESELECT(sel_op)) { data.is_changed |= ED_armature_edit_deselect_all_visible(vc->obedit); @@ -4792,7 +5814,7 @@ static bool mball_circle_select(ViewContext *vc, const bool select = (sel_op != SEL_OP_SUB); - view3d_userdata_circleselect_init(&data, vc, select, mval, rad); + view3d_userdata_circleselect_init(&data, vc, select, mval, rad, 0, 0); if (SEL_OP_USE_PRE_DESELECT(sel_op)) { data.is_changed |= BKE_mball_deselect_all(static_cast(vc->obedit->data)); @@ -4813,14 +5835,15 @@ static bool obedit_circle_select(bContext *C, wmGenericUserData *wm_userdata, const eSelectOp sel_op, const int mval[2], - float rad) + float rad, + wmOperator *op) { using namespace blender; bool changed = false; BLI_assert(ELEM(sel_op, SEL_OP_SET, SEL_OP_ADD, SEL_OP_SUB)); switch (vc->obedit->type) { case OB_MESH: - changed = mesh_circle_select(vc, wm_userdata, sel_op, mval, rad); + changed = mesh_circle_select(vc, wm_userdata, sel_op, mval, rad, op); break; case OB_CURVES_LEGACY: case OB_SURF: @@ -4961,7 +5984,6 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op) const eSelectOp sel_op = ED_select_op_modal( static_cast(RNA_enum_get(op->ptr, "mode")), WM_gesture_is_modal_first(gesture)); - ED_view3d_viewcontext_init(C, &vc, depsgraph); Object *obact = vc.obact; @@ -4981,7 +6003,7 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op) obedit = vc.obedit; if (obedit) { - obedit_circle_select(C, &vc, wm_userdata, sel_op, mval, float(radius)); + obedit_circle_select(C, &vc, wm_userdata, sel_op, mval, float(radius), op); } else if (BKE_paint_select_face_test(obact)) { paint_facesel_circle_select(&vc, wm_userdata, sel_op, mval, float(radius)); @@ -5009,11 +6031,27 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } else { - if (object_circle_select(&vc, sel_op, mval, float(radius))) { - DEG_id_tag_update(&vc.scene->id, ID_RECALC_SELECT); - WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, vc.scene); + ToolSettings *ts = vc.scene->toolsettings; + const int select_through_int = RNA_enum_get(op->ptr, "select_through"); + const bool default_object_select = U.drag_select_control & USER_DRAG_SELECT_KEYMAP ? + RNA_boolean_get(op->ptr, "select_origin_circle") && + (select_through_int == 2 || + select_through_int == 8) : + ts->select_through && ts->select_through_object && + ts->select_through_circle && + ts->select_origin_circle; + if (default_object_select) { + if (object_circle_select(&vc, sel_op, mval, float(radius))) { + DEG_id_tag_update(&vc.scene->id, ID_RECALC_SELECT); + WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, vc.scene); - ED_outliner_select_sync_from_object_tag(C); + ED_outliner_select_sync_from_object_tag(C); + } + } + else { + BKE_object_update_select_id(CTX_data_main(C)); + int circle_data[3] = {mval[0], mval[1], radius}; + do_lasso_select_objects(&vc, NULL, NULL, sel_op, op, circle_data); } } diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 0cf9d5fa309..5a067f0f7f9 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -516,7 +516,8 @@ short ED_transform_calc_orientation_from_type_ex(const Scene *scene, } case V3D_ORIENT_NORMAL: { if (obedit || (ob && ob->mode & OB_MODE_POSE)) { - ED_getTransformOrientationMatrix(scene, view_layer, v3d, ob, obedit, pivot_point, r_mat); + ED_getTransformOrientationMatrix( + scene, view_layer, v3d, ob, obedit, pivot_point, r_mat, NULL, NULL, NULL); break; } /* No break we define 'normal' as 'local' in Object mode. */ @@ -529,7 +530,8 @@ short ED_transform_calc_orientation_from_type_ex(const Scene *scene, * use the active pones axis for display #33575, this works as expected on a single * bone and users who select many bones will understand what's going on and what local * means when they start transforming. */ - ED_getTransformOrientationMatrix(scene, view_layer, v3d, ob, obedit, pivot_point, r_mat); + ED_getTransformOrientationMatrix( + scene, view_layer, v3d, ob, obedit, pivot_point, r_mat, NULL, NULL, NULL); } else { transform_orientations_create_from_axis(r_mat, UNPACK3(ob->object_to_world)); @@ -752,13 +754,18 @@ int getTransformOrientation_ex(const Scene *scene, struct Object *obedit, float normal[3], float plane[3], - const short around) + const short around, + struct BMVert *eve, + struct BMEdge *eed, + struct BMFace *efa) { int result = ORIENTATION_NONE; const bool activeOnly = (around == V3D_AROUND_ACTIVE); - zero_v3(normal); - zero_v3(plane); + if (efa == NULL && eed == NULL) { + zero_v3(normal); + zero_v3(plane); + } if (obedit) { float imat[3][3], mat[3][3]; @@ -777,20 +784,72 @@ int getTransformOrientation_ex(const Scene *scene, float vec[3] = {0, 0, 0}; /* USE LAST SELECTED WITH ACTIVE */ - if (activeOnly && BM_select_history_active_get(em->bm, &ese)) { - BM_editselection_normal(&ese, normal); - BM_editselection_plane(&ese, plane); + if (efa != NULL || eed != NULL || eve != NULL || + activeOnly && BM_select_history_active_get(em->bm, &ese)) { + if (efa != NULL) { + copy_v3_v3(normal, efa->no); + BM_face_calc_tangent_auto(efa, plane); + result = ORIENTATION_FACE; + } + else if (eed != NULL) { + float eed_plane[3]; + float vec[3]; + add_v3_v3v3(normal, eed->v1->no, eed->v2->no); + sub_v3_v3v3(eed_plane, eed->v2->co, eed->v1->co); + cross_v3_v3v3(vec, normal, eed_plane); + cross_v3_v3v3(normal, eed_plane, vec); + normalize_v3(normal); - switch (ese.htype) { - case BM_VERT: - result = ORIENTATION_VERT; - break; - case BM_EDGE: - result = ORIENTATION_EDGE; - break; - case BM_FACE: - result = ORIENTATION_FACE; - break; + if (BM_edge_is_boundary(eed)) { + sub_v3_v3v3(plane, eed->l->v->co, eed->l->next->v->co); + } + else { + if (eed->v2->co[1] > eed->v1->co[1]) { + sub_v3_v3v3(plane, eed->v2->co, eed->v1->co); + } + else { + sub_v3_v3v3(plane, eed->v1->co, eed->v2->co); + } + } + normalize_v3(plane); + result = ORIENTATION_EDGE; + } + else if (eve != NULL) { + copy_v3_v3(normal, eve->no); + if (eve->e) { + float vert1v3[3] = {eve->e->v1->co[0], eve->e->v1->co[1], eve->e->v1->co[2]}; + float vert2v3[3] = {eve->e->v2->co[0], eve->e->v2->co[1], eve->e->v2->co[2]}; + sub_v3_v3v3(plane, vert2v3, vert1v3); + } + else { + if (eve->no[0] < 0.5f) { + vec[0] = 1.0f; + } + else if (eve->no[1] < 0.5f) { + vec[1] = 1.0f; + } + else { + vec[2] = 1.0f; + } + cross_v3_v3v3(plane, eve->no, vec); + } + normalize_v3(plane); + result = ORIENTATION_VERT; + } + else { + BM_editselection_normal(&ese, normal); + BM_editselection_plane(&ese, plane); + switch (ese.htype) { + case BM_VERT: + result = ORIENTATION_VERT; + break; + case BM_EDGE: + result = ORIENTATION_EDGE; + break; + case BM_FACE: + result = ORIENTATION_FACE; + break; + } } } else { @@ -1289,7 +1348,8 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3]) ViewLayer *view_layer = CTX_data_view_layer(C); View3D *v3d = CTX_wm_view3d(C); - return getTransformOrientation_ex(scene, view_layer, v3d, obact, obedit, normal, plane, around); + return getTransformOrientation_ex( + scene, view_layer, v3d, obact, obedit, normal, plane, around, NULL, NULL, NULL); } void ED_getTransformOrientationMatrix(const Scene *scene, @@ -1298,14 +1358,32 @@ void ED_getTransformOrientationMatrix(const Scene *scene, Object *ob, Object *obedit, const short around, - float r_orientation_mat[3][3]) + float r_orientation_mat[3][3], + struct BMVert *eve, + struct BMEdge *eed, + struct BMFace *efa) { float normal[3] = {0.0, 0.0, 0.0}; float plane[3] = {0.0, 0.0, 0.0}; int type; - type = getTransformOrientation_ex(scene, view_layer, v3d, ob, obedit, normal, plane, around); + if (efa != NULL) { + type = getTransformOrientation_ex( + scene, view_layer, v3d, ob, obedit, normal, plane, around, NULL, NULL, efa); + } + else if (eed != NULL) { + type = getTransformOrientation_ex( + scene, view_layer, v3d, ob, obedit, normal, plane, around, NULL, eed, NULL); + } + else if (eve != NULL) { + type = getTransformOrientation_ex( + scene, view_layer, v3d, ob, obedit, normal, plane, around, eve, NULL, NULL); + } + else { + type = getTransformOrientation_ex( + scene, view_layer, v3d, ob, obedit, normal, plane, around, NULL, NULL, NULL); + } /* Fallback, when the plane can't be calculated. */ if (ORIENTATION_USE_PLANE(type) && is_zero_v3(plane)) { diff --git a/source/blender/editors/uvedit/uvedit_select.c b/source/blender/editors/uvedit/uvedit_select.c index 6897b171d8b..b4951e7aab6 100644 --- a/source/blender/editors/uvedit/uvedit_select.c +++ b/source/blender/editors/uvedit/uvedit_select.c @@ -3947,8 +3947,12 @@ static bool do_lasso_select_mesh_uv_is_edge_inside(const ARegion *region, if (UI_view2d_view_to_region_segment_clip( ®ion->v2d, co_test_a, co_test_b, co_screen_a, co_screen_b) && BLI_rcti_isect_segment(clip_rect, co_screen_a, co_screen_b) && - BLI_lasso_is_edge_inside( - mcoords, mcoords_len, UNPACK2(co_screen_a), UNPACK2(co_screen_b), V2D_IS_CLIPPED)) { + BLI_lasso_is_edge_inside(mcoords, + mcoords_len, + UNPACK2(co_screen_a), + UNPACK2(co_screen_b), + V2D_IS_CLIPPED, + false)) { return true; } return false; diff --git a/source/blender/makesdna/DNA_scene_defaults.h b/source/blender/makesdna/DNA_scene_defaults.h index 6cc01d254ce..e97e7402d1a 100644 --- a/source/blender/makesdna/DNA_scene_defaults.h +++ b/source/blender/makesdna/DNA_scene_defaults.h @@ -366,6 +366,54 @@ /* UV painting */ \ .uv_sculpt_settings = 0, \ .uv_relax_method = UV_SCULPT_TOOL_RELAX_LAPLACIAN, \ + \ + /* Mesh Select */ \ + .box_drag_direction = 1, \ + .lasso_drag_direction = 1, \ + .box_edge = 1, \ + .box_edge_left = 1, \ + .box_edge_right = 1, \ + .box_edge_up = 1, \ + .box_edge_down = 1, \ + .box_face = 1, \ + .box_face_left = 1, \ + .box_face_right = 1, \ + .box_face_up = 1, \ + .box_face_down = 1, \ + .lasso_edge = 1, \ + .lasso_edge_left = 1, \ + .lasso_edge_right = 1, \ + .lasso_edge_up = 1, \ + .lasso_edge_down = 1, \ + .lasso_face = 1, \ + .lasso_face_left = 1, \ + .lasso_face_right = 1, \ + .lasso_face_up = 1, \ + .lasso_face_down = 1, \ + .circle_edge = 2, \ + .circle_face = 1, \ + \ + /* X-Ray */ \ + .xray_button = true, \ + .auto_xray_object = true, \ + .auto_xray_edit = true, \ + .auto_xray_box = true, \ + .auto_xray_lasso = true, \ + .auto_xray_circle = true, \ + .select_through = true, \ + .select_through_object = true, \ + .select_through_box = true, \ + .select_through_lasso = true, \ + .select_through_circle = true, \ + \ + /* Viewport-Facing Select */ \ + .viewport_facing_select_mode = 1, \ + .viewport_facing_select_vert = 1, \ + .viewport_facing_select_edge = 1, \ + .viewport_facing_select_face = 1, \ + \ + /* Object Origin Select */ \ + .select_origin_circle = true, \ } /* clang-format off */ diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 6fb38eae744..31aeae0433b 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1557,7 +1557,40 @@ typedef struct ToolSettings { char gpencil_v3d_align; /** General 2D Editor. */ char gpencil_v2d_align; - char _pad0[2]; + + /* Give the UI an empty prop to expand formatting */ + char ui_prop; + + /* X-Ray Options */ + char xray_button; + char auto_xray; + char auto_xray_button; + char auto_xray_reset; + char auto_xray_object; + char auto_xray_edit; + char auto_xray_box; + char auto_xray_lasso; + char auto_xray_circle; + char select_through; + char select_through_button; + char select_through_object; + char select_through_edit; + char select_through_box; + char select_through_lasso; + char select_through_circle; + + /* Mesh Normal Direction Select */ + char viewport_facing_select; + char viewport_facing_select_mode; + float viewport_facing_select_threshold; + char viewport_facing_select_vert; + char viewport_facing_select_edge; + char viewport_facing_select_face; + + /* object origin select */ + char select_origin_box; + char select_origin_circle; + char _pad0[6]; /* Annotations. */ /** Stroke placement settings - 3D View. */ @@ -1682,7 +1715,41 @@ typedef struct ToolSettings { /** Normal Editing. */ float normal_vector[3]; - char _pad6[4]; + + /** Mesh Select Options. */ + char box_drag_direction; + char lasso_drag_direction; + char box_direction_upright; + char lasso_direction_upright; + char box_edge; + char box_edge_left; + char box_edge_right; + char box_edge_up; + char box_edge_down; + char box_face; + char box_face_left; + char box_face_right; + char box_face_up; + char box_face_down; + char lasso_edge; + char lasso_edge_left; + char lasso_edge_right; + char lasso_edge_up; + char lasso_edge_down; + char lasso_face; + char lasso_face_left; + char lasso_face_right; + char lasso_face_up; + char lasso_face_down; + char circle_edge; + char circle_face; + char show_box_options; + char show_lasso_options; + char show_circle_options; + + /* Combine shading and xray header buttons */ + char shrink_shading_header; + char _pad6[6]; /** * Custom Curve Profile for bevel tool: @@ -2331,6 +2398,78 @@ typedef enum eSnapTransformMode { SCE_SNAP_TRANSFORM_MODE_SCALE = (1 << 2), } eSnapTransformMode; +/** #ToolSettings.viewport_facing_mode */ +enum { + VIEWPORT_FACING_SELECT_BOTH = (1 << 0), + VIEWPORT_FACING_SELECT_NEAR = (1 << 1), + VIEWPORT_FACING_SELECT_XRAY = (1 << 2), +}; + +/** #ToolSettings.viewport_facing_select_vert */ +enum { + VIEWPORT_FACING_SELECT_FRONT_VERTS = (1 << 0), + VIEWPORT_FACING_SELECT_FRONT_VERTS_FACE = (1 << 1), + VIEWPORT_FACING_SELECT_REAR_VERTS = (1 << 2), + VIEWPORT_FACING_SELECT_REAR_VERTS_FACE = (1 << 3), + VIEWPORT_FACING_SELECT_ALL_VERTS = (1 << 4), +}; + +/** #ToolSettings.viewport_facing_select_edge */ +enum { + VIEWPORT_FACING_SELECT_FRONT_EDGES = (1 << 0), + VIEWPORT_FACING_SELECT_FRONT_EDGES_FACE = (1 << 1), + VIEWPORT_FACING_SELECT_REAR_EDGES = (1 << 2), + VIEWPORT_FACING_SELECT_REAR_EDGES_FACE = (1 << 3), + VIEWPORT_FACING_SELECT_ALL_EDGES = (1 << 4), +}; + +/** #ToolSettings.viewport_facing_select_face */ +enum { + VIEWPORT_FACING_SELECT_FRONT_FACES = (1 << 0), + VIEWPORT_FACING_SELECT_FRONT_FACES_VERT = (1 << 1), + VIEWPORT_FACING_SELECT_REAR_FACES = (1 << 2), + VIEWPORT_FACING_SELECT_REAR_FACES_VERT = (1 << 3), + VIEWPORT_FACING_SELECT_ALL_FACES = (1 << 4), +}; + +/** #ToolSettings.face_select */ +enum { + FACE_AUTO = (1 << 0), + FACE_TOUCH = (1 << 1), + FACE_ENCLOSE = (1 << 2), + FACE_CENTER = (1 << 3), +}; + +/** #ToolSettings.edge_select */ +enum { + EDGE_HYBRID = (1 << 0), + EDGE_TOUCH = (1 << 1), + EDGE_ENCLOSE = (1 << 2), +}; + +/** #ToolSettings.mesh_drag_direction */ +enum { + MESH_DIRECTION_ANY = (1 << 0), + MESH_DIRECTION_LEFT_RIGHT = (1 << 1), + MESH_DIRECTION_UP_DOWN = (1 << 2), +}; + +/** #ToolSettings.auto_xray_mode */ +enum { + AUTO_XRAY_DISABLE = (1 << 0), + AUTO_XRAY_OBJECT = (1 << 1), + AUTO_XRAY_EDIT = (1 << 2), + AUTO_XRAY_BOTH = (1 << 3), +}; + +/** #ToolSettings.select_through_mode */ +enum { + SELECT_THROUGH_DISABLE = (1 << 0), + SELECT_THROUGH_OBJECT = (1 << 1), + SELECT_THROUGH_EDIT = (1 << 2), + SELECT_THROUGH_BOTH = (1 << 3), +}; + /** #ToolSettings.selectmode */ #define SCE_SELECT_VERTEX (1 << 0) /* for mesh */ #define SCE_SELECT_EDGE (1 << 1) diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 01b2c0464ce..1b45ea6fe42 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -840,7 +840,11 @@ typedef struct UserDef { /** #eGPUBackendType */ short gpu_backend; - char _pad7[4]; + /** Keymap click-drag direction style. */ + char click_drag_direction; + /** Box, lasso, and circle select mesh control style. */ + char drag_select_control; + char _pad7[2]; /** Private, defaults to 20 for 72 DPI setting. */ short widget_unit; @@ -900,6 +904,12 @@ typedef struct UserDef { char drag_threshold; char move_threshold; + /** Adjustable selection radius */ + float selection_radius; + char adjustable_click_select; + char select_unbiased; + char _pad9[2]; + char font_path_ui[1024]; char font_path_ui_mono[1024]; @@ -1002,11 +1012,11 @@ typedef enum eUserPref_SpaceData_Flag { typedef enum eUserPref_Flag { USER_AUTOSAVE = (1 << 0), USER_FLAG_NUMINPUT_ADVANCED = (1 << 1), - USER_FLAG_UNUSED_2 = (1 << 2), /* cleared */ - USER_FLAG_UNUSED_3 = (1 << 3), /* cleared */ - USER_FLAG_UNUSED_4 = (1 << 4), /* cleared */ + USER_ADJUSTABLE_CLICK_SELECT = (1 << 2), + USER_SELECT_UNBIASED = (1 << 3), + USER_ALTERNATE_CURSOR = (1 << 4), USER_TRACKBALL = (1 << 5), - USER_FLAG_UNUSED_6 = (1 << 6), /* cleared */ + USER_ALTERNATE_CURSOR_LARGE = (1 << 6), USER_FLAG_UNUSED_7 = (1 << 7), /* cleared */ USER_MAT_ON_OB = (1 << 8), USER_FLAG_UNUSED_9 = (1 << 9), /* cleared */ @@ -1153,6 +1163,19 @@ typedef enum eUserpref_TableAPI { USER_TABLET_WINTAB = 2, } eUserpref_TabletAPI; +/** #UserDef.click_drag_direction_types */ +typedef enum eUserpref_Click_Drag_Direction { + USER_CLICK_DRAG_DIRECTION_EIGHT_WAY = 0, + USER_CLICK_DRAG_DIRECTION_LEFT_RIGHT = 1, + USER_CLICK_DRAG_DIRECTION_UP_DOWN = 2, +} eUserpref_Click_Drag_Direction; + +/** #UserDef.drag_select_control_types */ +typedef enum eUserpref_Drag_Select_Control { + USER_DRAG_SELECT_TOOLSETTING = 0, + USER_DRAG_SELECT_KEYMAP = 1, +} eUserpref_Drag_Select_Control; + /** #UserDef.app_flag */ typedef enum eUserpref_APP_Flag { USER_APP_LOCK_CORNER_SPLIT = (1 << 0), diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 078f7389fbd..b50803af76e 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -3057,10 +3057,347 @@ static void rna_def_tool_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}, }; + static const EnumPropertyItem mesh_drag_direction_items[] = { + {MESH_DIRECTION_ANY, "MESH_DIRECTION_ANY", 0, "Any", "Drag in any direction"}, + {MESH_DIRECTION_LEFT_RIGHT, + "MESH_DIRECTION_LEFT_RIGHT", + 0, + "Left Right", + "Drag to the left and right"}, + {MESH_DIRECTION_UP_DOWN, + "MESH_DIRECTION_UP_DOWN", + 0, + "Up Down", + "Drag upwards and downwards"}, + {0, NULL, 0, NULL, NULL}, + }; + + static const EnumPropertyItem edge_select_items[] = { + {EDGE_HYBRID, + "EDGE_HYBRID", + 0, + "Hybrid", + "Select edges that are fully inside the selection area. If no edges are fully inside the " + "selection area, select edges that are touched by the selection area"}, + {EDGE_TOUCH, + "EDGE_TOUCH", + 0, + "Touch", + "Select edges that are touched by the selection area"}, + {EDGE_ENCLOSE, + "EDGE_ENCLOSE", + 0, + "Enclose", + "Select edges that are fully inside the selection area"}, + {0, NULL, 0, NULL, NULL}, + }; + + static const EnumPropertyItem edge_circle_select_items[] = { + {EDGE_TOUCH, + "EDGE_TOUCH", + 0, + "Touch", + "Select edges that are touched by the selection area"}, + {EDGE_ENCLOSE, + "EDGE_ENCLOSE", + 0, + "Enclose", + "Select edges that are fully inside the selection area"}, + {0, NULL, 0, NULL, NULL}, + }; + + static const EnumPropertyItem face_select_items[] = { + {FACE_AUTO, + "FACE_AUTO", + 0, + "Auto", + "Select faces that are touched by the selection area in near select. Select faces whose " + "center is touched by the selection area in X-Ray select"}, + {FACE_TOUCH, + "FACE_TOUCH", + 0, + "Touch", + "Select faces that are touched by the selection area"}, + {FACE_ENCLOSE, + "FACE_ENCLOSE", + 0, + "Enclose", + "Select faces that are fully inside the selection area"}, + {FACE_CENTER, + "FACE_CENTER", + 0, + "Center", + "Select faces whose center is touched by the selection area"}, + {0, NULL, 0, NULL, NULL}, + }; + + static const EnumPropertyItem viewport_facing_select_mode_items[] = { + {VIEWPORT_FACING_SELECT_BOTH, + "BOTH", + 0, + "Near and X-Ray", + "Use viewport-facing selection in near select and X-Ray"}, + {VIEWPORT_FACING_SELECT_NEAR, + "NEAR", + 0, + "Near", + "Use viewport-facing selection in near select"}, + {VIEWPORT_FACING_SELECT_XRAY, + "XRAY", + 0, + "X-Ray", + "Use viewport-facing selection in X-Ray"}, + {0, NULL, 0, NULL, NULL}, + }; + + static const EnumPropertyItem viewport_facing_select_vert_items[] = { + {VIEWPORT_FACING_SELECT_FRONT_VERTS, + "FRONT_VERTS", + 0, + "Front Verts", + "Select vertices with viewport-facing normals"}, + {VIEWPORT_FACING_SELECT_FRONT_VERTS_FACE, + "FRONT_VERTS_FACE", + 0, + "Verts of Front Face", + "Select vertices if they are part of a face that has a viewport-facing normal"}, + {VIEWPORT_FACING_SELECT_REAR_VERTS, + "REAR_VERTS", + 0, + "Rear Verts", + "Select vertices without viewport-facing normals"}, + {VIEWPORT_FACING_SELECT_REAR_VERTS_FACE, + "REAR_VERTS_FACE", + 0, + "Verts of Rear Face", + "Select vertices if they are part of a face that does not have a viewport-facing normal"}, + {VIEWPORT_FACING_SELECT_ALL_VERTS, + "ALL_VERTS", + 0, + "All Verts", + "Select vertices regarless of their normal direction"}, + {0, NULL, 0, NULL, NULL}, + }; + + static const EnumPropertyItem viewport_facing_select_edge_items[] = { + {VIEWPORT_FACING_SELECT_FRONT_EDGES, + "FRONT_EDGES", + 0, + "Front Edges", + "Select edges with viewport-facing normals"}, + {VIEWPORT_FACING_SELECT_FRONT_EDGES_FACE, + "FRONT_EDGES_FACE", + 0, + "Edges of Front Face", + "Select edges if they are part of a face that has a viewport-facing normal"}, + {VIEWPORT_FACING_SELECT_REAR_EDGES, + "REAR_EDGES", + 0, + "Rear Edges", + "Select edges without viewport-facing normals"}, + {VIEWPORT_FACING_SELECT_REAR_EDGES_FACE, + "REAR_EDGES_FACE", + 0, + "Edges of Rear Face", + "Select edges if they are part of a face that does not have a viewport-facing normal"}, + {VIEWPORT_FACING_SELECT_ALL_EDGES, + "ALL_EDGES", + 0, + "All Edges", + "Select edges regarless of their normal direction"}, + {0, NULL, 0, NULL, NULL}, + }; + + static const EnumPropertyItem viewport_facing_select_face_items[] = { + {VIEWPORT_FACING_SELECT_FRONT_FACES, + "FRONT_FACES", + 0, + "Front Faces", + "Select faces with viewport-facing normals"}, + {VIEWPORT_FACING_SELECT_FRONT_FACES_VERT, + "FRONT_FACES_VERT", + 0, + "Faces of Front Vert", + "Select faces if they have a vertex with a viewport-facing normal"}, + {VIEWPORT_FACING_SELECT_REAR_FACES, + "REAR_FACES", + 0, + "Rear Faces", + "Select faces without viewport-facing normals"}, + {VIEWPORT_FACING_SELECT_REAR_FACES_VERT, + "REAR_FACES_VERT", + 0, + "Faces of Rear Vert", + "Select faces if they have a vertex without a viewport-facing normal"}, + {VIEWPORT_FACING_SELECT_ALL_FACES, + "ALL_FACES", + 0, + "All Faces", + "Select faces regarless of their normal direction"}, + {0, NULL, 0, NULL, NULL}, + }; + srna = RNA_def_struct(brna, "ToolSettings", NULL); RNA_def_struct_path_func(srna, "rna_ToolSettings_path"); RNA_def_struct_ui_text(srna, "Tool Settings", ""); + /* Viewport-Facing Select */ + prop = RNA_def_property(srna, "viewport_facing_select", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "viewport_facing_select", 0); + RNA_def_property_ui_text( + prop, + "Viewport Facing Select", + "Filter box, lasso, and circle selection of mesh elements based on the direction of their " + "normals compared to the viewport"); + + prop = RNA_def_property(srna, "viewport_facing_select_mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "viewport_facing_select_mode"); + RNA_def_property_enum_items(prop, viewport_facing_select_mode_items); + RNA_def_property_ui_text(prop, "Mode", "Which selection modes to use viewport-facing selection"); + + prop = RNA_def_property(srna, "viewport_facing_select_vert", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "viewport_facing_select_vert"); + RNA_def_property_enum_items(prop, viewport_facing_select_vert_items); + RNA_def_property_ui_text(prop, "Vert", "Direction and mode for vertices"); + + prop = RNA_def_property(srna, "viewport_facing_select_edge", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "viewport_facing_select_edge"); + RNA_def_property_enum_items(prop, viewport_facing_select_edge_items); + RNA_def_property_ui_text(prop, "Edge", "Direction and mode for edges"); + + prop = RNA_def_property(srna, "viewport_facing_select_face", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "viewport_facing_select_face"); + RNA_def_property_enum_items(prop, viewport_facing_select_face_items); + RNA_def_property_ui_text(prop, "Face", "Direction and mode for faces"); + + prop = RNA_def_property(srna, "viewport_facing_select_threshold", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, 0.0, 1.0); + RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1.0f, 2); + RNA_def_property_ui_text( + prop, + "Threshold", + "How close the angles of the viewport and mesh element need to be for selection to occur"); + + /* Mesh select settings. */ + prop = RNA_def_property(srna, "box_drag_direction", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, mesh_drag_direction_items); + RNA_def_property_ui_text(prop, "Drag Direction", "Click-drag direction style for box select"); + + prop = RNA_def_property(srna, "lasso_drag_direction", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, mesh_drag_direction_items); + RNA_def_property_ui_text(prop, "Drag Direction", "Click-drag direction style for lasso select"); + + prop = RNA_def_property(srna, "box_direction_upright", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "box_direction_upright", 0); + RNA_def_property_ui_text(prop, "Box Direction Helper", ""); + + prop = RNA_def_property(srna, "lasso_direction_upright", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "lasso_direction_upright", 0); + RNA_def_property_ui_text(prop, "Lasso Direction Helper", ""); + + prop = RNA_def_property(srna, "show_box_options", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "show_box_options", 0); + RNA_def_property_ui_text( + prop, "Mesh Options", "Additional options for box selection of mesh elements"); + + prop = RNA_def_property(srna, "show_lasso_options", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "show_lasso_options", 0); + RNA_def_property_ui_text( + prop, "Mesh Options", "Additional options for lasso selection of mesh elements"); + + prop = RNA_def_property(srna, "show_circle_options", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "show_circle_options", 0); + RNA_def_property_ui_text( + prop, "Mesh Options", "Additional options for circle selection of mesh elements"); + + prop = RNA_def_property(srna, "box_edge", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, edge_select_items); + RNA_def_property_ui_text(prop, "Edge", "Box edge selection style"); + + prop = RNA_def_property(srna, "box_edge_left", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, edge_select_items); + RNA_def_property_ui_text(prop, "Edge", "Box edge selection style when dragging left"); + + prop = RNA_def_property(srna, "box_edge_right", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, edge_select_items); + RNA_def_property_ui_text(prop, "Edge", "Box edge selection style when dragging right"); + + prop = RNA_def_property(srna, "box_edge_up", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, edge_select_items); + RNA_def_property_ui_text(prop, "Edge", "Box edge selection style when dragging up"); + + prop = RNA_def_property(srna, "box_edge_down", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, edge_select_items); + RNA_def_property_ui_text(prop, "Edge", "Box edge selection style when dragging down"); + + prop = RNA_def_property(srna, "box_face", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, face_select_items); + RNA_def_property_ui_text(prop, "Face", "Box face selection style"); + + prop = RNA_def_property(srna, "box_face_left", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, face_select_items); + RNA_def_property_ui_text(prop, "Face", "Box face selection style when dragging left"); + + prop = RNA_def_property(srna, "box_face_right", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, face_select_items); + RNA_def_property_ui_text(prop, "Face", "Box face selection style when dragging right"); + + prop = RNA_def_property(srna, "box_face_up", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, face_select_items); + RNA_def_property_ui_text(prop, "Face", "Box face selection style when dragging up"); + + prop = RNA_def_property(srna, "box_face_down", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, face_select_items); + RNA_def_property_ui_text(prop, "Face", "Box face selection style when dragging down"); + + prop = RNA_def_property(srna, "lasso_edge", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, edge_select_items); + RNA_def_property_ui_text(prop, "Edge", "Lasso edge selection style"); + + prop = RNA_def_property(srna, "lasso_edge_left", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, edge_select_items); + RNA_def_property_ui_text(prop, "Edge", "Lasso edge selection style when dragging left"); + + prop = RNA_def_property(srna, "lasso_edge_right", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, edge_select_items); + RNA_def_property_ui_text(prop, "Edge", "Lasso edge selection style when dragging right"); + + prop = RNA_def_property(srna, "lasso_edge_up", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, edge_select_items); + RNA_def_property_ui_text(prop, "Edge", "Lasso edge selection style when dragging up"); + + prop = RNA_def_property(srna, "lasso_edge_down", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, edge_select_items); + RNA_def_property_ui_text(prop, "Edge", "Lasso edge selection style when dragging down"); + + prop = RNA_def_property(srna, "lasso_face", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, face_select_items); + RNA_def_property_ui_text(prop, "Face", "Lasso face selection style"); + + prop = RNA_def_property(srna, "lasso_face_left", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, face_select_items); + RNA_def_property_ui_text(prop, "Face", "Lasso face selection style when dragging left"); + + prop = RNA_def_property(srna, "lasso_face_right", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, face_select_items); + RNA_def_property_ui_text(prop, "Face", "Lasso face selection style when dragging right"); + + prop = RNA_def_property(srna, "lasso_face_up", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, face_select_items); + RNA_def_property_ui_text(prop, "Face", "Lasso face selection style when dragging up"); + + prop = RNA_def_property(srna, "lasso_face_down", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, face_select_items); + RNA_def_property_ui_text(prop, "Face", "Lasso face selection style when dragging down"); + + prop = RNA_def_property(srna, "circle_edge", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, edge_circle_select_items); + RNA_def_property_ui_text(prop, "Edge", "Circle edge selection style"); + + prop = RNA_def_property(srna, "circle_face", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, face_select_items); + RNA_def_property_ui_text(prop, "Face", "Circle face selection style"); + prop = RNA_def_property(srna, "sculpt", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Sculpt"); RNA_def_property_ui_text(prop, "Sculpt", ""); @@ -3733,6 +4070,122 @@ static void rna_def_tool_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Normal Vector", "Normal Vector used to copy, add or multiply"); RNA_def_property_ui_range(prop, -10000.0, 10000.0, 1, 3); + /* UI prop helper, might help with formatting and using headings on a blank line, unused for now */ + prop = RNA_def_property(srna, "ui_prop", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "ui_prop", 0); + RNA_def_property_ui_text(prop, "UI Prop", ""); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + /* Shrink Shading Header */ + prop = RNA_def_property(srna, "shrink_shading_header", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "shrink_shading_header", 0); + RNA_def_property_ui_text( + prop, "Shrink Header", "Combine the four Shading Header buttons into one button that also toggles X-Ray"); + + /* X-Ray header button */ + prop = RNA_def_property(srna, "xray_button", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "xray_button", 0); + RNA_def_property_ui_text( + prop, "X-Ray Button", "Show button for X-Ray in viewport header"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + /* Auto X-Ray */ + prop = RNA_def_property(srna, "auto_xray", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "auto_xray", 0); + RNA_def_property_ui_text(prop, "Auto X-Ray", "Transparent scene display during drag select"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + prop = RNA_def_property(srna, "auto_xray_button", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "auto_xray_button", 0); + RNA_def_property_ui_text(prop, "Auto X-Ray Button", "Show button for automatic X-Ray in viewport header"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + prop = RNA_def_property(srna, "auto_xray_reset", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "auto_xray_reset", 0); + RNA_def_property_ui_text(prop, "Auto X-Ray Reset", "Helper that turns xray off for autoxray"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + prop = RNA_def_property(srna, "auto_xray_object", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "auto_xray_object", 0); + RNA_def_property_ui_text(prop, "Auto X-Ray Object", "Automatic X-Ray in object mode"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + prop = RNA_def_property(srna, "auto_xray_edit", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "auto_xray_edit", 0); + RNA_def_property_ui_text(prop, "Auto X-Ray Edit", "Automatic X-Ray in edit mode"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + prop = RNA_def_property(srna, "auto_xray_box", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "auto_xray_box", 0); + RNA_def_property_ui_text(prop, "Auto X-Ray Box", "Transparent scene display during box select"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + prop = RNA_def_property(srna, "auto_xray_lasso", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "auto_xray_lasso", 0); + RNA_def_property_ui_text(prop, "Auto X-Ray Lasso", "Transparent scene display during lasso select"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + prop = RNA_def_property(srna, "auto_xray_circle", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "auto_xray_circle", 0); + RNA_def_property_ui_text(prop, "Auto X-Ray Circle", "Transparent scene display during circle select"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + /* Select Through */ + prop = RNA_def_property(srna, "select_through", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "select_through", 0); + RNA_def_property_ui_text( + prop, "Select Through", "Select occluded objects and mesh elements with drag select"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + prop = RNA_def_property(srna, "select_through_button", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "select_through_button", 0); + RNA_def_property_ui_text( + prop, "Select Through Button", "Show button for select through in viewport header"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + prop = RNA_def_property(srna, "select_through_object", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "select_through_object", 0); + RNA_def_property_ui_text(prop, "Select Through Object", "Select through in object mode"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + prop = RNA_def_property(srna, "select_through_edit", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "select_through_edit", 0); + RNA_def_property_ui_text(prop, "Select Through Edit", "Select through in edit mode"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + prop = RNA_def_property(srna, "select_through_box", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "select_through_box", 0); + RNA_def_property_ui_text( + prop, "Select Through Box", "Select occluded objects and mesh elements with box select"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + prop = RNA_def_property(srna, "select_through_lasso", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "select_through_lasso", 0); + RNA_def_property_ui_text(prop, + "Select Through Lasso", + "Select occluded objects and mesh elements with lasso select"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + prop = RNA_def_property(srna, "select_through_circle", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "select_through_circle", 0); + RNA_def_property_ui_text(prop, + "Select Through Circle", + "Select occluded objects and mesh elements with circle select"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + /* Object Origin Select */ + prop = RNA_def_property(srna, "select_origin_box", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "select_origin_box", 0); + RNA_def_property_ui_text( + prop, "Select Origin", "Select objects by their origin with box select"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + prop = RNA_def_property(srna, "select_origin_circle", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "select_origin_circle", 0); + RNA_def_property_ui_text( + prop, "Select Origin", "Select objects by their origin with circle select"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + /* Unified Paint Settings */ prop = RNA_def_property(srna, "unified_paint_settings", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 46be0067071..7674f90ae22 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -5310,6 +5310,21 @@ static void rna_def_userdef_edit(BlenderRNA *brna) prop, "Auto-offset Margin", "Minimum distance between nodes for Auto-offsetting nodes"); RNA_def_property_update(prop, 0, "rna_userdef_update"); + prop = RNA_def_property(srna, "adjustable_click_select", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_ADJUSTABLE_CLICK_SELECT); + RNA_def_property_ui_text( + prop, "Adjustable Click-Select", "Use additional options for single-click select"); + + prop = RNA_def_property(srna, "select_unbiased", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SELECT_UNBIASED); + RNA_def_property_ui_text( + prop, "Select Unbiased", "Click-select will not favor unselected mesh elements"); + + prop = RNA_def_property(srna, "selection_radius", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_range(prop, 0.1f, 150.0f); + RNA_def_property_ui_range(prop, 0.1f, 150.0f, 0.01f, 2); + RNA_def_property_ui_text(prop, "Radius", "Size of single-click selection radius"); + /* cursor */ prop = RNA_def_property(srna, "use_cursor_lock_adjust", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_LOCK_CURSOR_ADJUST); @@ -5322,6 +5337,14 @@ static void rna_def_userdef_edit(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DEPTH_CURSOR); RNA_def_property_ui_text( prop, "Cursor Surface Project", "Use the surface depth for cursor placement"); + + prop = RNA_def_property(srna, "alternate_cursor", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_ALTERNATE_CURSOR); + RNA_def_property_ui_text(prop, "Alternate Cursor", "Alternate edit mode crosshair"); + + prop = RNA_def_property(srna, "alternate_cursor_large", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_ALTERNATE_CURSOR_LARGE); + RNA_def_property_ui_text(prop, "Large Cursor", "Supersize the alternate edit mode crosshair"); } static void rna_def_userdef_system(BlenderRNA *brna) @@ -5774,6 +5797,31 @@ static void rna_def_userdef_input(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}, }; + static const EnumPropertyItem click_drag_direction_types[] = { + {USER_CLICK_DRAG_DIRECTION_EIGHT_WAY, + "EIGHT_WAY", + 0, + "Eight", + "Eight directions (N, NE, E, SE, S, SW, W, NW)"}, + {USER_CLICK_DRAG_DIRECTION_LEFT_RIGHT, "LEFT_RIGHT", 0, "Left Right", "Left and right"}, + {USER_CLICK_DRAG_DIRECTION_UP_DOWN, "UP_DOWN", 0, "Up Down", "Up and down"}, + {0, NULL, 0, NULL, NULL}, + }; + + static const EnumPropertyItem drag_select_control_types[] = { + {USER_DRAG_SELECT_TOOLSETTING, + "USER_DRAG_TOOLSETTING", + 0, + "Toolsetting", + "Use toolsettings to control selection options for box, lasso, and circle select"}, + {USER_DRAG_SELECT_KEYMAP, + "USER_DRAG_KEYMAP", + 0, + "Keymap", + "Use the keymap to control selection options for box, lasso, and circle selection"}, + {0, NULL, 0, NULL, NULL}, + }; + static const EnumPropertyItem view_zoom_styles[] = { {USER_ZOOM_CONTINUE, "CONTINUE", @@ -5880,6 +5928,18 @@ static void rna_def_userdef_input(BlenderRNA *brna) "Release Confirms", "Moving things with a mouse drag confirms when releasing the button"); + prop = RNA_def_property(srna, "click_drag_direction", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, click_drag_direction_types); + RNA_def_property_ui_text( + prop, "Keymap Drag Directions", "Style of click-drag direction the keymap will use"); + + prop = RNA_def_property(srna, "drag_select_control", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, drag_select_control_types); + RNA_def_property_ui_text(prop, + "Drag Select Control", + "Use either the keymap or toolsettings to control selection options " + "for box, lasso, and circle select"); + prop = RNA_def_property(srna, "use_numeric_input_advanced", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_FLAG_NUMINPUT_ADVANCED); RNA_def_property_ui_text(prop, diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c index 5d8bb533d7e..9952cfb1a57 100644 --- a/source/blender/makesrna/intern/rna_wm_api.c +++ b/source/blender/makesrna/intern/rna_wm_api.c @@ -389,6 +389,41 @@ static void rna_KeyMap_item_remove(wmKeyMap *km, ReportList *reports, PointerRNA RNA_POINTER_INVALIDATE(kmi_ptr); } +static void rna_keymap_set_direction_any(wmKeyMap *km, PointerRNA *kmi_ptr) +{ + wmKeyMapItem *kmi = kmi_ptr->data; + kmi->direction = -1; + WM_keyconfig_update_tag(km, kmi); +} + +static void rna_keymap_set_direction_left(wmKeyMap *km, PointerRNA *kmi_ptr) +{ + wmKeyMapItem *kmi = kmi_ptr->data; + kmi->direction = 7; + WM_keyconfig_update_tag(km, kmi); +} + +static void rna_keymap_set_direction_right(wmKeyMap *km, PointerRNA *kmi_ptr) +{ + wmKeyMapItem *kmi = kmi_ptr->data; + kmi->direction = 3; + WM_keyconfig_update_tag(km, kmi); +} + +static void rna_keymap_set_direction_up(wmKeyMap *km, PointerRNA *kmi_ptr) +{ + wmKeyMapItem *kmi = kmi_ptr->data; + kmi->direction = 1; + WM_keyconfig_update_tag(km, kmi); +} + +static void rna_keymap_set_direction_down(wmKeyMap *km, PointerRNA *kmi_ptr) +{ + wmKeyMapItem *kmi = kmi_ptr->data; + kmi->direction = 5; + WM_keyconfig_update_tag(km, kmi); +} + static PointerRNA rna_KeyMap_item_find_from_operator(ID *id, wmKeyMap *km, const char *idname, @@ -1197,6 +1232,31 @@ void RNA_api_keymapitems(StructRNA *srna) RNA_def_function_flag(func, FUNC_USE_REPORTS); parm = RNA_def_pointer(func, "item", "KeyMapItem", "Item", ""); RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); + RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); + + func = RNA_def_function(srna, "set_direction_any", "rna_keymap_set_direction_any"); + parm = RNA_def_pointer(func, "item", "KeyMapItem", "Item", ""); + RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); + RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); + + func = RNA_def_function(srna, "set_direction_left", "rna_keymap_set_direction_left"); + parm = RNA_def_pointer(func, "item", "KeyMapItem", "Item", ""); + RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); + RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); + + func = RNA_def_function(srna, "set_direction_right", "rna_keymap_set_direction_right"); + parm = RNA_def_pointer(func, "item", "KeyMapItem", "Item", ""); + RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); + RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); + + func = RNA_def_function(srna, "set_direction_up", "rna_keymap_set_direction_up"); + parm = RNA_def_pointer(func, "item", "KeyMapItem", "Item", ""); + RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); + RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); + + func = RNA_def_function(srna, "set_direction_down", "rna_keymap_set_direction_down"); + parm = RNA_def_pointer(func, "item", "KeyMapItem", "Item", ""); + RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); func = RNA_def_function(srna, "from_id", "WM_keymap_item_find_id"); diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 0d970685582..90f0bbb0f52 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -688,6 +688,7 @@ int WM_operator_call_notest(struct bContext *C, struct wmOperator *op); * Execute this operator again, put here so it can share above code */ int WM_operator_repeat(struct bContext *C, struct wmOperator *op); +int WM_operator_repeat_tool(struct bContext *C, struct wmOperator *op); int WM_operator_repeat_last(struct bContext *C, struct wmOperator *op); /** * \return true if #WM_operator_repeat can run. @@ -1620,7 +1621,7 @@ bool WM_event_is_modal_drag_exit(const struct wmEvent *event, short init_event_val); bool WM_event_is_mouse_drag(const struct wmEvent *event); bool WM_event_is_mouse_drag_or_press(const wmEvent *event); -int WM_event_drag_direction(const wmEvent *event); +int WM_event_drag_direction(const wmEvent *event, struct ToolSettings *ts); char WM_event_utf8_to_ascii(const struct wmEvent *event) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT; /** diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c index c9624d0e14e..2475e617fd0 100644 --- a/source/blender/windowmanager/intern/wm_cursors.c +++ b/source/blender/windowmanager/intern/wm_cursors.c @@ -50,7 +50,15 @@ static GHOST_TStandardCursor convert_to_ghost_standard_cursor(WMCursorType curs) return GHOST_kStandardCursorWait; case WM_CURSOR_EDIT: case WM_CURSOR_CROSS: - return GHOST_kStandardCursorCrosshair; + if (U.flag & USER_ALTERNATE_CURSOR && !(U.flag & USER_ALTERNATE_CURSOR_LARGE)) { + return GHOST_kStandardCursorCrosshairD; + } + else if (U.flag & USER_ALTERNATE_CURSOR && U.flag & USER_ALTERNATE_CURSOR_LARGE) { + return GHOST_kStandardCursorCrosshairE; + } + else { + return GHOST_kStandardCursorCrosshair; + } case WM_CURSOR_X_MOVE: return GHOST_kStandardCursorLeftRight; case WM_CURSOR_Y_MOVE: diff --git a/source/blender/windowmanager/intern/wm_event_query.c b/source/blender/windowmanager/intern/wm_event_query.c index d39a853ead1..05725f1fe13 100644 --- a/source/blender/windowmanager/intern/wm_event_query.c +++ b/source/blender/windowmanager/intern/wm_event_query.c @@ -265,36 +265,71 @@ bool WM_event_is_mouse_drag_or_press(const wmEvent *event) (ISMOUSE_BUTTON(event->type) && (event->val == KM_PRESS)); } -int WM_event_drag_direction(const wmEvent *event) +int WM_event_drag_direction(const wmEvent *event, ToolSettings *ts) { const int delta[2] = { event->xy[0] - event->prev_press_xy[0], event->xy[1] - event->prev_press_xy[1], }; - int theta = round_fl_to_int(4.0f * atan2f((float)delta[1], (float)delta[0]) / (float)M_PI); - int val = KM_DIRECTION_W; + bool left_right = U.click_drag_direction & USER_CLICK_DRAG_DIRECTION_LEFT_RIGHT; + bool up_down = U.click_drag_direction & USER_CLICK_DRAG_DIRECTION_UP_DOWN; + int theta = left_right ? + round_fl_to_int(atan2f(0.0f, (float)delta[0]) / (float)M_PI) : + up_down ? + round_fl_to_int(atan2f(0.0f, (float)delta[1]) / (float)M_PI) : + round_fl_to_int(4.0f * atan2f((float)delta[1], (float)delta[0]) / (float)M_PI); + int val = up_down ? KM_DIRECTION_S : KM_DIRECTION_W; - if (theta == 0) { - val = KM_DIRECTION_E; + if (left_right || up_down) { + if (theta == 0) { + val = up_down ? KM_DIRECTION_N : KM_DIRECTION_E; + } } - else if (theta == 1) { - val = KM_DIRECTION_NE; + else { + if (theta == 0) { + val = KM_DIRECTION_E; + } + else if (theta == 1) { + val = KM_DIRECTION_NE; + } + else if (theta == 2) { + val = KM_DIRECTION_N; + } + else if (theta == 3) { + val = KM_DIRECTION_NW; + } + else if (theta == -1) { + val = KM_DIRECTION_SE; + } + else if (theta == -2) { + val = KM_DIRECTION_S; + } + else if (theta == -3) { + val = KM_DIRECTION_SW; + } } - else if (theta == 2) { - val = KM_DIRECTION_N; - } - else if (theta == 3) { - val = KM_DIRECTION_NW; - } - else if (theta == -1) { - val = KM_DIRECTION_SE; - } - else if (theta == -2) { - val = KM_DIRECTION_S; - } - else if (theta == -3) { - val = KM_DIRECTION_SW; + + if (U.drag_select_control < 1) { + int box = ts->box_drag_direction; + int lasso = ts->lasso_drag_direction; + + if (box > 1) { + ts->box_direction_upright = false; + theta = box == 2 ? round_fl_to_int(atan2f(0.0f, (float)delta[0]) / (float)M_PI) : + round_fl_to_int(atan2f(0.0f, (float)delta[1]) / (float)M_PI); + if (theta == 0) { + ts->box_direction_upright = true; + } + } + if (lasso > 1) { + ts->lasso_direction_upright = false; + theta = lasso == 2 ? round_fl_to_int(atan2f(0.0f, (float)delta[0]) / (float)M_PI) : + round_fl_to_int(atan2f(0.0f, (float)delta[1]) / (float)M_PI); + if (theta == 0) { + ts->lasso_direction_upright = true; + } + } } #if 0 diff --git a/source/blender/windowmanager/intern/wm_event_system.cc b/source/blender/windowmanager/intern/wm_event_system.cc index cf779f1bdf9..21d3978def6 100644 --- a/source/blender/windowmanager/intern/wm_event_system.cc +++ b/source/blender/windowmanager/intern/wm_event_system.cc @@ -1292,6 +1292,11 @@ int WM_operator_repeat(bContext *C, wmOperator *op) op->flag &= ~op_flag; return ret; } +int WM_operator_repeat_tool(bContext *C, wmOperator *op) +{ + const int ret = WM_operator_name_call_ptr(C, op->type, WM_OP_INVOKE_DEFAULT, NULL, NULL); + return ret; +} int WM_operator_repeat_last(bContext *C, wmOperator *op) { const int op_flag = OP_IS_REPEAT_LAST; @@ -3432,7 +3437,8 @@ static eHandlerActionFlag wm_handlers_do(bContext *C, wmEvent *event, ListBase * if ((event->flag & WM_EVENT_FORCE_DRAG_THRESHOLD) || WM_event_drag_test(event, event->prev_press_xy)) { win->event_queue_check_drag_handled = true; - const int direction = WM_event_drag_direction(event); + ToolSettings *ts = CTX_data_tool_settings(C); + const int direction = WM_event_drag_direction(event, ts); /* Intentionally leave `event->xy` as-is, event users are expected to use * `event->prev_press_xy` if they need to access the drag start location. */ diff --git a/source/blender/windowmanager/intern/wm_gesture_ops.c b/source/blender/windowmanager/intern/wm_gesture_ops.c index ae8c446bd87..d9ecd122b19 100644 --- a/source/blender/windowmanager/intern/wm_gesture_ops.c +++ b/source/blender/windowmanager/intern/wm_gesture_ops.c @@ -29,6 +29,7 @@ #include "ED_screen.h" #include "ED_select_utils.h" +#include "ED_view3d.h" #include "UI_interface.h" @@ -85,6 +86,18 @@ static void gesture_modal_state_to_operator(wmOperator *op, int modal_state) } } +static void gesture_toggle_xray(bContext *C) +{ + wmOperatorType *ot = WM_operatortype_find("VIEW3D_OT_toggle_xray", true); + ToolSettings *ts = CTX_data_tool_settings(C); + BLI_assert(ot); + PointerRNA ptr; + WM_operator_properties_create_ptr(&ptr, ot); + WM_operator_name_call_ptr(C, ot, WM_OP_INVOKE_DEFAULT, &ptr, NULL); + WM_operator_properties_free(&ptr); + ts->auto_xray_reset ^= true; +} + static int UNUSED_FUNCTION(gesture_modal_state_from_operator)(wmOperator *op) { PropertyRNA *prop; @@ -163,9 +176,33 @@ static bool gesture_box_apply(bContext *C, wmOperator *op) int WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event) { wmWindow *win = CTX_wm_window(C); + View3D *v3d = CTX_wm_view3d(C); + Object *obedit = CTX_data_edit_object(C); + ToolSettings *ts = CTX_data_tool_settings(C); const ARegion *region = CTX_wm_region(C); const bool wait_for_input = !WM_event_is_mouse_drag_or_press(event) && RNA_boolean_get(op->ptr, "wait_for_input"); + + bool auto_xray = false; + if (U.drag_select_control & USER_DRAG_SELECT_KEYMAP) { + const int auto_xray_int = RNA_enum_get(op->ptr, "auto_xray"); + auto_xray = obedit ? auto_xray_int > 2 : auto_xray_int == 2 || auto_xray_int == 8; + } + else { + auto_xray = ts->auto_xray && ts->auto_xray_box ? + obedit ? ts->auto_xray_edit : ts->auto_xray_object : + false; + } + + if (ts->auto_xray_reset) { + ts->auto_xray_reset ^= true; + } + + if (v3d && auto_xray) { + if (!XRAY_FLAG_ENABLED(v3d)) { + gesture_toggle_xray(C); + } + } if (wait_for_input) { op->customdata = WM_gesture_new(win, region, event, WM_GESTURE_CROSS_RECT); @@ -190,8 +227,11 @@ int WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event) int WM_gesture_box_modal(bContext *C, wmOperator *op, const wmEvent *event) { wmWindow *win = CTX_wm_window(C); + View3D *v3d = CTX_wm_view3d(C); wmGesture *gesture = op->customdata; rcti *rect = gesture->customdata; + Object *obedit = CTX_data_edit_object(C); + ToolSettings *ts = CTX_data_tool_settings(C); if (event->type == EVT_MODAL_MAP) { switch (event->val) { @@ -214,13 +254,22 @@ int WM_gesture_box_modal(bContext *C, wmOperator *op, const wmEvent *event) gesture->modal_state = event->val; } if (gesture_box_apply(C, op)) { + if (ts->auto_xray_reset) { + gesture_toggle_xray(C); + } gesture_modal_end(C, op); return OPERATOR_FINISHED; } + if (ts->auto_xray_reset) { + gesture_toggle_xray(C); + } gesture_modal_end(C, op); return OPERATOR_CANCELLED; } case GESTURE_MODAL_CANCEL: { + if (ts->auto_xray_reset) { + gesture_toggle_xray(C); + } gesture_modal_end(C, op); return OPERATOR_CANCELLED; } @@ -286,8 +335,31 @@ static void gesture_circle_apply(bContext *C, wmOperator *op); int WM_gesture_circle_invoke(bContext *C, wmOperator *op, const wmEvent *event) { wmWindow *win = CTX_wm_window(C); + View3D *v3d = CTX_wm_view3d(C); const bool wait_for_input = !WM_event_is_mouse_drag_or_press(event) && RNA_boolean_get(op->ptr, "wait_for_input"); + Object *obedit = CTX_data_edit_object(C); + ToolSettings *ts = win->scene->toolsettings; + bool auto_xray = false; + if (U.drag_select_control & USER_DRAG_SELECT_KEYMAP) { + const int auto_xray_int = RNA_enum_get(op->ptr, "auto_xray"); + auto_xray = obedit ? auto_xray_int > 2 : auto_xray_int == 2 || auto_xray_int == 8; + } + else { + auto_xray = ts->auto_xray && ts->auto_xray_circle ? + obedit ? ts->auto_xray_edit : ts->auto_xray_object : + false; + } + + if (ts->auto_xray_reset) { + ts->auto_xray_reset ^= true; + } + + if (v3d && auto_xray) { + if (!XRAY_FLAG_ENABLED(v3d)) { + gesture_toggle_xray(C); + } + } op->customdata = WM_gesture_new(win, CTX_wm_region(C), event, WM_GESTURE_CIRCLE); wmGesture *gesture = op->customdata; @@ -345,11 +417,14 @@ static void gesture_circle_apply(bContext *C, wmOperator *op) int WM_gesture_circle_modal(bContext *C, wmOperator *op, const wmEvent *event) { wmWindow *win = CTX_wm_window(C); + View3D *v3d = CTX_wm_view3d(C); wmGesture *gesture = op->customdata; rcti *rect = gesture->customdata; - if (event->type == MOUSEMOVE) { + Object *obedit = CTX_data_edit_object(C); + ToolSettings *ts = win->scene->toolsettings; + if (event->type == MOUSEMOVE) { rect->xmin = event->xy[0] - gesture->winrct.xmin; rect->ymin = event->xy[1] - gesture->winrct.ymin; @@ -415,6 +490,9 @@ int WM_gesture_circle_modal(bContext *C, wmOperator *op, const wmEvent *event) } if (is_finished) { + if (ts->auto_xray_reset) { + gesture_toggle_xray(C); + } gesture_modal_end(C, op); return OPERATOR_FINISHED; /* use finish or we don't get an undo */ } @@ -477,7 +555,31 @@ void WM_OT_circle_gesture(wmOperatorType *ot) int WM_gesture_lasso_invoke(bContext *C, wmOperator *op, const wmEvent *event) { wmWindow *win = CTX_wm_window(C); + View3D *v3d = CTX_wm_view3d(C); PropertyRNA *prop; + Object *obedit = CTX_data_edit_object(C); + ToolSettings *ts = win->scene->toolsettings; + + bool auto_xray = false; + if (U.drag_select_control & USER_DRAG_SELECT_KEYMAP) { + const int auto_xray_int = RNA_enum_get(op->ptr, "auto_xray"); + auto_xray = obedit ? auto_xray_int > 2 : auto_xray_int == 2 || auto_xray_int == 8; + } + else { + auto_xray = ts->auto_xray && ts->auto_xray_lasso ? + obedit ? ts->auto_xray_edit : ts->auto_xray_object : + false; + } + + if (ts->auto_xray_reset) { + ts->auto_xray_reset ^= true; + } + + if (v3d && auto_xray) { + if (!XRAY_FLAG_ENABLED(v3d)) { + gesture_toggle_xray(C); + } + } op->customdata = WM_gesture_new(win, CTX_wm_region(C), event, WM_GESTURE_LASSO); @@ -517,6 +619,10 @@ static int gesture_lasso_apply(bContext *C, wmOperator *op) int retval = OPERATOR_FINISHED; wmGesture *gesture = op->customdata; PointerRNA itemptr; + View3D *v3d = CTX_wm_view3d(C); + Object *obedit = CTX_data_edit_object(C); + wmWindow *win = CTX_wm_window(C); + ToolSettings *ts = win->scene->toolsettings; float loc[2]; int i; const short *lasso = gesture->customdata; @@ -538,12 +644,20 @@ static int gesture_lasso_apply(bContext *C, wmOperator *op) OPERATOR_RETVAL_CHECK(retval); } + if (ts->auto_xray_reset) { + gesture_toggle_xray(C); + } + return retval; } int WM_gesture_lasso_modal(bContext *C, wmOperator *op, const wmEvent *event) { wmGesture *gesture = op->customdata; + View3D *v3d = CTX_wm_view3d(C); + Object *obedit = CTX_data_edit_object(C); + wmWindow *win = CTX_wm_window(C); + ToolSettings *ts = win->scene->toolsettings; if (event->type == EVT_MODAL_MAP) { switch (event->val) { @@ -597,6 +711,9 @@ int WM_gesture_lasso_modal(bContext *C, wmOperator *op, const wmEvent *event) break; } case EVT_ESCKEY: { + if (ts->auto_xray_reset) { + gesture_toggle_xray(C); + } gesture_modal_end(C, op); return OPERATOR_CANCELLED; } diff --git a/source/blender/windowmanager/intern/wm_operator_props.c b/source/blender/windowmanager/intern/wm_operator_props.c index bd3322a8023..1004d953199 100644 --- a/source/blender/windowmanager/intern/wm_operator_props.c +++ b/source/blender/windowmanager/intern/wm_operator_props.c @@ -411,8 +411,93 @@ void WM_operator_properties_gesture_box_ex(wmOperatorType *ot, bool deselect, bo { PropertyRNA *prop; + static const EnumPropertyItem face_select_items[] = { + {FACE_AUTO, + "FACE_AUTO", + 0, + "Auto", + "Select faces that are touched by the selection area in near select. Select faces whose " + "center is touched by the selection area in X-Ray select"}, + {FACE_TOUCH, + "FACE_TOUCH", + 0, + "Touch", + "Select faces that are touched by the selection area"}, + {FACE_ENCLOSE, + "FACE_ENCLOSE", + 0, + "Enclose", + "Select faces that are fully inside the selection area"}, + {FACE_CENTER, + "FACE_CENTER", + 0, + "Center", + "Select faces whose center is touched by the selection area"}, + {0, NULL, 0, NULL, NULL}, + }; + + static const EnumPropertyItem edge_select_items[] = { + {EDGE_HYBRID, + "EDGE_HYBRID", + 0, + "Hybrid", + "Select edges that are fully inside the selection area. If no edges are fully inside the " + "selection area, select edges that are touched by the selection area"}, + {EDGE_TOUCH, + "EDGE_TOUCH", + 0, + "Touch", + "Select edges that are touched by the selection area"}, + {EDGE_ENCLOSE, + "EDGE_ENCLOSE", + 0, + "Enclose", + "Select edges that are fully inside the selection area"}, + {0, NULL, 0, NULL, NULL}, + }; + + static const EnumPropertyItem auto_xray_items[] = { + {AUTO_XRAY_DISABLE, "AUTO_XRAY_DISABLE", 0, "Disable", "Disable Automatic X-Ray"}, + {AUTO_XRAY_OBJECT, + "AUTO_XRAY_OBJECT", + 0, + "Object", + "Enable X-Ray during box select in object mode"}, + {AUTO_XRAY_EDIT, "AUTO_XRAY_EDIT", 0, "Edit", "Enable X-Ray during box select in edit mode"}, + {AUTO_XRAY_BOTH, + "AUTO_XRAY_BOTH", + 0, + "Both", + "Enable X-Ray during box select in object and edit mode"}, + {0, NULL, 0, NULL, NULL}, + }; + + static const EnumPropertyItem select_through_items[] = { + {SELECT_THROUGH_OBJECT, "SELECT_THROUGH_OBJECT", 0, "Object", "Select occluded objects"}, + {SELECT_THROUGH_EDIT, "SELECT_THROUGH_EDIT", 0, "Edit", "Select occluded mesh elements"}, + {SELECT_THROUGH_BOTH, + "SELECT_THROUGH_BOTH", + 0, + "Both", + "Select occluded objects and mesh elements"}, + {SELECT_THROUGH_DISABLE, "SELECT_THROUGH_DISABLE", 0, "Disable", "Disable Select Through"}, + {0, NULL, 0, NULL, NULL}, + }; + WM_operator_properties_border(ot); + prop = RNA_def_boolean(ot->srna, "select_origin_box", false, "Select Object Origin", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + + prop = RNA_def_enum(ot->srna, "face_type", face_select_items, 0, "Face Select", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "edge_type", edge_select_items, 0, "Edge Select", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "auto_xray", auto_xray_items, 0, "Automatic X-Ray", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "select_through", select_through_items, 0, "Select Through", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + if (deselect) { prop = RNA_def_boolean( ot->srna, "deselect", false, "Deselect", "Deselect rather than select items"); @@ -440,7 +525,8 @@ void WM_operator_properties_use_cursor_init(wmOperatorType *ot) void WM_operator_properties_gesture_box_select(wmOperatorType *ot) { - WM_operator_properties_gesture_box_ex(ot, true, true); + WM_operator_properties_gesture_box_ex( + ot, true, true); } void WM_operator_properties_gesture_box(wmOperatorType *ot) { @@ -519,6 +605,93 @@ void WM_operator_properties_gesture_box_zoom(wmOperatorType *ot) void WM_operator_properties_gesture_lasso(wmOperatorType *ot) { PropertyRNA *prop; + static const EnumPropertyItem face_select_items[] = { + {FACE_AUTO, + "FACE_AUTO", + 0, + "Auto", + "Select faces that are touched by the selection area in near select. Select faces whose " + "center is touched by the selection area in X-Ray select"}, + {FACE_TOUCH, + "FACE_TOUCH", + 0, + "Touch", + "Select faces that are touched by the selection area"}, + {FACE_ENCLOSE, + "FACE_ENCLOSE", + 0, + "Enclose", + "Select faces that are fully inside the selection area"}, + {FACE_CENTER, + "FACE_CENTER", + 0, + "Center", + "Select faces whose center is touched by the selection area"}, + {0, NULL, 0, NULL, NULL}, + }; + + static const EnumPropertyItem edge_select_items[] = { + {EDGE_HYBRID, + "EDGE_HYBRID", + 0, + "Hybrid", + "Select edges that are fully inside the selection area. If no edges are fully inside the " + "selection area, select edges that are touched by the selection area"}, + {EDGE_TOUCH, + "EDGE_TOUCH", + 0, + "Touch", + "Select edges that are touched by the selection area"}, + {EDGE_ENCLOSE, + "EDGE_ENCLOSE", + 0, + "Enclose", + "Select edges that are fully inside the selection area"}, + {0, NULL, 0, NULL, NULL}, + }; + + static const EnumPropertyItem auto_xray_items[] = { + {AUTO_XRAY_DISABLE, "AUTO_XRAY_DISABLE", 0, "Disable", "Disable Automatic X-Ray"}, + {AUTO_XRAY_OBJECT, + "AUTO_XRAY_OBJECT", + 0, + "Object", + "Enable X-Ray during lasso select in object mode"}, + {AUTO_XRAY_EDIT, + "AUTO_XRAY_EDIT", + 0, + "Edit", + "Enable X-Ray during lasso select in edit mode"}, + {AUTO_XRAY_BOTH, + "AUTO_XRAY_BOTH", + 0, + "Both", + "Enable X-Ray during lasso select in object and edit mode"}, + {0, NULL, 0, NULL, NULL}, + }; + + static const EnumPropertyItem select_through_items[] = { + {SELECT_THROUGH_OBJECT, "SELECT_THROUGH_OBJECT", 0, "Object", "Select occluded objects"}, + {SELECT_THROUGH_EDIT, "SELECT_THROUGH_EDIT", 0, "Edit", "Select occluded mesh elements"}, + {SELECT_THROUGH_BOTH, + "SELECT_THROUGH_BOTH", + 0, + "Both", + "Select occluded objects and mesh elements"}, + {SELECT_THROUGH_DISABLE, "SELECT_THROUGH_DISABLE", 0, "Disable", "Disable Select Through"}, + {0, NULL, 0, NULL, NULL}, + }; + + WM_operator_properties_border(ot); + + prop = RNA_def_enum(ot->srna, "face_type", face_select_items, 0, "Face Select", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "edge_type", edge_select_items, 0, "Edge Select", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "auto_xray", auto_xray_items, 0, "Automatic X-Ray", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "select_through", select_through_items, 0, "Select Through", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); prop = RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", ""); RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); } @@ -557,6 +730,81 @@ void WM_operator_properties_gesture_circle(wmOperatorType *ot) PropertyRNA *prop; const int radius_default = 25; + static const EnumPropertyItem face_select_items[] = { + {FACE_AUTO, + "FACE_AUTO", + 0, + "Auto", + "Select faces that are touched by the selection area in near select. Select faces whose " + "center is touched by the selection area in X-Ray select"}, + {FACE_TOUCH, + "FACE_TOUCH", + 0, + "Touch", + "Select faces that are touched by the selection area"}, + {FACE_ENCLOSE, + "FACE_ENCLOSE", + 0, + "Enclose", + "Select faces that are fully inside the selection area"}, + {FACE_CENTER, + "FACE_CENTER", + 0, + "Center", + "Select faces whose center is touched by the selection area"}, + {0, NULL, 0, NULL, NULL}, + }; + + static const EnumPropertyItem edge_select_items[] = { + {EDGE_TOUCH, + "EDGE_TOUCH", + 0, + "Touch", + "Select edges that are touched by the selection area"}, + {EDGE_ENCLOSE, + "EDGE_ENCLOSE", + 0, + "Enclose", + "Select edges that are fully inside the selection area"}, + {0, NULL, 0, NULL, NULL}, + }; + + static const EnumPropertyItem auto_xray_items[] = { + {AUTO_XRAY_DISABLE, "AUTO_XRAY_DISABLE", 0, "Disable", "Disable Automatic X-Ray"}, + {AUTO_XRAY_OBJECT, + "AUTO_XRAY_OBJECT", + 0, + "Object", + "Enable X-Ray during circle select in object mode"}, + {AUTO_XRAY_EDIT, "AUTO_XRAY_EDIT", 0, "Edit", "Enable X-Ray during circle select in edit mode"}, + {AUTO_XRAY_BOTH, + "AUTO_XRAY_BOTH", + 0, + "Both", + "Enable X-Ray during circle select in object and edit mode"}, + {0, NULL, 0, NULL, NULL}, + }; + + static const EnumPropertyItem select_through_items[] = { + {SELECT_THROUGH_OBJECT, + "SELECT_THROUGH_OBJECT", + 0, + "Object", + "Select occluded objects"}, + {SELECT_THROUGH_EDIT, + "SELECT_THROUGH_EDIT", + 0, + "Edit", + "Select occluded mesh elements"}, + {SELECT_THROUGH_BOTH, + "SELECT_THROUGH_BOTH", + 0, + "Both", + "Select occluded objects and mesh elements"}, + {SELECT_THROUGH_DISABLE, "SELECT_THROUGH_DISABLE", 0, "Disable", "Disable Select Through"}, + {0, NULL, 0, NULL, NULL}, + }; + prop = RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX); RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); prop = RNA_def_int(ot->srna, "y", 0, INT_MIN, INT_MAX, "Y", "", INT_MIN, INT_MAX); @@ -565,6 +813,18 @@ void WM_operator_properties_gesture_circle(wmOperatorType *ot) prop = RNA_def_boolean(ot->srna, "wait_for_input", true, "Wait for Input", ""); RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + + prop = RNA_def_boolean(ot->srna, "select_origin_circle", true, "Select Object Origin", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + + prop = RNA_def_enum(ot->srna, "face_type", face_select_items, 0, "Face Select", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "edge_type", edge_select_items, 0, "Edge Select", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "auto_xray", auto_xray_items, 0, "Automatic X-Ray", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "select_through", select_through_items, 0, "Select Through", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); } void WM_operator_properties_mouse_select(wmOperatorType *ot) -- 2.30.2 From 24600cede44911d9b94d24b3de85dddea0cbd3da Mon Sep 17 00:00:00 2001 From: Lukas Sneyd Date: Mon, 10 Apr 2023 02:48:11 -0700 Subject: [PATCH 2/6] icons, tool options --- .../blender_icons16/icon16_action_tweak.dat | Bin 1048 -> 1048 bytes .../datafiles/blender_icons16/icon16_add.dat | Bin 1048 -> 1048 bytes .../datafiles/blender_icons16/icon16_anim.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_anim_data.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_append_blend.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_axis_front.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_axis_side.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_axis_top.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_blender.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_boids.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_color.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_con_followpath.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_con_loclimit.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_con_sizelimit.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_con_transform.dat | Bin 1048 -> 1048 bytes .../datafiles/blender_icons16/icon16_cone.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_current_file.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_curve_ncircle.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_curve_ncurve.dat | Bin 1048 -> 1048 bytes .../icon16_decorate_driver.dat | Bin 1048 -> 1048 bytes .../icon16_decorate_library_override.dat | Bin 1048 -> 1048 bytes .../icon16_driver_transform.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_duplicate.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_edgesel.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_empty_axis.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_export.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_fcurve.dat | Bin 1048 -> 1048 bytes .../datafiles/blender_icons16/icon16_file.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_file_backup.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_file_blank.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_file_cache.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_force_curve.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_force_harmonic.dat | Bin 1048 -> 1048 bytes .../icon16_gp_multiframe_editing.dat | Bin 1048 -> 1048 bytes .../icon16_gp_only_selected.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_graph.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_image_plane.dat | Bin 1048 -> 1048 bytes .../icon16_image_reference.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_import.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_ipo_bezier.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_ipo_cubic.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_ipo_quad.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_ipo_quint.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_ipo_sine.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_keyframe.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_keyingset.dat | Bin 1048 -> 1048 bytes .../icon16_library_data_broken.dat | Bin 1048 -> 1048 bytes .../icon16_library_data_override.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_light_point.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_light_sun.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_linenumbers_on.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_linked.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_lockview_on.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_mat_sphere_sky.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_material.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_material_data.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_mod_bevel.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_mod_cloth.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_mod_decim.dat | Bin 1048 -> 1048 bytes .../icon16_mod_dynamicpaint.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_mod_envelope.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_mod_explode.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_mod_fluidsim.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_mod_instance.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_mod_length.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_mod_lineart.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_mod_mask.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_mod_outline.dat | Bin 1048 -> 1048 bytes .../icon16_mod_particle_instance.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_mod_particles.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_mod_physics.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_mod_shrinkwrap.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_mod_soft.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_mod_subsurf.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_mod_time.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_modifier_data.dat | Bin 1048 -> 1048 bytes .../icon16_node_compositing.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_node_corner.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_node_material.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_node_texture.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_node_top.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_normals_face.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_normals_vertex.dat | Bin 1048 -> 1048 bytes .../icon16_orientation_cursor.dat | Bin 1048 -> 1048 bytes .../icon16_orientation_gimbal.dat | Bin 1048 -> 1048 bytes .../icon16_orientation_local.dat | Bin 1048 -> 1048 bytes .../icon16_orientation_normal.dat | Bin 1048 -> 1048 bytes .../icon16_outliner_data_empty.dat | Bin 1048 -> 1048 bytes .../icon16_outliner_ob_curves.dat | Bin 1048 -> 1048 bytes .../icon16_outliner_ob_image.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_overlay.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_package.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_panel_close.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_particle_tip.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_pastedown.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_pasteflipup.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_pivot_median.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_play_sound.dat | Bin 1048 -> 1048 bytes .../icon16_pointcloud_data.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_preset_new.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_question.dat | Bin 1048 -> 1048 bytes .../icon16_restrict_color_on.dat | Bin 1048 -> 1048 bytes .../datafiles/blender_icons16/icon16_rna.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_rndcurve.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_rootcurve.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_screen_back.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_scriptplugins.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_sculptmode_hlt.dat | Bin 1048 -> 1048 bytes .../icon16_seq_luma_waveform.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_sequence.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_settings.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_shaderfx.dat | Bin 1048 -> 1048 bytes .../icon16_shading_texture.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_snap_midpoint.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_snap_normal.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_sortalpha.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_speaker.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_spherecurve.dat | Bin 1048 -> 1048 bytes .../icon16_stylus_pressure.dat | Bin 1048 -> 1048 bytes .../icon16_surface_ncircle.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_surface_ncurve.dat | Bin 1048 -> 1048 bytes .../icon16_surface_ncylinder.dat | Bin 1048 -> 1048 bytes .../icon16_surface_nsphere.dat | Bin 1048 -> 1048 bytes .../icon16_surface_nsurface.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_surface_ntorus.dat | Bin 1048 -> 1048 bytes .../datafiles/blender_icons16/icon16_time.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_tool_settings.dat | Bin 1048 -> 1048 bytes .../icon16_tracking_backwards.dat | Bin 1048 -> 1048 bytes .../icon16_tracking_refine_backwards.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_unlinked.dat | Bin 1048 -> 1048 bytes .../datafiles/blender_icons16/icon16_url.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_uv_facesel.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_uv_sync_select.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_vis_sel_00.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_vis_sel_01.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_vis_sel_10.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_vis_sel_11.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_world_data.dat | Bin 1048 -> 1048 bytes .../datafiles/blender_icons16/icon16_x.dat | Bin 1048 -> 1048 bytes .../blender_icons16/icon16_zoom_all.dat | Bin 1048 -> 1048 bytes .../datafiles/blender_icons32/icon32_add.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_anchor_right.dat | Bin 4120 -> 4120 bytes .../datafiles/blender_icons32/icon32_anim.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_anim_data.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_axis_front.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_blender.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_community.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_con_loclimit.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_con_sizelimit.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_con_splineik.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_con_transform.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_con_translike.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_current_file.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_decorate.dat | Bin 4120 -> 4120 bytes .../icon32_decorate_library_override.dat | Bin 4120 -> 4120 bytes .../icon32_driver_transform.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_edgesel.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_export.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_file_archive.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_file_blend.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_file_cache.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_file_image.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_force_boid.dat | Bin 4120 -> 4120 bytes .../icon32_force_fluidflow.dat | Bin 4120 -> 4120 bytes .../icon32_fullscreen_enter.dat | Bin 4120 -> 4120 bytes .../icon32_fullscreen_exit.dat | Bin 4120 -> 4120 bytes .../icon32_gp_only_selected.dat | Bin 4120 -> 4120 bytes .../icon32_gp_select_points.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_group_vcol.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_image_data.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_import.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_ipo_cubic.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_key_dehlt.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_key_hlt.dat | Bin 4120 -> 4120 bytes .../icon32_library_data_broken.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_light_sun.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_linenumbers_on.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_material.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_material_data.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_mod_decim.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_mod_edgesplit.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_mod_envelope.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_mod_explode.dat | Bin 4120 -> 4120 bytes .../icon32_mod_hue_saturation.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_mod_instance.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_mod_lattice.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_mod_length.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_mod_lineart.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_mod_mask.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_mod_offset.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_mod_outline.dat | Bin 4120 -> 4120 bytes .../icon32_mod_particle_instance.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_mod_particles.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_mod_physics.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_mod_skin.dat | Bin 4120 -> 4120 bytes .../icon32_mod_triangulate.dat | Bin 4120 -> 4120 bytes .../icon32_mod_vertex_weight.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_mod_wave.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_node_corner.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_node_material.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_node_texture.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_node_top.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_normals_face.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_normals_vertex.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_onionskin_off.dat | Bin 4120 -> 4120 bytes .../icon32_orientation_cursor.dat | Bin 4120 -> 4120 bytes .../icon32_orientation_gimbal.dat | Bin 4120 -> 4120 bytes .../icon32_orientation_normal.dat | Bin 4120 -> 4120 bytes .../icon32_outliner_data_pointcloud.dat | Bin 4120 -> 4120 bytes .../icon32_outliner_ob_curves.dat | Bin 4120 -> 4120 bytes .../icon32_outliner_ob_pointcloud.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_package.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_panel_close.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_pastedown.dat | Bin 4120 -> 4120 bytes .../icon32_pointcloud_data.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_preset.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_prop_on.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_rndcurve.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_rootcurve.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_scriptplugins.dat | Bin 4120 -> 4120 bytes .../icon32_seq_luma_waveform.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_settings.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_shaderfx.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_shapekey_data.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_snap_normal.dat | Bin 4120 -> 4120 bytes .../datafiles/blender_icons32/icon32_time.dat | Bin 4120 -> 4120 bytes .../icon32_tracking_backwards.dat | Bin 4120 -> 4120 bytes .../icon32_tracking_clear_backwards.dat | Bin 4120 -> 4120 bytes .../icon32_tracking_clear_forwards.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_unlinked.dat | Bin 4120 -> 4120 bytes .../datafiles/blender_icons32/icon32_url.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_uv_edgesel.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_uv_vertexsel.dat | Bin 4120 -> 4120 bytes .../datafiles/blender_icons32/icon32_x.dat | Bin 4120 -> 4120 bytes .../blender_icons32/icon32_zoom_all.dat | Bin 4120 -> 4120 bytes .../startup/bl_ui/space_toolsystem_common.py | 59 +++++++++++ .../startup/bl_ui/space_toolsystem_toolbar.py | 1 + scripts/startup/bl_ui/space_view3d.py | 4 +- source/blender/editors/include/UI_icons.h | 4 +- .../editors/space_view3d/view3d_intern.h | 3 + .../blender/editors/space_view3d/view3d_ops.c | 3 + .../editors/space_view3d/view3d_select.cc | 63 ++++++++++++ source/blender/windowmanager/WM_api.h | 7 +- .../windowmanager/intern/wm_operator_props.c | 94 ++++++++++++------ .../windowmanager/intern/wm_operators.c | 3 + 245 files changed, 203 insertions(+), 38 deletions(-) diff --git a/release/datafiles/blender_icons16/icon16_action_tweak.dat b/release/datafiles/blender_icons16/icon16_action_tweak.dat index a67990a0b20227684eb6fa82396ee798262af9f5..b4a840bece358cf3ca858bdb5b431dc7c8d3a8e0 100644 GIT binary patch delta 23 dcmbQiF@s~nYo^Kl%&e0?Fv$aH-pMk|e*kI_2#f## delta 20 ccmbQiF@s~nYbM72$#0mH8T&U2Fmo^h08di}aR2}S diff --git a/release/datafiles/blender_icons16/icon16_add.dat b/release/datafiles/blender_icons16/icon16_add.dat index dbb79562f80899e1f37ff01ced42396cf8aabb20..79babc512bc051eef8b7c7a8e25b7827677dbb04 100644 GIT binary patch literal 1048 zcmWe&U|j<+3}BV-eBVc0GLN#qW}N^ literal 1048 zcmWe&U|I9Pu5{lnEZm#nb8EuYUi~7|Ns9>AU2t(Xu$!bLxK1R KkUiOi`3V5OJsTDP diff --git a/release/datafiles/blender_icons16/icon16_anim_data.dat b/release/datafiles/blender_icons16/icon16_anim_data.dat index afdb1fc875b03c474eec481718ac4713fe0bbcf6..f873a0489978aeaff8f06e6ac23cd2b593385362 100644 GIT binary patch delta 68 zcmbQiF@s~nWJX5&iHahVS1`(RI{g3t|0NIu1tccFV030Qovg#u4i`3=sA$0flnw*p LBS7|K6XquXImRMZ delta 60 zcmbQiF@s~nWX8$HOrn!lFv>I9Pu5{lnEZm#nb8EuYUi~7|Ns9>AU2t(Xu$!bLxK1R KkUiOi`3V5OJsTDP diff --git a/release/datafiles/blender_icons16/icon16_append_blend.dat b/release/datafiles/blender_icons16/icon16_append_blend.dat index 80002bc2e940ec6df0e2ec3d5dca0b8ac4dd5aad..8ddd6671e74e99429f64578cba675192b470244e 100644 GIT binary patch literal 1048 zcmb`F%?bfg7={le+bOb@$cAzOV__jyT!0(v{D0@!M{!r1SuH77M^f|CDcCcU`DhH@Sz7eD8d-d z&`R>4KLpWc%{kFRq6dBX=DujT#p?gXCANCdyFf|n_r#sJ zy*3Z(@}E7eafz*a<24VIkJy1KY+!EA+Hz(aum*Wk2be;}Hvdcg1!XISkN^Mx literal 1048 zcmb`Du?_)26h((bw40zNAqomT3I#epprc*!2NECPJ9MH@YxUcRN})p#g?gQrjEzio zMu9YmbV)S diff --git a/release/datafiles/blender_icons16/icon16_axis_top.dat b/release/datafiles/blender_icons16/icon16_axis_top.dat index b3035f6c7f555a765794f67a7e2cd8bfd7ef3fd1..be9b34126b828576cc0c0e25580a4e656a53c1f9 100644 GIT binary patch delta 53 zcmbQiF@s~nVn)Wo$x9fW8HFalU{q%mny9EC^8f#TAs}`E;+aqyC~mU3f@uLG0CI;K A8vp z)cytH4NyKCkgWy8tWf?YsQgqY|0I9)@x94!7}X{3L1hJiBKx2!-U8`glh-gx z%W48yyin0^AeA5hx3n^%?I?7GbhyoH|iaWO4?RHZRz*P(?>3FJRJVbeVjC dX*uU{s3CVIH!z!X9t84E0kPENgUsQK3;=S+omBt; literal 1048 zcmcJL%}PR16opTMB~);m25QhO34&_YAgHJ4J(~9j4MLy6Svqte5&2UCUm!wi&@2ps zKrC+G(tY4?QEv!d`0m>K?7jB+iJWs0oUS;RMK3bWUBR-xIF5Iq0+44u$)c*$i z& diff --git a/release/datafiles/blender_icons16/icon16_color.dat b/release/datafiles/blender_icons16/icon16_color.dat index 762a38edac8da871ac3163c572fc148d70ff3f90..48ce1403e9854d7be82f3d6ccafd1d134116b8d8 100644 GIT binary patch delta 26 icmbQiF@s~mc2>pz|NmD{JRq|1f;AK4_RT!ZJd6OOBnr>~ delta 26 icmbQiF@s~mc2VxSejQL>t36!70l+So(@)ag~ASuFJ L57d%5(Le?OVI&v2 delta 82 zcmbQiF@s~mWXAs!6?G;a5C+qe7=wXygU;jzMvwrIaR4G>!}1>pCO0tGKp0n;>>2-0 P7GbUjX@f{kRCECV$=N1G diff --git a/release/datafiles/blender_icons16/icon16_con_sizelimit.dat b/release/datafiles/blender_icons16/icon16_con_sizelimit.dat index 1c5b6cfc0868b547c5bddb0ec84ea3f502b0680d..94211c8491171a5382bac97adbafc0960cc04a10 100644 GIT binary patch delta 80 zcmbQiF@s~mWX3ZSr`Q9DEA@vIw3^> delta 80 zcmbQiF@s~mWXAs!r`Q9DEA@>3CyOuwnUkk5g4lZ)4FvxG|G$_43V`hYlS7z5Qd5{f S%0!rf?1_ptEFhVQiY@?p>LWt{ diff --git a/release/datafiles/blender_icons16/icon16_con_transform.dat b/release/datafiles/blender_icons16/icon16_con_transform.dat index a7815f5b3c47b343b48150fe7e0038ed79166865..34dfc6a5a846c6a0bf97b800bc473d87b88b8a98 100644 GIT binary patch delta 89 zcmbQiF@s}5I^(5@iV71umNQ#{HZp|NsBL5`-t$Fc}NB09j9fSO|y( dfcW9$15Em&mw_w?1}Ffs?Sc5rW)@}_(#{Hb9{{R2K0)!{mFc}NB0$GoNSO|y( cfcU}W15Em&SAZ;g1}Ffrf%x=h7G@Df08}F{(f|Me diff --git a/release/datafiles/blender_icons16/icon16_cone.dat b/release/datafiles/blender_icons16/icon16_cone.dat index 8c7e4e640a19a1df617d2f21f3f4e7f860f2207e..b97f063b9ea3b6c95871cfbee2f1dfe22d31eca1 100644 GIT binary patch delta 118 zcmbQiF@s}5I-|tI3~R=+iA%HvOBs;B|Ns9>Cq6J{ESW6Ac$qP0@(acpJU}rHiA%HvOBj&A|Ns9>CO$A`ES@aFc$qPK@(acplO34YS+@Zt zY9=a5OkTny&zTD3oC9LkiHb6lUod$K?gerfp?D{dE}f{TF*%1hm{E1|LFRBq1^_0k BGF$)v diff --git a/release/datafiles/blender_icons16/icon16_current_file.dat b/release/datafiles/blender_icons16/icon16_current_file.dat index cc381ac5cfa86d976ae4b825e6c0cb6d53bdf655..09ef8ec808f0ffee888767d49bc80556d3058a11 100644 GIT binary patch delta 40 vcmbQiF@s}6F(c!h$t8^TjI%dyVdQ4yl=%Pu|8*eVGWi5kH>1+z5auHQRJRfM delta 40 vcmbQiF@s}6F(c#M$t8^TjB_?`VdQ4yl>Gny|8*eVI{5@sH>2|85auHQRTL5Z diff --git a/release/datafiles/blender_icons16/icon16_curve_ncircle.dat b/release/datafiles/blender_icons16/icon16_curve_ncircle.dat index fb54c393cce6cfbe3e00f5359fc37187df8e28bb..e39e9339fcee383fac93b8be50f8259fc1b8f700 100644 GIT binary patch delta 42 xcmbQiF@s}5JY(;~gnGvQi4U|H`!@413NtbGPF7$BicDU>tUWQFWAbHYR{%D44j2Fc delta 42 wcmbQiF@s}5JY(O)gnA(HK%235GY_LM6Jy_G1!kbgj1qVoQcAZ`NU_=$=-llL&k005XsI|2Xz diff --git a/release/datafiles/blender_icons16/icon16_driver_transform.dat b/release/datafiles/blender_icons16/icon16_driver_transform.dat index b0ca589ee81ab6bee33bbfc5680de28dff45c1cc..cc50f0e3a96c423c699775abe20325188d43fefa 100644 GIT binary patch literal 1048 zcmchWF-k*05QbMFN*W0&c9Lj<(aNJ}6AKTJ+(E%-om5GoXGjWDiG_Fo1tk{o07)SP zTLo>N-@u#jvqmtDfsdJQX7;h!x33UFD8R--2>Zn2#SqTHe`%VQ;Mx7RXfv=G_o?;a zG_J?aOafi4<7Jq@veswi%;ez>iryzrpd&uO_r!Pcf%qkUB7Tb>ir4WcSb`ipKwbJr z__g>ezU^)izk*gqKk8MfkGw|y2`lav@iiD{tVg|7>hE47|AKkff5>{<|CYN&+}>w1 zBi{cGb>06Re&FlL8}JBze)r^hel`3?<`cXv{(@J)2?c&!9zOBNpNd2>un4UJFrd z6|`B;z)tuWqF`mgsSxyWqc~C~9!${!_Ibn2vL@4s69d zIy*TWYmU#sD~xGAsAp#!-k|1l`Wz0#?T!ucCVne^g!k`Ce*sG}-@vb76h`0*S~6e3 z&%~ecS$C`WDYQ$vVb&mj^o;%!Cfu#!lkikh4YMlwyJz%Y5YOArZ|6Vcyxl)@w~BXR zucQ-Z^W=K}OMKCH=-1%}^!=^Le3{v~c#iLj_wc5;eZPD0LwsAjj=#WP{y&+Yx5`<2 d-c8L0_3Z4xNt}^o(7$7xyR-8EGw%OgzX1{qPZ9tC diff --git a/release/datafiles/blender_icons16/icon16_duplicate.dat b/release/datafiles/blender_icons16/icon16_duplicate.dat index 1798c1ee575cd833cdd42dac13501d7d077d7cb1..cf093dfd5aa397801727c2883338467d74b898bf 100644 GIT binary patch delta 40 vcmbQiF@s}+Ff-$aiHZ`FFEH{<)Z_tDER#K$>sdei|Nq}%@sdek|Nq}%@i|2JR&0w6sTM8g1(uRi$+qcUUCWDX{M#siZrn5;S7 WfufIqm}8=%!o&;wn^!aCG6DdlDIW6x diff --git a/release/datafiles/blender_icons16/icon16_file.dat b/release/datafiles/blender_icons16/icon16_file.dat index 5e617c4b04d20fcd90ad4384478dc2e642b64faa..2f7e2255b0c5327ff60dcdb203402ff44d3ee477 100644 GIT binary patch delta 56 zcmbQiF@s}6G85y&iG{+G&ohfoTp%(zhnZ*c8Yb(>`OKV?KR{^{=6Y89|NsBLpI9gk HRObl*NB0%7 delta 53 zcmbQiF@s}6G85yYiG{+G&ohfoTp+^o|Nnp6$xE1=8Eq%O0Fye*?W_(!(f1Pz#es@E E0YKaqL;wH) diff --git a/release/datafiles/blender_icons16/icon16_file_backup.dat b/release/datafiles/blender_icons16/icon16_file_backup.dat index c4d99c1bc7595faa3af7b6e50c6666cd4d11db20..3b888afe8efabcfa13be275eec143005f141379b 100644 GIT binary patch delta 53 wcmbQiF@s}+GBdBr|Ns9d0`UwGo~UTT1EkepViOf5Cd)7>uz*6p0iy5_ ArvLx| delta 46 zcmbQiF@s}6G81FRXGYb@FTkV@b2nrE!~*fj=b1eLm?seL diff --git a/release/datafiles/blender_icons16/icon16_file_cache.dat b/release/datafiles/blender_icons16/icon16_file_cache.dat index d62078bfbf44fe9ab0b2b4ab2bf2940cad96c385..3cc2bf1d484b48d8be8d2e5897407270ffe25049 100644 GIT binary patch delta 231 zcmbQiF@s~mZc)4c|Nrv<@joc-2&B(Xyr3`m9>@TJk3jqyi0vj`P?zKcGTs95X&{aU z;1fPEc072V}rN1OpHNIUq$aaCZ{3vLpwP_X>zl0&x@&p8?``K+HAy0;9Gl zNCt#K;0+Li*!GhJnDhlf`ao_3(GEa-aiXHm#0~5dn`I`?XF9>D0u-7A#4{%X PF?j(qKV$#o4a^w;wiu^G delta 227 zcmXxcI}UC|(GO7QT4f*1ZOqoICQl6+V!ww&Ksz~A!<)2A|aG3rV z%=5xYq88q;Q6bfTij<^ZM>i~uII5L5sF delta 34 pcmbQiF@s~maaQC1|NlRjoWLZq@j*Bv>nb3xbfTij<^ZM>i~uI45L5sF diff --git a/release/datafiles/blender_icons16/icon16_gp_multiframe_editing.dat b/release/datafiles/blender_icons16/icon16_gp_multiframe_editing.dat index 7ee62f74c7303f87d7f611531711e421026b3e39..a8db53cc859a255c6c9dfd273d25507417f6b5d5 100644 GIT binary patch delta 30 jcmbQiF@s}5H{+CzJp8x;= delta 49 zcmbQiF@s~nZ${Sp|NsA&oT#WXS%-<6@zi7srf$}YKq01yiZYX*Fp0CW138a2F-tH4 E03oUspa1{> diff --git a/release/datafiles/blender_icons16/icon16_image_plane.dat b/release/datafiles/blender_icons16/icon16_image_plane.dat index c3f3faba556c354873cb0e6241bd00ee86d69496..4b0a5732e11dd74188902337b27fe818e0896de3 100644 GIT binary patch delta 78 zcmbQiF@s}+JtO1M$qtO!f_?x0|No1GH%;EdXwCWyD55j@52G45P(EDC4q8R MfmnKT1=9jX06p_AvH$=8 delta 78 zcmbQiF@s}+JtO0>$qtO!g1!I$|No1GH&5QfXwCW?C}J@A52G-1=9jX02i1IZ2$lO delta 39 scmbQiF@s~md`6pz3!K5kWOc?fjGHEZVYFvdpKQY9%s6Rt1=9jX02et8XaE2J diff --git a/release/datafiles/blender_icons16/icon16_import.dat b/release/datafiles/blender_icons16/icon16_import.dat index 7a4db9998b77b8a0c4ce264096a0c4f0bf0bcee0..475621ec191b9dde9fbc2669d2d8f7d945d3e668 100644 GIT binary patch delta 90 zcmbQiF@s}+F(aqb|Ns9V0kPv`8%AS65bq@rg8+zjoT#WVc?F|5}aKc1*4F}Z_z0s!FM5Apy2 delta 28 hcmbQiF@s}6GBfYR|Ns9R0I@9)Kc1*4F}Z_z0s!Fs5A*;4 diff --git a/release/datafiles/blender_icons16/icon16_ipo_quad.dat b/release/datafiles/blender_icons16/icon16_ipo_quad.dat index a75a9f1fedaffcd07561e6e6d588dcdf43d2e0dd..22db3ed0d7265d24689495b1b6e8f3f2fcf89d5d 100644 GIT binary patch delta 48 ycmbQiF@s~nZbsJq|NsAQov3KR0;I(^|6xpL9fA1XL`4~pu+ron<{kiRks1B~ delta 48 ycmbQiF@s~nZbsI9|NsAQov3KR0;I(@|6xpLRWbzXxZN|Nm O1(@v_Z%z(iJ^=t4z!((( diff --git a/release/datafiles/blender_icons16/icon16_ipo_sine.dat b/release/datafiles/blender_icons16/icon16_ipo_sine.dat index d68ca4f24cb0ce2839c5238c8e1daf544ab66200..d4d8a55f498e1cd86a1e4bd0a207d30e41f0c093 100644 GIT binary patch delta 32 ncmbQiF@s~nZbsJq|NsAQov3KR0;I(^|6%NBWK^2m!`uS^1G5hX delta 32 ncmbQiF@s~nZbsI9|NsAQov3KR0;I(@|6%NBWK^Eq!`uS^1C$R1 diff --git a/release/datafiles/blender_icons16/icon16_keyframe.dat b/release/datafiles/blender_icons16/icon16_keyframe.dat index 8fb9ae0592e421dc6b39f612eb56e20769329e0e..e3d87dbc7faec3fa28daa9a2b9f21a136890e5a5 100644 GIT binary patch delta 34 pcmbQiF@s~mZ`OzZ|Npn2sAw?RfRUZ`C6H4xxq-=eb3WrrCIBaN5D)+W delta 35 qcmbQiF@s~mZ^lQH9T;^cFJR>6bol@O|0^IancTo+yg8q7B@+N6nGmG_ diff --git a/release/datafiles/blender_icons16/icon16_keyingset.dat b/release/datafiles/blender_icons16/icon16_keyingset.dat index 19a4dcf80cbdb99e0be0a0effea1487e3aa72994..e1eac60f08ac8528e3330fcd3c854cd67ee7d724 100644 GIT binary patch delta 30 icmbQiF@s}+Gt=b%j2x4_nQXvxKa&lk?&dR0K8ygO1_|T< delta 26 ecmbQiF@s}+GZUlEWEUo9AlU&TH=kkhVFUnSOa})5 diff --git a/release/datafiles/blender_icons16/icon16_library_data_broken.dat b/release/datafiles/blender_icons16/icon16_library_data_broken.dat index 514227fa30f9b71a0204b1c86dd3390b92142725..e18f0dfef6bb52e0273d2f1ae4d5e686bdb1e885 100644 GIT binary patch delta 45 zcmbQiF@s|RKO^JEiHb6l8yE#9+c5Goex1amFwsC{a|7dIMn>DoD$LG6GJ|;o062OL ALI3~& delta 45 zcmbQiF@s|RKO^IZiHb6l8yE#9+c5GoewoCiFwsC{a|7dIMn;>-D$LG6GJ|;o05~lT AJ^%m! diff --git a/release/datafiles/blender_icons16/icon16_library_data_override.dat b/release/datafiles/blender_icons16/icon16_library_data_override.dat index ccc7fbdc64161848d8ed0d9a563826dec0669ccd..4b1ca55ee6bd00e9940c78a3b37ca0a24d7cafe0 100644 GIT binary patch delta 30 mcmbQiF@s~mdPdWY8^oCyMJAtMa%be2EWjMhcx`eD^A-S;@(FMN delta 30 mcmbQiF@s~mdPb9t8^oCyg(sh2a%be6EWjMhcy)3L^A-S;&6Xc Q3Xn{j=%}*!1XBPb09{EJ=>Px# delta 61 zcmbQiF@s~mYSw`N|NqaMxWSxtC6IA>;u~wm)sr6{s Q3Xn{n=%}*!1XBPb0A6+%@&Et; diff --git a/release/datafiles/blender_icons16/icon16_light_sun.dat b/release/datafiles/blender_icons16/icon16_light_sun.dat index 16752aa2fbf57c79136882ce5e7e32f6f9b27938..a48b91b484f992e9f500fd678f6e523c6f8943f6 100644 GIT binary patch delta 64 zcmV-G0Kfm32$%@4a{&Q%lXL;Q0UDDq0zUzFlW+o)1?vC*|3Hx;7?U6aBa!D3lMn+C WkuVUE_!9*`|NsBgks&CPv;$=GX&B}J delta 63 zcmbQiF@s}6F(YH?5}u Oj8`TqYE0h3oB{wCmm1sv diff --git a/release/datafiles/blender_icons16/icon16_linenumbers_on.dat b/release/datafiles/blender_icons16/icon16_linenumbers_on.dat index 7a6416438e5dd84bfed80e6dd2ccc7c9bba1b761..f5c853806be3990b8d2269b97cbabdbffae92f62 100644 GIT binary patch delta 32 ncmbQiF@s~mW7fO>|Noym@kKqO#^wyh?ToCKfqciwD$HL17^V>E delta 32 ncmbQiF@s~mW7d2B|Noye@kKqO`sNJA?ToCKfP9C^D$HL17>p3+ diff --git a/release/datafiles/blender_icons16/icon16_linked.dat b/release/datafiles/blender_icons16/icon16_linked.dat index 8456af46d661a8a9062d14ed6e93fbe08c8e3cb1..1bb917cd34009be4123a10e02f8503a94b212d80 100644 GIT binary patch delta 105 zcmbQiF@s}5I_uW||Np<4nB&YD0c5-aVuy)}DiiNWGrpQUfk}O`JY$2TAyD)s5Zf~V r0Z0W9Lse=_e!wUWRQiL_8A#eNfyf3XYevq=dzgY5`8EqMb1(t`%rY|? delta 103 zcmbQiF@s}5I_tLo|Np<8nB&YD4rIIpVuy)}DiiNWPwr>Zm@LoOAZY*v9Ei~wYcGAaN7 diff --git a/release/datafiles/blender_icons16/icon16_lockview_on.dat b/release/datafiles/blender_icons16/icon16_lockview_on.dat index 33c57f59f22495e15c833abdf35ea642af757426..d973774674dfd9a1c708426e546d127a789d491e 100644 GIT binary patch delta 21 dcmbQiF@s}+FcV|m#1%S|9hf;bdoW#K1OQ1H28I9t delta 21 dcmbQiF@s}+FcV|$#1%S|4={3U_F%fe2mnm}2Lk{A diff --git a/release/datafiles/blender_icons16/icon16_mat_sphere_sky.dat b/release/datafiles/blender_icons16/icon16_mat_sphere_sky.dat index 0ee8bff31e4a3714f88d3262847d0021b577d802..02a5d19a4b0ed19db2185eefd372680b967bbfc1 100644 GIT binary patch delta 14 VcmbQiF@s|RKQm+WW&vgnMgSeZ11j?uEt?3GTnogvf%pp$a|5v|5C;SC{K+R6-5J+T7GSbx zeVS&>P6@^&T}#>UB4fc%ijD$Lr9K|sSbfa*hl800u)05Z=Uh(V46ITEN= fMgd5R0dX@Bp9f-)y&!xJh(Tha6BXSj8gK#t-j%5a diff --git a/release/datafiles/blender_icons16/icon16_material_data.dat b/release/datafiles/blender_icons16/icon16_material_data.dat index 0a903add3eb38cc635c5168960e6b21dfc4a33dc..abe7017d9b731820c8f7a8b2f8eb5e9c0da90cc4 100644 GIT binary patch delta 255 zcmbQiF@s}5zGTDy|NqYb@kb~Iu|Zj?uEt?3GTnogvf%pp$a|5v|5C;SC{K+R6-5J+T7GSbx zeVS&>P6@^&T}#>UB4fc%ijD$Lr9K|sSbfa*hl800u)05Z=Uh(V46ITEN= fMgd5R0dX@Bp9f-)y&!xJh(Tha6BXSj8gK#t-j%5a diff --git a/release/datafiles/blender_icons16/icon16_mod_bevel.dat b/release/datafiles/blender_icons16/icon16_mod_bevel.dat index 353df9f9e718994749818714b27da7725d205921..bdddafc39ea6c84eb66708727d3f23ddc155bf3d 100644 GIT binary patch delta 84 zcmbQiF@s~nd`8BPlNT`BGulpmz~~GnbtVTeiGx`hlP54qgIOw*FEGgiSs$1nYGft{ XFsp-QBqmQ_)@S@UF;RH(WoB0ZrQ#dj delta 84 zcmbQiF@s~nd`89(lNT`BGuljkz~~GnbtVTeiGx`hlP54qgIOw*FEGgiSs$1nYGft{ XFsp-QBqmQ_)@S@MF;RH(WoB0Zq*fc% diff --git a/release/datafiles/blender_icons16/icon16_mod_cloth.dat b/release/datafiles/blender_icons16/icon16_mod_cloth.dat index a3e957897fd15c5864993d3c6fa9b2bbc1de85a0..fe19d417897e7d6ea030c002ce2cd0f800fac810 100644 GIT binary patch delta 21 bcmbQiF@s}+F*E1x|Ns9h0kQIA8|FIzZJY|& delta 21 acmbQiF@s}+F*E0`|Ns9hf$(G-<~smwiVD^M diff --git a/release/datafiles/blender_icons16/icon16_mod_decim.dat b/release/datafiles/blender_icons16/icon16_mod_decim.dat index 029c54ee627b3b648c22e7148734d027844d8fa7..84e546cce92dd47b0b4e94d45b01bc0711938c92 100644 GIT binary patch delta 40 scmbQiF@s}6H4~%l#04UgCot(V+D<;ei~u4O1Y7_B delta 14 VcmbQiF@s}+KNF+Z<^ZM>i~u4I1X}pp+~uER-S(wo0DB3n&lZ1+0|vZ>4w! z_MTvTe%zYH)$O?TnR7e$`}>{go^u;1r3PEIlv?ccq;yVPola+sCFU6Xoz44|@8OzT zp84XHU5XW|d&$)}W}G@Lp17*6>^_wp<&>G2HTLtyN;g$~Cp*j$?V`tl`|STv)C{QE zXPrgvs#h&PRnx~d@ec3HiM$!L^E~9G%PF-@9+_gIoT#2rGfV8_2q*mPO?6fGsr(op zF=HI!kX4-Eyi4|-8&C4vypw838@(DRH5MHreWiduL?1sU1XBJbf7 zOYCsOH~R22bI2v|hCGr8u*F={mkik)rYPC_G}k|9ILx>r|B9NOG2&YN8*Jy2&Ja&{ zz)Ji4I7cUi7sxyOiuYYtx>c-QdvTtwj}3~rjrX-HoigMcuQ9>@**NrX==@2ZRnBIN zrnYZ;zjW&MTE2+^+DK~VkgMT JcP{;N*%R~`7C8U_ diff --git a/release/datafiles/blender_icons16/icon16_mod_explode.dat b/release/datafiles/blender_icons16/icon16_mod_explode.dat index a9fb1f2ef61b2db5f05aab58c33233f17f50b85c..4ec2eedbc708e9ae34f2d9715efba4a6b0171a49 100644 GIT binary patch delta 26 icmbQiF@s|RI}_u_$sA1fjJA_KnA{m(ZJxl?!3Y3ost4l$ delta 26 icmbQiF@s|RI}_uF$sA1fj5d=!nA{m(Zl1u@!3Y3oh6msP diff --git a/release/datafiles/blender_icons16/icon16_mod_fluidsim.dat b/release/datafiles/blender_icons16/icon16_mod_fluidsim.dat index 5c39610331d5cda756ae58974c129bf13f4699cc..370297d5f48bc583fdc36ef48ca8d4bae3591cec 100644 GIT binary patch delta 63 zcmbQiF@s~mddYkL|NoBwVlgO=1kxa}_KAuzJV4qT$`{-CfuD(S@+4+!My<&<%y$4> CI47n6 delta 63 zcmbQiF@s~mdda*0|NoBwVlgO=1kxa}_KAuzJV4qTi0=Wh=*AEHOpH?|F(xr3N z&>Eh}S8##0OK;cE8J@{|aD{`dt;*3Fp2^4XkQorT`l#>Vdz-93o~g+U@gZkfzz~Xi zAwEGQvss;GuuL9_<;qj=JGFua{ReGDCc%kU#|dZS^1Yau)d>Gmv}P*YEyc`2p&rHGTj9 literal 1048 zcmbu7K@Pz{6owyZSfCM!gJ2;NCvgXfu&@$BNW|T&T|nXj?4-V*YT7ZKjV53F=Dq(- z{+ZXdnYH0oFAoA(moOF%-?UH8;duO8wdEIzBxn|08$qphM}!Pv={dd}+< u)7yokyT?~YzTo+r&wtZB(d#U_58bKevJ2_|t-S#4;5B{# diff --git a/release/datafiles/blender_icons16/icon16_mod_length.dat b/release/datafiles/blender_icons16/icon16_mod_length.dat index 0e1e25fcd71106824f494d9a38dfce941d1a1132..38b82f986daa6f461ebbbf7b58757265d43bbe19 100644 GIT binary patch delta 26 hcmbQiF@s~nWhTb1$%Tv>lm9SXXRHCT>?b;~0sw|e34H(n delta 26 hcmbQiF@s~nWhTbX$%Tv>lm9SXXRHOX>?b;~0sw|U34H(n diff --git a/release/datafiles/blender_icons16/icon16_mod_lineart.dat b/release/datafiles/blender_icons16/icon16_mod_lineart.dat index 3478b14fdab7f1fd7f6d1a8f9e90723c3b72e427..f9e4f4d242ab4fae78eb6e3efd56377831536245 100644 GIT binary patch delta 18 acmbQiF@s}5Hlz8(oZF0Dn>`pWFaZEQ&jzIc delta 18 acmbQiF@s}5Hlx|ZoZF0@n>`pWFaZEQz6PTJ diff --git a/release/datafiles/blender_icons16/icon16_mod_mask.dat b/release/datafiles/blender_icons16/icon16_mod_mask.dat index e9bed91ac1b602a6f1efcc7aecdbd8781f9829b1..a162c2eb16063a6b8e50ac034f1447018f1dcea1 100644 GIT binary patch delta 36 ocmbQiF@s}5zTk}i|NpNC;w3;_1jL#X6%{5f;AYI(xF&}g0G(nL5&!@I delta 36 ocmbQiF@s}5zTou#|NpN8;w3;_1jL#X6%{5f;AYI-xF&}g0G%-v5dZ)H diff --git a/release/datafiles/blender_icons16/icon16_mod_outline.dat b/release/datafiles/blender_icons16/icon16_mod_outline.dat index fa15aabec551d1122a60bb6adf19a4147e70f1d4..e8eeb6d6b1b919e038acaa96a0d1a2e32546f26a 100644 GIT binary patch literal 1048 zcmajePbhr<9a9J37t9 z8F8Q#<{-I0-rx0o^zG@6FxI@jlAxRn%qr($5?pBp6M5Hr2A>|5;A)3C%-_R zNvGWlGIb9h=+d2DvV4z}o}0*9c*PU;P`SRj#vHX<)a%Y5Sw2_J%*g%izz*)w81!`K zl-dCjdX`za#su2&_lqT;pcvXuQoF(h8uS{q7pTyt8Ae4{VF>2X}*8}b~*1BN1({wXpq_aQ6n$S*t( Bq}>1j literal 1048 zcmajeKPZH89LMqB-63&!>M*FwO~}Teh!}LTnIt6}#SJ%63{FZZyTRa3DJd}-(#3PmgYR^?ZKcKfmtoA#lzGSV}lIhS{WZB~dC>gkji$4IE%*gNCg&jPg(f4%c zl-dDOdX`zaV;VUm{XF>uMSs@$G_@;Sph0W3^fiO;6zxKalq*9x)QP^Iwg5`CeIJXZ`?v CuWIQ4 diff --git a/release/datafiles/blender_icons16/icon16_mod_particle_instance.dat b/release/datafiles/blender_icons16/icon16_mod_particle_instance.dat index 6c0005d570a578290c14f49db1df111dd9159054..15ff46c3ad5fff696e897c3af1226a4d9ff18c09 100644 GIT binary patch delta 51 zcmbQiF@s}5K4Z(of_fnF;XR}OV!|Ve9 D1sW2@ delta 49 zcmbQiF@s}5K4bI5f_lcLi67oG`b~bom<{5KOip0RW^9^#hAEs;d9n)gbfDB8<`@9o C{t^oS diff --git a/release/datafiles/blender_icons16/icon16_mod_particles.dat b/release/datafiles/blender_icons16/icon16_mod_particles.dat index d7b54116ec214ab175a1941ae5cd5041c9fe5b2c..662cc37b90d3fc8d1b4d0379a851b9355d3f4ca5 100644 GIT binary patch delta 58 zcmbQiF@s}5GH1*G|Np-LaqC1yiHR-ooXtS?FDQRA3nM!dW6NY7W_!k8lYM|>^W+}p F9srv*8@2!d delta 58 zcmbQiF@s}5GH3Ju|Np-LaqC1yiHR-ooJ~OXFDQRA3nM!dWAkJlW_!k;lYM|>)8roJ F9sruZ8?gWY diff --git a/release/datafiles/blender_icons16/icon16_mod_physics.dat b/release/datafiles/blender_icons16/icon16_mod_physics.dat index 15bddac3726d7ddac106c2d7f622a08ad2e000c6..0c9ec4b0d9b55a770a1268250783c6b5c3fc9e72 100644 GIT binary patch delta 62 zcmbQiF@s}5JFC$D|No~=Vpf^B;Wp5bQzt4)Om<X4#xlh delta 30 lcmbQiF@s~nV5bQzt4)Om<&FHiF0+3{Mo7}_P0|2XR3dsNf delta 30 lcmbQiF@s~mV#c`>m*g{QPZnX^&FH)N0+3{MpWMUT0|2X33dsNf diff --git a/release/datafiles/blender_icons16/icon16_mod_subsurf.dat b/release/datafiles/blender_icons16/icon16_mod_subsurf.dat index ebd8f583ae76031bddfa7163cfb88d2fa2b4cf3a..89decf0d6dd988905dac06e272c131b0324843d9 100644 GIT binary patch delta 32 icmbQiF@s}+F(Yr`|Ns9rp}1(W1EW5p>gEE*6-)pLybo0X delta 32 icmbQiF@s}+F(Yrm|Ns9rptx|d1EW5p%H{&b6-)pLZVylZ diff --git a/release/datafiles/blender_icons16/icon16_mod_time.dat b/release/datafiles/blender_icons16/icon16_mod_time.dat index a7c04f4f923c1592d8790104b7b7a26e301fc892..a7ae74b2d69a2026bcaeaf8a595f8fba0a950ef5 100644 GIT binary patch delta 19 bcmbQiF@s~nVMfMdlaDZ3Gv;q%l3)S=N00_h delta 19 bcmbQiF@s~nVMfNIlaDZ3Gv;k#l3)S=M}P)P diff --git a/release/datafiles/blender_icons16/icon16_modifier_data.dat b/release/datafiles/blender_icons16/icon16_modifier_data.dat index d8fb1d726450468baf59e6cda2ce3c47c9591266..2a34d216424e3a70e02f5470b19cd1b891c6680b 100644 GIT binary patch delta 78 zcmbQiF@s~mjmZxf*%`l0d>}q?vj*d}%?gbCjEtWr8!*{3zL;FVB+lqOxr0fcll%Yw i|G$9PZSn!2jQd1Ioyj`P{EXp~ZJ3=ImrQP8o&f;IC>`(s delta 90 zcmbQiF@s~m4UYf+|1$#d_lXb0CtEWrPJY11&Uk&Z0wX^oO!kZ~Cl@e@GrCOf sVAAL00jm53#IBPM0A<`JD(XzuVdkIsUU#Aa$K(QLe#WJf8<=MR04$RwnE(I) diff --git a/release/datafiles/blender_icons16/icon16_node_compositing.dat b/release/datafiles/blender_icons16/icon16_node_compositing.dat index 338a2d99a4fc73df7e93952b41b617ec3d91f5b0..964048d62f604197dd7e6cb7f58121a6d1867367 100644 GIT binary patch delta 61 zcmbQiF@s~nXGTWb$r~6ICW|mBgIO|@LzvXTEQ!fen6!bc15D09l7$&WdVt9u<{kho C%MmL8 delta 61 zcmbQiF@s~nXGTVw$r~6ICW|mBgIO|@LzvXTEQ!fen6!bc15D09l7$&WdVt9u<{kho C5)mW- diff --git a/release/datafiles/blender_icons16/icon16_node_corner.dat b/release/datafiles/blender_icons16/icon16_node_corner.dat index bb1faa86ddb308cda74aabc2d39e994a951e2090..e893553c7bb37181cff85d16d70db53a85aa4c17 100644 GIT binary patch literal 1048 zcmchU(G9{d3`7kRbO-ojqfS#%u>+$~R^Y$=C@4HvxUwSWCqN^eE;;$)oYRO%1Fqn- z6KVG%9r*Q1Dct}a>K5MT)_(fk!Rv#E_6LL022B%bbt%g(dVD*-nLC!Bg?lgo%Vw`0=dstMupj!?$yHDZlq$s4LCC_gQUE K{W?F>{>g9n*h;DZ literal 1048 zcmcJMQ3}F93`Aq=0eT1h>y3IEvGfk!tb$kYTd5%HTiKLl$^N8T7_tnRWHRkUqyrbw z??i@1D_OyLNxBpXjUQKjydU LoBlOF<^EYe{r*a< diff --git a/release/datafiles/blender_icons16/icon16_node_material.dat b/release/datafiles/blender_icons16/icon16_node_material.dat index ad382a140fe3d4062e0a568425c74b31119b74ed..d533af514a96022534fe368e86a360e4e841aa02 100644 GIT binary patch delta 233 zcmbQiF@s~mYR=dH|Nn0UVvUJgj9G628OjqKB{s7#sxz|Q1M>JMI?7D;VGpOZH*>DMa)SucTD9f%8ncnc770r3$aKFojwfP7^j w2023kNtgl1PX^*!K&%cE2eOX>@ew3GNbe0GPJ@X-=!yPpEI`rN$r;QW0P>T5-2eap delta 233 zcmbQiF@s~mYR*^x|Nn0UV)cnzj9G608A=l!B{s7#sxz|Q1@ibNI?7D;VG`ICDXqZL_zvP?ky7l=UsgTI-B=``ICDXqZOHfvP?ky7l=UsgTI-B=`8+3WkB3M`5<#RBLe{N<`xnF diff --git a/release/datafiles/blender_icons16/icon16_normals_vertex.dat b/release/datafiles/blender_icons16/icon16_normals_vertex.dat index 62dd29997983e6e0830a54a92c5986538f9bad46..f70641db32b93a7263d51ef1e044d94e93fe2050 100644 GIT binary patch literal 1048 zcmWe&U|4Ta9G6w_02E7`57h#^gG`01JbBCko_QV5?!7cK2RUXjAKB2 Kh#2*R)Bpf@MDr&A literal 1048 zcmd^-F$%&!5Je}RAWed2^E85BCECX8SO{sg@CqKlLaX(CoP{OH#sy11JhIEo{{uUz z&8&ud^;c&QFfg5@Adc&Q(u3Z z?EdAUXA2M53^Uvx_dD9X`{k9M(4-mM_5Xd_ujao%x~l$`N2Z~^HC%MxGOgQo?} Sm-@6;dd8=WGn`62bA4~KDl7T` diff --git a/release/datafiles/blender_icons16/icon16_orientation_cursor.dat b/release/datafiles/blender_icons16/icon16_orientation_cursor.dat index 1e7babb8a26a2960df931acb06a46bedbfb283fc..266d4874419f7c04584eb750ef576fd3febcd557 100644 GIT binary patch delta 259 zcmbQiF@s}5JnQ8D|NrYxR8*MQqReOjqEASRY5~QTfW(0q#BKrNH4}g6gC$l0In#mI z0*E<)n0K-bqdw#G$vKSij71X_C0KxBD<{8TbY|q4tixo_XgxWHNtzX;x&5=0MRFpezrN zRtI8`2|SZGFqy0B09h-6cm@z#0WmiegUko10@(+2o`?pJ2B`%(Oc#hj{3aj<=>@3) oITGYp?a2wuB9mj7&3W}1pa3X3W%2@MeO8dircG3|o@l@c0HGV082|tP diff --git a/release/datafiles/blender_icons16/icon16_orientation_gimbal.dat b/release/datafiles/blender_icons16/icon16_orientation_gimbal.dat index 3818f2eed1be12a1553375e8131cf70a571a5f12..c716cfaa392a8c583f9e77f2c6a57a24bb8f77b3 100644 GIT binary patch delta 282 zcmbQiF@s}5Jge>h|NkdUOtCi<2Qox}*b|6rftU%1*?_nOh+jZyB_OQ@#Ge^}VB(c- zM#0GmjPbl1KwO~kav<)Ss3OOGFVJTVNm!A1{p*l9B1(ftiFuFU@$2LlU0xZ zDN0WLy6@{gFP)ul=i9X1CEK>ws#`8ZX~L*s1PKo&xP5Axn!^)99Ty^?JECnJOvD~@ zl?v&LNQl=~mi;d#S0v4}DI-?i@mUP-dMu0nC0!LlrIPwA-03fq13jhEB delta 83 zcmbQiF@s~mW!9Ph|Nm#4sHh_Xq*;Kt5{TV^cm@!I#5sU;91y2Y_F**Vv;(plftX{W UqR8Y0jOvVH5C;3^$Bd>-03fI>3IG5A diff --git a/release/datafiles/blender_icons16/icon16_orientation_normal.dat b/release/datafiles/blender_icons16/icon16_orientation_normal.dat index e8a25182df04ee5f2bac49ee0d9149cba6aa834b..45f210a77b84f70b1dde90cc23362b354725516d 100644 GIT binary patch delta 174 zcmbQiF@s}5KBMGBMU9CwgjvJ?|Nq}Maf3UjE09qD#C;PLB_>NSP8Rh6a-IV5V<2`1 zVn!gIG5G+aw&F7&%N&Spf%rZH8UTvfP3B=zX0-&e944DESu;MKT)^Zpc?P2}NSP8RhBa-IV5V<7fm z00JOAbMgU3ZAFl%IS|_b@dJ?fNrSu;MGT)^Zp(SSt&C^8eK x7RbIl`3%!+Nw5omylx;)1Y%<#<^tjw6BTttfV2b?aSf%wnl1C05ckst{mFKS|f%;XRz Rc~*5G=K+wjc?wetBLHb>9+dz9 delta 78 zcmbQiF@s}6IwRwPiHagD|NsAAIJtpQThxpJ2>?Znf%y021C05c5g-X5FLGjn%;XRz Rc~&(b=K+wjc?wetBLHT|9)viA$^*JtjV|XWTYffzg>!XmSeUZbrAs3QY2!aB>RcZbtXX3QY2s~nRVQaKI&l2||NjaQJ4`lU6lc7!QIVZ-q5&rWZC4Pu delta 50 zcmbQiF@s}+J|m<3W&_4xMn=bpiYk*c80A3>1&;s!|6c}T`^g53;*94vDzY<9G~fgP DnY|H1 diff --git a/release/datafiles/blender_icons16/icon16_particle_tip.dat b/release/datafiles/blender_icons16/icon16_particle_tip.dat index eac2e68e5d589f38bc212d5e5cd797a95041ed6d..f3027da041e43adfb6aa82911bdeb837a1653915 100644 GIT binary patch delta 17 YcmbQiF@s}+Ium2~L`93u2~0Z}0WT>9DgXcg delta 17 YcmbQiF@s}+Ium2WL`93u2~0Z}0WUHID*ylh diff --git a/release/datafiles/blender_icons16/icon16_pastedown.dat b/release/datafiles/blender_icons16/icon16_pastedown.dat index c0f65d5423dec0363fc49c17c1b7d707da484c77..d19636e8de27fe49e36c74248b448a0223314678 100644 GIT binary patch delta 12 TcmbQiF@s}5Gvn=zEmN2QADIOF delta 12 TcmbQiF@s}5Gvl3&EmN2QAD#sL diff --git a/release/datafiles/blender_icons16/icon16_pasteflipup.dat b/release/datafiles/blender_icons16/icon16_pasteflipup.dat index caeb50ed285d6326e1fd848eb4490a87a4a76b2a..06da331953158ece2f86c46332ca2e3a20728b40 100644 GIT binary patch delta 62 zcmbQiF@s~mcSfd(KkONqCR;Fq$O{6jSq?$8EYnoFzshNJ5f<)vH`O@`BjSq?$8EYqpFzshNGf`1yvH`O@vJH3WpWLpw%{os>j)4p2jUk%>^pe}qcN)skQK4{1EU5L06@w}H~;_u delta 106 zcmbQiF@s}5IkA-*b#e`(w%}o5>617eV<-{c*P#;mSDR^;Xnj2cV;KkZ04 diff --git a/release/datafiles/blender_icons16/icon16_preset_new.dat b/release/datafiles/blender_icons16/icon16_preset_new.dat index 42086824420f51deca64920a49fbb1ca53b736da..8e01ae71617f4813cb40cd71ae4b577001052f46 100644 GIT binary patch delta 14 VcmbQiF@s}6ITNGb<_e|-i~u9v1cv|s delta 14 VcmbQiF@s}6ITNG*<_e|-i~u9#1c(3t diff --git a/release/datafiles/blender_icons16/icon16_question.dat b/release/datafiles/blender_icons16/icon16_question.dat index 3e9ac34483d07ba3227612dfe0bf5c45eeab2e4e..6efc5587c67bb67af16d85bd4a0b074d32205669 100644 GIT binary patch delta 25 hcmbQiF@s~ne@4cxNley^Unkoz*)zItu3?(P2mo})2xkBQ delta 25 hcmbQiF@s~ne@4dcNley^-zM8I*)w`#Vw`&p&`|Np;oa|_cHMgXXu3^@P* delta 29 lcmbQiF@s}5HlxnQoMuMG&dDDb`&niF|Np;ga|_cHMgXYP3_Sn< diff --git a/release/datafiles/blender_icons16/icon16_sculptmode_hlt.dat b/release/datafiles/blender_icons16/icon16_sculptmode_hlt.dat index ac49226b3002b0d8c31ff8f8b5a6037ce17f871d..30bb15380323d12d37e40ca058e7bc3d4c37b164 100644 GIT binary patch delta 80 zcmbQiF@s}+JR_sUWCccNM%&3LjJFxTPIh2&=H>nW|NnX*{tCoS6BShifb=6E-T=hh YAbRobS|NlB5{tCoS6BShifb=6E-T=hh ZK)inP5hiQK^^=(GK^mByfn*Ew6aXIYDM0`L diff --git a/release/datafiles/blender_icons16/icon16_seq_luma_waveform.dat b/release/datafiles/blender_icons16/icon16_seq_luma_waveform.dat index 01d218514f3d5c7526c3fb12434b3a1019251db4..0f13deedb19c9950914a72e3e881dd7a17d9f98e 100644 GIT binary patch literal 1048 zcmWe&U|pcl)9Tz{gk*L0MTr0b^rhX literal 1048 zcmWe&U|6Fj49OV*UP@ zfn_gtXW-+^%>Ms5XU}fk7*mJiqA^oqM7)IbisQHdx9R(=v-MmPPoN6VHl7lPSzh-H zT@&u$5nf;d_t0>ftcb1*572`)^x+ADET5jC8G&kwmc45y?ruDCsJ{A7)*o}OC=h8en bp8h%75HttPzXE6Q;p2B2^!kRC*~Bc|t0=|;IKC&{ zFk~^)4Ug*X`M#=}nrVj++OWME!Yy$?JcQ*{6vYahE#Ft2qvwR!g%;e!xI-LQdDAm= zde7ks?%@V5pp!IJ5#2gm!V&DjF)XHe^;&-djXH0v z=dARLeWZOi(?7=30sCr;5U8E%%j$M7-!(SY{74g`^0HxF1_#Y4Xz*ffL^BG zf9VSzU;vM>fXzBTniojxKs^U@q&3gT(L`+j)*r$Xe8NVZH`a4jZxO{Zq6( Vun*_o0B8D~<1cIQ%*yAq{{!&Ue;WV* diff --git a/release/datafiles/blender_icons16/icon16_shaderfx.dat b/release/datafiles/blender_icons16/icon16_shaderfx.dat index fdecd1c5929c956cf9ba52a3a9bb53cc68b1a7ae..cfff9e9053fddcf54961f7fc8c7d55d8b6ece7dc 100644 GIT binary patch delta 38 rcmbQiF@s}5Jfq&mg!_z)b0;dA@cjS(Ul)ky0kQT(MU~Ahpeu@&bYMugM*Z_PqW;mN^jr2I3o& PuP|COI&2nT;$Q**QUxoH delta 74 zcmbQiF@s|RGb7{A$t;Z4yg&c{{~rUzzb5-I>hpeq@&bYM&&eH(_Pl;TmN^jr0^;kF PuP|CO+HV$M;$Q**P}M7i diff --git a/release/datafiles/blender_icons16/icon16_snap_midpoint.dat b/release/datafiles/blender_icons16/icon16_snap_midpoint.dat index e90145e77c97e39958c8d9b425f7c0360ef1dc8f..1b4cb2ef76d9ac262797b94abcace9c7fc59add1 100644 GIT binary patch delta 38 tcmbQiF@s}+IwPmq|NsA21F`-@MT^ZDjEfm3PiD56IKP9@Z1M$W4**xF5ZC|! delta 34 pcmbQiF@s}+IwPm~|NsA21F`-@MT^ZDjEfm3CLdumpL~JY0{|Ca4|MnS5E36qAIVLKqOy*#UX0(~8C^ET%Nt>~C@)D+Y#;(aa%x?e^dkp#j delta 42 ycmbQiF@s~ma>l5QE36qAIVUQrOy*#UX0)BCC^ET%Nt>~4@)D+Y#_q{F%x?e^nGF2^ diff --git a/release/datafiles/blender_icons16/icon16_sortalpha.dat b/release/datafiles/blender_icons16/icon16_sortalpha.dat index d0822295cf96360d0c5cb8cfdf25ca32133118d4..0e4482ab40a1b8682c3b5c07a841ed889bbd64dd 100644 GIT binary patch delta 20 bcmbQiF@s}+Gb3Z#WEaM6#+1z$7(JK(LZJpS delta 20 bcmbQiF@s}+Gb3aAWEaM6#?;Lh7(JK(LbC=m diff --git a/release/datafiles/blender_icons16/icon16_speaker.dat b/release/datafiles/blender_icons16/icon16_speaker.dat index 84b1c48f8c4b71bad75df36ea5f2a4ee17e24219..dc1ad20ebad9023c28f0255b9e982ed6e418e55b 100644 GIT binary patch delta 62 zcmbQiF@s}+G9#nJWEDnxPId+$`2YX^y2&|==A67x-lEBCfIKZIuVnHYMsvp0%_>Y^ F7y(sS6w&|y delta 62 zcmbQiF@s}+G9#n-WEDnxPBsQ0`2YX^`pG$r=A1lG-r~t?fILkouXOSoMsvoL%_>Y^ F7y(rT6wm+w diff --git a/release/datafiles/blender_icons16/icon16_spherecurve.dat b/release/datafiles/blender_icons16/icon16_spherecurve.dat index 27742a3f816b906948b213def83ba747b1d52dca..808bf4f6104ee1f9f967b7c7f3fe100c9090edc6 100644 GIT binary patch delta 25 hcmbQiF@s~mg~<+#{EXKpDjKl-|NsBSW)VgfW&nap3FZI* delta 36 kcmbQiF@s~m1%dzn|1&Z`0g!!tqM`u{kiNNDgpq|A02D_L4gdfE diff --git a/release/datafiles/blender_icons16/icon16_stylus_pressure.dat b/release/datafiles/blender_icons16/icon16_stylus_pressure.dat index 2f5126c3b5c8d5140a98eab2e668dc43722e2e64..fb2a661c42ad365017c9abd82eb0a28b0c75db29 100644 GIT binary patch delta 41 zcmV+^0M`GQ2$%@4GXVt&|Ns9tlQ;o;0n?HK9Fx!iF9GqA0*3+hk^&gBpaOUSM}-eU delta 41 zcmV+^0M`GQ2$%@4GXVt(|Ns9ulQ;o;0n(BJ9Fx!iF9Gn90*3+gk^&gBpaOUSN0kpj diff --git a/release/datafiles/blender_icons16/icon16_surface_ncircle.dat b/release/datafiles/blender_icons16/icon16_surface_ncircle.dat index 41f59f3d38fccb56a9bcb02d14debe40497eb602..d38f2c43338bd5a72a6b84dd88e07001035468af 100644 GIT binary patch delta 42 xcmbQiF@s}5JY(;~gnGvQi4U|H`!@413NtbGPF7$BicDU>tUWQFWAbHYR{%D44j2Fc delta 42 wcmbQiF@s}5JY(O)gnA(HK%235GY_LM6Jy_G1!kbgf jJpz>e4-}icgsGabcd`O=J!Ajm1f hJq(oo4-}icgsGabZ?Xb&J&;_$tUWQFWAbHYR{&*rAWr}Q diff --git a/release/datafiles/blender_icons16/icon16_surface_nsphere.dat b/release/datafiles/blender_icons16/icon16_surface_nsphere.dat index 812612bce048b14fec775c256f165c635718b754..e355a811daf0b94795bb21889b6356a64dfeb2b3 100644 GIT binary patch delta 36 rcmbQiF@s}5JY(;~gnGvQjSuXZ7<(rxFaz0>7cgs2jOUnqnb{Qp^HvP% delta 36 rcmbQiF@s}5JY(O)gnGuljSuXZ82ctGFaz0>7cgs2jOUnqnb{Qp^I;6? diff --git a/release/datafiles/blender_icons16/icon16_surface_nsurface.dat b/release/datafiles/blender_icons16/icon16_surface_nsurface.dat index 4a8f4433df66c6238ac6cd40fe62e07461bfce10..ef95168a9590197b93fb15b04912240f3ae25977 100644 GIT binary patch delta 36 scmbQiF@s|RHzQ-;W*$a)M#fu{3z?)RyEENj?47K@T+i4)c>!|;0K!!Z9RL6T delta 36 rcmbQiF@s|RHzQ;3W*$a)M#h_y3z?)RyEENj?3=8>Tn{7{FjoKo!YT_J diff --git a/release/datafiles/blender_icons16/icon16_surface_ntorus.dat b/release/datafiles/blender_icons16/icon16_surface_ntorus.dat index 8c4a2d10d47751b46bea9d8f7551256314f9bde4..ec0f81c949728e06cbf4034f89219ff243df7be5 100644 GIT binary patch delta 46 zcmbQiF@s}5JY(;~gnGvQjSu=684pf2WE7s<%ru9wcd`OAP;~MFX6=db9Fs3Iy8-}? C{Sb!$ delta 50 zcmbQiF@s}5JY(O)gnGuljSu=684pc1WE7s9&m=H;GE)y@-(&@5pv>e2%-R#a}iKKaITAcUvVx4_Wdb};ushLufUgpoLXG=d+@I$zrziId+pGM zbT@zW>=rW}yMga9z-^mTzJ`7QTpE7~exe)TkH*uU-T`y)&%8`(`fr}6-52Op0lDhD zGt=jLtf#!e47`58&rE+6@VRj={a(P&P5(XMv;P4c%Eq&onVbH|^Ys0^PtrdE|1`O= z>DQot8_)L1A7rB`8D;3*REXJHn43SIg`a*lW#A&H5g=kTAbj6AEL8=7IB z8+}mpSXE!o6JFLimxW3R=Q^0LN$1AUy`LzGa?lX^gf^lt@p9MhL+2Sj(>Y)d`J>mF82;PKl%2s(iFj6@ z^T+UU?_QC+`yNYvZ}@E>XQwKBH;^9;KM&;OS5QWFe0ZH-!%w`7tZFKJ8s5_QZ-#$> zANL=)rzbng!tXE(%1hRO_b<8Lt@8+<-vGr<%d&cg--NhZIe#*1Yd<0PIr^cK`qY delta 31 jcmbQiF@s}6G9&A&|NsBnPtIVphp;9piflf>7{LSp?1~P0 diff --git a/release/datafiles/blender_icons16/icon16_unlinked.dat b/release/datafiles/blender_icons16/icon16_unlinked.dat index e81e544b7ba2d9a3f2f61d3451e6d1a2f83ff21d..a58ad3ed910e132012af86ce22a6c659736d0daa 100644 GIT binary patch delta 21 dcmbQiF@s~naz<9;|NsB9OjI=4{D9Gd2>@X)2!;Rv delta 21 dcmbQiF@s~naz<8@|NsB9OjI=4{D9Gd2>@X{2!{Xw diff --git a/release/datafiles/blender_icons16/icon16_url.dat b/release/datafiles/blender_icons16/icon16_url.dat index 80eee66263912367cd495dd50dd71594698fb468..cdefb41a3c3be6f12c6959c22e2a4a0b85cc915f 100644 GIT binary patch delta 73 zcmbQiF@s}+Gn4E>1}OOd|35DfuSViep1gojW^xVFaz?w!D$LG;c0l=MK%5Q4Z9rT; Ixq^8C0QP+$c>n+a delta 73 zcmbQiF@s}+Gn3*X1}OOd|35DfuSVie2J$r~r!ehjw4JQN>?~*tB08Y#Xc>n+a diff --git a/release/datafiles/blender_icons16/icon16_uv_sync_select.dat b/release/datafiles/blender_icons16/icon16_uv_sync_select.dat index b6039719375e0851767db89510fdf0a35f250090..b118a44c8580ef3dfb32ee4a203e5e0852a0c847 100644 GIT binary patch delta 38 scmbQiF@s~nd`8yG|NsAYoTw-dX(=G?1Y#B- V)&t@KDBl-I^8nRszQbt41OW1CF9ZMp delta 82 zcmbQiF@s~mbJo`X|NqNOR5Y2az{t*6JW-dX(=FX2Vxc= X)&t@KAnpQUUm)fIs@Z&p(S`{C@enTm diff --git a/release/datafiles/blender_icons16/icon16_vis_sel_01.dat b/release/datafiles/blender_icons16/icon16_vis_sel_01.dat index 0d6cdc768b3c1b5b277aef90ccfa1109d1fedb0a..947a3ca5589e441956301b3568f68fc35442ed70 100644 GIT binary patch delta 15 WcmbQiF@s}5J|q7`MU#z7N|*sB;spW# delta 15 WcmbQiF@s}5J|o{mMU#z7N|*sB+64gs diff --git a/release/datafiles/blender_icons16/icon16_vis_sel_10.dat b/release/datafiles/blender_icons16/icon16_vis_sel_10.dat index caca9934a36bc999b3d794ee86bc9d7a4c6de872..30af958aa5074f647ec0b43cb6c3021bc4dc18f7 100644 GIT binary patch delta 74 zcmbQiF@s~ma#oN3|NqBLR5Y3R;4)_?knIb^JQEcaCf{Ln=4=2-00* delta 67 zcmbQiF@s}5J|o{mMH8O?|NmD4F$hFYR5Y0QpqcT|?E|bhkN*LmP%EY!+{2bNDXud=DqqB1U-o!LJFphNfm5$j&wXO5 z%ZU@077nb(zl3$KQ+>X-dgS^w)mV?OIroaXW9LhYc1|^pchrxZ>$2!)Vd@;d&Oe0m z&T;P6*`iy8>ui0<`VR70+5gc4-3jO!#}9u2UcoiFZIaB|C3Jd6i$#2!SU&S_b<&bo zt=>=Pe2DLW&!IP=ISJi&0@`VDWZZRX)}*tP^+FL)T~9Dg36a_Q4$C)3xe83V#{Lse%E{A zbhS-1@Ol3J&K&Q|R6__=ScelhTnM2H|8bRNc?X4NVOOC8H}D3p$!}v<=G~8c0WWZr zY#+M|%L)0{pq|z*Go*cjO{?R7z$dhoQw<(r&w5f`J3p(Q+Qn$fd5{*E**9uqHRx-+Zimfi}CEiXUQ$Mdp!Zs}cw ziRJO*{@DCK&z(cxHVmA;M?3<5R_4#lpzi|o8pjL24tm#2Ic+pj}E@hNo>J6=pEB{p!>(~#qW@2G^m}z04DGb_n=(d8C$?G I*Zw8`0+g5GJOBUy diff --git a/release/datafiles/blender_icons16/icon16_x.dat b/release/datafiles/blender_icons16/icon16_x.dat index c5c0978bd22c816c16fab17c2808c6aa40c6f3d7..15fd75664c78ddb21c79f94d3e9b25d83901cebc 100644 GIT binary patch delta 44 zcmbQiF@s}+J|m;UW&_4x#>s~nRVQaKI&l2||NjaQJ4`lU6lc7!QIVZ-q5&rWZC4Pu delta 50 zcmbQiF@s}+J|m<3W&_4xMn=bpiYk*c80A3>1&;s!|6c}T`^g53;*94vDzY<9G~fgP DnY|H1 diff --git a/release/datafiles/blender_icons16/icon16_zoom_all.dat b/release/datafiles/blender_icons16/icon16_zoom_all.dat index a1288509cd6af5f7a28a044b5a0fa68fe386c078..1322fdf98123c4fabbe625404b4e6698a35f60ae 100644 GIT binary patch delta 59 zcmbQiF@s}+HY4lh|Ns9xO#EQYXft^OqsZh2Mtw$`%^Mio85!42wqUkrRRhXDpIifF Kt($y+IRXIN1{se4 delta 59 zcmbQiF@s}+HY4km|Ns9xO#EQYXghfWqsZh2Mtw%x%^Mio85vhkwqUkrl>y2>n_L5B Kt)6^n+a diff --git a/release/datafiles/blender_icons32/icon32_anchor_right.dat b/release/datafiles/blender_icons32/icon32_anchor_right.dat index 7c7f7987596c323c1c1c86f911c434a09fed21e3..3981dc58f375d58f7adb9e86fa22e8dc0b6c44b2 100644 GIT binary patch delta 77 zcmbQCFhgNOG8^N<$ti60j8T)HuxT?&PgG2pT)-~RxCF%b0AxHtX0ZJK|9{2g5_X-* U3e3(xEh(J!j0-nE;WS|b05=RAD*ylh delta 68 zcmbQCFhgNOG8^Np$ti60jKPyrIBg~?u;)+a=M86gy#q|0D|fs-2eap diff --git a/release/datafiles/blender_icons32/icon32_anim_data.dat b/release/datafiles/blender_icons32/icon32_anim_data.dat index 0d9dbb3a18a255bda8663e45b1ff6eba83880f5f..a7a51d1947feeff1f3144b1e64e03a9c8f81825c 100644 GIT binary patch delta 61 zcmbQCFhgO(VYbQ4?7EXbumv+lOjOjFT)-a8_;~UGHl58M*z=hgqbDks@cjS(KN^TZ NU86gy#q|0D|fs-2eap diff --git a/release/datafiles/blender_icons32/icon32_axis_front.dat b/release/datafiles/blender_icons32/icon32_axis_front.dat index ca9a0efd4676bc5f10c11c21159ecfddf5ad4e76..e81fd92b8bfd05e813cffd914ba5e25d2baff7f3 100644 GIT binary patch delta 17 ZcmbQCFhgO(V?Nf(|NsA&Z&Wm31OQ4n2nPTF delta 17 ZcmbQCFhgO(V?Nf3|NsA&Z&Wm31OQ4e2nGNE diff --git a/release/datafiles/blender_icons32/icon32_blender.dat b/release/datafiles/blender_icons32/icon32_blender.dat index 12ed7ccb2d5af3ff57bd2bfa46c6d547534cb7d7..44f3b8b0a97f174137b05c8d54099da97479a58f 100644 GIT binary patch literal 4120 zcmeH~$!ior6oV2s~!YJ z^ca_epeVRvqM|5@GJZelH@rNmr#sDfOW@0^dfTt6x>HRWwOXwKW3y|uZtTsu{F(5k?n04nj6bAi zb!nkQBK0fbc?E4-%M0~Lv@Uc}r!&6~*30Z`e5240-5DD)-y5vunbp}%`&m$%za!&rMaeY2*w_A0)4}xw&uDgTF*dr z%$LJX7=YG$m&Hz>emO-frnV$z?0Sl5a91NtWS?bkz&z9ag!bwbm6+@@dYcipe2?3n(W;eBG= zH}G|p?NcR>{#)U5Li;Sf|N7qz{dL#bp@CpWs@@L}d6Zi`g{uj0Y literal 4120 zcmeH~No!P55QW<@gBgq?W)XWY8W3Cy?i|1n#VOzb;$FmH5*PjeH-f)FP?R_zxE5R( zL|mx^L68WJI1p46MQOhyU5`p}U%&27TxsB>>QDsORd<(5rBWH3nO`ckV{a|w z-y-n;uc;HLR4P5-2)GWOfY0Dd)xUu~40@UpuTg|%D>wx{fL{d=XBf2BkgPj}PA|9% ziu%U<18Vx}Zj>NWzXm*OqPOj3irU_UbYY0P7H}`o`z0~mi}j!#v{ik@l(XJuCy2Ea zHVg!6P9(H05?d0e*^*ob5XX9(J(-bk$ZrR4z-zGA=j0RX0w00Z%U%NWA~&wZsd9a- zp2?-g#eW4X{}X@MatPDAwgYO}YgT}$vbz6V4=ZG;W|MVXZ z`4OwF=J%8TvHE_mU zUK-;*AARzgW7k5B?LqHL_6(?&^=dE(c7o+zk98-A@7R#%q#CEs7Z_Auidd_6hMO>tt~anGyAN8=Fqp3u_VJ`Fa4?keOfrd;ej zL2PlVC-DP0HBqD4^;7g$<@DC)MEs0twoj^V68+roALP_OHUCmtjmGYyoz3FZ^(zKv zA9w*8)vv|Z{O-!@ITvyCH-Wc_ecvS3HWxkeG|=Ay{Oq%{xIp}`{<=Yb0DJ@1)9hJd yg|jK|n(B?yBlUjI_-<0KR--&!AMp452kT>v>db~uKYiEJ89WCAv(fsOYkva*nHRqC6BQ*kUtsm%0suVW21Wn? delta 17 ZcmbQCFhgO(c2>s26BQ*kUtsm%0suVN21Nh> diff --git a/release/datafiles/blender_icons32/icon32_con_loclimit.dat b/release/datafiles/blender_icons32/icon32_con_loclimit.dat index f59da673e1fd613eae37d427bf2b47c09e5addc1..b2b8eb7787b18ab3d73a5dfe0a9274f6b8198068 100644 GIT binary patch delta 165 zcmbQCFhgNOH{)bu&byNpxCJIxFbM*4IC!FVV*zPm{oQ129{_r zZNLhlH$dpk25iwlbASpA*r5tg>CFb5C<;V@7G?uAhypDG)0-7|vOy*&PFCPypS+nj NVzV)4DC0zf9RSSOF-8CY delta 274 zcmbQCFhgNOHzVtR5SXY~!2xD~*%6Z!xCJIxFbTsXBPK5Z3j9D8c*E>6(ZFHy8|L{i zMGBKQutXy`2CPV&4M?2L25ixAYZWFNup_C%$=PhciB;2N0q$yuos%cPSepfSs^J#M XOjh7wpS+nj0_HMgk0RI`6*(9IX@Q$B diff --git a/release/datafiles/blender_icons32/icon32_con_sizelimit.dat b/release/datafiles/blender_icons32/icon32_con_sizelimit.dat index 83930095fa79cae6b9c0e8391e4fe94aac71767f..ab068fd85645d0fa68aa299b5dfd4fe7a15acf30 100644 GIT binary patch delta 173 zcmbQCFhgNOH{)byX5GmP*n@$z=wt<^Y%sk5LT^@J&ITy}O0YmA(CEzyY+wbt6AdgT r7qCb})N()#fzX>3IH86t;DQ>$4OIZ4H!JW!41qcW<{UUZ(cl39+5$35 delta 222 zcmbQCFhgNOHzVtR5SXY~!2xCfiOB*?)ezCi6JV^(0?gG=rIQ6%VA5Dvn+4cl3MVQi wOfF!Nh8iWn0n;@B#@Z~v2~#_H0vAkLfE&h|0ApHq)$ diff --git a/release/datafiles/blender_icons32/icon32_con_splineik.dat b/release/datafiles/blender_icons32/icon32_con_splineik.dat index 61442c8b50ecb4c30f30e3ea8a25167fcfd0a3e2..ad59ae02df3a0eb80c76c3a527f9b729f0b89880 100644 GIT binary patch delta 47 zcmbQCFhgO(dNxMhiHbUt6WG-!UtngLe4kNrvI09dWAj8s6QH0sqr*f+i_K5iO*jB# Cq7G63 delta 47 zcmbQCFhgO(dNxMBiHbUt6WG-!UtngLe4kNrvI09dW6MNE6QH0sqvJ$Hi_K5iO*jB# C{LG9e KHvi$1VFUpCR1y6E delta 54 zcmbQCFhgNOH6!D(%{7dlnHX1YE?}9?%qTmVgQK2NW^xCR)Z5I#`Iw3E#^yKN{LG9e KH~-<2VFUpD3K9eW diff --git a/release/datafiles/blender_icons32/icon32_con_translike.dat b/release/datafiles/blender_icons32/icon32_con_translike.dat index 2e9d47bb32448eee62807506dee1155f8b6496de..a7203afd160ae20963bbf6f383a721d486a6d5e4 100644 GIT binary patch delta 96 zcmbQCFhgO(Vn$y6|Ns9#0Adh0JW;Vg07%z?dH?^P2GYDhvB?XVxEb9hDwa%EVCH5N q-mJrXpNVxIP?CGH09*ZJem=p?3)tkD81GF!z#+|eZ}S}v8+HJnh%k5n delta 94 zcmbQCFhgO(Vn$wp|Ns9#0Adh0JW;U##IFZ&fZ#L`^8&>tFJR(kbf2hLGFgF{n^9!5 m4)c8`*7-n5p2-4i^^DP*C$Q-=G2WegfJ2(`?&dojHtYaIv@jO{ diff --git a/release/datafiles/blender_icons32/icon32_current_file.dat b/release/datafiles/blender_icons32/icon32_current_file.dat index 6709a64f29c6c935664b1a7ab5cc9c7b05981fae..4eb766c94db5773666dc61a5c9fa01f57f1bd580 100644 GIT binary patch delta 121 zcmbQCFhgO(V;08riHahV7qIG2u4hu&?9IA@5hS8BS%F=jF>!JLdo!5ynXJHJ4rY05 zUciyf$QTCFrNEWX7&LhTS3Tpc%>vxjjEtQV6%{5caLY_$QkXn}QJB~F|Ns9tfcOaz O7fw{v*lfW2f(ZZ}i7O-k delta 139 zcmbQCFhgO(V;07=iHahV7qIG2u4hu&?9IA@5hS8BS%F=Day+NP-5G<%IT diff --git a/release/datafiles/blender_icons32/icon32_decorate_library_override.dat b/release/datafiles/blender_icons32/icon32_decorate_library_override.dat index 1651f288be4e3d9ab1b22805d0df3ecbc569b44c..45fdcfcf1d2fa68419ca970a7cd518ae054b17ea 100644 GIT binary patch delta 156 zcmbQCFhgO(Y9_|1lh-hni*o$`|9=_~ZwBJoKx_uY!jmnSUvo}}iW*K-6q)S6lFi6F zQBeZOV4r-NC4tdwvJPuK>pY+u-pLzSn;CgGo3Jr6GWKk?UGf8e%;QPS{0Pf*HKmY&$ delta 161 zcmbQCFhgO(Y9_`hlh-hni?aX!|9=_~ZwBJoKx_)cLX$0+Uvt7ljV3CJOm<+&p4`kQ z38dL4pJqv5G@q=)TF*KksF-i^2G(XqzRf0V%#4hEn=RN^GqDCk#SJDJs7!vqs=PU# uOMsEFcXI*vbfB7viVBl8c;gv;L5vl=?u<5*Kk$k(vP@Kr*qp$(gAoAqhD34z diff --git a/release/datafiles/blender_icons32/icon32_driver_transform.dat b/release/datafiles/blender_icons32/icon32_driver_transform.dat index 87bc83aa25c1833bdfda6e2bf37d56b1137b9016..bafe7134a6cd19eecf0f132a2a7292f3b2f5c76f 100644 GIT binary patch literal 4120 zcmeH~%Wq9l6vj^*uNsnQXa}tj1C=nqkRjq75+(63&`OwN(s)czj~S!RBqBjo(x8F? zRTJhC5)&q^cx}J$bgyLFckg@8Eg}*t`MUOA-?!H3*=N6QS5XvQpr^Gc4&ral;?Hc5 zFz4Jn@I*+^O@*j22JVA7RTI$;0NF&@Nx`7vjGxHh15GiEXK#P$Q(ON)h`cz4M<_Yq&SGKr0Q z{!*A1w&4f8=0zA+o4D5Wq~|*ly#0S8G3WDF2Kjqq4V>orcc6K`I_7SK3&OuohR zv4`vRx_b%kmFL#ST-ZkwzUvYC{XXxfF$r_5jc%jYrsjw8Wy?*U^JumL`_}s2YH!c! zEskatkiD^(JbjI;_8i&5kju5vT`1Mle+F~9Fpjj-=S)U%eMjy0vh4m8<=9$N&c%?+ zwb6A*j7`NFV$F>IHuT~6tLBclX52@U9DnKHZ0}ne=Y@TA;r#2PpInn+j_bhI@lZ-K1e z;<1N2Q!1Q0o!}05ZaC)DhwA}4KV>y*jo2n&b7D=VhK=!_m?ziHpAWQC=g)KEvg}%e zvoU;@s9*Q|k)C{;gEf0FoSnaIac%3P(fRurJg}H~V!c3?Jb$HwJ60XwVZ1w^ zKMO!2LI{h%b1<2pYnSMs2gbo;u&{0;+Vep1x^7QShsV3ZDTLEGO}UPC1NafKt;}_D zjn8hN_zrqod7!x|F>$Sxwl0s?XyF*b^=3V2mV+6f`|oL{ZHL2aJ@^g2fu*@#xRXF} zC#UJOj_1R|IfSD*5BRrHv)5~=KLyXgV$WGF4(Pd=u$qn34gp1SPg7r4upxYAtUQ_2 zrXxRMo_>TMiJIvI*A1ujSFB3#_WAC4PB}gO!1@Qh25u+NcdUKB+4Iq35>Bzt^VF^s zObF*ZXF2?dsQJjavQ%G2{vmS5t?ozop{Ti#;3gus$8(m$>pUBaI*rOJHPibM?ZMbv zS!3$9_nMwL=w{t3d2&ts+{)4J0E#KkQ`4F%`aI`zG=sptYkl9kuI!0K-zId5_hpW} z3;Yy8WX}iJV|!ga!(}dajc$#^#Fw&$T=V}DK`beAxodQt%->VY5W-jQOZ`*i>a70& zTEG4S-qYvwB-dX$ID1cS@qOhS-CXwHcKQ{m^GWBcBD;^^D$iP~R{p%@YqSS|;(ocV zYih#<6T(@~Sq`6k)~L@~6Vv+<-Q_sPr3804a$}xT4)-_CUt8n-eh&Owy?>_S=gU58 z@V1686aG!#Kk*)I4_3}#y!GyQ0lK}n<>I1d+-f#bx3l++)%=L&6i|$MZmv0=4+`fH zj^(`ISAZFy-(Rb9x_0Y$^#Pr4O@DvM7tJl8xZ3VKIXzyt3&#*{GVTBX diff --git a/release/datafiles/blender_icons32/icon32_edgesel.dat b/release/datafiles/blender_icons32/icon32_edgesel.dat index d013e4b6b745434994827341973a83f028a9f525..5d824f017ff8b49d5501b3794ffd97c922a0790e 100644 GIT binary patch delta 18 ZcmbQCFhgO3HWOpjWCuR=&B07Zc>y=q1*-r6 delta 16 YcmbQCFhgO3Hq+$8d>WgBnU3-T05XaNv;Y7A diff --git a/release/datafiles/blender_icons32/icon32_export.dat b/release/datafiles/blender_icons32/icon32_export.dat index a663ddab899f20a07ff331cbcd083784dd077fad..fc17cb201c26dc760e6bd78ab49fcda5014c8543 100644 GIT binary patch delta 21 dcmbQCFhgMjGb?N5|NsBXCn|bu4q!dO1pr~d2=4#@ delta 20 ccmbQCFhgMjGwbBVEV`2?a4ByNWk09k1U`w`39Re zvVg>77j_gwfwrIuI84srFh|y6v-t(bZbrrmkmnhJp4H(1db$jRCn_pTR^ZlPfdqmM z50FL*6p$Q51Db>iPy!gPK$FlUG=LKF*d%m-64KZt41f~i*d$DV5*m{O_`vp906FZN J5A%gG0stOV@LvD` delta 371 zcmbQCFhgO3G9zQ@WCuR=$=-|+lb!iACjaLXo&12&nRVv>|Nm!BR5Y0!!{iR*$V@)M z6c6J_Om<*SMsN-wa~xRUGC(~na6KxM7jUsp4rUF2>C>2efi)P$(U}~=<`3f-OuoV9 z4dcj6c43Db0yGi9ahaUMVGdK~u=xeYZbrsRpodf@DjIMAy-)_kr4tnuCM$4jK!u<_ zQvnLWR6&I_fIeC$JRldbSyYHI_luy;72f?rQni}Ac~7q zDq0aAXl<)Q7dJnGwQBsIG=WYY_}zP6oE!cpHCdA<+d{vIqA2v8G6kYystDMAI3bm} ztcIWq9zmYELXN?)!4tUl9h(Bhn{ILyC}0_|{el(1BMYEI2buNUB)k{E)&@;_S0{3B z@Lo9udj?iKSltw@BW*|YX;<4SmE-E*_`xiIbIEt6Na{s#h4F>_Y1*3J zXgcSLxTQngqgCDhr{|8wjY?^DXnYU8J2cBf%%7B+%g+afmkrYl?jC&@$E0d&76MkV zlN4FJkY&&t@Y=MmZn$tBl5(sEKZbZF$+5P@B*%)jl6-@8lj^*Ai9{V(R5jz3ao0V# a@SQ5JFkSSw@9bp|^IuTM($D1Rr~U^l9Z|sm literal 4120 zcmeH|%}O0X5QWF6OLs=M?t-Ye7De$Dd=nvt=)$+iBCnzDgaj27H4uL>_$Cqb`kk@s zQjRmz-4oqN3eK&Xs?&9<=g#y@6h$!sRtAgW>rhebfMOW@xAG43dc8I9J%Vr4r`v8B z^+T}N#;L1CbZsu_&uBgV0~qkVLJrq^@cEROHKj%(cM$$9_zlKv4e1xNqU6-WkkZFaP#DVmV_=vBDU^Cx$v_riY!GgtLu diff --git a/release/datafiles/blender_icons32/icon32_file_image.dat b/release/datafiles/blender_icons32/icon32_file_image.dat index e40eb65bb84625f496b573a30ccbb92322094e4e..2a6095f534bc492880c6bd5b043b4824ee4c4021 100644 GIT binary patch delta 14 VcmbQCFhgNOIwRxW%^8dv_y8yh1t9vsO-4U}~PM%+jz~nYn?HQGc=lllWwNCXUUASwgu1 DT+a=m delta 51 zcmbQCFhgO3J|kn{WCO->M*qnMOyZOGGd^J~0<-LyI5r<Z~8R E0G_%KSpWb4 diff --git a/release/datafiles/blender_icons32/icon32_force_fluidflow.dat b/release/datafiles/blender_icons32/icon32_force_fluidflow.dat index 0553f2adac256c8d0b43bf2d4cb13b1066a5eedf..03c74b6c2177ffb91748cde27d93198473be95b5 100644 GIT binary patch delta 60 zcmV-C0K@;7AebPqrvZ~E1Q@fw0ptMzWs{@>e*qAaBm{#25tFC{V*!bgAw-i<1wR2O Sks&~{&;@S<0n)QT3fKi)&J%+G delta 62 zcmV-E0Kxy5AebPqrvU+tv#0_40h1#F9FxBTWRs%-9Fso;XaNwDs03pHh>;;glTZae U0Vk0mK(o*VZv+9+vp@>i1*q#3=Kufz diff --git a/release/datafiles/blender_icons32/icon32_fullscreen_enter.dat b/release/datafiles/blender_icons32/icon32_fullscreen_enter.dat index 9da6801e386da56c7d138566ffbf972f052af9b0..7d24e2664be52f7686eee0a80e37f94acfbc1ff7 100644 GIT binary patch delta 25 hcmbQCFhgO(a#qIU6BR`!Cva&@KES2EnVXH53jlS+2j2hy delta 25 hcmbQCFhgO(a#qG;6BR`!Cva&@KES2EnVXH53jlSr2i^bx diff --git a/release/datafiles/blender_icons32/icon32_fullscreen_exit.dat b/release/datafiles/blender_icons32/icon32_fullscreen_exit.dat index 8e69e871b5d0a9af97227f1b9b7fbe1a671914f4..ad3c217643cc84cb2134d5ebe0cd1806c9bb0057 100644 GIT binary patch delta 24 gcmbQCFhgO(b6&>d6BR`!D==wHG>F;Uz&C>t0C6J-cK`qY delta 24 gcmbQCFhgO(b6&<{6BR`!D==wHG>F;Uz&C>t0C5utb^rhX diff --git a/release/datafiles/blender_icons32/icon32_gp_only_selected.dat b/release/datafiles/blender_icons32/icon32_gp_only_selected.dat index a77e2fc400500adece1b31a55022b19b6d8b618d..319c23e22d580c96b8a85f9098045ce25de77f37 100644 GIT binary patch literal 4120 zcmeH}T}xF#6oyCB3_&aKA|&x31WG~_MmG^%NLPUufg*_Fjo$b{WQAWKM3fk*QEGpp ztA2n8`V0Iy!tr?zvtk@(pS{n)6GU!!m_2K~Ypt2tvuE#;bFKuZ&CdO5a_)BvomRNI zDl1Sfmk%N9I&SnbQTQyYxVK*`G6uBQp$l#l(VGT+-St%qUcfpWz)#<*{~U71j;5~q z#P!1_sHXS?>O8Y}P!c*C5dZG{K$5o`>Z>wu=F`sg+9 zJ)e7&HkliH2iO>%rRMI(Tev>?^t^4&$Fp*p9j(?uYp`s#xW#t_S=ULZM>GPJe6-1V zNBU-T+7H?rmFE-sYq=+0&vhGAf1pS#x+eJMV|4P?eUW3x=UFM51pRFv^Cd3^-6||Y za-FbGf#yD(m&^QUU;3C?vt_mDHoW#}N`p^lit6{K{ILz4=Kj^k+>iZnADyl5F8AFD z{|;AD#BfjE~u(?F)7Eb;djnZK-=SU0}6!9^OjnQZ}@0 z@CGz)oiVSVJ*ACp=yWy=gS{i4xW5zY^7_QIzy#R$MDNceJcJ8#q2CFEFa}mvV_$%q zd9|wfiN6Q$K>0#+mZ+AU!J$ukRO94N>vAq~^}qa6ltNs$mU%H%%)w57Xd%GQy z=S21Bf8WczU&9()*o!tZ><#^&B){!RoozZ_@4}yF!F}QHxsAD&mi&75^APU)HOtZH n`azumYE8ojm<#L;oxjz|YX8>!uj;2)fb}o@Kbg+(e^}1}vx=u_ literal 4120 zcmeH}T}xF#6o$9oB4`R;L=+wZK_d_)@gj&Ws+$5YLh3?{uDl3@Aj+>3f{02{6s7ei zy6O)^(l7Au$nkkkvveG0&fe$X5kxmU%*^Y~DWmyUKTeIv}OP2j^XV3wc zPqhM-O63ovp1o$5iNpt~gMR?ZTKO^9T#W0Xb|)RZqCQNIp|hk z38Hnv{sOf22YIo~kM@b1GjFz3i*C(n@5VIv-aG$L%pcm&YVDugoLiwk9HX=PexZLY z;+I|DU1#VE$7pm`mO=Ge2>r1!I-QkyH|GQGO<%`Ycg&=3i}leAg5}nI*dNoyY-qdS z4d}gh;3@RPw4n{1?uLh8-^eEYtD!D$%$#u|Ie^b7x<+dJ3O5?_120RGuuwHVFL m@8!||zn8EMuRMEG*Kc`J?OCn=GJm`R)W7im$#{f|VLb$eJ3A-XFrYx*L`4l2AT2t12WLC) n6d()a;sPKR1L+4kmeF-{1y?vDqvPfa+}uozWt;Et+AskCLY`QW diff --git a/release/datafiles/blender_icons32/icon32_group_vcol.dat b/release/datafiles/blender_icons32/icon32_group_vcol.dat index 47984dfaf0cbc50c9374a526cc30059b93aa2184..91dfc0426c87345aa44d5ce5d2c96a1f4a29829e 100644 GIT binary patch delta 16 YcmbQCFhgNOI{W13>@}Movzu}N06Ad>W&i*H delta 17 ZcmbQCFhgNOIy>X^iHa7R7qC}w001}!1?vC+ diff --git a/release/datafiles/blender_icons32/icon32_image_data.dat b/release/datafiles/blender_icons32/icon32_image_data.dat index 16fa18103d67d568c60b413bcfd15966cb1922a5..0331569ee3ca3667638935023f0669e9aa31a780 100644 GIT binary patch delta 14 VcmbQCFhgNOIwRxW%^8dv_y8yh1t9Q10Zgk?7`&D*g9E&O`b7$qM`%~P%LWl876H;rpX%^#ThqF7GRcUteU8(0Fr5% z9KfuOkYTmwGzN--%r2Rz=rMT#i#{XYWS^S|GtQ z%;B7IP=N}t0Bbm}08n5xR4@SOA`m|u%AWSrdU6WHt!*0Wrv2o{5S*noN9>PYgFq4GLF`N=-4;hd|X0vsTLGc3-Gn@K9FBO`2<@s fD<}w7PBvg~mW&3nCIT^fsPRlx?AaW_aey5FiHOjY diff --git a/release/datafiles/blender_icons32/icon32_key_hlt.dat b/release/datafiles/blender_icons32/icon32_key_hlt.dat index 5de3936878ab4c30be94c63904814af9de55112d..5480ee74de14a03a81bcc394d45f1ba5a2296665 100644 GIT binary patch delta 340 zcmbQCFhgO3HKX9l|NsAka4!&t0x|bQ#hA$}7}XhdCMt%g00pdocoPtB2I5*E)&pWL zAm#>Q10Zgk?7`&D*g9E&O`b7$qM`%~P%LWl876H;rpX%^#ThqF7GRcUteU8(0Fr5% z9KfuOkYTmwGzN--%r2Rz=rMT#i#{XYWS^S|GtQ z%;B7IP=N}t0Bbm}08n5xR4@SOA`m|u%AWSrdU6WHt!*0Wrv2o{5SxHm7iGVFv)v7svAe delta 343 zcmbQCFhgO3HKX9F|NsAka32td0WtSP#hA$}7}XhdCn|=h00pdocoPtB2I3kZ)&pWr zAm##M10Zgg?7`&D*fx0rlQ`!}ARnYIc%q^N3y_YSe1=Jzk#X_{M)Ar0EFzq-Q2FYK ziV7h4#>oN9>PYgFq4GLF`N=-4;hd|X0vsTLGc3-Gn@K9FBO`2<@s fD<}w7PBvg~mW&3nCIT^fsPRlxoUu8DV+%U~iRjRv diff --git a/release/datafiles/blender_icons32/icon32_library_data_broken.dat b/release/datafiles/blender_icons32/icon32_library_data_broken.dat index a533a99a15eae7e50284102cda29ed407a72df30..fe338b051d6d546a0edb77742dfcc86135106d03 100644 GIT binary patch delta 18 acmbQCFhgO(aX!W)lNC7KH}mszG6DcVX9bx6 delta 18 acmbQCFhgO(aX!YwlNC7KH}mszG6DcVT?Lo` diff --git a/release/datafiles/blender_icons32/icon32_light_sun.dat b/release/datafiles/blender_icons32/icon32_light_sun.dat index e66fc89490ea304d0e8e6965fa4f2f29e401f33f..7da9cb558c716585fbe4f249ffc3ecd81fe87365 100644 GIT binary patch literal 4120 zcmeH}J4>8F7==HBYm?aNwhA^Ww(x>cLDU}>2!Vu{LIsf!%zv=S76A+IB8FTbDQqng zwhDGhR9K%gI|IY)&bQyqCgi}`xxMc>?~LorjweYn4jT`W#y3A3h#iIBpb)L0 zvz+cvOdWoOC$Q2Q&@+hbibZ*=e&Gwu>@Q8?!*iHt?iKtDub{(gIum{!jD2sNW%Tdp z=Y@Up{2CZWal?vgtHDaVRSQ}}@Bp)lj-i?(R2870mb-XLKv78A}ByJ9lp zAA4a=Y>dPUE3+Ak3FnD_XLFv1Yk9}$=$;Y&z{!63#LPk6gSv~x`o*WMlkeZ549(p# z70Y2=-Yo@!QhO)g_trhulqk@?-oQnu@0sG3;WpI1g&nA0xP?G&=q(?;DXY-kZFHm1 z-Cy*r>+<$Df$ju+={f(Te+-|(NvN|D3e`Z~xykP6jQZYw-^O(P?qc45t8>>t{t^5r z9p5kPvu+U1Ys^Ba8hUAlbJo6V|1K`5;oQwv)%Nq3kFDW^_OL2nr<29s#okAY{~65u LzTQU-|AOWnj}!Gt delta 546 zcmYk3%S!@r5XW0}eXk;x8NFOIG%z#_tdy|m5Oi>%OVFu%mu^8Ff}ny5T8F~^3wzuO zBzp=;fyXX&sY{SI=>gk!G{u3>&dhISfAgD}tS{@!EeK*>)3m%QuaM%Hr>Jg+s$wtf zFd6g_(Su-_Dx!~`q@cv!Be({FDu*a%H3=NGDwzMQTM0oON9w}7D~I!#H@J+O}xzS{;QFb)pE7hpL7{JdFdujXsoEA)^m zd(F@>@J1hES_;DY1yz8kk1LJPk})mp(uFZ598m?|OIkMf(UfWN-zu0&VVxVOa1d5G*7H$prBO z#$X|FOWYz%ER2QrypuY~>FRS%pH8eqC2!ZMs<+ptTuoet~ zl1))unH^9l(6G2_0GcZM3V&Y!E`o7Fm8;Cc^nDL4jRbu@8SC-^Un zw;I0!Tm!!>mvvsp$21Otqd?DJu;&S$-X*fV;Qjon;=}9YVx*RXJ0|(v^T>z!zl~Gn zyiO@baEXb|dLH?gRRbN#>y%rL`^8YCQbSAU?BAs@-`ls@m^^AiQ_9m)kwBCZZ;@muFL4?LqNg%gs#Xr3G|G>70BBG~OS@9r7AIXg3V##Rr!b7szY=RJ4t+&g!++v#+=-~hM`R<_Vgga1~1 z2L^+|9O!}j;4%1WP+zegm@5`6Afh(`mcSY)HE~ZA$Y&{N%z}rFqA%&+07t=oFavV7 zN^(!ONFvF+gW#=+zs8>fdTKYB<#X;M$-|o_wG7}dfFCA$2S1aVVw^T7twSk|W*lA@ zyf?us_{nD8_l;NLq?ug{@_N?7dh2&*YwKFz)Yz)O{^l5=lP2~GpS1)0Y@vYzpxCB;!?$amm z6HJ4hU>`UJ&Vzg4J4jhCQsaS<7ekJ*_Mcnev*pHI;Cc^n2RI9!jZI>&j_{utZ!dl~ zxDE9CvgURCn8~_7x{k1yNpC&E+fV{K4&DrV1&!B9jgi^~w05#Do<}Uy|21S3HeM$; zMpA1c+weSMPluVx#_Qz9Nb8#=i{1bJFjLv&>iHbfdOu{b=kMYuRoD6&xiQK&P5pxB z5fA%M)dhH+)ELnzpzpXWw*NHu-w~^zP1W;pr1TETqWiD-e}M`#kvbCqgdf$!pL3VEk4W(+DvptM*kB(fMOGQf^ZaGg z<1VEGTW3?9VPragEu^@yIDDNy-+`?8xsdgnPlM++vHJWOG?}lpXnP*E!O^#O5nKl^ zKrpR$H|YJ1XTF|Ey%*tZM7Pz%)mbk4tkqr*dfKCwK_BQp*EfUueW2WYt?s|f{|&@c B3$y?L diff --git a/release/datafiles/blender_icons32/icon32_material_data.dat b/release/datafiles/blender_icons32/icon32_material_data.dat index 6a9e1dbd8854d2b59512f8b34986975087fe38a1..ef43d432bf0bb786ea7e22a6e018e5a540ee3314 100644 GIT binary patch literal 4120 zcmeH}%Z^P!6oyZCYX&qiVd!)u!ibKcTgQYTap~{^E>kZc+NI}$HsB=?3?v#!2k`){ zF_5?=ZV@^L+Q9MsC##Y=>r~aLPK?A#{(|SZHHODfUQSxuavJeG zye829m0bk=ao&&Hth%3%(2Dnhd>?phayRhB-ntg!*1Bnb{c()QmQrlhl8oHPX>A-^&Nl1^AhiCiNqx@diJT;-uyl&^M-b?NKDp8sW0-d<$L2w-C{R{Ry!P8kH+YjEiM-@L_Cl@2N3fwWt@1Dne=>OX| zRnF^_Vg#3)=$z*<|FWu~BYB-tOzC2s?6);V#JP_;B0|&q^fB|%4x;((Dj`Z z-s!P87mwj+4W5E(i|bQkg!+Nba+%I{zW(z@el5^9Q@?F zVBYGAF4TBW(K2w|ilw!~b4oG%tsvgBO{&v*4YFGA!yueHTFafDR})jGd(rE8SPDmH zmd@u(;57*LghADs=dOo(-9x<>3wbxi)fyC^wOr5CytIJ!DD9IEfqMKfXso$&K%BqU KH+3!l(%c`8U=F(g literal 4120 zcmeH~O>a#>7{^ar6^W8qh^5;NmQA;!iIs{C#TO9qB`mH=_r%MF55b}f8}6p!8&pY1 zyhOZ3D2cFe{r=}Z6Q|FenRCXLC;82sndd+MIj?i)_NuDt!OBEcZHLuuG^XKybiM<_ z;cyQ6a33DSS3}3@>%&}U!wy3HCSVEHp=(Hcs)K!2g2ya8Y)tx+;~Q`s4#5oMVvXef z>?DaK;|{}HGk;Be0rb{x3CriIk0g(78Pw81zW_hX^bYk*YKUptDtR4Ac{Kac_29i3 zUZI|B=KZnhx>WMaJ`3`C*TVDGb!X?+xu7YDHGlriHb$q->=kwLp1Uz6^Gh53F6h^_ zZ%9C#YtE579?6T!^_U+H^X8&&Y$~RS^%c$hM?AJhky^I&H9rsiJKz|sz$)lIeS)7b z4SV1qoPdjP557Yx`jI&vn0PVdXlwns1)nW9Rt2rE5$=Zb@N8@lYjs5b#B>L!_rYz@ z^<~5R_%?%ee{>#UEtB6yM7OB~aT4CtM;!|9lWJqN7xe5DU%ZaKF#oSw(XsG8xi*%1 zCW=k3qwi^*DJ;BCu8p;RvlOxWKd3W>MQ%Qy!&={mBKH1W9;M1kKS!>O^G$QVilNztWRCQ!5GzKToWU-7W~<^ioWt zJ~X-qkDzm;yh1-llW^Az_1n(wKON+?=6*1JYn67YuSauVH52VWW^?+GL)YAY+3z&kh5%xwLwuZFY%VpoS((}PjYt%9fK>xYE89E+-a`UCW|FZr!!zl}d diff --git a/release/datafiles/blender_icons32/icon32_mod_decim.dat b/release/datafiles/blender_icons32/icon32_mod_decim.dat index 3e6f876f393432eb2d8bba68525d48caebd869f2..c01af50bc0ad7fa571497ef4f2f7ba8fe504199d 100644 GIT binary patch delta 16 XcmbQCFhgMjKR@G<&4T>wjEoEbD!T*V delta 16 XcmbQCFhgMjKR@H)&4T>wjEoEbDzgLM diff --git a/release/datafiles/blender_icons32/icon32_mod_edgesplit.dat b/release/datafiles/blender_icons32/icon32_mod_edgesplit.dat index 6c7175255e106d16c3bb2c45b1ce0b22f43d62d0..24a3d91f227cc548f387406263852b68245e7e18 100644 GIT binary patch literal 4120 zcmeH~O$x$5429EL@6n?P>NT7>lou$jM3*kSi$C#YS|yATgpRGy2|P?5lCP7r(AGp$ zL+66%R1$3~6muv?m;f{HMe#V`tstLROM?Rhv-VLIP-=GQr#X@fTSEINUwrNN$h8A#lWxybYS>-qmHU#@G+^AE+J z$?_4`X#Y?CM*DqoFdXD{57e2DAt1(@f7Rmo676NE{bzo=fKT%e?@ahhvR}Pt$O*1@8exuK4l* delta 138 zcmbQCFhgO3G9&A$|NsA=n5@BAGI4)pmRFjX6^I^*24Uzxgg^-!IEbJ@ku-2(7fTD%2n|Y)w^1QA5*s;* z0%wMQpdiYrAQ3bwkft>&h3)em_LAM|c#i0|A^PB9-QV{++qKtTrh_0z!%|TYOu|YD zjZ*jrA`HV6%)%19gcnhJh_V~%l1vl*8u$(QVvWIRs81pnblczx^ulczhk1AhKf#6a zdx^sw?Mv;?qgEdIbnua{LV4&Lsdqv- z=sj)9x7K0|j}cHjlOCnM8+tF4gU+iK3!mLIA}@+?#m%9ff-X=F8P(mGb%}Nw6dS%a zeev(cMcUkY?E~F!pg8NR({~CUfu6-xFu!p}+7#i(T>A9YgU$)%pnF}FpXWi^=;`k4 z?n1ArAM*9+I|4c@mBU@gen0(r`)#Aw4nIKg2`<4O_d?prvmYKn*?zrtTZd)~tb+^P zjTS-Q$WCa4axnev@qExOgF(-NI+-x M&OLIk>;A`i+ZK36DF6Tf literal 4120 zcmd6q%}Z2K7{>36Gg*E>3rhmUQ3-^?77_)8*dh=F7pCIEg<@%iXi8Z@HKVpFqE@0S zH=^J!@gGo-aw~`gtqP=V?fih-?-}OEc*dCl=UnQAALsjd-h1cVd(Xr?&x^rw*z*#w z8le%To=E(2eBTejTUdq#m`k-sDDT3>AoE1O9QGksY%w?mRYBx}ZWDAtFFb_TFazuG z2TUl>_fXXHl6dpji(Wf4TJFp0cpxA^8Gsi`VUKoZU0Z$-9pFZ8E@1R(NA{X99 z1HE%F0LtMx)R-|-(sv1dfMU?}yDHI)fcAoNcm-E&?bJAh{|!R+c%f}H^;@)oa)`sN zbWPgYE5ATdpFZZYj`j_RgYsyFqid!985G?vJ#8)YuYrCC<AiVNv;;VO*;#0o4 zL5$-&k#zU{cR}dq)5QBt%0IdPsb7Y&eCu3|<29Y~*Rxp-+Lzj&m99K;>EI(@h4Roh zvLBSg3#iMr*2NeeW1#pbJxaZkJ3%?<{LtvaCz}TPdIlA%W)Afbw19Gmt8T_zmuSa8 zv1@D7cN5~EJlY{_&vDU4_a`WtZ9V!Lz%%s z*4wN@vk|tzgw96upl{@DsDZO^EHAU(MTzzqcnrD+x#EDq6&Ie_G|;~S`Y$mLUqH{v Y9+=q3wl?T~641N)=o}fe-~X)t7sxT*UjP6A diff --git a/release/datafiles/blender_icons32/icon32_mod_explode.dat b/release/datafiles/blender_icons32/icon32_mod_explode.dat index d5f731df899c2c2c12f5a8eff1bb9645157cbb65..e0d724204ebcd449e5ed16117d6fe6fbfe8c54a5 100644 GIT binary patch delta 14 VcmbQCFhgMjKR4r%%>vvUtN1KR)q delta 14 VcmbQCFhgMjKR4sy%>vvUtNQw0Qvx8q>*M~ zV(vqD0YPPT{C=ndv(-I4Jv}!q_&8mss?UF{`MVnjgCH1$>y{vRYYu{wRwixmNk=}P z?}eU5wC}XvPuI;oLRwO3Xpk&VgDbea;>|BR62Z`b52@;Udn zLIx&a!0K8gHxAO@u$&)RtJvp$O`B6&{rv{@Fl>20vR0AL{d$FSYR@|T9I@y-gtgQ@ zFVyp|soMs>KxZ)RulsZMlcMKT zKi22AFD_D}3BH4R&^b&)Q9s1hO1maKm;?P5>LUk5pNq6QrS3y>61G7-h;`8KGYmaY v^Z(+|(DSBe)7}r(i^b4)v((>}W*vQb>l-Y=53q06Pp<3gk2L*%#CzTWGB5p%L=y(AVxrsuf_W&Z-PopCWIzjIZX!JUb7w`%s5(UBa zEjc^JnKAdwW!y-dWM!YT&z`k*&a62z6h+YxxNeD}*XAfXZ)MR2{^+Pyt9_uS5$!we zd*U7F{_P&noB%dv8=yaI;>4u}=(nQ#=z3WDZGGvXedY8oiquCV)#v1QoW9PXvxpv? zcB;?W8*};!m4fs$eU9$A>!FbE5bjK$vp)`=T@R-}eFpH>^f@($PG4cYfF3e^j%EkA zlsMxB{AdsG)$}z^CBTt0X8XT-0D?vzhDtabjAYsKpuVqHXfMt$8}gQ1L>FJd7G2}md|-!-|`@s0t3ctk=!JZ{g zxqR+(_-pv4f%N6~5r02zOL}jM0;?GfPf(VBw#v%oH%$pM`_bXQHCY zw8P3TrguCLn_Ys7wr`bn+V3<&4)RKj2Z{T+L>{$f&t_4SP2eIT%w1Ju+B(g_4D5VN%>FK1Dm?7+m$=?4-2zaMNntM+7dRrhEE pkYoUx_GETm3&uha=K_$^4&%di7w__i?a1qM*?W`2H7MgU(JiKYMm delta 317 zcmbQCFhgO3G9%;R$%Y*MtpEQ1|G#viqQ>L}jM0q36BSh^D=-Cf9t4VlfDcGu0Z^b7 z!vEh6R>928cz&Xy%w!K{ZB8$!%we!n=625GPysiPiUKC?$>A&!le@WPC!b+4W~>0J zn#7|q*@xAbaWjz30aPps#Q!F*VO>7?K99!cYBmE#MvcvD*t?k~UuIUAe41Hfay?fI zvau>WKph=WYg$0od;nT=okfAO8!FfcG#aGH7s@{Xb_+AmEvyQh0Z_rcAQv0(v~ymA m3YdXZ-Qh`|oX)E-Ii5FR@^c`4pZ5;q9$-)fZ|3LcWCQ>nDxnbo diff --git a/release/datafiles/blender_icons32/icon32_mod_length.dat b/release/datafiles/blender_icons32/icon32_mod_length.dat index 0d1cf1f33aab0fce55011971d53c6e98e38fbf3f..681fafb94a274429393579d6e75cce672f662730 100644 GIT binary patch delta 72 zcmbQCFhgO(Vpi58|NsA=KT%O+^Bz`ZCPu}HiUpGcID{FMAq@V>k2z`>zfDfytY>7L YsHm}-gNvD!^)yfq_hvzUc1A`90OX<=*Z=?k delta 73 zcmbQCFhgO(Vpi6p|NsAAFi}xt^Bz`ZCPsyciUpGcID{FMfD9I(RQBW>9PNzXCns>$ bGcrw7)Y#0y#mvfj1}MY5S&*Ndk&yuaNZcDu diff --git a/release/datafiles/blender_icons32/icon32_mod_lineart.dat b/release/datafiles/blender_icons32/icon32_mod_lineart.dat index a8e9c976a9f5b13ef7e3c838c970181164a79463..723ed8befbc4548ab4aa7a2542a0237b22dc5fc0 100644 GIT binary patch delta 113 zcmbQCFhgNOJsacK$qj7Pyr2L7|8Eb(%s}ilnS;HU(Q0xHdpYYnAm4QI5B752^FWpX z5VHgErpXH#g(vrOWH4?Avcwr@Zx-PE&BQ1&QBh>F0#7=p7f{VVAT9$5tl^E`{GUgX F82~FtIK}_~ delta 113 zcmbQCFhgNOJsabf$qj7Pyr2I6|8EDx%s}itnS;HU(Q z5VHgE=E(~gg(vrOWH9akvcwr@Z5H7C&BQ1=QBh>F0#7=pH&D$#AT9$5tl^E`{GUgX F82~B1IKuz{ diff --git a/release/datafiles/blender_icons32/icon32_mod_mask.dat b/release/datafiles/blender_icons32/icon32_mod_mask.dat index 67fec92473f24552e8beb6fafd1983a4f760f078..db2f98f82ebb9072fa14445d4b1ba3ba68469798 100644 GIT binary patch delta 51 zcmV-30L=fGAebPqKLP=qlRyG{1x)|{{{oRA9FyDvTa&W`Et6ye%K=M~Aw08e1iu9V JUb8F;>;?D$63zes delta 51 zcmV-30L=fGAebPqKLP=rlRyG{1x^3|{{oRA9FyDvTLB@FAuN+*1Iv^12@$hE1nUI> JU$ZO<>;>>k62Slf diff --git a/release/datafiles/blender_icons32/icon32_mod_offset.dat b/release/datafiles/blender_icons32/icon32_mod_offset.dat index eb767471c255dff461dececaaafb3de6b61bb807..8ae67cdc01f82ad63543077d123d4ee631b6f413 100644 GIT binary patch delta 269 zcmbQCFhgO(Zbru6oA)p-W)u|t|Np-;5GMn1EfDujE?`dPWCgOUfw*S!17?xQADD}I zLGmCGc_8MVT)>jfSq@~G12M})#fZ%otiKr2Qc#h{lS_EaCmVB0PBhR_0E#gJu@Ml1T)F~?F9PvXAbto*JV Haxen`5#p?Q delta 268 zcmbQCFhgO(ZbrsmoA)p-W)u|p|Np-e5GMg~EfDukE?`dPWC60QfVg_{17?xQADD}I zQ-C~cAeIMWp2-C)>6{fnmN^i!OjL}R{DFskvpwqKAgd9GpG+>{F=tepsOU0z0T;WZF;EEP(3L=Z35cHo O@dqH@uvvhYgBbvDSE!i) diff --git a/release/datafiles/blender_icons32/icon32_mod_outline.dat b/release/datafiles/blender_icons32/icon32_mod_outline.dat index 19d31834fcb7f98df4795080dfed6e251c37279b..cc17d0f425a6ea6273fb9cc12a8aba329b9fb6c7 100644 GIT binary patch literal 4120 zcmcJSYiP}39LLY@b1RoNR?;Sy)?$gWO|(&7P$rqnD|s_1${Unzw!DyH@`h4M^1`LO zP!q))r51B5Lt~MZXrj-5|798U@0^~BUDDDj;Wh*#=!v?1Ye%x*fORAnqt&0g?naDjdvNY!h7RC zi>?_QGofAq+yO~Htgywgb74Dt1xcrkXRA|hXQFC6{+hNlsvfaA_yND6Ix26peri1h zNn@(MZ)v2{4sMlj_;46k!X!iU? z`2N6m$g#0ZbZS(CkI(KDQsH`?1m5)S3yB0oxZl2M$6z`0u3~pQO(A z$wa5dc+h-)1Am-d_%sJ)wl?+&kessqOm*tKNL2Io6u$MK@oQ~u?75&lI0RXr&D1y# zk{#YSmH0G%Xbma{-x-kfL00R4{>>_cT=T}y$F~pk3>98X`=bXWZy@9Ih`!qAI@f+e z=(k`mhr}Gva(fO7b_uw1Tl?`46c1;luhCEUjHJc(!Y+h8pl7JJG3oep9-IWN2gy6o z9U7W1zn^cD-vE+NFxkejE1*4~%Ep{dOn1Y5u<{Dy2JD5%d&Sha8FW7Ce6Gb`3z~yA zNcs%QCAJbSfX;I(Uob-J+tqe0@x`Du@C$03-?jKwfu5lq>LIiqT%KBD`VXc3vjN<@ zMUA)FJYOe%SV@S^geghlnrEGhdJgTI(AnhYJDa?%px>smuEF{JmYCMl1CZQ;5&snN z%?7t7^(<>)s$a{u$lLZ?K5Z& zX8AR(O?(l!HPnSZ$;O?IUuVENXa&6!p*5+*0>r`EjfCI4@yRQVg5gI zClc2l*#>q_N^Boumq4<~`lEF6=D-tmK!#v9M6P?)A+B><^Ab8sgV-bdl4Vh2`hIft z+s>&|AX=aGeqJh@KKietcds>2lq%nk(?{Pzx@(-=MbVl|`8`06)}H&mIOf+**AD8m z&<=u=0hHsQyK2O{!M6bPtdf@yI^WYB+vZV2_pi>MXJAG5$8FHJ(?xg)nsZ4%%(Hc} r)v1>QHE;y_Aerdw*Zhn)PqQ80@6Q-BpaGgdYeVm3)N9SJ`#Hm9se$TV#|NMW?PGu|>tAyVC zSS$fug&0NXi9{&LWU>I3K?^iPbyV(H`k7}u9Do7vzF#MeTC9Zzk1zSKu0a zH2!nwg?4PNI`xX+E=c-drLBpb4?E#INIGpiSDkvhQ&p46w>-Jh7lU+@=dqw+@U zr`9u&G-n!1PG>4JnLLvzcO-FYRix{E=2>9JV3)!~&$lR@-)H^V>eO1AuGeF0;46lM z&>G_ZhyN$!*;qC@HEKcf#E!?-x0rx7>z9tteGfDI*l2BP%>qfk9gCd@hae95UaT9R zq~7|o(Wx;3w4Xn~fB$>%X%8xFZS0dEIc@#f>eP9as^)!D_%?#(ud}tW=YhV#LCCo` zQ{w_ic6swu83aykc$Z&e}Wx;K9zzBbSrs=QbUz8;XggRJ`zW2b@o z+HVN_E!Yi^+5?{cIh>Bq^=*BRhoQu-bEG=sbk9iI?HFv`4f{ZAXtXiu_|zv(fzE^E z1LzK&uO^uB?otW;12Vmt5#!c7{k@t$JaVtIenDe|y#Y90D+0=>!4cQ$$3L4TWiU6b?sPhvVx4?%Jpib8U# z@VhgqwXBCyKhL+x(Ycg#`!Q=1*PZZQiO5wLXXDc4gSFuHB96WlY9RC*#IHN;D`*d9 z`!%gid@;B))P+9T#+{B|JzxXqTAE{MLtyRLH$bw^)rfkMqcwa|GSUkRhRK~o zTxVkkxINKY%Ip~I%OKfe{ZTr3bK$85AcL?M0)5aQOI&@s3me`eL4 yXkapV0WY^`HqZoqAm#(&EFhi<#2Fy76j<58uBx7_%nou<1JE^sn;Up%FaZE-=YAak delta 188 zcmbQCFhgO3J0oNJ2V!ekHDXvToacX(7L zpJ2^r?AdI=ww#f1$>ay@$+GMJ;|5zNDoRXtU}OiIUJWx@VzUP4bS6fLiHZpdK)snj qJQIksftVkN`G7bJh(TgmAOjRw*}=}J20LLgW6wlIgUt(gE0_S2uwQ)u diff --git a/release/datafiles/blender_icons32/icon32_mod_particles.dat b/release/datafiles/blender_icons32/icon32_mod_particles.dat index 099639164b5e26605804c382685fbec1013da710..051f761e72d63c3f303539f407232825945739d6 100644 GIT binary patch literal 4120 zcmeH~OG_1D7{{kfT?#GA%F9_4^#R%l2DK?dL_bTUXwV|H!V3{pv~wAFSr{d#NJyWd zFOV)YuoCjtYWn?8?*r$&%$#{AeB0Cmzw=(6%YSCh%$(;`k|e3X#Hl3tbUI1ipJCAq z|E=x{q-oj$PhlH&U0e!mip8?lb&xgEZ^l0khj0YC7h9}G=t#~S$X1{mI^iA2 z7K-W+qkC2HO+~T3pPV+Bg#++S*QLYH@z=!skv@6SehE7E*YF0uI~EzQ_*z+O;!5k2 zBkdPp+Gn$BhwPQrKS^yJUm5+A)-IzTLpxMImUf7KOzk55*xF8C@4Xq#Yt3of^ZiQe zT7T?0de1=5_g~l6xuH7^&mqcrQ@0O3fZp9=0|sJWS9flY(8{yYzrkgW8PU5=_$T8K zw8J^L2l^eB4VJ0t&MBy$r1n}>Ax%eo4fb^mvX8#6XiZK~KS`YROPzjAe7X*@L-R4$ zeW>T42=y_t8<5*i;xqj&)36cWd5|5{?CJebq%FVc-(sHIPvTnz*#pzCk-hs>56^<_ zg^uI}^^?Tib{e|>MnV0W{yz-EG06HubuEq@>nGLMZ^0AD>?hfO2zfSPHDiv5-vNCW Q>e=>S9r|Kw{>!z00es{jLS1PT)vII@dJ~9BpGXiy7y1B7kx>*0iS-P= zKpK4zm7k}&ntp#-8^+ztnLXk5Mi>0pd+qh{pBd(yS+yidYB1K6B#X^S^0Eb|74~i0 z6G+pv4Q|0F_zZX9;I^bdhq`u{hBa7+XK=bvIq`Au?Ovmryci9-;hWzG|0fh)1F#+_FwZf8l6!$W3{hXPk^4qb32hKG0L!0Xnx>BR}PWBp3LI=D6*^{z9o<@w}Q)~6<`{TTm9 zUhj~zs`@*rt?R3zzth@P^kZm;>c`R!(T}NJrXO3|^z{wCuYJ}$?ML{Bv+>w_^d><6 zExWF*dqY?A$ODLS-}Jo*^RNM%umD$LKUcfA5wwb|@;A83H6wb#g#WPK0DY^E!2swx zEW28zr`=P~JW21lErm24@-;ZWX0i8vtjwn_Xr3g`%}bqrPhv++zwToAdJpwGD5Gw* zy{v`vB(V_v&5XYOAIh{9clzhq_kir5d6Kg?Tah#!b{cNw{JO>7xwFufx}bTIygt*= z`!@ud*EBN^!f%jW4%Kye)VO(anf*u5bIYA4Ill=-Htu@HToLaF{T4K@t-@Ql6jO6A G_x=mor#v$N diff --git a/release/datafiles/blender_icons32/icon32_mod_physics.dat b/release/datafiles/blender_icons32/icon32_mod_physics.dat index f7849f817c0214ad415e0ea699e6511bcfea5c19..94d79d54f84c1ac45f1b8e7c3b92b8c4bcf54ac3 100644 GIT binary patch delta 24 gcmbQCFhgNOJtO19iHZuF7ckD}Vw||yf#(J@0BkJ?ZU6uP delta 24 gcmbQCFhgNOJtO0!iHZuF7ckD}Vw|+uf#(J@0Bl1DZ~y=R diff --git a/release/datafiles/blender_icons32/icon32_mod_skin.dat b/release/datafiles/blender_icons32/icon32_mod_skin.dat index 2e9f029a714af1cec942ed1a7300a132da9134b5..59a2f96df664bbfd8267cc4b34f7514b4aba37ad 100644 GIT binary patch delta 36 lcmbQCFhgO31Q63UWSQL0$jbr}oUFiSKKVMMD-Tpf y15j1NL`9v+Axs_^Vpp(;g)n1Lhbgu>gyl5zWO*iw$>AIxVEQ_Q-W<+(kPQI8l|=^t delta 111 zcmbQCFhgO3G9zQk=(Fe$L vo*d6)3#RWw>3C)+A56P%PG;G|Jb6B+@8lc~V;~(k`2&YOh~8Ylxq=M%qlM#0GejLMTwv&n4kXYAwy0A}h3_5c6? diff --git a/release/datafiles/blender_icons32/icon32_mod_wave.dat b/release/datafiles/blender_icons32/icon32_mod_wave.dat index a7b97702504604c3dc8a0f488046546ed041fccb..9735bef4fe53f24d152ec0abb13051661c44e915 100644 GIT binary patch delta 28 kcmbQCFhgO(dsfE2$sbsoS;PMS|9@|CA(!~(ezs0d0KR|>b8(HERN~p{`RGXB&-xCa_if*QxAI)b7pw6Bww90e z2)2b?VY>fCx0XS>hDEN0Kx^VlwvOSlw*CR1>RvEnEz6uU#vW7sROgHlYfe35?5X2Z z9;}(cKOyIfs;4@9XEh$z_vO+)E>G1{9N$@uXYvtWd;j@zX`hLwu0!AU`Rgh_r(Sx@ xx!PxwZ|VQegG+bB#>7+CEqwX@>|vZf$U9rU8(+UaYM!BdZ@486A6w+BnuDMF9x8H;lA2G77+e3`XJ3(Pz?vyy ze(`f1s#U>nzP}^z_5Z3hQK6P0(I~MxTr0ge2N*WYD{nqf_d--gz^D{5Q<`zGuX{I$R7o- zfy*+DIdBkccW$-KCf^EhQSPY6mC@u)1E1q(v};B46$_Lj5y$zWxr!rx3b@>+!LBJM z*H+AxI#hp~3Rv3p}XP0Cy z^i|b|`*Kntj_-w>*k79OQ0S|w55LYWNj>Dm_6=yS4urm{`f%%+g{jnzj08ys+sF^a`Lh$hpT9?K45zXA{Yf*CbM5M6`N^zprDvbNR_~_8 ztf74!x=k*P<%q?O(_S}>XVr8YF>UW3}qKpQhy8l+H3ZEkEGSjr zom3FI4~?O}=$KkfVEbV(sSf@&_yAI8QcNv2YHCkPI-7Iu2W)%fM3q|RNz0|Soz2~0 z9KJD4js`+sy~fnm{UBWqYhrsEd!lG<=&RS5`s>{sPyCwLbXIkT|AxQrPd}$fU$xyF zpZ$DndXGu7zI{IW%<(RsDToNXruhJ z-Jmn+YhRd~WlVuCS48)3TT%}8vo7Wyt?fgz$)#u6pj_G>cmaA}b|=*{8~#QZ2WiOc zVT*4uOe+YTmY-I4liuOFpLbafea&r}GJ8@>&^Z^VXKhJ}F&q9J@DqN)A+v`qzD)BI z*9VfmKRUuXNn_%UDgkM|Pr;n;FKjv=S}Q$APgn<=)_ep^n^cz-IE{z6y-15g2ze(y|cZgYk$`8t=w@Ckf< zXYd-{`bO8+ca*;6QukUoSK63bIve}pD%f33H=UfY) zPn=s|T~6`Sz^gqJ@ZPWBL)ki(9pKAQ@E0fS05!w!<@JV40pqZICajKO9G2I{OabGt zd?u`pVH}p%#!La@uzV)0j$xcQkLwM5XMC(f5Tw@8C+EC(&f+|-_wa*pe7QSIt)s8< zAp(r)|EzjHL(mu(-M*=xr5Woxeyw-gJ)E~#|5Exq=9b`LX4p^iKiKmN|B8F9#owQ# zItG5qzgalqk$D~AeI(U?fPca>29HhhvZmIhkG+4XmtHI1Y-orr=c2UkGQaBI*MBR* L46q&z`me(~0LG;&6J4k`@_|1%t))p9Vn<_yqyx0jkNJ7@A%q^b>_S+f zUeEBE!&=D-#27cQPnE5f9pLk)-~%U}04{=G_<4X+!{S(eCoHG2IF_F$IyEeg<#)nz z8jEB3d7@Lp;#htsET^$J+K>Job`Un@BxuyeF^}$fanH1W;GR&E;pKjo+PLOWM(wZ7 zFY+brXzi)a>(?AHzR=~1e4uk#;M)nK^*y37z8kmppYpdj9S+nGMe9G7J~=OV7utxS z*7vU}F8;$>Kk=`Muiu}l_zV1-;!nhOr2VLh{{Ub8_Gn#e|3?F=#EmZwG_=w0i;~N| S+w?E>-?=MnCp-%DUpMb$_O74+ diff --git a/release/datafiles/blender_icons32/icon32_node_top.dat b/release/datafiles/blender_icons32/icon32_node_top.dat index cce81c01badb76a54936c9040fdd8a4cf968c58c..dc054457ad856ec5df9b2db3f271360d06ca6b78 100644 GIT binary patch delta 78 zcmbQCFhgO3G7sZ{$pOsLyeIzu|If$(1V9>x2rF34WDy>1##56Wc+_F!W&vIfW&jlb BA0+?) delta 92 zcmbQCFhgO3GSB42JTi>OCm-NZhmfMj|NsBb$bbZZ{6muin5B77!enrZFrM5jz{|l5 E08$epu>b%7 diff --git a/release/datafiles/blender_icons32/icon32_normals_face.dat b/release/datafiles/blender_icons32/icon32_normals_face.dat index 7de621d20e4744bb526b5abebf607abf99ab1b1d..f73e2302c3c28f26996d463078b92cb7ac6f0d08 100644 GIT binary patch delta 80 zcmbQCFhgO3GdpYS|NsAAPQJ))H#vcwb#gbm#bjp=pUM0jCX8R8qP&y)IZRj+fa+es Y)NSVGyur%a1QaUX{E<(caiRey05uOF_5c6? delta 80 zcmbQCFhgO3GdpX{|NsAAPQJ))H#vcwb#gbm1>+|uk9RUZhsor_>^_tGIZRmNf$Cnt Y)NSVGyur%a3=}Hf{E<(caiRey08hywasU7T diff --git a/release/datafiles/blender_icons32/icon32_normals_vertex.dat b/release/datafiles/blender_icons32/icon32_normals_vertex.dat index 71e89c1f0bf4e9577e23d81efaf61923941ef3eb..1ed4a2c7048a2f065df394a97a3e77837261d75a 100644 GIT binary patch literal 4120 zcmeHJ?Fqs_3@v`H(Ula$AFiQJAd27u?%^P=ApTI%4HWB3HJ~Aq9CxT-4;~@Cyu5ee zXq#tQmILeh9jgYCCQz+%0!2}bfTh6DJDvo5sa@s)`bqe#C+48`)@mf5b1QN$uH!s3 zN`J75a9|FBT2eq#gtleS!w0RGGW1{$e;l;<_lz;imYT$>N- z)7<5{;z8fz0d?wmJzS~*e=fxz`5DplfSRc9H~1}J25bSjTpqk-_yZ3>ASV1b-h+d91>+Aja03bDo64Havn{i3qsDZT zmon|Vd2fed%cv-d5qKPYV0}(-0s2*Spe)N7co5up+mpkGdnUTU$Gu0tLw=>#QZM*w zx+*`_zw(=On(iwJztySi2MG1o`e1T zIOauDetUk@Pima&KUFWzM?3fZKcvPAyn+|70Iq*nK1X~4Ofz0Pf@^P$+&r}Yf`=(Sv=0`KbNA=vqgChO&CBm1ug1fs Vi@GT_@Nfm}jM{=p3im(f9soBz=%N4s diff --git a/release/datafiles/blender_icons32/icon32_onionskin_off.dat b/release/datafiles/blender_icons32/icon32_onionskin_off.dat index 653d2fb17182bb0f540770abc43b872d09d871c0..fb0fd2365833e02cf6e534844c78d4f4ee48b19d 100644 GIT binary patch delta 308 zcmbQCFhgNOJgcnQ|NsA^fw&%sCqOZX9R+pm&ran!i@HlAF!!2_D*60a@o0ArvT-YCMqgSu3`7*)j-l@KT%O* z5(ht{`b0$w7NB^{WFHP^#%LgK@(B)mPLLfS^BX_{9-PM+CxIDU?u?CKC0x6C?V(CQ z$}}b_+Dtyf-9Py@n*z`YH9YB}Z9w4&Aa;Uc5W8*i51wSk;>izK{e2*f)vIW%3#Bn#msA*1QftX_!`xiHa7JPjEF)KFwjn2{HpD z(Et+k;5^Pa5zOFnX9SC!;M$F@*9K^4KkF2r9=pj8*wiPt^Tde4T;mKB1!0(Lk{OF8 cKVX%gT+N#y3G?CvpgaiI12Nc(8x>`k03ku9eEIc+jIq!J~)xeQ_hW@Zrt(&3kX&&b*dw+0Fr_pLM%kAoI@S zo|;liSTGh%?+AXWOchslSeH#>-mCQ1IHRWU+pFWLG2_hhNR2!ougLqH7VSe)!)^bn z5w(kCWF5`YKE27+4P4h2QBa-Op!!V23v!W+l0wcH?FoDj#<3Wj(jTZAScois1eeSt zmE?-|uuCmlP0;mY%c9fQ>~$1n9;WwchaR9I)$QYV!QB2S=7U=Sm%Y_ z$z~QUsr}fFwqof;`npf|5bg0?zohl?C7w~WUNs%YtNGS!9(p0y>$ILrk4bukd?Fvo zQI{SHXeaS=@S2*%axhw^lsjz@`6D@bgKsm9PBA>)KcG#o6p>x&;|fWMAthqTWwJ&j zM(*deysOLhNTJ>RLShplU9HN);F}+r7gTbsQqJ|pp&bpMmAL=%2J(-7MdV`c5XpW+ z-V$lyL15_M%-HLDe@HGG#0e9{f94)(ro1a{9zs(Y^j$+C&y4V=Mgw`<6u? WljkIH=^TSX{e)t1b7vANHSh<;iJy}I delta 700 zcmZ9Kze^lJ6vv&to!eV=+=~fBF~%K?Aoy$KjIMZ~V53C66ALXQ*aXrk3F!nILD7JW zFItlH774hXRf)F$%bYU$40-VX(Bg`|-R-BQx zP~id4btb2(hzeLNih$LmLrkK{sBj0+LJhU2= z@$w1o;zvGQ-tRm}T(`mr^6j#F76h8G8Lc*{6HQAC&R>g1=)6`NOq2&hg69jPZ>~aK>y3spqIc1h=ApmyKl!K gN`UCd9ixU@N%C{>r|_b;fLmOG{IeXk44rj<0YtzL6aWAK delta 467 zcmXxgK}!Nb6bEp|-P~Q*F$V;-JnSCA4nab6Nz2HJz@S5iqHYx=bSN?~BnXlYbtuMX zU^hR4P#>T}2anx4=B;BNpuql5*29l^Z{ORQH`DgoUNY5Qa~U7_F70NHA!ng`hU}7FO0aestD?ir_C0vDL(0Qiup*KoGIAG9ZZP zUl3G8L=bGwXTq**&fE2JIh&A$hq;@bop*NbF4=S^Hd;SZ58)N72t{4dREDeq3{-bBVR-tGQDpa)OoK7vNm^;+kp$`tslN8Y1+F zFK6blT@#mqdzIr3`|~W-9z*-D^AVqiLy+&_2@W8y=UtXKr*;&5SAMnL_5EE_gN$GM z)_Iw8?qA2*tZO}Umv9AjJvVc?)|+v*>lRvHVlN9Y4r$wdgZ^gsFZsx^4(3^Ek9#>| z$yv+!oiX3k`=j?m9{HVY_}rV6zOF;{L(aWpFb{v7dsD>3KL44zwrldcdZV9Ptn;T$ V)8?m^G{`#|?9G~OP1_&dfp1{ohOhtt literal 4120 zcmeH~J1<005XZ0g(h`rbtk7sAX!HsiwZ@}U6OY0dAffg807S$iK_nzf357(E_zEI~ z1dV3>W^;~=YtM1*u15AIzsz~e%zw_@d$V^FK@cS1y(kFQ;h>mF3FNO-2a?I;G^`rt zu_Mq06@T3#Gz!3KhwU}0-BqxaOisZ&tK@W_4(m=H!U1uk#TXgAN#m&-*pr$7Mr#P)_wYWCVm%N3-xel);6q;%i>oFm&QMB4ea^!-%Mf6(7HBKz1l$k~s~TBhdW7y6BeJf;!4V=b=pxW@QZ!?nqA zBXjM`+}VHeV_$xAHsKlWVGSB}4%ZkzueQnW)pzCA>*%=Nzccpa`gU#`&t6vgzIgUd z;1s^}+-i&U#cMy;_&>#SmLceba@Tpo>)D=P@{wZ_QqPdF@@+Q(eIU=j^Sf8}Kw?wh zui^Tl&WW#rUw`)!lM{ViCppWY9R^_z!oAV|2@1`AR_E9H;W7Dry|K0ZnZB-vT4EsI Rz0w=~pI}P+<;OpF-~(n0eW?Hd diff --git a/release/datafiles/blender_icons32/icon32_outliner_data_pointcloud.dat b/release/datafiles/blender_icons32/icon32_outliner_data_pointcloud.dat index 1d753d9c1739cb93b237c4f6cbf8ca499e8994cd..8bb62ed880410a017034e0845f5b9ffc07e757ed 100644 GIT binary patch delta 39 xcmV+?0NDSSAebPqF9HE8lQ04w0hW_c0$T+b|NsBxldu9K0gsU(RI?}p@C*ll4iEqU delta 39 xcmV+?0NDSSAebPqF9HE7lQ04w0hNGQp{kXlxZ}$DY7AyMr!sNfA%)Y#*PieN@^^o)Mz5n6gwLwB??ia z{8?DBP*(ore^C>IxqeTbZ+gx<=ia$zrlyp)p1$|}p67YLbHDqYKRsEN^?*g7Hb2X5 zfNTNyA6dO#?*hZ%9O#Z)!rW>w0xp78Rr#ooH9a4I6pu>yr-@`7t;$Dztm*l~`cIHg zo(%GKpt%&|CI0b5GX4fST`dRtG4m_!baUV)oKp_}HfUBxO|u&Bx8PsydbmG@@tp}cLMwj9+jGF zb02k0goU1=9YM2@xtFFhY4BZ*i zrgX~pQ(UJ}O@ny8b&nU`#qNdEeWPzik1^L&$!Vhh;FUKcKiRAYyuQyan5Xo)*sOecTP+Kp^2N!2fvvOc+p3?nI=~y?G2?UH o>bkCD;a$Es`Df?nB4^D(yN1(qv1VL@^*4iF(C|GQJ^xbu7nU(vkN^Mx literal 4120 zcmeH}O^A(Q7>2(w%!2W=k;S0X%##6fj_qn}uX3jSo3s2p>&-2{({e18F&ikG7Rf?jhfSI6sdQn^l z#SHL2ifXmm0ZxL`V6op4dKGX1oGZioJg=E~AEX$}@Q)M8`lwmn^&3^y4?m<1LLHVC4E2b~#T zzZtG(H1|w%+%>g5%tm*|v|0|k53)}M|Ns9pPE@qmyoDu&8vtpk2{Zrz diff --git a/release/datafiles/blender_icons32/icon32_pastedown.dat b/release/datafiles/blender_icons32/icon32_pastedown.dat index 5eba9974cfb1d27392100c18dcecff2fdeaab04c..f4fa83d1a70dddf94bd93e97636256a364b40838 100644 GIT binary patch delta 198 zcmbQCFhgNOKO^I@iHZ@EUodL0{Qv)-aiU_zM#A07n030D{RP%;l_L z;mH#?!zbToQRD#gfCNw=7$~5MEZ`3m(1EHK;PeLaG#L`2LN#6c5DCu diff --git a/release/datafiles/blender_icons32/icon32_pointcloud_data.dat b/release/datafiles/blender_icons32/icon32_pointcloud_data.dat index e926102ef1ba9d3ec6b2703129e6cb9ee0927ff5..132b92a69d363dc4c11749562fa721a2655cd6c7 100644 GIT binary patch delta 86 zcmbQCFhgO(dsfBh|NsBL24ZyZ6(~>v#EcUaWhU#e*)!%$&S6t#oH9{SVe$sHWJXUA W!-V}l>rbE}riqF^n^QQpumb?da53fp delta 86 zcmbQCFhgO(dsfA$|NsBL0%COV1t?Gs#EcUaWhU#e*)wKO&S6t#oIFucVe$sHWJV7V W!-V}l>kptJriqF^n^QQpumb?c2{GOP diff --git a/release/datafiles/blender_icons32/icon32_preset.dat b/release/datafiles/blender_icons32/icon32_preset.dat index 43e6f3fdbe2cd3f0ab3dbc921ee8b1970bcc2f18..b1ad7578b041dd97820275d99dab5fe0f319fa14 100644 GIT binary patch delta 37 ccmbQCFhgO3IWuGPM8%BF3z(;~V6rNh0QXJ|=Kufz delta 37 ccmbQCFhgO3IWuF^M8%BF3z(;~V6rNh0QVIP diff --git a/release/datafiles/blender_icons32/icon32_scriptplugins.dat b/release/datafiles/blender_icons32/icon32_scriptplugins.dat index 25cd8a405b5216805df63b919581552995eda12b..9846f084d2a0691e5d49c79ca7cb39e43d3e7b26 100644 GIT binary patch delta 20 ccmbQCFhgNOF(>1b$t9f4j0-pa;8b7(08;A*kpKVy delta 20 ccmbQCFhgNOF(>2W$t9f4j0-mZ;8b7(08-fpj{pDw diff --git a/release/datafiles/blender_icons32/icon32_seq_luma_waveform.dat b/release/datafiles/blender_icons32/icon32_seq_luma_waveform.dat index d705ca126373c88d1c8d64250ac4687e14a85ecf..d7ed37a76ab1d3d7fd9ad4eeb2e1579fcca1de9a 100644 GIT binary patch literal 4120 zcmeH|VG4jS2!;Jo_t?ogWyk1BVfJHSp)jUH1cOII=KDk*)c~N84$`#&oFv#u^(@^0 zBHoggLYcY5erxQC+fidlbvGz8k~mt8wV95Zf3KU&2bw!adkB pTcY<|{O^AxWrz|DU3rVmTlD@DMYTqC*g$mNiXZ#Eafnb#iwAL_r@sII literal 4120 zcmeH|Q3}8y2!?&w?$OD1${k~Oa=rvQGAfg37|6o(|K+1t0)RwuQ9K90O#vrGELQ@k zELT$|uGk|hnYPuuO8IG~OsM3e@lD^w}A&h@$0FY;Xb&esb>=JeQ>YvH8(uO7c|#dZ4PP)BdDc#Q;oR#qq<6sb@DBlB!(m&iW8s_z z_FUdx40*}B(j|8$%#EGHH`Rr+AN}cAy{bIw*yC#Hb^iOSxKh{9p9yNv-3#yEO=4}m zGF8v-gHydF=J%(ZvQK)BR6o#eGVgRRuM)Suq#jV#fM4r8*sp%3`>#H{MbClVUBu?) z7qJGu)ll|dVxPfsjpx^U7s|edZ{MHt`$tUQfUQ7xV5+ET6klU4)F&p6q_bh4zCk*Z z$4=)L^ABL$wD3oO#=6Cd{9VMpfE6F_$7k;~kpI51diGC1L+3pX6gv+z{(^Hru?g@4 zXe7UvuvWNs06mk2?AP3D|MQ*c&myF=8Vh;q%;DP!z7_mcMrX9Wj#j6=aOzHdbi%9n zb3k`x&Bb*#!<{(l#Na&cG=AfsG(P+@VBM{swzWDIzD39B-Pw?r#RZ?>{G~8Ab`HmL z$K&08^cQ3Gs`3y&;tJ5aKV|v&XMsQe6Sg);i^dYLp&E4eo&m4@j(Jk=tEv^w383G2 zuc7`>_Q@*F*fsdnQ?0M*H~0#K;|&4pOL?D+c@<7qMLb0J+F0j{pDw literal 4120 zcmchZ+iDa+5QfJjUdnoaU=SgQ7&RbxBZ}lgAH!#f1_CkQ3C{{XggJSUnQlly3>D%KMl?U`Bsl=9BT5cReRw);54K+VR`sRfUjZF)|yy2=YTzz zx6@@_@@Bf^&X;rR&f%Nw!WpAKS68oB9(C+@wdkx5TR#3ISa9oyY%QgQf8J@Rh6`W@ zc^*pC^~75C>UX~gLSMtT`zPFg#B>Mj1bPQ%i<%VE_*K>=Ht@Ny zS9g%kWTDU*!T%24fl<@KSDwaiixv4}#6E%#J|5$<_cF-8Z>)55&Klw!1$y=~K;sWM z3smP`@D*shh|%no3zsydt??Or%Dv7%-Xs49`zy5+=L z_O5o}jM0A@t6P;%9Y9rqt`)$kgurqZwCf#2@mjjHwk5u=7@V6Cp!Un~VHjsO4v diff --git a/release/datafiles/blender_icons32/icon32_shaderfx.dat b/release/datafiles/blender_icons32/icon32_shaderfx.dat index da2831c7618bb9007e54fc27735fe4b384dd4b3d..f72abb0e8d5da4b6e311cd4fbf0006a9abff61fa 100644 GIT binary patch delta 48 scmbQCFhgNOH52RU|Ns9Vov5g=c>&XGb{MZ@@)uTj7{_F@3HK8g0AOtx)&Kwi delta 48 scmbQCFhgNOH52Qp|Ns9Vov5g=c>&XGb{MZ@@)uTj7{_F@3HK8g0AL;%(*OVf diff --git a/release/datafiles/blender_icons32/icon32_shapekey_data.dat b/release/datafiles/blender_icons32/icon32_shapekey_data.dat index a08f85d38e9a29a46c4cc4a459d169d5433f951c..1ea1b85bf4cb5238c2a681f90a3149e2efa61c31 100644 GIT binary patch delta 86 zcmbQCFhgO(9LC8DxY#EzW~>C$%1jV?F@)Z%%)Eh<@$}?_tlE?R^9V4`oT#WV`2(}g dWCcFu$@3XGCo1ZIxebgO6BP|MJMi6L1OPH29lihn delta 97 zcmbQCFhgO(9LC9Wn7Jn}XDkKM9+N*X>r9@&908^kxVb0KXZ8iN7jUs}p3iK;Ir%V` p&gB0*0+aiBR3|UsQkdMpq%e5`lQ2-BDMTT!Jdka<*@5o{BLLgTBJ=fHF!zJOhZQOy0nyF?j-${N!>L3r4?*iXI?Ye;@{#Q8ZCeX0ifnGp8?9AO>j7 z^_-X=$j+ejv>W^6L#wf4FvE zkU#`iG@~rg&y#O(1v5rZ*5PhuET6mqOq%fYbM^r>Mgy_#0vQ2x63_^CZpJB4i8iQ& z$V5e*$q^jhoCQz;eUQKn4t>U4uvwhRtTI3uZV<jD`c`Ui|XVXT)~V{lXbY88OtVb0Fx#>{hT1Z(Lk&>`3z4nW65R*-WyB+tWvBh diff --git a/release/datafiles/blender_icons32/icon32_time.dat b/release/datafiles/blender_icons32/icon32_time.dat index 4a328750662dfbb013696d8e609938360bdb82e7..cd4360830276935beba9bf5ef9e4b92b27af821b 100644 GIT binary patch literal 4120 zcmeH~J!@1^5QcBWG>T#&iK2uMK`^l~g(4_Xu#wnkp&~@`FM?R4QTzu&3Kf5V7Jh+3 zf(QXo#4jxTh)SAZNC+fR5tQ{A*n!!*bMBqp+`__zH#6s)dEa;L*|WPRy;+v^g464= z><;nXdj52R|F7^4)M~XoU<}*`ufaDkU(X*9FMxrtV6YI)BQDHF#@3@*WKpST!wCe*mmj;H^FUKSAWdSdx z_Z!YJtHpRnfzCVDn)ZOXy#<_GtI^x{O=!#nbfz5tHvyh{OKfM~mH*!HUue<4+iJi)3d;6f{Z}kka=42v z_=``M)nGgTR)QLlWUk3eF zi}6NKwwISIM{+pwdz;sfjOBB)!Rj$CI}7`5z2@-byD{RKueqig8qrCeg%7MXeg6uN z`BQEBOF!q;TO)Hf9lf)t9{K

LNx2 z!HtTFng}igQG9@yNL(o6SI{LjJ$3umB(o9&Cso~5=bY}IJAG%Us;VJydPP-D5~o)3 zZx#6e7e0Yjt2GQRfZO01_zb?J{0{LV7zqmo8__%po`By$$l8tv6D3mmap zj5if@UQ+8g1Lj5woH}orziPcDm$?S5y$(n2u9A;elXG8dwHO})awcBC&Rw<~$?2E- zQ|poFoqInTvZf~fwBs*#W)siWuQ?h`=dS!&hb!+9tw-XZ)qr~#G@ZNZ&ReeJaKCox zKVUWB?gHO~8Vi=2{GSK8x`zoz<6KZ<&f(q-a@Akrc}M4ZKo`nfV?~J$i#_rygM|~^!nDHY1(j(vDHAYK* z4=7iDEAP-+DbhCv77bT5B5?|y{Dv9;H6;>B608oY|KL7v# delta 68 scmbQCFhgO3HLK*o{|In^0SbUZ2PcQHrc0hgNd7;LBzto66;>B608mOMKL7v# diff --git a/release/datafiles/blender_icons32/icon32_tracking_clear_backwards.dat b/release/datafiles/blender_icons32/icon32_tracking_clear_backwards.dat index a84348d5e2ac6371c016f670db78a3a225e39094..3fd3b5b4c2a0fc747495da5bb6281531f54cc268 100644 GIT binary patch delta 232 zcmbQCFhgO(es;#PiHZi3Kd`@MJU_XCS7mYoU&!PJ4))3ac@-x=;1QWTfirk=J+J8G zADsC>ns;&uS2^$1{}6ByNL`&A!>2OQzz3+9e{wl@iKr-0@Dfx3h`I*E5)&0uCMR(5 zGhUwjg)2t`D1xl&I!FZ&ivjUvAO-=bt`H6&8?1H`mk7`e{H#z3AGpNi2fW%aQ4bcN U@^e5J88e=qsOYl!3ZDxj0Q;YassI20 delta 202 zcmbQCFhgO(es;#viHZi3Kd`@Myf8U|Q)Z$8$0SaE#*-5jJtik`u`^x)3O0jDk;y+e z^MR}ku4d6|{~_Qakh%(GUz)@Xk}lw`o?Oq#GdY=4aHMtM zfdUdhmdNA}oE(!sa0pCZ!0A1?o0E5P1g8p=Es88Z(ZGNOsOS9T7(V04{G6_vukg7r F0swpBUi|<7 diff --git a/release/datafiles/blender_icons32/icon32_tracking_clear_forwards.dat b/release/datafiles/blender_icons32/icon32_tracking_clear_forwards.dat index 48b4076f2274994f64f46054324e245732c85dbb..9433a243fc0a62aba6ee0f425c33af89db29353a 100644 GIT binary patch delta 36 ucmV+<0NekVAebPquLA)Vv#*4B(a<$v- zV{k~P{zZDJ^^qo?$So*!Du|2G0c5v80!)J8YZ!G4KO4!B>z4ZjcA8 zeF8m}G02*WPF#WBePnOIBM`ETn-tYv1P^$d&H-}>{G?s&+4xbHqrv$Ac!M<{y8No` zJ>c?l?kURXAu70aQKES*pjxmu0CpdwuuK{6of?S$fiupL?0_u2l123o*(wOqnT(5B zeB4Z5&kNCLRz2%Ne5QUiEy`T8tWxSVR`U7o@flhWqPFmhOz$*RynkdLls(Gn_tmED zT^%?qJtH4&VHvUecKmo;IZc1{m{_X$vSNaAzPOm7HDBuC0xZQ3f~bSeiD6LB(%ThkpPKOQuBxhaVU8bwJB5}`=CU9NN2 z!%(+73ZbEnGSyf4;Qa9j= zo}CezPzp#9{qhjX4h@Spp9@hrXa@b@%O@E8BFMCJL#wNS&`@-E)cDPKJeMl+?2?%l3y7qyX31f4I3&zoDxd->vdL!8`%VW$vhBQdBe$X;lqUd#*;0@Ov^q!F-*5<)6`iOC=54s?-=x z;U+!`^+;_+9y^mh^BC ze>XKFL*u>ErhW=vkJlyL;q}?ECi~aEjdQx8HFd-Dd;K(ZzBmTP0S}$m tYardj0pc)-0nRZ$K#8FR@Df(pjzyGoSxb}7h|2%WAn+!ionB$+@*RoSs7wF= diff --git a/release/datafiles/blender_icons32/icon32_uv_edgesel.dat b/release/datafiles/blender_icons32/icon32_uv_edgesel.dat index 228a2f2875d25c05d9849b42e07aef568b328552..ffd90d18ad1194cee8a860e9ded538e456cbe3d6 100644 GIT binary patch literal 4120 zcmeH|I}XAy42CTp_vit*7ZUU&z;PHmAu+LVABON#Flwy4oTi&CSy39-pZhm)IwI=e zyA{!MO?2I0vW1&@3OMKX@Qc!qUXmFTa8F7$*NQ(o-zNN`eA@V2h1z`Dc;lxP(CVp; zPt%FC`Lyw^`MG@B_153B6d!dCaA`L!PsSr5_rGNSLEKBifAi1HR&5hL_f;Y2 zKf~p_JU_$=Y{+L;a4g_2qCab5{ICL(|8M$-B^sYXr>gUB`|sP6V$$0F``L(oZpaX528;=ql8kixHmQDWugG`-o96{T_gxqlO9Aff@j zTM@n1MAr=_Tew-EfOBpSzbO3}B$+V*_oQTVt@yL^&Er?))5e!7)aKL18$YjrR!?nw zo=&9Ar;YE;FXhv&_x_%x_^9&+mv-0kWIPgb|I79t#Jwf_H^=SPZXTcesvM`fN_?!J z;qqOcA5s-|HORN`}U-iw6_2L_fNEMLZ90H p&-Yj~Pe%Wd_h@45!5>rn+UKaP>HO8^FU5iXfJ=Lp-m~>kfe*!}e<}a~ diff --git a/release/datafiles/blender_icons32/icon32_uv_vertexsel.dat b/release/datafiles/blender_icons32/icon32_uv_vertexsel.dat index f987f7ee96defbd05d4364347f7cc838d8d165d4..9d2093cba1b04586ccd42cbab3d5a138fd1c8f6a 100644 GIT binary patch delta 18 acmbQCFhgO3GB@Lq$qTuqH`{aHWB~v@R0c=@ delta 18 acmbQCFhgO3GB@Ml$qTuqH`{aHWB~v@N(M&& diff --git a/release/datafiles/blender_icons32/icon32_x.dat b/release/datafiles/blender_icons32/icon32_x.dat index 14c5a27f6d6c90d3ebc5aa1bce7bf795ff2ce088..b60c397f1e8e89b0b7c3bc713da7a6bb339daa5d 100644 GIT binary patch delta 21 dcmbQCFhgNOIScEh|Ns9pPE@qmyoDu&8vtpx2{ix! delta 21 dcmbQCFhgNOIScE>|Ns9pPE@qmyoDu&8vtpk2{Zrz diff --git a/release/datafiles/blender_icons32/icon32_zoom_all.dat b/release/datafiles/blender_icons32/icon32_zoom_all.dat index cae7aae87f9994e43f2791e3a8efc7cf12815eca..d2200fff0e534398c851a5579ea0962e7e98d3d5 100644 GIT binary patch delta 509 zcmZ9Iy-EW?5XZA}=Vo)ah~U@36?-TWi4Y~kORzA7g+&TG^A0|O4`7vqyRit^+#?7! zqKz-01d`6iLeV-ZC>HTQ$pvBte$26ohnOFUA|I#UnBvGtK{keREHu?xbB z0)Lbwc9D}cdbdwGs8cc@a&SaO7Rt*Q?oAZnS28g8P0$8?@C7~r_cg&*6c|cmadCFI zNzZcK<}sT$nrx{$-Gch?2N0+LC#4F10r-vW20&nml5D7XA=?YsfoiO!;+U-!1&4I3 zN_rOwPyd2^6x67zLOORnGP!-R7X^8;T%VHMo6_iD8?e4{e7bio=}B#)yCI-&Vtu0H zanHY$hFh$f5)>Njj5KLjG;3N15wiXsqvl#;cn|%bq zLL`kZpakLrSSVPlg`%*Yvzvf8@G)oR-kG^Secjhrn`w0~&GeD=5G6K3v?O|JL$py* z#lS1YL1zYNX**FM1eShwNJfu|)jt26(L z+wx>C8Z0w7QDQ> eKTw@yWnYGlIe(7e5%41jHD7tmHGv}GgZm} diff --git a/scripts/startup/bl_ui/space_toolsystem_common.py b/scripts/startup/bl_ui/space_toolsystem_common.py index 1f950ce1611..f9f9bc53a52 100644 --- a/scripts/startup/bl_ui/space_toolsystem_common.py +++ b/scripts/startup/bl_ui/space_toolsystem_common.py @@ -828,6 +828,65 @@ class ToolSelectPanelHelper: row.context_pointer_set("tool", tool) row.popover(panel="TOPBAR_PT_tool_fallback", text=iface_(label, "Operator")) + if idname_fallback == "builtin.select_box": + if context.mode == 'OBJECT' and bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': + layout.prop(tool_settings, "select_origin_box") + if context.mode == 'EDIT_MESH' and bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': + layout.prop(tool_settings, "show_box_options", toggle=True) + if tool_settings.show_box_options: + row = layout.row(align=True) + row.prop(tool_settings, "box_drag_direction") + row = layout.row(align=True) + if tool_settings.box_drag_direction == 'MESH_DIRECTION_ANY': + row.prop(tool_settings, "box_edge") + row = layout.row(align=True) + row.prop(tool_settings, "box_face") + elif tool_settings.box_drag_direction == 'MESH_DIRECTION_LEFT_RIGHT': + row.prop(tool_settings, "box_edge_left", icon='TRIA_LEFT') + row.prop(tool_settings, "box_edge_right", text="", icon='TRIA_RIGHT') + row = layout.row(align=True) + row.prop(tool_settings, "box_face_left", icon='TRIA_LEFT') + row.prop(tool_settings, "box_face_right", text="", icon='TRIA_RIGHT') + else: + row.prop(tool_settings, "box_edge_up", icon='TRIA_UP') + row.prop(tool_settings, "box_edge_down", text="", icon='TRIA_DOWN') + row = layout.row(align=True) + row.prop(tool_settings, "box_face_up", icon='TRIA_UP') + row.prop(tool_settings, "box_face_down", text="", icon='TRIA_DOWN') + elif idname_fallback == "builtin.select_lasso": + if context.mode == 'EDIT_MESH' and bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': + layout.prop(tool_settings, "show_lasso_options", toggle=True) + if tool_settings.show_lasso_options: + row = layout.row(align=True) + row.prop(tool_settings, "lasso_drag_direction") + row = layout.row(align=True) + if tool_settings.lasso_drag_direction == 'MESH_DIRECTION_ANY': + row.prop(tool_settings, "lasso_edge") + row = layout.row(align=True) + row.prop(tool_settings, "lasso_face") + elif tool_settings.lasso_drag_direction == 'MESH_DIRECTION_LEFT_RIGHT': + row.prop(tool_settings, "lasso_edge_left", icon='TRIA_LEFT') + row.prop(tool_settings, "lasso_edge_right", text="", icon='TRIA_RIGHT') + row = layout.row(align=True) + row.prop(tool_settings, "lasso_face_left", icon='TRIA_LEFT') + row.prop(tool_settings, "lasso_face_right", text="", icon='TRIA_RIGHT') + else: + row.prop(tool_settings, "lasso_edge_up", icon='TRIA_UP') + row.prop(tool_settings, "lasso_edge_down", text="", icon='TRIA_DOWN') + row = layout.row(align=True) + row.prop(tool_settings, "lasso_face_up", icon='TRIA_UP') + row.prop(tool_settings, "lasso_face_down", text="", icon='TRIA_DOWN') + elif idname_fallback == "builtin.select_circle": + if context.mode == 'OBJECT' and bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': + layout.prop(tool_settings, "select_origin_circle") + if context.mode == 'EDIT_MESH' and bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': + layout.prop(tool_settings, "show_circle_options", toggle=True) + if tool_settings.show_circle_options: + row = layout.row(align=True) + row.prop(tool_settings, "circle_edge") + row = layout.row(align=True) + row.prop(tool_settings, "circle_face") + return tool # Show a list of tools in the popover. diff --git a/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/scripts/startup/bl_ui/space_toolsystem_toolbar.py index e735b9f797b..af40424152a 100644 --- a/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -269,6 +269,7 @@ class _defs_transform: def draw_settings(context, layout, _tool): _defs_transform.draw_transform_sculpt_tool_settings(context, layout) _template_widget.VIEW3D_GGT_xform_gizmo.draw_settings_with_index(context, layout, 1) + return dict( idname="builtin.move", label="Move", diff --git a/scripts/startup/bl_ui/space_view3d.py b/scripts/startup/bl_ui/space_view3d.py index 0f935ce00fc..3af25e38911 100644 --- a/scripts/startup/bl_ui/space_view3d.py +++ b/scripts/startup/bl_ui/space_view3d.py @@ -926,9 +926,9 @@ class VIEW3D_HT_header(Header): if object_mode in 'EDIT' or object_mode in 'OBJECT': if bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': if tool_settings.auto_xray_button: - row.operator("view3d.toggle_auto_xray", text="", icon='XRAY', depress=depress_auto_xray) + row.operator("view3d.toggle_auto_xray", text="", icon='AUTO_XRAY', depress=depress_auto_xray) if tool_settings.select_through_button: - row.operator("view3d.toggle_select_through", text="", icon='XRAY', depress=depress_select_through) + row.operator("view3d.toggle_select_through", text="", icon='SELECT_THROUGH', depress=depress_select_through) # While exposing `shading.show_xray(_wireframe)` is correct. # this hides the key shortcut from users: #70433. diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index 6e0edeace6a..0d7b6ca733c 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -447,8 +447,8 @@ DEF_ICON_BLANK(705) DEF_ICON_BLANK(706) DEF_ICON_BLANK(707) DEF_ICON_BLANK(708) -DEF_ICON_BLANK(709) -DEF_ICON_BLANK(710) +DEF_ICON(AUTO_XRAY) +DEF_ICON(SELECT_THROUGH) DEF_ICON(SELECT_SET) DEF_ICON(SELECT_EXTEND) DEF_ICON(SELECT_SUBTRACT) diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index f85453b7a96..37c9d5bb2dd 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -92,8 +92,11 @@ float view3d_depth_near(struct ViewDepths *d); void VIEW3D_OT_select(struct wmOperatorType *ot); void VIEW3D_OT_select_circle(struct wmOperatorType *ot); +void VIEW3D_OT_select_circle_toolsetting(struct wmOperatorType *ot); void VIEW3D_OT_select_box(struct wmOperatorType *ot); +void VIEW3D_OT_select_box_toolsetting(struct wmOperatorType *ot); void VIEW3D_OT_select_lasso(struct wmOperatorType *ot); +void VIEW3D_OT_select_lasso_toolsetting(struct wmOperatorType *ot); void VIEW3D_OT_select_menu(struct wmOperatorType *ot); void VIEW3D_OT_bone_select_menu(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c index c8fdbd8f044..c39acb7c8c8 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -164,14 +164,17 @@ void view3d_operatortypes(void) WM_operatortype_append(VIEW3D_OT_view_center_lock); WM_operatortype_append(VIEW3D_OT_select); WM_operatortype_append(VIEW3D_OT_select_box); + WM_operatortype_append(VIEW3D_OT_select_box_toolsetting); WM_operatortype_append(VIEW3D_OT_clip_border); WM_operatortype_append(VIEW3D_OT_select_circle); + WM_operatortype_append(VIEW3D_OT_select_circle_toolsetting); WM_operatortype_append(VIEW3D_OT_smoothview); WM_operatortype_append(VIEW3D_OT_render_border); WM_operatortype_append(VIEW3D_OT_clear_render_border); WM_operatortype_append(VIEW3D_OT_zoom_border); WM_operatortype_append(VIEW3D_OT_cursor3d); WM_operatortype_append(VIEW3D_OT_select_lasso); + WM_operatortype_append(VIEW3D_OT_select_lasso_toolsetting); WM_operatortype_append(VIEW3D_OT_select_menu); WM_operatortype_append(VIEW3D_OT_bone_select_menu); WM_operatortype_append(VIEW3D_OT_camera_to_view); diff --git a/source/blender/editors/space_view3d/view3d_select.cc b/source/blender/editors/space_view3d/view3d_select.cc index 568d6bbe18a..e80df3f1135 100644 --- a/source/blender/editors/space_view3d/view3d_select.cc +++ b/source/blender/editors/space_view3d/view3d_select.cc @@ -2251,6 +2251,26 @@ void VIEW3D_OT_select_lasso(wmOperatorType *ot) WM_operator_properties_select_operation(ot); } +void VIEW3D_OT_select_lasso_toolsetting(wmOperatorType *ot) +{ + ot->name = "Lasso Select"; + ot->description = "Select items using lasso selection"; + ot->idname = "VIEW3D_OT_select_lasso_toolsetting"; + + ot->invoke = WM_gesture_lasso_invoke; + ot->modal = WM_gesture_lasso_modal; + ot->exec = view3d_lasso_select_exec; + ot->poll = view3d_selectable_data; + ot->cancel = WM_gesture_lasso_cancel; + + /* flags */ + ot->flag = OPTYPE_UNDO | OPTYPE_DEPENDS_ON_CURSOR; + + /* properties */ + WM_operator_properties_gesture_lasso_toolsetting(ot); + WM_operator_properties_select_operation(ot); +} + /** \} */ /* -------------------------------------------------------------------- */ @@ -5063,6 +5083,28 @@ void VIEW3D_OT_select_box(wmOperatorType *ot) WM_operator_properties_select_operation(ot); } +void VIEW3D_OT_select_box_toolsetting(wmOperatorType *ot) +{ + /* identifiers */ + ot->name = "Box Select"; + ot->description = "Select items using box selection"; + ot->idname = "VIEW3D_OT_select_box_toolsetting"; + + /* api callbacks */ + ot->invoke = WM_gesture_box_invoke; + ot->exec = view3d_box_select_exec; + ot->modal = WM_gesture_box_modal; + ot->poll = view3d_selectable_data; + ot->cancel = WM_gesture_box_cancel; + + /* flags */ + ot->flag = OPTYPE_UNDO; + + /* rna */ + WM_operator_properties_gesture_box_toolsetting(ot); + WM_operator_properties_select_operation(ot); +} + /** \} */ /* -------------------------------------------------------------------- */ @@ -6091,4 +6133,25 @@ void VIEW3D_OT_select_circle(wmOperatorType *ot) WM_operator_properties_select_operation_simple(ot); } +void VIEW3D_OT_select_circle_toolsetting(wmOperatorType *ot) +{ + ot->name = "Circle Select"; + ot->description = "Select items using circle selection"; + ot->idname = "VIEW3D_OT_select_circle_toolsetting"; + + ot->invoke = WM_gesture_circle_invoke; + ot->modal = view3d_circle_select_modal; + ot->exec = view3d_circle_select_exec; + ot->poll = view3d_selectable_data; + ot->cancel = view3d_circle_select_cancel; + ot->get_name = ED_select_circle_get_name; + + /* flags */ + ot->flag = OPTYPE_UNDO; + + /* properties */ + WM_operator_properties_gesture_circle_toolsetting(ot); + WM_operator_properties_select_operation_simple(ot); +} + /** \} */ diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 90f0bbb0f52..21202609172 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -872,14 +872,17 @@ void WM_operator_properties_border_to_rctf(struct wmOperator *op, rctf *rect); /** * Use with #WM_gesture_box_invoke */ -void WM_operator_properties_gesture_box_ex(struct wmOperatorType *ot, bool deselect, bool extend); +void WM_operator_properties_gesture_box_ex(struct wmOperatorType *ot, bool deselect, bool extend, bool keymap); void WM_operator_properties_gesture_box(struct wmOperatorType *ot); +void WM_operator_properties_gesture_box_toolsetting(struct wmOperatorType *ot); void WM_operator_properties_gesture_box_select(struct wmOperatorType *ot); void WM_operator_properties_gesture_box_zoom(struct wmOperatorType *ot); /** * Use with #WM_gesture_lasso_invoke */ void WM_operator_properties_gesture_lasso(struct wmOperatorType *ot); +void WM_operator_properties_gesture_lasso_toolsetting(struct wmOperatorType *ot); +void WM_operator_properties_gesture_lasso_ex(struct wmOperatorType *ot, bool keymap); /** * Use with #WM_gesture_straightline_invoke */ @@ -888,6 +891,8 @@ void WM_operator_properties_gesture_straightline(struct wmOperatorType *ot, int * Use with #WM_gesture_circle_invoke */ void WM_operator_properties_gesture_circle(struct wmOperatorType *ot); +void WM_operator_properties_gesture_circle_toolsetting(struct wmOperatorType *ot); +void WM_operator_properties_gesture_circle_ex(struct wmOperatorType *ot, bool keymap); /** * See #ED_select_pick_params_from_operator to initialize parameters defined here. */ diff --git a/source/blender/windowmanager/intern/wm_operator_props.c b/source/blender/windowmanager/intern/wm_operator_props.c index 1004d953199..4069f91361c 100644 --- a/source/blender/windowmanager/intern/wm_operator_props.c +++ b/source/blender/windowmanager/intern/wm_operator_props.c @@ -407,7 +407,7 @@ void WM_operator_properties_border_to_rctf(struct wmOperator *op, rctf *rect) BLI_rctf_rcti_copy(rect, &rect_i); } -void WM_operator_properties_gesture_box_ex(wmOperatorType *ot, bool deselect, bool extend) +void WM_operator_properties_gesture_box_ex(wmOperatorType *ot, bool deselect, bool extend, bool keymap) { PropertyRNA *prop; @@ -486,17 +486,18 @@ void WM_operator_properties_gesture_box_ex(wmOperatorType *ot, bool deselect, bo WM_operator_properties_border(ot); - prop = RNA_def_boolean(ot->srna, "select_origin_box", false, "Select Object Origin", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - - prop = RNA_def_enum(ot->srna, "face_type", face_select_items, 0, "Face Select", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "edge_type", edge_select_items, 0, "Edge Select", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "auto_xray", auto_xray_items, 0, "Automatic X-Ray", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "select_through", select_through_items, 0, "Select Through", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + if (keymap) { + prop = RNA_def_boolean(ot->srna, "select_origin_box", false, "Select Object Origin", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "face_type", face_select_items, 0, "Face Select", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "edge_type", edge_select_items, 0, "Edge Select", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "auto_xray", auto_xray_items, 0, "Automatic X-Ray", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "select_through", select_through_items, 0, "Select Through", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + } if (deselect) { prop = RNA_def_boolean( @@ -526,11 +527,15 @@ void WM_operator_properties_use_cursor_init(wmOperatorType *ot) void WM_operator_properties_gesture_box_select(wmOperatorType *ot) { WM_operator_properties_gesture_box_ex( - ot, true, true); + ot, true, true, false); } void WM_operator_properties_gesture_box(wmOperatorType *ot) { - WM_operator_properties_gesture_box_ex(ot, false, false); + WM_operator_properties_gesture_box_ex(ot, false, false, true); +} +void WM_operator_properties_gesture_box_toolsetting(wmOperatorType *ot) +{ + WM_operator_properties_gesture_box_ex(ot, false, false, false); } void WM_operator_properties_select_operation(wmOperatorType *ot) @@ -603,6 +608,16 @@ void WM_operator_properties_gesture_box_zoom(wmOperatorType *ot) } void WM_operator_properties_gesture_lasso(wmOperatorType *ot) +{ + WM_operator_properties_gesture_lasso_ex(ot, true); +} + +void WM_operator_properties_gesture_lasso_toolsetting(wmOperatorType *ot) +{ + WM_operator_properties_gesture_lasso_ex(ot, false); +} + +void WM_operator_properties_gesture_lasso_ex(wmOperatorType *ot, bool keymap) { PropertyRNA *prop; static const EnumPropertyItem face_select_items[] = { @@ -684,14 +699,16 @@ void WM_operator_properties_gesture_lasso(wmOperatorType *ot) WM_operator_properties_border(ot); - prop = RNA_def_enum(ot->srna, "face_type", face_select_items, 0, "Face Select", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "edge_type", edge_select_items, 0, "Edge Select", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "auto_xray", auto_xray_items, 0, "Automatic X-Ray", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "select_through", select_through_items, 0, "Select Through", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + if (keymap) { + prop = RNA_def_enum(ot->srna, "face_type", face_select_items, 0, "Face Select", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "edge_type", edge_select_items, 0, "Edge Select", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "auto_xray", auto_xray_items, 0, "Automatic X-Ray", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "select_through", select_through_items, 0, "Select Through", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + } prop = RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", ""); RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); } @@ -726,6 +743,16 @@ void WM_operator_properties_gesture_straightline(wmOperatorType *ot, int cursor) } void WM_operator_properties_gesture_circle(wmOperatorType *ot) +{ + WM_operator_properties_gesture_circle_ex(ot, true); +} + +void WM_operator_properties_gesture_circle_toolsetting(wmOperatorType *ot) +{ + WM_operator_properties_gesture_circle_ex(ot, false); +} + +void WM_operator_properties_gesture_circle_ex(wmOperatorType *ot, bool keymap) { PropertyRNA *prop; const int radius_default = 25; @@ -814,17 +841,18 @@ void WM_operator_properties_gesture_circle(wmOperatorType *ot) prop = RNA_def_boolean(ot->srna, "wait_for_input", true, "Wait for Input", ""); RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_boolean(ot->srna, "select_origin_circle", true, "Select Object Origin", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - - prop = RNA_def_enum(ot->srna, "face_type", face_select_items, 0, "Face Select", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "edge_type", edge_select_items, 0, "Edge Select", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "auto_xray", auto_xray_items, 0, "Automatic X-Ray", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "select_through", select_through_items, 0, "Select Through", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + if (keymap) { + prop = RNA_def_boolean(ot->srna, "select_origin_circle", true, "Select Object Origin", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "face_type", face_select_items, 0, "Face Select", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "edge_type", edge_select_items, 0, "Edge Select", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "auto_xray", auto_xray_items, 0, "Automatic X-Ray", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "select_through", select_through_items, 0, "Select Through", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + } } void WM_operator_properties_mouse_select(wmOperatorType *ot) diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 94b34212933..113b173c2c8 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -3852,6 +3852,7 @@ static void gesture_circle_modal_keymap(wmKeyConfig *keyconf) /* assign map to operators */ WM_modalkeymap_assign(keymap, "VIEW3D_OT_select_circle"); + WM_modalkeymap_assign(keymap, "VIEW3D_OT_select_circle_toolsetting"); WM_modalkeymap_assign(keymap, "UV_OT_select_circle"); WM_modalkeymap_assign(keymap, "CLIP_OT_select_circle"); WM_modalkeymap_assign(keymap, "MASK_OT_select_circle"); @@ -3941,6 +3942,7 @@ static void gesture_box_modal_keymap(wmKeyConfig *keyconf) WM_modalkeymap_assign(keymap, "VIEW3D_OT_clip_border"); WM_modalkeymap_assign(keymap, "VIEW3D_OT_render_border"); WM_modalkeymap_assign(keymap, "VIEW3D_OT_select_box"); + WM_modalkeymap_assign(keymap, "VIEW3D_OT_select_box_toolsetting"); /* XXX TODO: zoom border should perhaps map right-mouse to zoom out instead of in+cancel. */ WM_modalkeymap_assign(keymap, "VIEW3D_OT_zoom_border"); WM_modalkeymap_assign(keymap, "IMAGE_OT_render_border"); @@ -3967,6 +3969,7 @@ static void gesture_lasso_modal_keymap(wmKeyConfig *keyconf) /* assign map to operators */ WM_modalkeymap_assign(keymap, "VIEW3D_OT_select_lasso"); + WM_modalkeymap_assign(keymap, "VIEW3D_OT_select_lasso_toolsetting"); WM_modalkeymap_assign(keymap, "GPENCIL_OT_stroke_cutter"); WM_modalkeymap_assign(keymap, "GPENCIL_OT_select_lasso"); WM_modalkeymap_assign(keymap, "MASK_OT_select_lasso"); -- 2.30.2 From b045c7e29176e9ccdc4dc1c9d54a21e1015ebdfe Mon Sep 17 00:00:00 2001 From: Lukas Sneyd Date: Tue, 11 Apr 2023 06:07:40 -0700 Subject: [PATCH 3/6] add header highlight facedot toggle and some fixes --- release/datafiles/blender_icons.svg | 173 +++++++++++++++++- release/datafiles/userdef/userdef_default.c | 1 + scripts/startup/bl_operators/userpref.py | 10 +- scripts/startup/bl_ui/space_userpref.py | 1 + scripts/startup/bl_ui/space_view3d.py | 80 ++++---- .../blenloader/intern/versioning_defaults.cc | 2 + .../draw/engines/overlay/overlay_edit_mesh.cc | 6 +- .../draw/engines/select/select_draw_utils.c | 4 +- source/blender/editors/interface/resources.cc | 2 +- .../editors/space_view3d/view3d_edit.c | 31 ++++ .../editors/space_view3d/view3d_intern.h | 1 + .../blender/editors/space_view3d/view3d_ops.c | 1 + source/blender/makesdna/DNA_userdef_types.h | 4 +- source/blender/makesdna/DNA_view3d_types.h | 1 + source/blender/makesrna/intern/rna_space.c | 9 + source/blender/makesrna/intern/rna_userdef.c | 6 + 16 files changed, 279 insertions(+), 53 deletions(-) diff --git a/release/datafiles/blender_icons.svg b/release/datafiles/blender_icons.svg index 9dc7b184b12..82ebc6f0ba3 100644 --- a/release/datafiles/blender_icons.svg +++ b/release/datafiles/blender_icons.svg @@ -7,7 +7,7 @@ inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docname="blender_icons.svg" version="1.0" - inkscape:version="1.2 (dc2aeda, 2022-05-15)" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" sodipodi:version="0.32" id="svg2" height="640" @@ -42,19 +42,70 @@ guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" - inkscape:window-width="1728" - inkscape:window-height="1051" + inkscape:window-width="1920" + inkscape:window-height="1027" id="namedview34335" showgrid="false" - inkscape:zoom="1.2495612" - inkscape:cx="196.46897" - inkscape:cy="320.51252" - inkscape:window-x="767" - inkscape:window-y="120" - inkscape:window-maximized="0" + inkscape:zoom="22.627417" + inkscape:cx="423.44648" + inkscape:cy="332.84842" + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:window-maximized="1" inkscape:current-layer="layer8" inkscape:showpageshadow="2" - inkscape:deskcolor="#808080" /> + inkscape:deskcolor="#808080" + showguides="true" + inkscape:guide-bbox="true"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + overlay.vertex_paint_mode_opacity = 1.0f; /* Use dimmed selected edges. */ v3d->overlay.edit_flag &= ~V3D_OVERLAY_EDIT_EDGES; + /* Show xray facedots */ + v3d->overlay.edit_flag |= V3D_OVERLAY_EDIT_FACE_DOT_XRAY; /* grease pencil settings */ v3d->vertex_opacity = 1.0f; v3d->gp_flag |= V3D_GP_SHOW_EDIT_LINES; diff --git a/source/blender/draw/engines/overlay/overlay_edit_mesh.cc b/source/blender/draw/engines/overlay/overlay_edit_mesh.cc index 256588e56f2..eff0b81a165 100644 --- a/source/blender/draw/engines/overlay/overlay_edit_mesh.cc +++ b/source/blender/draw/engines/overlay/overlay_edit_mesh.cc @@ -59,8 +59,10 @@ void OVERLAY_edit_mesh_cache_init(OVERLAY_Data *vedata) bool select_edge = pd->edit_mesh.select_edge = (tsettings->selectmode & SCE_SELECT_EDGE) != 0; bool do_occlude_wire = (v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_OCCLUDE_WIRE) != 0; - bool show_face_dots = (v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_FACE_DOT) != 0 || - pd->edit_mesh.do_zbufclip; + bool show_face_dots = !XRAY_FLAG_ENABLED(draw_ctx->v3d) && + v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_FACE_DOT || + XRAY_FLAG_ENABLED(draw_ctx->v3d) && + v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_FACE_DOT_XRAY; pd->edit_mesh.do_faces = true; pd->edit_mesh.do_edges = true; diff --git a/source/blender/draw/engines/select/select_draw_utils.c b/source/blender/draw/engines/select/select_draw_utils.c index 03b189a3e5b..34615e47e16 100644 --- a/source/blender/draw/engines/select/select_draw_utils.c +++ b/source/blender/draw/engines/select/select_draw_utils.c @@ -72,7 +72,9 @@ static bool check_ob_drawface_dot(short select_mode, const View3D *v3d, eDrawTyp { if (select_mode & SCE_SELECT_FACE) { if ((dt < OB_SOLID) || XRAY_FLAG_ENABLED(v3d)) { - return true; + if (v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_FACE_DOT_XRAY) { + return true; + } } if (v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_FACE_DOT) { return true; diff --git a/source/blender/editors/interface/resources.cc b/source/blender/editors/interface/resources.cc index 5982f8ad1c9..c457aa38f45 100644 --- a/source/blender/editors/interface/resources.cc +++ b/source/blender/editors/interface/resources.cc @@ -229,7 +229,7 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) case TH_HEADER_ACTIVE: { cp = ts->header; - const int factor = 5; + const int factor = U.header_highlight; /* Lighten the header color when editor is active. */ header_active[0] = cp[0] > 245 ? cp[0] - factor : cp[0] + factor; header_active[1] = cp[1] > 245 ? cp[1] - factor : cp[1] + factor; diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index aa239596e8d..87fb6e6c77f 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -1443,3 +1443,34 @@ void VIEW3D_OT_toggle_select_through(wmOperatorType *ot) } /** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Toggle Facedots + * \{ */ + +static int toggle_facedots_exec(bContext *C, wmOperator *op) +{ + ScrArea *area = CTX_wm_area(C); + View3D *v3d = CTX_wm_view3d(C); + if (!XRAY_FLAG_ENABLED(v3d)) { + v3d->overlay.edit_flag ^= V3D_OVERLAY_EDIT_FACE_DOT; + } + else { + v3d->overlay.edit_flag ^= V3D_OVERLAY_EDIT_FACE_DOT_XRAY; + } + ED_area_tag_redraw(area); + return OPERATOR_FINISHED; +} + +void VIEW3D_OT_toggle_facedots(wmOperatorType *ot) +{ + /* identifiers */ + ot->name = "Toggle Facedots"; + ot->idname = "VIEW3D_OT_toggle_facedots"; + ot->description = "Show face center dots in the current shading mode"; + /* api callbacks */ + ot->exec = toggle_facedots_exec; + ot->poll = ED_operator_view3d_active; +} + +/** \} */ diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index 37c9d5bb2dd..2237906d707 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -57,6 +57,7 @@ void VIEW3D_OT_toggle_shading(struct wmOperatorType *ot); void VIEW3D_OT_toggle_xray(struct wmOperatorType *ot); void VIEW3D_OT_toggle_auto_xray(struct wmOperatorType *ot); void VIEW3D_OT_toggle_select_through(struct wmOperatorType *ot); +void VIEW3D_OT_toggle_facedots(struct wmOperatorType *ot); /* view3d_draw.c */ diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c index c39acb7c8c8..0dc887da7e5 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -205,6 +205,7 @@ void view3d_operatortypes(void) WM_operatortype_append(VIEW3D_OT_toggle_matcap_flip); WM_operatortype_append(VIEW3D_OT_toggle_auto_xray); WM_operatortype_append(VIEW3D_OT_toggle_select_through); + WM_operatortype_append(VIEW3D_OT_toggle_facedots); WM_operatortype_append(VIEW3D_OT_ruler_add); WM_operatortype_append(VIEW3D_OT_ruler_remove); diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 1b45ea6fe42..2d4aa7979e0 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -800,7 +800,9 @@ typedef struct UserDef { char gizmo_size; /** Navigate gizmo size. */ char gizmo_size_navigate_v3d; - char _pad3[5]; + /** Header highlight */ + char header_highlight; + char _pad3[4]; short edit_studio_light; short lookdev_sphere_size; short vbotimeout, vbocollectrate; diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index fb70fe982ba..cb3ef48293f 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -588,6 +588,7 @@ enum { V3D_OVERLAY_EDIT_CU_NORMALS = (1 << 21), V3D_OVERLAY_EDIT_CONSTANT_SCREEN_SIZE_NORMALS = (1 << 22), + V3D_OVERLAY_EDIT_FACE_DOT_XRAY = (1 << 23), }; /** #View3DOverlay.paint_flag */ diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 8edeb6dd29d..caf122f3a8b 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -4566,6 +4566,15 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna) "Display face center when face selection is enabled in solid shading modes"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + prop = RNA_def_property(srna, "show_face_center_xray", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_FACE_DOT_XRAY); + RNA_def_property_boolean_default(prop, true); + RNA_def_property_ui_text( + prop, + "Display Face Center X-Ray", + "Display face center when face selection is enabled in X-Ray shading modes"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + prop = RNA_def_property(srna, "show_edge_crease", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_CREASES); RNA_def_property_ui_text( diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 7674f90ae22..39b2f0e6eb0 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -6004,6 +6004,12 @@ static void rna_def_userdef_input(BlenderRNA *brna) "Number of pixels to before the cursor is considered to have moved " "(used for cycling selected items on successive clicks)"); + prop = RNA_def_property(srna, "header_highlight", PROP_INT, PROP_FACTOR); + RNA_def_property_range(prop, 0, 10); + RNA_def_property_ui_range(prop, 0, 10, 1, -1); + RNA_def_property_ui_text( + prop, "Header Highlight", "How much brighter the header of the active window is"); + /* tablet pressure curve */ prop = RNA_def_property(srna, "pressure_threshold_max", PROP_FLOAT, PROP_FACTOR); RNA_def_property_range(prop, 0.0f, 1.0f); -- 2.30.2 From c20dffdcdd2a9f214d7cd3c9b74050ca5ba6efce Mon Sep 17 00:00:00 2001 From: Lukas Sneyd Date: Sun, 16 Apr 2023 02:32:36 -0700 Subject: [PATCH 4/6] remove options for keymap vs toolsettings, xray stuff in header only and mesh select is is keymap only --- .../startup/bl_ui/space_toolsystem_common.py | 61 +---- .../startup/bl_ui/space_toolsystem_toolbar.py | 62 ----- scripts/startup/bl_ui/space_view3d.py | 129 ++++++----- scripts/startup/bl_ui/space_view3d_toolbar.py | 1 - .../blenloader/intern/versioning_defaults.cc | 29 --- .../editors/space_view3d/view3d_intern.h | 3 - .../blender/editors/space_view3d/view3d_ops.c | 3 - .../editors/space_view3d/view3d_select.cc | 205 +++-------------- source/blender/makesdna/DNA_scene_defaults.h | 29 --- source/blender/makesdna/DNA_scene_types.h | 82 ++----- source/blender/makesdna/DNA_userdef_types.h | 10 +- source/blender/makesrna/intern/rna_scene.c | 213 ------------------ source/blender/makesrna/intern/rna_userdef.c | 21 -- source/blender/windowmanager/WM_api.h | 9 +- .../windowmanager/intern/wm_event_query.c | 24 +- .../windowmanager/intern/wm_event_system.cc | 3 +- .../windowmanager/intern/wm_gesture_ops.c | 39 +--- .../windowmanager/intern/wm_operator_props.c | 178 ++------------- .../windowmanager/intern/wm_operators.c | 3 - 19 files changed, 153 insertions(+), 951 deletions(-) diff --git a/scripts/startup/bl_ui/space_toolsystem_common.py b/scripts/startup/bl_ui/space_toolsystem_common.py index f9f9bc53a52..58a725a05d9 100644 --- a/scripts/startup/bl_ui/space_toolsystem_common.py +++ b/scripts/startup/bl_ui/space_toolsystem_common.py @@ -828,66 +828,7 @@ class ToolSelectPanelHelper: row.context_pointer_set("tool", tool) row.popover(panel="TOPBAR_PT_tool_fallback", text=iface_(label, "Operator")) - if idname_fallback == "builtin.select_box": - if context.mode == 'OBJECT' and bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': - layout.prop(tool_settings, "select_origin_box") - if context.mode == 'EDIT_MESH' and bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': - layout.prop(tool_settings, "show_box_options", toggle=True) - if tool_settings.show_box_options: - row = layout.row(align=True) - row.prop(tool_settings, "box_drag_direction") - row = layout.row(align=True) - if tool_settings.box_drag_direction == 'MESH_DIRECTION_ANY': - row.prop(tool_settings, "box_edge") - row = layout.row(align=True) - row.prop(tool_settings, "box_face") - elif tool_settings.box_drag_direction == 'MESH_DIRECTION_LEFT_RIGHT': - row.prop(tool_settings, "box_edge_left", icon='TRIA_LEFT') - row.prop(tool_settings, "box_edge_right", text="", icon='TRIA_RIGHT') - row = layout.row(align=True) - row.prop(tool_settings, "box_face_left", icon='TRIA_LEFT') - row.prop(tool_settings, "box_face_right", text="", icon='TRIA_RIGHT') - else: - row.prop(tool_settings, "box_edge_up", icon='TRIA_UP') - row.prop(tool_settings, "box_edge_down", text="", icon='TRIA_DOWN') - row = layout.row(align=True) - row.prop(tool_settings, "box_face_up", icon='TRIA_UP') - row.prop(tool_settings, "box_face_down", text="", icon='TRIA_DOWN') - elif idname_fallback == "builtin.select_lasso": - if context.mode == 'EDIT_MESH' and bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': - layout.prop(tool_settings, "show_lasso_options", toggle=True) - if tool_settings.show_lasso_options: - row = layout.row(align=True) - row.prop(tool_settings, "lasso_drag_direction") - row = layout.row(align=True) - if tool_settings.lasso_drag_direction == 'MESH_DIRECTION_ANY': - row.prop(tool_settings, "lasso_edge") - row = layout.row(align=True) - row.prop(tool_settings, "lasso_face") - elif tool_settings.lasso_drag_direction == 'MESH_DIRECTION_LEFT_RIGHT': - row.prop(tool_settings, "lasso_edge_left", icon='TRIA_LEFT') - row.prop(tool_settings, "lasso_edge_right", text="", icon='TRIA_RIGHT') - row = layout.row(align=True) - row.prop(tool_settings, "lasso_face_left", icon='TRIA_LEFT') - row.prop(tool_settings, "lasso_face_right", text="", icon='TRIA_RIGHT') - else: - row.prop(tool_settings, "lasso_edge_up", icon='TRIA_UP') - row.prop(tool_settings, "lasso_edge_down", text="", icon='TRIA_DOWN') - row = layout.row(align=True) - row.prop(tool_settings, "lasso_face_up", icon='TRIA_UP') - row.prop(tool_settings, "lasso_face_down", text="", icon='TRIA_DOWN') - elif idname_fallback == "builtin.select_circle": - if context.mode == 'OBJECT' and bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': - layout.prop(tool_settings, "select_origin_circle") - if context.mode == 'EDIT_MESH' and bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': - layout.prop(tool_settings, "show_circle_options", toggle=True) - if tool_settings.show_circle_options: - row = layout.row(align=True) - row.prop(tool_settings, "circle_edge") - row = layout.row(align=True) - row.prop(tool_settings, "circle_face") - - return tool + return tool # Show a list of tools in the popover. @staticmethod diff --git a/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/scripts/startup/bl_ui/space_toolsystem_toolbar.py index af40424152a..aa448aeca56 100644 --- a/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -269,7 +269,6 @@ class _defs_transform: def draw_settings(context, layout, _tool): _defs_transform.draw_transform_sculpt_tool_settings(context, layout) _template_widget.VIEW3D_GGT_xform_gizmo.draw_settings_with_index(context, layout, 1) - return dict( idname="builtin.move", label="Move", @@ -387,37 +386,10 @@ class _defs_view3d_select: @ToolDef.from_fn def box(): def draw_settings(_context, layout, tool): - tool_settings = _context.tool_settings props = tool.operator_properties("view3d.select_box") row = layout.row() row.use_property_split = False row.prop(props, "mode", text="", expand=True, icon_only=True) - - if _context.mode == 'OBJECT' and bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': - layout.prop(tool_settings, "select_origin_box") - if _context.mode == 'EDIT_MESH' and bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': - layout.prop(tool_settings, "show_box_options", toggle=True) - if tool_settings.show_box_options: - row = layout.row(align=True) - row.prop(tool_settings, "box_drag_direction") - row = layout.row(align=True) - if tool_settings.box_drag_direction == 'MESH_DIRECTION_ANY': - row.prop(tool_settings, "box_edge") - row = layout.row(align=True) - row.prop(tool_settings, "box_face") - elif tool_settings.box_drag_direction == 'MESH_DIRECTION_LEFT_RIGHT': - row.prop(tool_settings, "box_edge_left", icon='TRIA_LEFT') - row.prop(tool_settings, "box_edge_right", text="", icon='TRIA_RIGHT') - row = layout.row(align=True) - row.prop(tool_settings, "box_face_left", icon='TRIA_LEFT') - row.prop(tool_settings, "box_face_right", text="", icon='TRIA_RIGHT') - else: - row.prop(tool_settings, "box_edge_up", icon='TRIA_UP') - row.prop(tool_settings, "box_edge_down", text="", icon='TRIA_DOWN') - row = layout.row(align=True) - row.prop(tool_settings, "box_face_up", icon='TRIA_UP') - row.prop(tool_settings, "box_face_down", text="", icon='TRIA_DOWN') - return dict( idname="builtin.select_box", label="Select Box", @@ -430,33 +402,10 @@ class _defs_view3d_select: @ToolDef.from_fn def lasso(): def draw_settings(_context, layout, tool): - tool_settings = _context.tool_settings props = tool.operator_properties("view3d.select_lasso") row = layout.row() row.use_property_split = False row.prop(props, "mode", text="", expand=True, icon_only=True) - if _context.mode == 'EDIT_MESH' and bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': - layout.prop(tool_settings, "show_lasso_options", toggle=True) - if tool_settings.show_lasso_options: - row = layout.row(align=True) - row.prop(tool_settings, "lasso_drag_direction") - row = layout.row(align=True) - if tool_settings.lasso_drag_direction == 'MESH_DIRECTION_ANY': - row.prop(tool_settings, "lasso_edge") - row = layout.row(align=True) - row.prop(tool_settings, "lasso_face") - elif tool_settings.lasso_drag_direction == 'MESH_DIRECTION_LEFT_RIGHT': - row.prop(tool_settings, "lasso_edge_left", icon='TRIA_LEFT') - row.prop(tool_settings, "lasso_edge_right", text="", icon='TRIA_RIGHT') - row = layout.row(align=True) - row.prop(tool_settings, "lasso_face_left", icon='TRIA_LEFT') - row.prop(tool_settings, "lasso_face_right", text="", icon='TRIA_RIGHT') - else: - row.prop(tool_settings, "lasso_edge_up", icon='TRIA_UP') - row.prop(tool_settings, "lasso_edge_down", text="", icon='TRIA_DOWN') - row = layout.row(align=True) - row.prop(tool_settings, "lasso_face_up", icon='TRIA_UP') - row.prop(tool_settings, "lasso_face_down", text="", icon='TRIA_DOWN') return dict( idname="builtin.select_lasso", label="Select Lasso", @@ -469,23 +418,12 @@ class _defs_view3d_select: @ToolDef.from_fn def circle(): def draw_settings(_context, layout, tool): - tool_settings = _context.tool_settings props = tool.operator_properties("view3d.select_circle") row = layout.row() row.use_property_split = False row.prop(props, "mode", text="", expand=True, icon_only=True) layout.prop(props, "radius") - if _context.mode == 'OBJECT' and bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': - layout.prop(tool_settings, "select_origin_circle") - if _context.mode == 'EDIT_MESH' and bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': - layout.prop(tool_settings, "show_circle_options", toggle=True) - if tool_settings.show_circle_options: - row = layout.row(align=True) - row.prop(tool_settings, "circle_edge") - row = layout.row(align=True) - row.prop(tool_settings, "circle_face") - def draw_cursor(_context, tool, xy): from gpu_extras.presets import draw_circle_2d props = tool.operator_properties("view3d.select_circle") diff --git a/scripts/startup/bl_ui/space_view3d.py b/scripts/startup/bl_ui/space_view3d.py index fed164964fe..f87b1941b11 100644 --- a/scripts/startup/bl_ui/space_view3d.py +++ b/scripts/startup/bl_ui/space_view3d.py @@ -924,11 +924,10 @@ class VIEW3D_HT_header(Header): depress_auto_xray = False depress_select_through = False - if bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': - if tool_settings.auto_xray_button: - row.operator("view3d.toggle_auto_xray", text="", icon='AUTO_XRAY', depress=depress_auto_xray) - if tool_settings.select_through_button: - row.operator("view3d.toggle_select_through", text="", icon='SELECT_THROUGH', depress=depress_select_through) + if tool_settings.auto_xray_button: + row.operator("view3d.toggle_auto_xray", text="", icon='AUTO_XRAY', depress=depress_auto_xray) + if tool_settings.select_through_button: + row.operator("view3d.toggle_select_through", text="", icon='SELECT_THROUGH', depress=depress_select_through) # While exposing `shading.show_xray(_wireframe)` is correct. # this hides the key shortcut from users: #70433. @@ -939,12 +938,7 @@ class VIEW3D_HT_header(Header): else: draw_depressed = shading.show_xray - if bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': - if tool_settings.xray_button: - row.operator("view3d.toggle_xray", text="", icon='XRAY', depress=draw_depressed) - elif not tool_settings.auto_xray_button and not tool_settings.select_through_button: - row.operator("view3d.toggle_xray", text="", icon='XRAY', depress=draw_depressed) - else: + if tool_settings.xray_button or not tool_settings.auto_xray_button and not tool_settings.select_through_button: row.operator("view3d.toggle_xray", text="", icon='XRAY', depress=draw_depressed) row.popover(panel="VIEW3D_PT_xray", text="") @@ -6428,57 +6422,75 @@ class VIEW3D_PT_xray(Panel): sub.active = shading.show_xray sub.prop(shading, "xray_alpha", text="X-Ray Solid") - if bpy.context.preferences.inputs.drag_select_control == 'USER_DRAG_TOOLSETTING': - tool_settings = context.tool_settings - - row = layout.row(align=True) - row = layout.row(align=True) - row = layout.row(align=True) - row = layout.row(heading="Automatic X-Ray") - row.prop(tool_settings, "ui_prop", text="", emboss=False) - row = layout.row(align=True) - row.prop(tool_settings, "auto_xray", text="Enable") - sub = row.row(align=True) - sub.active = tool_settings.auto_xray - sub.prop(tool_settings, "auto_xray_object", text="Object") - sub.prop(tool_settings, "auto_xray_edit", text="Edit") - row = layout.row(align=True) - sub = row.row(align=True) - sub.active = tool_settings.auto_xray - sub.prop(tool_settings, "auto_xray_box", text="Box", toggle=True) - sub.prop(tool_settings, "auto_xray_lasso", text="Lasso", toggle=True) - sub.prop(tool_settings, "auto_xray_circle", text="Circle", toggle=True) +class VIEW3D_PT_auto_xray(Panel): + bl_space_type = 'VIEW_3D' + bl_region_type = 'HEADER' + bl_label = "Automatic X-Ray" + bl_parent_id = 'VIEW3D_PT_xray' - row = layout.row(align=True) - row = layout.row(align=True) - row = layout.row(align=True) + def draw(self, context): + layout = self.layout + tool_settings = context.tool_settings + #layout.label(text="X-Ray Settings") + col = layout.column() + row = col.row(align=True) + row = layout.row(align=True) + row.prop(tool_settings, "auto_xray", text="Enable") + sub = row.row(align=True) + sub.active = tool_settings.auto_xray + sub.prop(tool_settings, "auto_xray_object", text="Object") + sub.prop(tool_settings, "auto_xray_edit", text="Edit") + row = layout.row(align=True) + sub = row.row(align=True) + sub.active = tool_settings.auto_xray + sub.prop(tool_settings, "auto_xray_box", text="Box", toggle=True) + sub.prop(tool_settings, "auto_xray_lasso", text="Lasso", toggle=True) + sub.prop(tool_settings, "auto_xray_circle", text="Circle", toggle=True) - row = layout.row(heading="Select Through") - row.prop(tool_settings, "ui_prop", text="", emboss=False) - row = layout.row(align=True) - row.prop(tool_settings, "select_through", text="Enable") - sub = row.row(align=True) - sub.active = tool_settings.select_through - sub.prop(tool_settings, "select_through_object", text="Object") - sub.prop(tool_settings, "select_through_edit", text="Edit") - row = layout.row(align=True) - sub = row.row(align=True) - sub.active = tool_settings.select_through - sub.prop(tool_settings, "select_through_box", text="Box", toggle=True) - sub.prop(tool_settings, "select_through_lasso", text="Lasso", toggle=True) - sub.prop(tool_settings, "select_through_circle", text="Circle", toggle=True) - row = layout.row(align=True) - row = layout.row(align=True) - row = layout.row(align=True) +class VIEW3D_PT_select_through(Panel): + bl_space_type = 'VIEW_3D' + bl_region_type = 'HEADER' + bl_label = "Select Through" + bl_parent_id = 'VIEW3D_PT_xray' - row = layout.row(heading="Header Buttons") - row.prop(tool_settings, "ui_prop", text="", emboss=False) - row = layout.row(align=True) - row.prop(tool_settings, "auto_xray_button", text="Auto X-Ray", toggle=True) - row.prop(tool_settings, "select_through_button", text="Select Through", toggle=True) - row.prop(tool_settings, "xray_button", text="X-Ray", toggle=True) + def draw(self, context): + layout = self.layout + tool_settings = context.tool_settings + #layout.label(text="X-Ray Settings") + col = layout.column() + row = col.row(align=True) + row = layout.row(align=True) + row.prop(tool_settings, "select_through", text="Enable") + sub = row.row(align=True) + sub.active = tool_settings.select_through + sub.prop(tool_settings, "select_through_object", text="Object") + sub.prop(tool_settings, "select_through_edit", text="Edit") + row = layout.row(align=True) + sub = row.row(align=True) + sub.active = tool_settings.select_through + sub.prop(tool_settings, "select_through_box", text="Box", toggle=True) + sub.prop(tool_settings, "select_through_lasso", text="Lasso", toggle=True) + sub.prop(tool_settings, "select_through_circle", text="Circle", toggle=True) + + +class VIEW3D_PT_xray_buttons(Panel): + bl_space_type = 'VIEW_3D' + bl_region_type = 'HEADER' + bl_label = "Header Buttons" + bl_parent_id = 'VIEW3D_PT_xray' + + def draw(self, context): + layout = self.layout + tool_settings = context.tool_settings + #layout.label(text="X-Ray Settings") + col = layout.column() + row = col.row(align=True) + row = layout.row(align=True) + row.prop(tool_settings, "auto_xray_button", text="Auto X-Ray", toggle=True) + row.prop(tool_settings, "select_through_button", text="Select Through", toggle=True) + row.prop(tool_settings, "xray_button", text="X-Ray", toggle=True) class VIEW3D_PT_overlay(Panel): @@ -8447,6 +8459,9 @@ classes = ( VIEW3D_PT_shading_compositor, VIEW3D_PT_gizmo_display, VIEW3D_PT_xray, + VIEW3D_PT_auto_xray, + VIEW3D_PT_select_through, + VIEW3D_PT_xray_buttons, VIEW3D_PT_overlay, VIEW3D_PT_overlay_guides, VIEW3D_PT_overlay_object, diff --git a/scripts/startup/bl_ui/space_view3d_toolbar.py b/scripts/startup/bl_ui/space_view3d_toolbar.py index 29631c411e7..dcb5efb5bef 100644 --- a/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1,5 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-or-later -import bpy from bpy.types import Menu, Panel, UIList, WindowManager from bl_ui.properties_grease_pencil_common import ( GreasePencilSculptAdvancedPanel, diff --git a/source/blender/blenloader/intern/versioning_defaults.cc b/source/blender/blenloader/intern/versioning_defaults.cc index 37ca8ce1e00..4755ad7d625 100644 --- a/source/blender/blenloader/intern/versioning_defaults.cc +++ b/source/blender/blenloader/intern/versioning_defaults.cc @@ -376,32 +376,6 @@ static void blo_update_defaults_scene(Main *bmain, Scene *scene) IDP_ClearProperty(idprop); } - /* Mesh select. */ - ts->box_drag_direction = 1; - ts->lasso_drag_direction = 1; - ts->box_edge = 1; - ts->box_edge_left = 1; - ts->box_edge_right = 1; - ts->box_edge_up = 1; - ts->box_edge_down = 1; - ts->box_face = 1; - ts->box_face_left = 1; - ts->box_face_right = 1; - ts->box_face_up = 1; - ts->box_face_down = 1; - ts->lasso_edge = 1; - ts->lasso_edge_left = 1; - ts->lasso_edge_right = 1; - ts->lasso_edge_up = 1; - ts->lasso_edge_down = 1; - ts->lasso_face = 1; - ts->lasso_face_left = 1; - ts->lasso_face_right = 1; - ts->lasso_face_up = 1; - ts->lasso_face_down = 1; - ts->circle_edge = 2; - ts->circle_face = 1; - /* X-Ray. */ ts->xray_button = true; ts->auto_xray_object = true; @@ -420,9 +394,6 @@ static void blo_update_defaults_scene(Main *bmain, Scene *scene) ts->viewport_facing_select_vert = 1; ts->viewport_facing_select_edge = 1; ts->viewport_facing_select_face = 1; - - /* Object Origin Select */ - ts->select_origin_circle = true; } void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template) diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index 2237906d707..02d852e87ff 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -93,11 +93,8 @@ float view3d_depth_near(struct ViewDepths *d); void VIEW3D_OT_select(struct wmOperatorType *ot); void VIEW3D_OT_select_circle(struct wmOperatorType *ot); -void VIEW3D_OT_select_circle_toolsetting(struct wmOperatorType *ot); void VIEW3D_OT_select_box(struct wmOperatorType *ot); -void VIEW3D_OT_select_box_toolsetting(struct wmOperatorType *ot); void VIEW3D_OT_select_lasso(struct wmOperatorType *ot); -void VIEW3D_OT_select_lasso_toolsetting(struct wmOperatorType *ot); void VIEW3D_OT_select_menu(struct wmOperatorType *ot); void VIEW3D_OT_bone_select_menu(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c index 0dc887da7e5..5551508fe8a 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -164,17 +164,14 @@ void view3d_operatortypes(void) WM_operatortype_append(VIEW3D_OT_view_center_lock); WM_operatortype_append(VIEW3D_OT_select); WM_operatortype_append(VIEW3D_OT_select_box); - WM_operatortype_append(VIEW3D_OT_select_box_toolsetting); WM_operatortype_append(VIEW3D_OT_clip_border); WM_operatortype_append(VIEW3D_OT_select_circle); - WM_operatortype_append(VIEW3D_OT_select_circle_toolsetting); WM_operatortype_append(VIEW3D_OT_smoothview); WM_operatortype_append(VIEW3D_OT_render_border); WM_operatortype_append(VIEW3D_OT_clear_render_border); WM_operatortype_append(VIEW3D_OT_zoom_border); WM_operatortype_append(VIEW3D_OT_cursor3d); WM_operatortype_append(VIEW3D_OT_select_lasso); - WM_operatortype_append(VIEW3D_OT_select_lasso_toolsetting); WM_operatortype_append(VIEW3D_OT_select_menu); WM_operatortype_append(VIEW3D_OT_bone_select_menu); WM_operatortype_append(VIEW3D_OT_camera_to_view); diff --git a/source/blender/editors/space_view3d/view3d_select.cc b/source/blender/editors/space_view3d/view3d_select.cc index e80df3f1135..f763166b90f 100644 --- a/source/blender/editors/space_view3d/view3d_select.cc +++ b/source/blender/editors/space_view3d/view3d_select.cc @@ -457,73 +457,6 @@ bool edbm_facing_viewport(ViewContext *vc, BMVert *eve, BMEdge *eed, BMFace *efa return mesh_facing; } -int edbm_select_style(ToolSettings *ts, int style[2], const bool box, const bool lasso, wmOperator *op) -{ - if (U.drag_select_control & USER_DRAG_SELECT_KEYMAP) { - style[0] = RNA_enum_get(op->ptr, "edge_type"); - style[1] = RNA_enum_get(op->ptr, "face_type"); - } - else { - if (box) { - if (ts->box_drag_direction > 1) { - if (ts->box_drag_direction == 2) { - if (ts->box_direction_upright) { - style[0] = ts->box_edge_right; - style[1] = ts->box_face_right; - } - else { - style[0] = ts->box_edge_left; - style[1] = ts->box_face_left; - } - } - else if (ts->box_direction_upright) { - style[0] = ts->box_edge_up; - style[1] = ts->box_face_up; - } - else { - style[0] = ts->box_edge_down; - style[1] = ts->box_face_down; - } - } - else { - style[0] = ts->box_edge; - style[1] = ts->box_face; - } - } - else if (lasso) { - if (ts->lasso_drag_direction > 1) { - if (ts->lasso_drag_direction == 2) { - if (ts->lasso_direction_upright) { - style[0] = ts->lasso_edge_right; - style[1] = ts->lasso_face_right; - } - else { - style[0] = ts->lasso_edge_left; - style[1] = ts->lasso_face_left; - } - } - else if (ts->lasso_direction_upright) { - style[0] = ts->lasso_edge_up; - style[1] = ts->lasso_face_up; - } - else { - style[0] = ts->lasso_edge_down; - style[1] = ts->lasso_face_down; - } - } - else { - style[0] = ts->lasso_edge; - style[1] = ts->lasso_face; - } - } - else { - style[0] = ts->circle_edge; - style[1] = ts->circle_face; - } - } - return style[2]; -} - bool edbm_circle_enclose_mesh(BMEdge *eed, BMFace *efa, struct CircleSelectUserData *data) { BMVert *eve; @@ -1070,9 +1003,7 @@ static bool do_lasso_select_objects(ViewContext *vc, ToolSettings *ts = vc->scene->toolsettings; const int select_through_int = RNA_enum_get(op->ptr, "select_through"); - const bool select_through = U.drag_select_control & USER_DRAG_SELECT_KEYMAP ? - select_through_int == 2 || select_through_int == 8 : - circle_data == NULL ? + const bool select_through = circle_data == NULL ? ts->select_through && ts->select_through_object && ts->select_through_lasso : ts->select_through && ts->select_through_object && @@ -1212,7 +1143,7 @@ static bool do_lasso_select_objects(ViewContext *vc, } else { is_inside = base->object->id.tag & LIB_TAG_DOIT ? - ts->select_origin_circle ? + RNA_boolean_get(op->ptr, "select_origin_circle") ? (ED_view3d_project_float_global(vc->region, base->object->object_to_world[3], region_co, @@ -1555,17 +1486,14 @@ static bool do_lasso_select_mesh(ViewContext *vc, LassoSelectUserData data; ToolSettings *ts = vc->scene->toolsettings; rcti rect; - int select_style[2] = {0, 0}; /* set editmesh */ vc->em = BKE_editmesh_from_object(vc->obedit); BLI_lasso_boundbox(&rect, mcoords, mcoords_len); - edbm_select_style(ts, select_style, false, true, op); - view3d_userdata_lassoselect_init( - &data, vc, &rect, mcoords, mcoords_len, sel_op, select_style[0], select_style[1]); + &data, vc, &rect, mcoords, mcoords_len, sel_op, RNA_enum_get(op->ptr, "edge_type"), RNA_enum_get(op->ptr, "face_type")); if (SEL_OP_USE_PRE_DESELECT(sel_op)) { if (vc->em->bm->totvertsel) { @@ -1579,11 +1507,8 @@ static bool do_lasso_select_mesh(ViewContext *vc, GPU_matrix_set(vc->rv3d->viewmat); - const int select_through_int = RNA_enum_get(op->ptr, "select_through"); - const bool select_through = U.drag_select_control & USER_DRAG_SELECT_KEYMAP ? - select_through_int > 2 : - ts->select_through && ts->select_through_edit && - ts->select_through_lasso; + const bool select_through = ts->select_through && ts->select_through_edit && + ts->select_through_lasso; const bool use_zbuf = !XRAY_FLAG_ENABLED(vc->v3d) && !select_through; EditSelectBuf_Cache *esel = static_cast(wm_userdata->data); @@ -2251,26 +2176,6 @@ void VIEW3D_OT_select_lasso(wmOperatorType *ot) WM_operator_properties_select_operation(ot); } -void VIEW3D_OT_select_lasso_toolsetting(wmOperatorType *ot) -{ - ot->name = "Lasso Select"; - ot->description = "Select items using lasso selection"; - ot->idname = "VIEW3D_OT_select_lasso_toolsetting"; - - ot->invoke = WM_gesture_lasso_invoke; - ot->modal = WM_gesture_lasso_modal; - ot->exec = view3d_lasso_select_exec; - ot->poll = view3d_selectable_data; - ot->cancel = WM_gesture_lasso_cancel; - - /* flags */ - ot->flag = OPTYPE_UNDO | OPTYPE_DEPENDS_ON_CURSOR; - - /* properties */ - WM_operator_properties_gesture_lasso_toolsetting(ot); - WM_operator_properties_select_operation(ot); -} - /** \} */ /* -------------------------------------------------------------------- */ @@ -4497,11 +4402,13 @@ static bool do_mesh_box_select(ViewContext *vc, { BoxSelectUserData data; ToolSettings *ts = vc->scene->toolsettings; - int select_style[2] = {0, 0}; - edbm_select_style(ts, select_style, true, false, op); - - view3d_userdata_boxselect_init(&data, vc, rect, sel_op, select_style[0], select_style[1]); + view3d_userdata_boxselect_init(&data, + vc, + rect, + sel_op, + RNA_enum_get(op->ptr, "edge_type"), + RNA_enum_get(op->ptr, "face_type")); if (SEL_OP_USE_PRE_DESELECT(sel_op)) { if (vc->em->bm->totvertsel) { @@ -4515,11 +4422,8 @@ static bool do_mesh_box_select(ViewContext *vc, GPU_matrix_set(vc->rv3d->viewmat); - const int select_through_int = RNA_enum_get(op->ptr, "select_through"); - const bool select_through = U.drag_select_control & USER_DRAG_SELECT_KEYMAP ? - select_through_int > 2 : - ts->select_through && ts->select_through_edit && - ts->select_through_box; + const bool select_through = ts->select_through && ts->select_through_edit && + ts->select_through_box; const bool use_zbuf = !XRAY_FLAG_ENABLED(vc->v3d) && !select_through; EditSelectBuf_Cache *esel = static_cast(wm_userdata->data); @@ -4782,14 +4686,9 @@ static bool do_object_box_select( MEM_mallocN((totobj + MAXPICKELEMS) * sizeof(GPUSelectResult), __func__)); const eV3DSelectObjectFilter select_filter = ED_view3d_select_filter_from_mode(vc->scene, vc->obact); - const bool select_origin = U.drag_select_control & USER_DRAG_SELECT_KEYMAP ? - RNA_boolean_get(op->ptr, "select_origin_box") : - ts->select_origin_box; - const bool select_through_int = RNA_enum_get(op->ptr, "select_through"); - const bool select_through = U.drag_select_control & USER_DRAG_SELECT_KEYMAP ? - select_through_int == 2 || select_through_int == 8 : - ts->select_through && ts->select_through_object && - ts->select_through_box; + const bool select_origin = RNA_boolean_get(op->ptr, "select_origin_box"); + const bool select_through = ts->select_through && ts->select_through_object && + ts->select_through_box; int hits = 0; if (XRAY_FLAG_ENABLED(vc->v3d) || select_through) { hits = view3d_opengl_select( @@ -5083,28 +4982,6 @@ void VIEW3D_OT_select_box(wmOperatorType *ot) WM_operator_properties_select_operation(ot); } -void VIEW3D_OT_select_box_toolsetting(wmOperatorType *ot) -{ - /* identifiers */ - ot->name = "Box Select"; - ot->description = "Select items using box selection"; - ot->idname = "VIEW3D_OT_select_box_toolsetting"; - - /* api callbacks */ - ot->invoke = WM_gesture_box_invoke; - ot->exec = view3d_box_select_exec; - ot->modal = WM_gesture_box_modal; - ot->poll = view3d_selectable_data; - ot->cancel = WM_gesture_box_cancel; - - /* flags */ - ot->flag = OPTYPE_UNDO; - - /* rna */ - WM_operator_properties_gesture_box_toolsetting(ot); - WM_operator_properties_select_operation(ot); -} - /** \} */ /* -------------------------------------------------------------------- */ @@ -5262,7 +5139,6 @@ static bool mesh_circle_select(ViewContext *vc, { ToolSettings *ts = vc->scene->toolsettings; CircleSelectUserData data; - int select_style[2] = {0, 0}; vc->em = BKE_editmesh_from_object(vc->obedit); bool changed = false; @@ -5279,15 +5155,16 @@ static bool mesh_circle_select(ViewContext *vc, ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* for foreach's screen/vert projection */ - edbm_select_style(ts, select_style, false, false, op); + view3d_userdata_circleselect_init(&data, + vc, + select, + mval, + rad, + RNA_enum_get(op->ptr, "edge_type"), + RNA_enum_get(op->ptr, "face_type")); - view3d_userdata_circleselect_init(&data, vc, select, mval, rad, select_style[0], select_style[1]); - - const int select_through_int = RNA_enum_get(op->ptr, "select_through"); - const bool select_through = U.drag_select_control & USER_DRAG_SELECT_KEYMAP ? - select_through_int > 2 : - ts->select_through && ts->select_through_edit && - ts->select_through_circle; + const bool select_through = ts->select_through && ts->select_through_edit && + ts->select_through_circle; const bool use_zbuf = !XRAY_FLAG_ENABLED(vc->v3d) && !select_through; if (use_zbuf) { @@ -6074,14 +5951,9 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op) } else { ToolSettings *ts = vc.scene->toolsettings; - const int select_through_int = RNA_enum_get(op->ptr, "select_through"); - const bool default_object_select = U.drag_select_control & USER_DRAG_SELECT_KEYMAP ? - RNA_boolean_get(op->ptr, "select_origin_circle") && - (select_through_int == 2 || - select_through_int == 8) : - ts->select_through && ts->select_through_object && - ts->select_through_circle && - ts->select_origin_circle; + const bool default_object_select = RNA_boolean_get(op->ptr, "select_origin_circle") && + ts->select_through && ts->select_through_object && + ts->select_through_circle; if (default_object_select) { if (object_circle_select(&vc, sel_op, mval, float(radius))) { DEG_id_tag_update(&vc.scene->id, ID_RECALC_SELECT); @@ -6133,25 +6005,4 @@ void VIEW3D_OT_select_circle(wmOperatorType *ot) WM_operator_properties_select_operation_simple(ot); } -void VIEW3D_OT_select_circle_toolsetting(wmOperatorType *ot) -{ - ot->name = "Circle Select"; - ot->description = "Select items using circle selection"; - ot->idname = "VIEW3D_OT_select_circle_toolsetting"; - - ot->invoke = WM_gesture_circle_invoke; - ot->modal = view3d_circle_select_modal; - ot->exec = view3d_circle_select_exec; - ot->poll = view3d_selectable_data; - ot->cancel = view3d_circle_select_cancel; - ot->get_name = ED_select_circle_get_name; - - /* flags */ - ot->flag = OPTYPE_UNDO; - - /* properties */ - WM_operator_properties_gesture_circle_toolsetting(ot); - WM_operator_properties_select_operation_simple(ot); -} - /** \} */ diff --git a/source/blender/makesdna/DNA_scene_defaults.h b/source/blender/makesdna/DNA_scene_defaults.h index e97e7402d1a..c332d479da3 100644 --- a/source/blender/makesdna/DNA_scene_defaults.h +++ b/source/blender/makesdna/DNA_scene_defaults.h @@ -366,32 +366,6 @@ /* UV painting */ \ .uv_sculpt_settings = 0, \ .uv_relax_method = UV_SCULPT_TOOL_RELAX_LAPLACIAN, \ - \ - /* Mesh Select */ \ - .box_drag_direction = 1, \ - .lasso_drag_direction = 1, \ - .box_edge = 1, \ - .box_edge_left = 1, \ - .box_edge_right = 1, \ - .box_edge_up = 1, \ - .box_edge_down = 1, \ - .box_face = 1, \ - .box_face_left = 1, \ - .box_face_right = 1, \ - .box_face_up = 1, \ - .box_face_down = 1, \ - .lasso_edge = 1, \ - .lasso_edge_left = 1, \ - .lasso_edge_right = 1, \ - .lasso_edge_up = 1, \ - .lasso_edge_down = 1, \ - .lasso_face = 1, \ - .lasso_face_left = 1, \ - .lasso_face_right = 1, \ - .lasso_face_up = 1, \ - .lasso_face_down = 1, \ - .circle_edge = 2, \ - .circle_face = 1, \ \ /* X-Ray */ \ .xray_button = true, \ @@ -411,9 +385,6 @@ .viewport_facing_select_vert = 1, \ .viewport_facing_select_edge = 1, \ .viewport_facing_select_face = 1, \ - \ - /* Object Origin Select */ \ - .select_origin_circle = true, \ } /* clang-format off */ diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 31aeae0433b..b760250a09b 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1558,8 +1558,13 @@ typedef struct ToolSettings { /** General 2D Editor. */ char gpencil_v2d_align; - /* Give the UI an empty prop to expand formatting */ - char ui_prop; + /* Mesh Normal Direction Select */ + char viewport_facing_select; + char viewport_facing_select_mode; + char viewport_facing_select_vert; + float viewport_facing_select_threshold; + char viewport_facing_select_edge; + char viewport_facing_select_face; /* X-Ray Options */ char xray_button; @@ -1579,18 +1584,8 @@ typedef struct ToolSettings { char select_through_lasso; char select_through_circle; - /* Mesh Normal Direction Select */ - char viewport_facing_select; - char viewport_facing_select_mode; - float viewport_facing_select_threshold; - char viewport_facing_select_vert; - char viewport_facing_select_edge; - char viewport_facing_select_face; - - /* object origin select */ - char select_origin_box; - char select_origin_circle; - char _pad0[6]; + /* Combine shading and xray header buttons */ + char shrink_shading_header; /* Annotations. */ /** Stroke placement settings - 3D View. */ @@ -1715,41 +1710,7 @@ typedef struct ToolSettings { /** Normal Editing. */ float normal_vector[3]; - - /** Mesh Select Options. */ - char box_drag_direction; - char lasso_drag_direction; - char box_direction_upright; - char lasso_direction_upright; - char box_edge; - char box_edge_left; - char box_edge_right; - char box_edge_up; - char box_edge_down; - char box_face; - char box_face_left; - char box_face_right; - char box_face_up; - char box_face_down; - char lasso_edge; - char lasso_edge_left; - char lasso_edge_right; - char lasso_edge_up; - char lasso_edge_down; - char lasso_face; - char lasso_face_left; - char lasso_face_right; - char lasso_face_up; - char lasso_face_down; - char circle_edge; - char circle_face; - char show_box_options; - char show_lasso_options; - char show_circle_options; - - /* Combine shading and xray header buttons */ - char shrink_shading_header; - char _pad6[6]; + char _pad6[4]; /** * Custom Curve Profile for bevel tool: @@ -2398,14 +2359,14 @@ typedef enum eSnapTransformMode { SCE_SNAP_TRANSFORM_MODE_SCALE = (1 << 2), } eSnapTransformMode; -/** #ToolSettings.viewport_facing_mode */ +/** #Viewport-facing select mode */ enum { VIEWPORT_FACING_SELECT_BOTH = (1 << 0), VIEWPORT_FACING_SELECT_NEAR = (1 << 1), VIEWPORT_FACING_SELECT_XRAY = (1 << 2), }; -/** #ToolSettings.viewport_facing_select_vert */ +/** #Viewport-facing select vert */ enum { VIEWPORT_FACING_SELECT_FRONT_VERTS = (1 << 0), VIEWPORT_FACING_SELECT_FRONT_VERTS_FACE = (1 << 1), @@ -2414,7 +2375,7 @@ enum { VIEWPORT_FACING_SELECT_ALL_VERTS = (1 << 4), }; -/** #ToolSettings.viewport_facing_select_edge */ +/** #Viewport-facing select edge */ enum { VIEWPORT_FACING_SELECT_FRONT_EDGES = (1 << 0), VIEWPORT_FACING_SELECT_FRONT_EDGES_FACE = (1 << 1), @@ -2423,7 +2384,7 @@ enum { VIEWPORT_FACING_SELECT_ALL_EDGES = (1 << 4), }; -/** #ToolSettings.viewport_facing_select_face */ +/** #Viewport-facing select face */ enum { VIEWPORT_FACING_SELECT_FRONT_FACES = (1 << 0), VIEWPORT_FACING_SELECT_FRONT_FACES_VERT = (1 << 1), @@ -2432,7 +2393,7 @@ enum { VIEWPORT_FACING_SELECT_ALL_FACES = (1 << 4), }; -/** #ToolSettings.face_select */ +/** #Face select style */ enum { FACE_AUTO = (1 << 0), FACE_TOUCH = (1 << 1), @@ -2440,21 +2401,14 @@ enum { FACE_CENTER = (1 << 3), }; -/** #ToolSettings.edge_select */ +/** #Edge select style */ enum { EDGE_HYBRID = (1 << 0), EDGE_TOUCH = (1 << 1), EDGE_ENCLOSE = (1 << 2), }; -/** #ToolSettings.mesh_drag_direction */ -enum { - MESH_DIRECTION_ANY = (1 << 0), - MESH_DIRECTION_LEFT_RIGHT = (1 << 1), - MESH_DIRECTION_UP_DOWN = (1 << 2), -}; - -/** #ToolSettings.auto_xray_mode */ +/** #Auto X-Ray mode */ enum { AUTO_XRAY_DISABLE = (1 << 0), AUTO_XRAY_OBJECT = (1 << 1), @@ -2462,7 +2416,7 @@ enum { AUTO_XRAY_BOTH = (1 << 3), }; -/** #ToolSettings.select_through_mode */ +/** #Select through mode */ enum { SELECT_THROUGH_DISABLE = (1 << 0), SELECT_THROUGH_OBJECT = (1 << 1), diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 2d4aa7979e0..2ca1d07e56b 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -844,9 +844,7 @@ typedef struct UserDef { /** Keymap click-drag direction style. */ char click_drag_direction; - /** Box, lasso, and circle select mesh control style. */ - char drag_select_control; - char _pad7[2]; + char _pad7[3]; /** Private, defaults to 20 for 72 DPI setting. */ short widget_unit; @@ -1172,12 +1170,6 @@ typedef enum eUserpref_Click_Drag_Direction { USER_CLICK_DRAG_DIRECTION_UP_DOWN = 2, } eUserpref_Click_Drag_Direction; -/** #UserDef.drag_select_control_types */ -typedef enum eUserpref_Drag_Select_Control { - USER_DRAG_SELECT_TOOLSETTING = 0, - USER_DRAG_SELECT_KEYMAP = 1, -} eUserpref_Drag_Select_Control; - /** #UserDef.app_flag */ typedef enum eUserpref_APP_Flag { USER_APP_LOCK_CORNER_SPLIT = (1 << 0), diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index b50803af76e..4cae796ba05 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -3057,80 +3057,6 @@ static void rna_def_tool_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}, }; - static const EnumPropertyItem mesh_drag_direction_items[] = { - {MESH_DIRECTION_ANY, "MESH_DIRECTION_ANY", 0, "Any", "Drag in any direction"}, - {MESH_DIRECTION_LEFT_RIGHT, - "MESH_DIRECTION_LEFT_RIGHT", - 0, - "Left Right", - "Drag to the left and right"}, - {MESH_DIRECTION_UP_DOWN, - "MESH_DIRECTION_UP_DOWN", - 0, - "Up Down", - "Drag upwards and downwards"}, - {0, NULL, 0, NULL, NULL}, - }; - - static const EnumPropertyItem edge_select_items[] = { - {EDGE_HYBRID, - "EDGE_HYBRID", - 0, - "Hybrid", - "Select edges that are fully inside the selection area. If no edges are fully inside the " - "selection area, select edges that are touched by the selection area"}, - {EDGE_TOUCH, - "EDGE_TOUCH", - 0, - "Touch", - "Select edges that are touched by the selection area"}, - {EDGE_ENCLOSE, - "EDGE_ENCLOSE", - 0, - "Enclose", - "Select edges that are fully inside the selection area"}, - {0, NULL, 0, NULL, NULL}, - }; - - static const EnumPropertyItem edge_circle_select_items[] = { - {EDGE_TOUCH, - "EDGE_TOUCH", - 0, - "Touch", - "Select edges that are touched by the selection area"}, - {EDGE_ENCLOSE, - "EDGE_ENCLOSE", - 0, - "Enclose", - "Select edges that are fully inside the selection area"}, - {0, NULL, 0, NULL, NULL}, - }; - - static const EnumPropertyItem face_select_items[] = { - {FACE_AUTO, - "FACE_AUTO", - 0, - "Auto", - "Select faces that are touched by the selection area in near select. Select faces whose " - "center is touched by the selection area in X-Ray select"}, - {FACE_TOUCH, - "FACE_TOUCH", - 0, - "Touch", - "Select faces that are touched by the selection area"}, - {FACE_ENCLOSE, - "FACE_ENCLOSE", - 0, - "Enclose", - "Select faces that are fully inside the selection area"}, - {FACE_CENTER, - "FACE_CENTER", - 0, - "Center", - "Select faces whose center is touched by the selection area"}, - {0, NULL, 0, NULL, NULL}, - }; - static const EnumPropertyItem viewport_facing_select_mode_items[] = { {VIEWPORT_FACING_SELECT_BOTH, "BOTH", @@ -3278,126 +3204,6 @@ static void rna_def_tool_settings(BlenderRNA *brna) "Threshold", "How close the angles of the viewport and mesh element need to be for selection to occur"); - /* Mesh select settings. */ - prop = RNA_def_property(srna, "box_drag_direction", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, mesh_drag_direction_items); - RNA_def_property_ui_text(prop, "Drag Direction", "Click-drag direction style for box select"); - - prop = RNA_def_property(srna, "lasso_drag_direction", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, mesh_drag_direction_items); - RNA_def_property_ui_text(prop, "Drag Direction", "Click-drag direction style for lasso select"); - - prop = RNA_def_property(srna, "box_direction_upright", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "box_direction_upright", 0); - RNA_def_property_ui_text(prop, "Box Direction Helper", ""); - - prop = RNA_def_property(srna, "lasso_direction_upright", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "lasso_direction_upright", 0); - RNA_def_property_ui_text(prop, "Lasso Direction Helper", ""); - - prop = RNA_def_property(srna, "show_box_options", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "show_box_options", 0); - RNA_def_property_ui_text( - prop, "Mesh Options", "Additional options for box selection of mesh elements"); - - prop = RNA_def_property(srna, "show_lasso_options", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "show_lasso_options", 0); - RNA_def_property_ui_text( - prop, "Mesh Options", "Additional options for lasso selection of mesh elements"); - - prop = RNA_def_property(srna, "show_circle_options", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "show_circle_options", 0); - RNA_def_property_ui_text( - prop, "Mesh Options", "Additional options for circle selection of mesh elements"); - - prop = RNA_def_property(srna, "box_edge", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, edge_select_items); - RNA_def_property_ui_text(prop, "Edge", "Box edge selection style"); - - prop = RNA_def_property(srna, "box_edge_left", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, edge_select_items); - RNA_def_property_ui_text(prop, "Edge", "Box edge selection style when dragging left"); - - prop = RNA_def_property(srna, "box_edge_right", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, edge_select_items); - RNA_def_property_ui_text(prop, "Edge", "Box edge selection style when dragging right"); - - prop = RNA_def_property(srna, "box_edge_up", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, edge_select_items); - RNA_def_property_ui_text(prop, "Edge", "Box edge selection style when dragging up"); - - prop = RNA_def_property(srna, "box_edge_down", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, edge_select_items); - RNA_def_property_ui_text(prop, "Edge", "Box edge selection style when dragging down"); - - prop = RNA_def_property(srna, "box_face", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, face_select_items); - RNA_def_property_ui_text(prop, "Face", "Box face selection style"); - - prop = RNA_def_property(srna, "box_face_left", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, face_select_items); - RNA_def_property_ui_text(prop, "Face", "Box face selection style when dragging left"); - - prop = RNA_def_property(srna, "box_face_right", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, face_select_items); - RNA_def_property_ui_text(prop, "Face", "Box face selection style when dragging right"); - - prop = RNA_def_property(srna, "box_face_up", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, face_select_items); - RNA_def_property_ui_text(prop, "Face", "Box face selection style when dragging up"); - - prop = RNA_def_property(srna, "box_face_down", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, face_select_items); - RNA_def_property_ui_text(prop, "Face", "Box face selection style when dragging down"); - - prop = RNA_def_property(srna, "lasso_edge", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, edge_select_items); - RNA_def_property_ui_text(prop, "Edge", "Lasso edge selection style"); - - prop = RNA_def_property(srna, "lasso_edge_left", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, edge_select_items); - RNA_def_property_ui_text(prop, "Edge", "Lasso edge selection style when dragging left"); - - prop = RNA_def_property(srna, "lasso_edge_right", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, edge_select_items); - RNA_def_property_ui_text(prop, "Edge", "Lasso edge selection style when dragging right"); - - prop = RNA_def_property(srna, "lasso_edge_up", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, edge_select_items); - RNA_def_property_ui_text(prop, "Edge", "Lasso edge selection style when dragging up"); - - prop = RNA_def_property(srna, "lasso_edge_down", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, edge_select_items); - RNA_def_property_ui_text(prop, "Edge", "Lasso edge selection style when dragging down"); - - prop = RNA_def_property(srna, "lasso_face", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, face_select_items); - RNA_def_property_ui_text(prop, "Face", "Lasso face selection style"); - - prop = RNA_def_property(srna, "lasso_face_left", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, face_select_items); - RNA_def_property_ui_text(prop, "Face", "Lasso face selection style when dragging left"); - - prop = RNA_def_property(srna, "lasso_face_right", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, face_select_items); - RNA_def_property_ui_text(prop, "Face", "Lasso face selection style when dragging right"); - - prop = RNA_def_property(srna, "lasso_face_up", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, face_select_items); - RNA_def_property_ui_text(prop, "Face", "Lasso face selection style when dragging up"); - - prop = RNA_def_property(srna, "lasso_face_down", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, face_select_items); - RNA_def_property_ui_text(prop, "Face", "Lasso face selection style when dragging down"); - - prop = RNA_def_property(srna, "circle_edge", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, edge_circle_select_items); - RNA_def_property_ui_text(prop, "Edge", "Circle edge selection style"); - - prop = RNA_def_property(srna, "circle_face", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, face_select_items); - RNA_def_property_ui_text(prop, "Face", "Circle face selection style"); - prop = RNA_def_property(srna, "sculpt", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Sculpt"); RNA_def_property_ui_text(prop, "Sculpt", ""); @@ -4070,12 +3876,6 @@ static void rna_def_tool_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Normal Vector", "Normal Vector used to copy, add or multiply"); RNA_def_property_ui_range(prop, -10000.0, 10000.0, 1, 3); - /* UI prop helper, might help with formatting and using headings on a blank line, unused for now */ - prop = RNA_def_property(srna, "ui_prop", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "ui_prop", 0); - RNA_def_property_ui_text(prop, "UI Prop", ""); - RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); - /* Shrink Shading Header */ prop = RNA_def_property(srna, "shrink_shading_header", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "shrink_shading_header", 0); @@ -4173,19 +3973,6 @@ static void rna_def_tool_settings(BlenderRNA *brna) "Select occluded objects and mesh elements with circle select"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); - /* Object Origin Select */ - prop = RNA_def_property(srna, "select_origin_box", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "select_origin_box", 0); - RNA_def_property_ui_text( - prop, "Select Origin", "Select objects by their origin with box select"); - RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); - - prop = RNA_def_property(srna, "select_origin_circle", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "select_origin_circle", 0); - RNA_def_property_ui_text( - prop, "Select Origin", "Select objects by their origin with circle select"); - RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); - /* Unified Paint Settings */ prop = RNA_def_property(srna, "unified_paint_settings", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 39b2f0e6eb0..6e32ee2ac35 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -5808,20 +5808,6 @@ static void rna_def_userdef_input(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}, }; - static const EnumPropertyItem drag_select_control_types[] = { - {USER_DRAG_SELECT_TOOLSETTING, - "USER_DRAG_TOOLSETTING", - 0, - "Toolsetting", - "Use toolsettings to control selection options for box, lasso, and circle select"}, - {USER_DRAG_SELECT_KEYMAP, - "USER_DRAG_KEYMAP", - 0, - "Keymap", - "Use the keymap to control selection options for box, lasso, and circle selection"}, - {0, NULL, 0, NULL, NULL}, - }; - static const EnumPropertyItem view_zoom_styles[] = { {USER_ZOOM_CONTINUE, "CONTINUE", @@ -5933,13 +5919,6 @@ static void rna_def_userdef_input(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Keymap Drag Directions", "Style of click-drag direction the keymap will use"); - prop = RNA_def_property(srna, "drag_select_control", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, drag_select_control_types); - RNA_def_property_ui_text(prop, - "Drag Select Control", - "Use either the keymap or toolsettings to control selection options " - "for box, lasso, and circle select"); - prop = RNA_def_property(srna, "use_numeric_input_advanced", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_FLAG_NUMINPUT_ADVANCED); RNA_def_property_ui_text(prop, diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 21202609172..767c95627f1 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -872,17 +872,14 @@ void WM_operator_properties_border_to_rctf(struct wmOperator *op, rctf *rect); /** * Use with #WM_gesture_box_invoke */ -void WM_operator_properties_gesture_box_ex(struct wmOperatorType *ot, bool deselect, bool extend, bool keymap); +void WM_operator_properties_gesture_box_ex(struct wmOperatorType *ot, bool deselect, bool extend); void WM_operator_properties_gesture_box(struct wmOperatorType *ot); -void WM_operator_properties_gesture_box_toolsetting(struct wmOperatorType *ot); void WM_operator_properties_gesture_box_select(struct wmOperatorType *ot); void WM_operator_properties_gesture_box_zoom(struct wmOperatorType *ot); /** * Use with #WM_gesture_lasso_invoke */ void WM_operator_properties_gesture_lasso(struct wmOperatorType *ot); -void WM_operator_properties_gesture_lasso_toolsetting(struct wmOperatorType *ot); -void WM_operator_properties_gesture_lasso_ex(struct wmOperatorType *ot, bool keymap); /** * Use with #WM_gesture_straightline_invoke */ @@ -891,8 +888,6 @@ void WM_operator_properties_gesture_straightline(struct wmOperatorType *ot, int * Use with #WM_gesture_circle_invoke */ void WM_operator_properties_gesture_circle(struct wmOperatorType *ot); -void WM_operator_properties_gesture_circle_toolsetting(struct wmOperatorType *ot); -void WM_operator_properties_gesture_circle_ex(struct wmOperatorType *ot, bool keymap); /** * See #ED_select_pick_params_from_operator to initialize parameters defined here. */ @@ -1626,7 +1621,7 @@ bool WM_event_is_modal_drag_exit(const struct wmEvent *event, short init_event_val); bool WM_event_is_mouse_drag(const struct wmEvent *event); bool WM_event_is_mouse_drag_or_press(const wmEvent *event); -int WM_event_drag_direction(const wmEvent *event, struct ToolSettings *ts); +int WM_event_drag_direction(const wmEvent *event); char WM_event_utf8_to_ascii(const struct wmEvent *event) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT; /** diff --git a/source/blender/windowmanager/intern/wm_event_query.c b/source/blender/windowmanager/intern/wm_event_query.c index 05725f1fe13..5cd52f496d1 100644 --- a/source/blender/windowmanager/intern/wm_event_query.c +++ b/source/blender/windowmanager/intern/wm_event_query.c @@ -265,7 +265,7 @@ bool WM_event_is_mouse_drag_or_press(const wmEvent *event) (ISMOUSE_BUTTON(event->type) && (event->val == KM_PRESS)); } -int WM_event_drag_direction(const wmEvent *event, ToolSettings *ts) +int WM_event_drag_direction(const wmEvent *event) { const int delta[2] = { event->xy[0] - event->prev_press_xy[0], @@ -310,28 +310,6 @@ int WM_event_drag_direction(const wmEvent *event, ToolSettings *ts) } } - if (U.drag_select_control < 1) { - int box = ts->box_drag_direction; - int lasso = ts->lasso_drag_direction; - - if (box > 1) { - ts->box_direction_upright = false; - theta = box == 2 ? round_fl_to_int(atan2f(0.0f, (float)delta[0]) / (float)M_PI) : - round_fl_to_int(atan2f(0.0f, (float)delta[1]) / (float)M_PI); - if (theta == 0) { - ts->box_direction_upright = true; - } - } - if (lasso > 1) { - ts->lasso_direction_upright = false; - theta = lasso == 2 ? round_fl_to_int(atan2f(0.0f, (float)delta[0]) / (float)M_PI) : - round_fl_to_int(atan2f(0.0f, (float)delta[1]) / (float)M_PI); - if (theta == 0) { - ts->lasso_direction_upright = true; - } - } - } - #if 0 /* debug */ if (val == 1) { diff --git a/source/blender/windowmanager/intern/wm_event_system.cc b/source/blender/windowmanager/intern/wm_event_system.cc index 21d3978def6..d08b3c154b1 100644 --- a/source/blender/windowmanager/intern/wm_event_system.cc +++ b/source/blender/windowmanager/intern/wm_event_system.cc @@ -3437,8 +3437,7 @@ static eHandlerActionFlag wm_handlers_do(bContext *C, wmEvent *event, ListBase * if ((event->flag & WM_EVENT_FORCE_DRAG_THRESHOLD) || WM_event_drag_test(event, event->prev_press_xy)) { win->event_queue_check_drag_handled = true; - ToolSettings *ts = CTX_data_tool_settings(C); - const int direction = WM_event_drag_direction(event, ts); + const int direction = WM_event_drag_direction(event); /* Intentionally leave `event->xy` as-is, event users are expected to use * `event->prev_press_xy` if they need to access the drag start location. */ diff --git a/source/blender/windowmanager/intern/wm_gesture_ops.c b/source/blender/windowmanager/intern/wm_gesture_ops.c index d9ecd122b19..14c40af15f0 100644 --- a/source/blender/windowmanager/intern/wm_gesture_ops.c +++ b/source/blender/windowmanager/intern/wm_gesture_ops.c @@ -183,16 +183,9 @@ int WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event) const bool wait_for_input = !WM_event_is_mouse_drag_or_press(event) && RNA_boolean_get(op->ptr, "wait_for_input"); - bool auto_xray = false; - if (U.drag_select_control & USER_DRAG_SELECT_KEYMAP) { - const int auto_xray_int = RNA_enum_get(op->ptr, "auto_xray"); - auto_xray = obedit ? auto_xray_int > 2 : auto_xray_int == 2 || auto_xray_int == 8; - } - else { - auto_xray = ts->auto_xray && ts->auto_xray_box ? - obedit ? ts->auto_xray_edit : ts->auto_xray_object : - false; - } + const bool auto_xray = ts->auto_xray && ts->auto_xray_box ? + obedit ? ts->auto_xray_edit : ts->auto_xray_object : + false; if (ts->auto_xray_reset) { ts->auto_xray_reset ^= true; @@ -340,16 +333,9 @@ int WM_gesture_circle_invoke(bContext *C, wmOperator *op, const wmEvent *event) RNA_boolean_get(op->ptr, "wait_for_input"); Object *obedit = CTX_data_edit_object(C); ToolSettings *ts = win->scene->toolsettings; - bool auto_xray = false; - if (U.drag_select_control & USER_DRAG_SELECT_KEYMAP) { - const int auto_xray_int = RNA_enum_get(op->ptr, "auto_xray"); - auto_xray = obedit ? auto_xray_int > 2 : auto_xray_int == 2 || auto_xray_int == 8; - } - else { - auto_xray = ts->auto_xray && ts->auto_xray_circle ? - obedit ? ts->auto_xray_edit : ts->auto_xray_object : - false; - } + const bool auto_xray = ts->auto_xray && ts->auto_xray_circle ? + obedit ? ts->auto_xray_edit : ts->auto_xray_object : + false; if (ts->auto_xray_reset) { ts->auto_xray_reset ^= true; @@ -560,16 +546,9 @@ int WM_gesture_lasso_invoke(bContext *C, wmOperator *op, const wmEvent *event) Object *obedit = CTX_data_edit_object(C); ToolSettings *ts = win->scene->toolsettings; - bool auto_xray = false; - if (U.drag_select_control & USER_DRAG_SELECT_KEYMAP) { - const int auto_xray_int = RNA_enum_get(op->ptr, "auto_xray"); - auto_xray = obedit ? auto_xray_int > 2 : auto_xray_int == 2 || auto_xray_int == 8; - } - else { - auto_xray = ts->auto_xray && ts->auto_xray_lasso ? - obedit ? ts->auto_xray_edit : ts->auto_xray_object : - false; - } + const bool auto_xray = ts->auto_xray && ts->auto_xray_lasso ? + obedit ? ts->auto_xray_edit : ts->auto_xray_object : + false; if (ts->auto_xray_reset) { ts->auto_xray_reset ^= true; diff --git a/source/blender/windowmanager/intern/wm_operator_props.c b/source/blender/windowmanager/intern/wm_operator_props.c index 4069f91361c..509b16b2de4 100644 --- a/source/blender/windowmanager/intern/wm_operator_props.c +++ b/source/blender/windowmanager/intern/wm_operator_props.c @@ -407,7 +407,7 @@ void WM_operator_properties_border_to_rctf(struct wmOperator *op, rctf *rect) BLI_rctf_rcti_copy(rect, &rect_i); } -void WM_operator_properties_gesture_box_ex(wmOperatorType *ot, bool deselect, bool extend, bool keymap) +void WM_operator_properties_gesture_box_ex(wmOperatorType *ot, bool deselect, bool extend) { PropertyRNA *prop; @@ -456,48 +456,14 @@ void WM_operator_properties_gesture_box_ex(wmOperatorType *ot, bool deselect, bo {0, NULL, 0, NULL, NULL}, }; - static const EnumPropertyItem auto_xray_items[] = { - {AUTO_XRAY_DISABLE, "AUTO_XRAY_DISABLE", 0, "Disable", "Disable Automatic X-Ray"}, - {AUTO_XRAY_OBJECT, - "AUTO_XRAY_OBJECT", - 0, - "Object", - "Enable X-Ray during box select in object mode"}, - {AUTO_XRAY_EDIT, "AUTO_XRAY_EDIT", 0, "Edit", "Enable X-Ray during box select in edit mode"}, - {AUTO_XRAY_BOTH, - "AUTO_XRAY_BOTH", - 0, - "Both", - "Enable X-Ray during box select in object and edit mode"}, - {0, NULL, 0, NULL, NULL}, - }; - - static const EnumPropertyItem select_through_items[] = { - {SELECT_THROUGH_OBJECT, "SELECT_THROUGH_OBJECT", 0, "Object", "Select occluded objects"}, - {SELECT_THROUGH_EDIT, "SELECT_THROUGH_EDIT", 0, "Edit", "Select occluded mesh elements"}, - {SELECT_THROUGH_BOTH, - "SELECT_THROUGH_BOTH", - 0, - "Both", - "Select occluded objects and mesh elements"}, - {SELECT_THROUGH_DISABLE, "SELECT_THROUGH_DISABLE", 0, "Disable", "Disable Select Through"}, - {0, NULL, 0, NULL, NULL}, - }; - WM_operator_properties_border(ot); - if (keymap) { - prop = RNA_def_boolean(ot->srna, "select_origin_box", false, "Select Object Origin", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "face_type", face_select_items, 0, "Face Select", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "edge_type", edge_select_items, 0, "Edge Select", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "auto_xray", auto_xray_items, 0, "Automatic X-Ray", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "select_through", select_through_items, 0, "Select Through", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - } + prop = RNA_def_boolean(ot->srna, "select_origin_box", false, "Select Object Origin", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "face_type", face_select_items, 0, "Face Select", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "edge_type", edge_select_items, 0, "Edge Select", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); if (deselect) { prop = RNA_def_boolean( @@ -527,15 +493,11 @@ void WM_operator_properties_use_cursor_init(wmOperatorType *ot) void WM_operator_properties_gesture_box_select(wmOperatorType *ot) { WM_operator_properties_gesture_box_ex( - ot, true, true, false); + ot, true, true); } void WM_operator_properties_gesture_box(wmOperatorType *ot) { - WM_operator_properties_gesture_box_ex(ot, false, false, true); -} -void WM_operator_properties_gesture_box_toolsetting(wmOperatorType *ot) -{ - WM_operator_properties_gesture_box_ex(ot, false, false, false); + WM_operator_properties_gesture_box_ex(ot, false, false); } void WM_operator_properties_select_operation(wmOperatorType *ot) @@ -608,16 +570,6 @@ void WM_operator_properties_gesture_box_zoom(wmOperatorType *ot) } void WM_operator_properties_gesture_lasso(wmOperatorType *ot) -{ - WM_operator_properties_gesture_lasso_ex(ot, true); -} - -void WM_operator_properties_gesture_lasso_toolsetting(wmOperatorType *ot) -{ - WM_operator_properties_gesture_lasso_ex(ot, false); -} - -void WM_operator_properties_gesture_lasso_ex(wmOperatorType *ot, bool keymap) { PropertyRNA *prop; static const EnumPropertyItem face_select_items[] = { @@ -665,50 +617,12 @@ void WM_operator_properties_gesture_lasso_ex(wmOperatorType *ot, bool keymap) {0, NULL, 0, NULL, NULL}, }; - static const EnumPropertyItem auto_xray_items[] = { - {AUTO_XRAY_DISABLE, "AUTO_XRAY_DISABLE", 0, "Disable", "Disable Automatic X-Ray"}, - {AUTO_XRAY_OBJECT, - "AUTO_XRAY_OBJECT", - 0, - "Object", - "Enable X-Ray during lasso select in object mode"}, - {AUTO_XRAY_EDIT, - "AUTO_XRAY_EDIT", - 0, - "Edit", - "Enable X-Ray during lasso select in edit mode"}, - {AUTO_XRAY_BOTH, - "AUTO_XRAY_BOTH", - 0, - "Both", - "Enable X-Ray during lasso select in object and edit mode"}, - {0, NULL, 0, NULL, NULL}, - }; - - static const EnumPropertyItem select_through_items[] = { - {SELECT_THROUGH_OBJECT, "SELECT_THROUGH_OBJECT", 0, "Object", "Select occluded objects"}, - {SELECT_THROUGH_EDIT, "SELECT_THROUGH_EDIT", 0, "Edit", "Select occluded mesh elements"}, - {SELECT_THROUGH_BOTH, - "SELECT_THROUGH_BOTH", - 0, - "Both", - "Select occluded objects and mesh elements"}, - {SELECT_THROUGH_DISABLE, "SELECT_THROUGH_DISABLE", 0, "Disable", "Disable Select Through"}, - {0, NULL, 0, NULL, NULL}, - }; - WM_operator_properties_border(ot); - - if (keymap) { - prop = RNA_def_enum(ot->srna, "face_type", face_select_items, 0, "Face Select", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "edge_type", edge_select_items, 0, "Edge Select", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "auto_xray", auto_xray_items, 0, "Automatic X-Ray", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "select_through", select_through_items, 0, "Select Through", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - } + + prop = RNA_def_enum(ot->srna, "face_type", face_select_items, 0, "Face Select", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "edge_type", edge_select_items, 0, "Edge Select", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); prop = RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", ""); RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); } @@ -743,16 +657,6 @@ void WM_operator_properties_gesture_straightline(wmOperatorType *ot, int cursor) } void WM_operator_properties_gesture_circle(wmOperatorType *ot) -{ - WM_operator_properties_gesture_circle_ex(ot, true); -} - -void WM_operator_properties_gesture_circle_toolsetting(wmOperatorType *ot) -{ - WM_operator_properties_gesture_circle_ex(ot, false); -} - -void WM_operator_properties_gesture_circle_ex(wmOperatorType *ot, bool keymap) { PropertyRNA *prop; const int radius_default = 25; @@ -796,42 +700,6 @@ void WM_operator_properties_gesture_circle_ex(wmOperatorType *ot, bool keymap) {0, NULL, 0, NULL, NULL}, }; - static const EnumPropertyItem auto_xray_items[] = { - {AUTO_XRAY_DISABLE, "AUTO_XRAY_DISABLE", 0, "Disable", "Disable Automatic X-Ray"}, - {AUTO_XRAY_OBJECT, - "AUTO_XRAY_OBJECT", - 0, - "Object", - "Enable X-Ray during circle select in object mode"}, - {AUTO_XRAY_EDIT, "AUTO_XRAY_EDIT", 0, "Edit", "Enable X-Ray during circle select in edit mode"}, - {AUTO_XRAY_BOTH, - "AUTO_XRAY_BOTH", - 0, - "Both", - "Enable X-Ray during circle select in object and edit mode"}, - {0, NULL, 0, NULL, NULL}, - }; - - static const EnumPropertyItem select_through_items[] = { - {SELECT_THROUGH_OBJECT, - "SELECT_THROUGH_OBJECT", - 0, - "Object", - "Select occluded objects"}, - {SELECT_THROUGH_EDIT, - "SELECT_THROUGH_EDIT", - 0, - "Edit", - "Select occluded mesh elements"}, - {SELECT_THROUGH_BOTH, - "SELECT_THROUGH_BOTH", - 0, - "Both", - "Select occluded objects and mesh elements"}, - {SELECT_THROUGH_DISABLE, "SELECT_THROUGH_DISABLE", 0, "Disable", "Disable Select Through"}, - {0, NULL, 0, NULL, NULL}, - }; - prop = RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX); RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); prop = RNA_def_int(ot->srna, "y", 0, INT_MIN, INT_MAX, "Y", "", INT_MIN, INT_MAX); @@ -841,18 +709,12 @@ void WM_operator_properties_gesture_circle_ex(wmOperatorType *ot, bool keymap) prop = RNA_def_boolean(ot->srna, "wait_for_input", true, "Wait for Input", ""); RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - if (keymap) { - prop = RNA_def_boolean(ot->srna, "select_origin_circle", true, "Select Object Origin", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "face_type", face_select_items, 0, "Face Select", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "edge_type", edge_select_items, 0, "Edge Select", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "auto_xray", auto_xray_items, 0, "Automatic X-Ray", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "select_through", select_through_items, 0, "Select Through", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - } + prop = RNA_def_boolean(ot->srna, "select_origin_circle", true, "Select Object Origin", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "face_type", face_select_items, 0, "Face Select", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_enum(ot->srna, "edge_type", edge_select_items, 0, "Edge Select", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); } void WM_operator_properties_mouse_select(wmOperatorType *ot) diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 113b173c2c8..94b34212933 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -3852,7 +3852,6 @@ static void gesture_circle_modal_keymap(wmKeyConfig *keyconf) /* assign map to operators */ WM_modalkeymap_assign(keymap, "VIEW3D_OT_select_circle"); - WM_modalkeymap_assign(keymap, "VIEW3D_OT_select_circle_toolsetting"); WM_modalkeymap_assign(keymap, "UV_OT_select_circle"); WM_modalkeymap_assign(keymap, "CLIP_OT_select_circle"); WM_modalkeymap_assign(keymap, "MASK_OT_select_circle"); @@ -3942,7 +3941,6 @@ static void gesture_box_modal_keymap(wmKeyConfig *keyconf) WM_modalkeymap_assign(keymap, "VIEW3D_OT_clip_border"); WM_modalkeymap_assign(keymap, "VIEW3D_OT_render_border"); WM_modalkeymap_assign(keymap, "VIEW3D_OT_select_box"); - WM_modalkeymap_assign(keymap, "VIEW3D_OT_select_box_toolsetting"); /* XXX TODO: zoom border should perhaps map right-mouse to zoom out instead of in+cancel. */ WM_modalkeymap_assign(keymap, "VIEW3D_OT_zoom_border"); WM_modalkeymap_assign(keymap, "IMAGE_OT_render_border"); @@ -3969,7 +3967,6 @@ static void gesture_lasso_modal_keymap(wmKeyConfig *keyconf) /* assign map to operators */ WM_modalkeymap_assign(keymap, "VIEW3D_OT_select_lasso"); - WM_modalkeymap_assign(keymap, "VIEW3D_OT_select_lasso_toolsetting"); WM_modalkeymap_assign(keymap, "GPENCIL_OT_stroke_cutter"); WM_modalkeymap_assign(keymap, "GPENCIL_OT_select_lasso"); WM_modalkeymap_assign(keymap, "MASK_OT_select_lasso"); -- 2.30.2 From e352ec30ee9975e130ed187aa6c1be479649ad04 Mon Sep 17 00:00:00 2001 From: Lukas Sneyd Date: Sun, 16 Apr 2023 03:36:37 -0700 Subject: [PATCH 5/6] cleanup --- .../startup/bl_ui/space_toolsystem_common.py | 2 +- scripts/startup/bl_ui/space_userpref.py | 4 +- scripts/startup/bl_ui/space_view3d.py | 42 ++++++++----------- scripts/startup/bl_ui/space_view3d_toolbar.py | 3 +- source/blender/editors/screen/screen_ops.c | 2 +- source/blender/makesrna/intern/rna_scene.c | 37 ++++++++-------- source/blender/makesrna/intern/rna_userdef.c | 6 +-- .../windowmanager/intern/wm_event_query.c | 4 +- .../windowmanager/intern/wm_operator_props.c | 3 +- 9 files changed, 47 insertions(+), 56 deletions(-) diff --git a/scripts/startup/bl_ui/space_toolsystem_common.py b/scripts/startup/bl_ui/space_toolsystem_common.py index 58a725a05d9..1f950ce1611 100644 --- a/scripts/startup/bl_ui/space_toolsystem_common.py +++ b/scripts/startup/bl_ui/space_toolsystem_common.py @@ -828,7 +828,7 @@ class ToolSelectPanelHelper: row.context_pointer_set("tool", tool) row.popover(panel="TOPBAR_PT_tool_fallback", text=iface_(label, "Operator")) - return tool + return tool # Show a list of tools in the popover. @staticmethod diff --git a/scripts/startup/bl_ui/space_userpref.py b/scripts/startup/bl_ui/space_userpref.py index 8e67eda58c9..1219703524d 100644 --- a/scripts/startup/bl_ui/space_userpref.py +++ b/scripts/startup/bl_ui/space_userpref.py @@ -497,12 +497,13 @@ class USERPREF_PT_edit_misc(EditingPanel, CenterAlignMixIn, Panel): col = layout.column() col.prop(edit, "sculpt_paint_overlay_color", text="Sculpt Overlay Color") col.prop(edit, "node_margin", text="Node Auto-Offset Margin") + col = layout.column(heading="Adjustable Click Select") col.prop(edit, "adjustable_click_select") colsub = col.column(align=True) colsub.active = edit.adjustable_click_select colsub.prop(edit, "select_unbiased") colsub.prop(edit, "selection_radius") - col = layout.column() + col = layout.column(heading="Alternate Edit Cursor") col.prop(edit, "alternate_cursor") colsub = col.column(align=True) colsub.active = edit.alternate_cursor @@ -1572,7 +1573,6 @@ class USERPREF_PT_input_mouse(InputPanel, CenterAlignMixIn, Panel): flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) flow.prop(inputs, "click_drag_direction") - flow.prop(inputs, "drag_select_control") flow.prop(inputs, "use_mouse_emulate_3_button") if sys.platform[:3] != "win": rowsub = flow.row() diff --git a/scripts/startup/bl_ui/space_view3d.py b/scripts/startup/bl_ui/space_view3d.py index f87b1941b11..51b66458f02 100644 --- a/scripts/startup/bl_ui/space_view3d.py +++ b/scripts/startup/bl_ui/space_view3d.py @@ -6432,21 +6432,19 @@ class VIEW3D_PT_auto_xray(Panel): def draw(self, context): layout = self.layout tool_settings = context.tool_settings - #layout.label(text="X-Ray Settings") - col = layout.column() - row = col.row(align=True) + row = layout.row(align=True) - row.prop(tool_settings, "auto_xray", text="Enable") + row.prop(tool_settings, "auto_xray") sub = row.row(align=True) sub.active = tool_settings.auto_xray - sub.prop(tool_settings, "auto_xray_object", text="Object") - sub.prop(tool_settings, "auto_xray_edit", text="Edit") + sub.prop(tool_settings, "auto_xray_object") + sub.prop(tool_settings, "auto_xray_edit") row = layout.row(align=True) sub = row.row(align=True) sub.active = tool_settings.auto_xray - sub.prop(tool_settings, "auto_xray_box", text="Box", toggle=True) - sub.prop(tool_settings, "auto_xray_lasso", text="Lasso", toggle=True) - sub.prop(tool_settings, "auto_xray_circle", text="Circle", toggle=True) + sub.prop(tool_settings, "auto_xray_box", toggle=True) + sub.prop(tool_settings, "auto_xray_lasso", toggle=True) + sub.prop(tool_settings, "auto_xray_circle", toggle=True) class VIEW3D_PT_select_through(Panel): @@ -6458,21 +6456,19 @@ class VIEW3D_PT_select_through(Panel): def draw(self, context): layout = self.layout tool_settings = context.tool_settings - #layout.label(text="X-Ray Settings") - col = layout.column() - row = col.row(align=True) + row = layout.row(align=True) - row.prop(tool_settings, "select_through", text="Enable") + row.prop(tool_settings, "select_through") sub = row.row(align=True) sub.active = tool_settings.select_through - sub.prop(tool_settings, "select_through_object", text="Object") - sub.prop(tool_settings, "select_through_edit", text="Edit") + sub.prop(tool_settings, "select_through_object") + sub.prop(tool_settings, "select_through_edit") row = layout.row(align=True) sub = row.row(align=True) sub.active = tool_settings.select_through - sub.prop(tool_settings, "select_through_box", text="Box", toggle=True) - sub.prop(tool_settings, "select_through_lasso", text="Lasso", toggle=True) - sub.prop(tool_settings, "select_through_circle", text="Circle", toggle=True) + sub.prop(tool_settings, "select_through_box", toggle=True) + sub.prop(tool_settings, "select_through_lasso", toggle=True) + sub.prop(tool_settings, "select_through_circle", toggle=True) class VIEW3D_PT_xray_buttons(Panel): @@ -6484,13 +6480,11 @@ class VIEW3D_PT_xray_buttons(Panel): def draw(self, context): layout = self.layout tool_settings = context.tool_settings - #layout.label(text="X-Ray Settings") - col = layout.column() - row = col.row(align=True) + row = layout.row(align=True) - row.prop(tool_settings, "auto_xray_button", text="Auto X-Ray", toggle=True) - row.prop(tool_settings, "select_through_button", text="Select Through", toggle=True) - row.prop(tool_settings, "xray_button", text="X-Ray", toggle=True) + row.prop(tool_settings, "auto_xray_button", toggle=True) + row.prop(tool_settings, "select_through_button", toggle=True) + row.prop(tool_settings, "xray_button", toggle=True) class VIEW3D_PT_overlay(Panel): diff --git a/scripts/startup/bl_ui/space_view3d_toolbar.py b/scripts/startup/bl_ui/space_view3d_toolbar.py index dcb5efb5bef..91496b2f0e1 100644 --- a/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -153,7 +153,7 @@ class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel): bl_context = ".mesh_edit" # dot on purpose (access from topbar) bl_label = "Options" bl_options = {'DEFAULT_CLOSED'} - bl_ui_units_x = 15 + bl_ui_units_x = 13 @classmethod def poll(cls, context): @@ -169,7 +169,6 @@ class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel): ob = context.active_object mesh = ob.data - row = layout.row(align=True) row = layout.row(align=True, heading="Transform") row.prop(tool_settings, "use_transform_correct_face_attributes") diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 689275a4d79..6d0a90a6b45 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -3870,7 +3870,7 @@ static int repeat_tool_exec(bContext *C, wmOperator *UNUSED(op)) lastop = lastop->prev; } else { - printf(lastop->idname, "\n"); + //printf(lastop->idname, "\n"); break; } } diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 4cae796ba05..4b706461e6b 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -3886,18 +3886,19 @@ static void rna_def_tool_settings(BlenderRNA *brna) prop = RNA_def_property(srna, "xray_button", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "xray_button", 0); RNA_def_property_ui_text( - prop, "X-Ray Button", "Show button for X-Ray in viewport header"); + prop, "X-Ray", "Show button for X-Ray in viewport header"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* Auto X-Ray */ prop = RNA_def_property(srna, "auto_xray", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "auto_xray", 0); - RNA_def_property_ui_text(prop, "Auto X-Ray", "Transparent scene display during drag select"); + RNA_def_property_ui_text(prop, "Enable", "Transparent scene display during drag select"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); prop = RNA_def_property(srna, "auto_xray_button", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "auto_xray_button", 0); - RNA_def_property_ui_text(prop, "Auto X-Ray Button", "Show button for automatic X-Ray in viewport header"); + RNA_def_property_ui_text( + prop, "Auto X-Ray", "Show button for automatic X-Ray in viewport header"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); prop = RNA_def_property(srna, "auto_xray_reset", PROP_BOOLEAN, PROP_NONE); @@ -3907,70 +3908,68 @@ static void rna_def_tool_settings(BlenderRNA *brna) prop = RNA_def_property(srna, "auto_xray_object", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "auto_xray_object", 0); - RNA_def_property_ui_text(prop, "Auto X-Ray Object", "Automatic X-Ray in object mode"); + RNA_def_property_ui_text(prop, "Object", "Automatic X-Ray in object mode"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); prop = RNA_def_property(srna, "auto_xray_edit", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "auto_xray_edit", 0); - RNA_def_property_ui_text(prop, "Auto X-Ray Edit", "Automatic X-Ray in edit mode"); + RNA_def_property_ui_text(prop, "Edit", "Automatic X-Ray in edit mode"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); prop = RNA_def_property(srna, "auto_xray_box", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "auto_xray_box", 0); - RNA_def_property_ui_text(prop, "Auto X-Ray Box", "Transparent scene display during box select"); + RNA_def_property_ui_text(prop, "Box", "Transparent scene display during box select"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); prop = RNA_def_property(srna, "auto_xray_lasso", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "auto_xray_lasso", 0); - RNA_def_property_ui_text(prop, "Auto X-Ray Lasso", "Transparent scene display during lasso select"); + RNA_def_property_ui_text(prop, "Lasso", "Transparent scene display during lasso select"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); prop = RNA_def_property(srna, "auto_xray_circle", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "auto_xray_circle", 0); - RNA_def_property_ui_text(prop, "Auto X-Ray Circle", "Transparent scene display during circle select"); + RNA_def_property_ui_text(prop, "Circle", "Transparent scene display during circle select"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* Select Through */ prop = RNA_def_property(srna, "select_through", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "select_through", 0); RNA_def_property_ui_text( - prop, "Select Through", "Select occluded objects and mesh elements with drag select"); + prop, "Enable", "Select occluded objects and mesh elements with drag select"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); prop = RNA_def_property(srna, "select_through_button", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "select_through_button", 0); RNA_def_property_ui_text( - prop, "Select Through Button", "Show button for select through in viewport header"); + prop, "Select Through", "Show button for select through in viewport header"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); prop = RNA_def_property(srna, "select_through_object", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "select_through_object", 0); - RNA_def_property_ui_text(prop, "Select Through Object", "Select through in object mode"); + RNA_def_property_ui_text(prop, "Object", "Select through in object mode"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); prop = RNA_def_property(srna, "select_through_edit", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "select_through_edit", 0); - RNA_def_property_ui_text(prop, "Select Through Edit", "Select through in edit mode"); + RNA_def_property_ui_text(prop, "Edit", "Select through in edit mode"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); prop = RNA_def_property(srna, "select_through_box", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "select_through_box", 0); RNA_def_property_ui_text( - prop, "Select Through Box", "Select occluded objects and mesh elements with box select"); + prop, "Box", "Select occluded objects and mesh elements with box select"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); prop = RNA_def_property(srna, "select_through_lasso", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "select_through_lasso", 0); - RNA_def_property_ui_text(prop, - "Select Through Lasso", - "Select occluded objects and mesh elements with lasso select"); + RNA_def_property_ui_text( + prop, "Lasso", "Select occluded objects and mesh elements with lasso select"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); prop = RNA_def_property(srna, "select_through_circle", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "select_through_circle", 0); - RNA_def_property_ui_text(prop, - "Select Through Circle", - "Select occluded objects and mesh elements with circle select"); + RNA_def_property_ui_text( + prop, "Circle", "Select occluded objects and mesh elements with circle select"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* Unified Paint Settings */ diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 6e32ee2ac35..6c6f4851f5e 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -5313,7 +5313,7 @@ static void rna_def_userdef_edit(BlenderRNA *brna) prop = RNA_def_property(srna, "adjustable_click_select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_ADJUSTABLE_CLICK_SELECT); RNA_def_property_ui_text( - prop, "Adjustable Click-Select", "Use additional options for single-click select"); + prop, "Enable", "Use additional options for single-click select"); prop = RNA_def_property(srna, "select_unbiased", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SELECT_UNBIASED); @@ -5340,11 +5340,11 @@ static void rna_def_userdef_edit(BlenderRNA *brna) prop = RNA_def_property(srna, "alternate_cursor", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_ALTERNATE_CURSOR); - RNA_def_property_ui_text(prop, "Alternate Cursor", "Alternate edit mode crosshair"); + RNA_def_property_ui_text(prop, "Enable", "Alternate edit mode crosshair"); prop = RNA_def_property(srna, "alternate_cursor_large", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_ALTERNATE_CURSOR_LARGE); - RNA_def_property_ui_text(prop, "Large Cursor", "Supersize the alternate edit mode crosshair"); + RNA_def_property_ui_text(prop, "Larger", "Bigger version of the alternate crosshair"); } static void rna_def_userdef_system(BlenderRNA *brna) diff --git a/source/blender/windowmanager/intern/wm_event_query.c b/source/blender/windowmanager/intern/wm_event_query.c index 5cd52f496d1..59fa04430e2 100644 --- a/source/blender/windowmanager/intern/wm_event_query.c +++ b/source/blender/windowmanager/intern/wm_event_query.c @@ -272,8 +272,8 @@ int WM_event_drag_direction(const wmEvent *event) event->xy[1] - event->prev_press_xy[1], }; - bool left_right = U.click_drag_direction & USER_CLICK_DRAG_DIRECTION_LEFT_RIGHT; - bool up_down = U.click_drag_direction & USER_CLICK_DRAG_DIRECTION_UP_DOWN; + const bool left_right = U.click_drag_direction & USER_CLICK_DRAG_DIRECTION_LEFT_RIGHT; + const bool up_down = U.click_drag_direction & USER_CLICK_DRAG_DIRECTION_UP_DOWN; int theta = left_right ? round_fl_to_int(atan2f(0.0f, (float)delta[0]) / (float)M_PI) : up_down ? diff --git a/source/blender/windowmanager/intern/wm_operator_props.c b/source/blender/windowmanager/intern/wm_operator_props.c index 509b16b2de4..00821f5753a 100644 --- a/source/blender/windowmanager/intern/wm_operator_props.c +++ b/source/blender/windowmanager/intern/wm_operator_props.c @@ -492,8 +492,7 @@ void WM_operator_properties_use_cursor_init(wmOperatorType *ot) void WM_operator_properties_gesture_box_select(wmOperatorType *ot) { - WM_operator_properties_gesture_box_ex( - ot, true, true); + WM_operator_properties_gesture_box_ex(ot, true, true); } void WM_operator_properties_gesture_box(wmOperatorType *ot) { -- 2.30.2 From 27b67eee8f4a2d4725d01422db6d46c938a7b21e Mon Sep 17 00:00:00 2001 From: Lukas Sneyd Date: Thu, 4 May 2023 04:12:00 -0700 Subject: [PATCH 6/6] remove gizmo tweak, add edit cursor options, rename face and edge style, rename repeat_tool to invoke_last --- intern/ghost/GHOST_Types.h | 5 +- intern/ghost/intern/GHOST_WindowWin32.cpp | 17 +++- release/windows/icons/winblender.rc | 8 +- scripts/startup/bl_ui/space_userpref.py | 6 +- scripts/startup/bl_ui/space_view3d.py | 82 ------------------- .../blenloader/intern/versioning_userdef.c | 4 +- source/blender/editors/screen/screen_ops.c | 18 ++-- source/blender/makesdna/DNA_scene_types.h | 4 +- source/blender/makesdna/DNA_userdef_types.h | 24 +++++- source/blender/makesrna/intern/rna_userdef.c | 24 ++++-- source/blender/windowmanager/WM_api.h | 2 +- .../blender/windowmanager/intern/wm_cursors.c | 25 +++++- .../windowmanager/intern/wm_event_system.cc | 2 +- .../windowmanager/intern/wm_operator_props.c | 30 +++---- 14 files changed, 113 insertions(+), 138 deletions(-) diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index 8e8ca667e5f..30e93e71968 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -236,13 +236,16 @@ typedef enum { GHOST_kStandardCursorCrosshairB, GHOST_kStandardCursorCrosshairC, GHOST_kStandardCursorCrosshairD, - GHOST_kStandardCursorCrosshairE, + GHOST_kStandardCursorBox, + GHOST_kStandardCursorBoxDot, + GHOST_kStandardCursorBoxPointer, GHOST_kStandardCursorPencil, GHOST_kStandardCursorUpArrow, GHOST_kStandardCursorDownArrow, GHOST_kStandardCursorVerticalSplit, GHOST_kStandardCursorHorizontalSplit, GHOST_kStandardCursorEraser, + GHOST_kStandardCursorPointer, GHOST_kStandardCursorKnife, GHOST_kStandardCursorEyedropper, GHOST_kStandardCursorZoomIn, diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 183af447f9b..506edbf022e 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -727,6 +727,9 @@ HCURSOR GHOST_WindowWin32::getStandardCursor(GHOST_TStandardCursor shape) const case GHOST_kStandardCursorHorizontalSplit: cursor = ::LoadImage(module, "splith_cursor", IMAGE_CURSOR, cx, cy, flags); break; + case GHOST_kStandardCursorPointer: + cursor = ::LoadImage(module, "pointer_cursor", IMAGE_CURSOR, cx, cy, flags); + break; case GHOST_kStandardCursorKnife: cursor = ::LoadImage(module, "knife_cursor", IMAGE_CURSOR, cx, cy, flags); break; @@ -774,10 +777,16 @@ HCURSOR GHOST_WindowWin32::getStandardCursor(GHOST_TStandardCursor shape) const break; /* Minimal Crosshair C */ case GHOST_kStandardCursorCrosshairD: cursor = ::LoadImage(module, "crossD_cursor", IMAGE_CURSOR, cx, cy, flags); - break; /* Alternate Crosshair D */ - case GHOST_kStandardCursorCrosshairE: - cursor = ::LoadImage(module, "crossE_cursor", IMAGE_CURSOR, cx, cy, flags); - break; /* Large Crosshair E */ + break; /* Open Crosshair D */ + case GHOST_kStandardCursorBox: + cursor = ::LoadImage(module, "box_cursor", IMAGE_CURSOR, cx, cy, flags); + break; /* Box */ + case GHOST_kStandardCursorBoxDot: + cursor = ::LoadImage(module, "boxdot_cursor", IMAGE_CURSOR, cx, cy, flags); + break; /* Box Dot */ + case GHOST_kStandardCursorBoxPointer: + cursor = ::LoadImage(module, "boxpointer_cursor", IMAGE_CURSOR, cx, cy, flags); + break; /* Box Pointer */ case GHOST_kStandardCursorBottomSide: case GHOST_kStandardCursorUpDown: cursor = ::LoadImage(module, "movens_cursor", IMAGE_CURSOR, cx, cy, flags); diff --git a/release/windows/icons/winblender.rc b/release/windows/icons/winblender.rc index fcd2a66b0cd..5908715e66e 100644 --- a/release/windows/icons/winblender.rc +++ b/release/windows/icons/winblender.rc @@ -12,7 +12,6 @@ APPICON ICON DISCARDABLE "winblender.ico" BLENDERFILE ICON DISCARDABLE "winblenderfile.ico" -pointer_cursor CURSOR "cursors/pointer.cur" moveew_cursor CURSOR "cursors/moveew.cur" movens_cursor CURSOR "cursors/movens.cur" arrowdown_cursor CURSOR "cursors/arrowdown.cur" @@ -24,8 +23,11 @@ crossA_cursor CURSOR "cursors/crossa.cur" crossB_cursor CURSOR "cursors/crossb.cur" crossC_cursor CURSOR "cursors/crossc.cur" crossD_cursor CURSOR "cursors/crossd.cur" -crossE_cursor CURSOR "cursors/crosse.cur" -eraser_cursor CURSOR "cursors/eraser.cur" +box_cursor CURSOR "cursors/box.cur" +boxdot_cursor CURSOR "cursors/boxdot.cur" +boxpointer_cursor CURSOR "cursors/boxpointer.cur" +pointer_cursor CURSOR "cursors/pointera.cur" +eraser_cursor CURSOR "cursors/eraser.cur" eyedropper_cursor CURSOR "cursors/eyedropper.cur" handopen_cursor CURSOR "cursors/handopen.cur" knife_cursor CURSOR "cursors/knife.cur" diff --git a/scripts/startup/bl_ui/space_userpref.py b/scripts/startup/bl_ui/space_userpref.py index 1219703524d..a3969564f8d 100644 --- a/scripts/startup/bl_ui/space_userpref.py +++ b/scripts/startup/bl_ui/space_userpref.py @@ -497,17 +497,13 @@ class USERPREF_PT_edit_misc(EditingPanel, CenterAlignMixIn, Panel): col = layout.column() col.prop(edit, "sculpt_paint_overlay_color", text="Sculpt Overlay Color") col.prop(edit, "node_margin", text="Node Auto-Offset Margin") + col.prop(edit, "edit_cursor") col = layout.column(heading="Adjustable Click Select") col.prop(edit, "adjustable_click_select") colsub = col.column(align=True) colsub.active = edit.adjustable_click_select colsub.prop(edit, "select_unbiased") colsub.prop(edit, "selection_radius") - col = layout.column(heading="Alternate Edit Cursor") - col.prop(edit, "alternate_cursor") - colsub = col.column(align=True) - colsub.active = edit.alternate_cursor - colsub.prop(edit, "alternate_cursor_large") diff --git a/scripts/startup/bl_ui/space_view3d.py b/scripts/startup/bl_ui/space_view3d.py index 51b66458f02..a50b1f00d4b 100644 --- a/scripts/startup/bl_ui/space_view3d.py +++ b/scripts/startup/bl_ui/space_view3d.py @@ -1072,84 +1072,6 @@ class ShowHideMenu: # Custom Operators -class VIEW3D_gizmo_tweak(bpy.types.Operator): - """tweak based on gizmo shown""" - bl_idname = "view3d.gizmo_tweak" - bl_label = "gizmo tweak" - - from bpy.props import StringProperty, BoolProperty - - tmode: StringProperty(name="Transform Mode") - release: BoolProperty(name="Confirm on Release") - - def modal(self, context, event): - if event.type == 'MOUSEMOVE': - bpy.ops.transform.transform( - 'INVOKE_DEFAULT', - mode=self.tmode, - release_confirm=self.release) - return {'FINISHED'} - - return {'RUNNING_MODAL'} - - def invoke(self, context, event): - if context.object: - if context.space_data.show_gizmo_object_translate==True: - self.tmode = 'TRANSLATION' - elif context.space_data.show_gizmo_object_rotate==True: - self.tmode = 'ROTATION' - elif context.space_data.show_gizmo_object_scale==True: - self.tmode = 'RESIZE' - else: self.tmode = 'TRANSLATION' - - context.window_manager.modal_handler_add(self) - return {'RUNNING_MODAL'} - else: - self.report({'WARNING'}, "No active object, could not finish") - return {'CANCELLED'} - -class VIEW3D_gizmo_move(bpy.types.Operator): - bl_idname = "view3d.gizmo_move" - bl_label = "gizmo move" - - def invoke(self, context, event): - areas = bpy.context.workspace.screens[0].areas - for area in areas: - for space in area.spaces: - if space.type == 'VIEW_3D': - space.show_gizmo_object_translate^= True - space.show_gizmo_object_rotate = False - space.show_gizmo_object_scale = False - return {'FINISHED'} - -class VIEW3D_gizmo_scale(bpy.types.Operator): - bl_idname = "view3d.gizmo_scale" - bl_label = "gizmo scale" - - def invoke(self, context, event): - areas = bpy.context.workspace.screens[0].areas - for area in areas: - for space in area.spaces: - if space.type == 'VIEW_3D': - space.show_gizmo_object_translate = False - space.show_gizmo_object_rotate = False - space.show_gizmo_object_scale ^= True - return {'FINISHED'} - -class VIEW3D_gizmo_rotate(bpy.types.Operator): - bl_idname = "view3d.gizmo_rotate" - bl_label = "gizmo rotate" - - def invoke(self, context, event): - areas = bpy.context.workspace.screens[0].areas - for area in areas: - for space in area.spaces: - if space.type == 'VIEW_3D': - space.show_gizmo_object_translate = False - space.show_gizmo_object_rotate ^= True - space.show_gizmo_object_scale = False - return {'FINISHED'} - class VIEW3D_box_lasso(bpy.types.Operator): bl_idname = "view3d.box_lasso" bl_label = "box lasso" @@ -8423,10 +8345,6 @@ classes = ( VIEW3D_MT_sculpt_gpencil_automasking_pie, VIEW3D_MT_wpaint_vgroup_lock_pie, VIEW3D_MT_sculpt_face_sets_edit_pie, - VIEW3D_gizmo_tweak, - VIEW3D_gizmo_move, - VIEW3D_gizmo_scale, - VIEW3D_gizmo_rotate, VIEW3D_box_lasso, VIEW3D_MT_sculpt_curves, VIEW3D_PT_active_tool, diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c index a4c765d9e61..bdb327fc5f3 100644 --- a/source/blender/blenloader/intern/versioning_userdef.c +++ b/source/blender/blenloader/intern/versioning_userdef.c @@ -434,7 +434,7 @@ void blo_do_versions_userdef(UserDef *userdef) if (!USER_VERSION_ATLEAST(278, 6)) { /* Clear preference flags for re-use. */ - userdef->flag &= ~(USER_FLAG_NUMINPUT_ADVANCED | USER_FLAG_UNUSED_7 | + userdef->flag &= ~(USER_FLAG_NUMINPUT_ADVANCED | USER_FLAG_UNUSED_6 | USER_FLAG_UNUSED_7 | USER_FLAG_UNUSED_9 | USER_DEVELOPER_UI); userdef->uiflag &= ~(USER_HEADER_BOTTOM); userdef->transopts &= ~(USER_TR_UNUSED_2 | USER_TR_UNUSED_3 | USER_TR_UNUSED_4 | @@ -524,6 +524,8 @@ void blo_do_versions_userdef(UserDef *userdef) copy_v3_fl3(userdef->light_ambient, 0.025000, 0.025000, 0.025000); + userdef->flag &= ~(USER_FLAG_UNUSED_4); + userdef->uiflag &= ~(USER_HEADER_FROM_PREF | USER_UIFLAG_UNUSED_12 | USER_UIFLAG_UNUSED_22); } diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 6d0a90a6b45..10dc4b90421 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -3848,10 +3848,10 @@ static void SCREEN_OT_repeat_history(wmOperatorType *ot) /** \} */ /* -------------------------------------------------------------------- */ -/** \name Repeat Tool Operator +/** \name Invoke Last Operator * \{ */ -static int repeat_tool_exec(bContext *C, wmOperator *UNUSED(op)) +static int invoke_last_exec(bContext *C, wmOperator *UNUSED(op)) { wmWindowManager *wm = CTX_wm_manager(C); wmOperator *lastop = wm->operators.last; @@ -3881,21 +3881,21 @@ static int repeat_tool_exec(bContext *C, wmOperator *UNUSED(op)) if (lastop) { WM_operator_free_all_after(wm, lastop); - WM_operator_repeat_tool(C, lastop); + WM_operator_invoke_last(C, lastop); } return OPERATOR_CANCELLED; } -static void SCREEN_OT_repeat_tool(wmOperatorType *ot) +static void SCREEN_OT_invoke_last(wmOperatorType *ot) { /* identifiers */ - ot->name = "Repeat Tool"; - ot->description = "Repeat last tool"; - ot->idname = "SCREEN_OT_repeat_tool"; + ot->name = "Invoke Last"; + ot->description = "Invoke last operation"; + ot->idname = "SCREEN_OT_invoke_last"; /* api callbacks */ - ot->exec = repeat_tool_exec; + ot->exec = invoke_last_exec; ot->poll = ED_operator_screenactive; } @@ -5734,7 +5734,7 @@ void ED_operatortypes_screen(void) WM_operatortype_append(SCREEN_OT_actionzone); WM_operatortype_append(SCREEN_OT_repeat_last); WM_operatortype_append(SCREEN_OT_repeat_history); - WM_operatortype_append(SCREEN_OT_repeat_tool); + WM_operatortype_append(SCREEN_OT_invoke_last); WM_operatortype_append(SCREEN_OT_redo_last); /* Screen tools. */ diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index b760250a09b..7164759a632 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -2395,7 +2395,7 @@ enum { /** #Face select style */ enum { - FACE_AUTO = (1 << 0), + FACE_DEFAULT = (1 << 0), FACE_TOUCH = (1 << 1), FACE_ENCLOSE = (1 << 2), FACE_CENTER = (1 << 3), @@ -2403,7 +2403,7 @@ enum { /** #Edge select style */ enum { - EDGE_HYBRID = (1 << 0), + EDGE_DEFAULT = (1 << 0), EDGE_TOUCH = (1 << 1), EDGE_ENCLOSE = (1 << 2), }; diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 2ca1d07e56b..b1709d9589d 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -904,11 +904,14 @@ typedef struct UserDef { char drag_threshold; char move_threshold; - /** Adjustable selection radius */ + /** Adjustable selection radius. */ float selection_radius; char adjustable_click_select; char select_unbiased; - char _pad9[2]; + + /** Edit mode cursor. **/ + char edit_cursor; + char _pad9[1]; char font_path_ui[1024]; char font_path_ui_mono[1024]; @@ -1014,9 +1017,9 @@ typedef enum eUserPref_Flag { USER_FLAG_NUMINPUT_ADVANCED = (1 << 1), USER_ADJUSTABLE_CLICK_SELECT = (1 << 2), USER_SELECT_UNBIASED = (1 << 3), - USER_ALTERNATE_CURSOR = (1 << 4), + USER_FLAG_UNUSED_4 = (1 << 4), /* cleared */ USER_TRACKBALL = (1 << 5), - USER_ALTERNATE_CURSOR_LARGE = (1 << 6), + USER_FLAG_UNUSED_6 = (1 << 6), /* cleared */ USER_FLAG_UNUSED_7 = (1 << 7), /* cleared */ USER_MAT_ON_OB = (1 << 8), USER_FLAG_UNUSED_9 = (1 << 9), /* cleared */ @@ -1170,6 +1173,19 @@ typedef enum eUserpref_Click_Drag_Direction { USER_CLICK_DRAG_DIRECTION_UP_DOWN = 2, } eUserpref_Click_Drag_Direction; +/** #UserDef.edit_cursor_types */ +typedef enum eUserpref_Edit_Cursor_Types { + USER_EDIT_CURSOR_CROSS = 0, + USER_EDIT_CURSOR_SYSTEM = 1, + USER_EDIT_CURSOR_POINTER = 2, + USER_EDIT_CURSOR_CROSS_OPEN = 3, + USER_EDIT_CURSOR_CROSS_DOT = 4, + USER_EDIT_CURSOR_CROSS_MIN = 5, + USER_EDIT_CURSOR_BOX = 6, + USER_EDIT_CURSOR_BOX_DOT = 7, + USER_EDIT_CURSOR_BOX_POINTER = 8, +} eUserpref_Edit_Cursor_Types; + /** #UserDef.app_flag */ typedef enum eUserpref_APP_Flag { USER_APP_LOCK_CORNER_SPLIT = (1 << 0), diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 6c6f4851f5e..f5388dd3710 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -4999,6 +4999,19 @@ static void rna_def_userdef_edit(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}, }; + static const EnumPropertyItem edit_cursor_items[] = { + {USER_EDIT_CURSOR_CROSS, "CROSS", 0, "Cross", ""}, + {USER_EDIT_CURSOR_SYSTEM, "SYSTEM", 0, "System", ""}, + {USER_EDIT_CURSOR_POINTER, "POINTER", 0, "Pointer", ""}, + {USER_EDIT_CURSOR_CROSS_OPEN, "CROSS_OPEN", 0, "Cross Open", ""}, + {USER_EDIT_CURSOR_CROSS_DOT, "CROSS_DOT", 0, "Cross Dot", ""}, + {USER_EDIT_CURSOR_CROSS_MIN, "CROSS_MIN", 0, "Cross Minimal", ""}, + {USER_EDIT_CURSOR_BOX, "BOX", 0, "Box", ""}, + {USER_EDIT_CURSOR_BOX_DOT, "BOX_DOT", 0, "Box Dot", ""}, + {USER_EDIT_CURSOR_BOX_POINTER, "BOX_POINTER", 0, "Box Pointer", ""}, + {0, NULL, 0, NULL, NULL}, + }; + srna = RNA_def_struct(brna, "PreferencesEdit", NULL); RNA_def_struct_sdna(srna, "UserDef"); RNA_def_struct_nested(brna, srna, "Preferences"); @@ -5338,13 +5351,10 @@ static void rna_def_userdef_edit(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Cursor Surface Project", "Use the surface depth for cursor placement"); - prop = RNA_def_property(srna, "alternate_cursor", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_ALTERNATE_CURSOR); - RNA_def_property_ui_text(prop, "Enable", "Alternate edit mode crosshair"); - - prop = RNA_def_property(srna, "alternate_cursor_large", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_ALTERNATE_CURSOR_LARGE); - RNA_def_property_ui_text(prop, "Larger", "Bigger version of the alternate crosshair"); + prop = RNA_def_property(srna, "edit_cursor", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, edit_cursor_items); + RNA_def_property_enum_sdna(prop, NULL, "edit_cursor"); + RNA_def_property_ui_text(prop, "Edit Cursor", "Edit mode cursor style"); } static void rna_def_userdef_system(BlenderRNA *brna) diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 767c95627f1..6d4860623f9 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -688,7 +688,7 @@ int WM_operator_call_notest(struct bContext *C, struct wmOperator *op); * Execute this operator again, put here so it can share above code */ int WM_operator_repeat(struct bContext *C, struct wmOperator *op); -int WM_operator_repeat_tool(struct bContext *C, struct wmOperator *op); +int WM_operator_invoke_last(struct bContext *C, struct wmOperator *op); int WM_operator_repeat_last(struct bContext *C, struct wmOperator *op); /** * \return true if #WM_operator_repeat can run. diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c index 2475e617fd0..2baac067660 100644 --- a/source/blender/windowmanager/intern/wm_cursors.c +++ b/source/blender/windowmanager/intern/wm_cursors.c @@ -43,6 +43,7 @@ static BCursor *BlenderCursor[WM_CURSOR_NUM] = {0}; /* Blender cursor to GHOST standard cursor conversion. */ static GHOST_TStandardCursor convert_to_ghost_standard_cursor(WMCursorType curs) { + const int edit_style = U.edit_cursor; switch (curs) { case WM_CURSOR_DEFAULT: return GHOST_kStandardCursorDefault; @@ -50,11 +51,29 @@ static GHOST_TStandardCursor convert_to_ghost_standard_cursor(WMCursorType curs) return GHOST_kStandardCursorWait; case WM_CURSOR_EDIT: case WM_CURSOR_CROSS: - if (U.flag & USER_ALTERNATE_CURSOR && !(U.flag & USER_ALTERNATE_CURSOR_LARGE)) { + if (edit_style == 1) { + return GHOST_kStandardCursorDefault; + } + else if (edit_style == 2) { + return GHOST_kStandardCursorPointer; + } + else if (edit_style == 3) { return GHOST_kStandardCursorCrosshairD; } - else if (U.flag & USER_ALTERNATE_CURSOR && U.flag & USER_ALTERNATE_CURSOR_LARGE) { - return GHOST_kStandardCursorCrosshairE; + else if (edit_style == 4) { + return GHOST_kStandardCursorCrosshairA; + } + else if (edit_style == 5) { + return GHOST_kStandardCursorCrosshairC; + } + else if (edit_style == 6) { + return GHOST_kStandardCursorBox; + } + else if (edit_style == 7) { + return GHOST_kStandardCursorBoxDot; + } + else if (edit_style == 8) { + return GHOST_kStandardCursorBoxPointer; } else { return GHOST_kStandardCursorCrosshair; diff --git a/source/blender/windowmanager/intern/wm_event_system.cc b/source/blender/windowmanager/intern/wm_event_system.cc index d08b3c154b1..c888f9a7692 100644 --- a/source/blender/windowmanager/intern/wm_event_system.cc +++ b/source/blender/windowmanager/intern/wm_event_system.cc @@ -1292,7 +1292,7 @@ int WM_operator_repeat(bContext *C, wmOperator *op) op->flag &= ~op_flag; return ret; } -int WM_operator_repeat_tool(bContext *C, wmOperator *op) +int WM_operator_invoke_last(bContext *C, wmOperator *op) { const int ret = WM_operator_name_call_ptr(C, op->type, WM_OP_INVOKE_DEFAULT, NULL, NULL); return ret; diff --git a/source/blender/windowmanager/intern/wm_operator_props.c b/source/blender/windowmanager/intern/wm_operator_props.c index 00821f5753a..c2766a791aa 100644 --- a/source/blender/windowmanager/intern/wm_operator_props.c +++ b/source/blender/windowmanager/intern/wm_operator_props.c @@ -412,10 +412,10 @@ void WM_operator_properties_gesture_box_ex(wmOperatorType *ot, bool deselect, bo PropertyRNA *prop; static const EnumPropertyItem face_select_items[] = { - {FACE_AUTO, - "FACE_AUTO", + {FACE_DEFAULT, + "FACE_DEFAULT", 0, - "Auto", + "Default", "Select faces that are touched by the selection area in near select. Select faces whose " "center is touched by the selection area in X-Ray select"}, {FACE_TOUCH, @@ -437,10 +437,10 @@ void WM_operator_properties_gesture_box_ex(wmOperatorType *ot, bool deselect, bo }; static const EnumPropertyItem edge_select_items[] = { - {EDGE_HYBRID, - "EDGE_HYBRID", + {EDGE_DEFAULT, + "EDGE_DEFAULT", 0, - "Hybrid", + "Default", "Select edges that are fully inside the selection area. If no edges are fully inside the " "selection area, select edges that are touched by the selection area"}, {EDGE_TOUCH, @@ -572,10 +572,10 @@ void WM_operator_properties_gesture_lasso(wmOperatorType *ot) { PropertyRNA *prop; static const EnumPropertyItem face_select_items[] = { - {FACE_AUTO, - "FACE_AUTO", + {FACE_DEFAULT, + "FACE_DEFAULT", 0, - "Auto", + "Default", "Select faces that are touched by the selection area in near select. Select faces whose " "center is touched by the selection area in X-Ray select"}, {FACE_TOUCH, @@ -597,10 +597,10 @@ void WM_operator_properties_gesture_lasso(wmOperatorType *ot) }; static const EnumPropertyItem edge_select_items[] = { - {EDGE_HYBRID, - "EDGE_HYBRID", + {EDGE_DEFAULT, + "EDGE_DEFAULT", 0, - "Hybrid", + "Default", "Select edges that are fully inside the selection area. If no edges are fully inside the " "selection area, select edges that are touched by the selection area"}, {EDGE_TOUCH, @@ -661,10 +661,10 @@ void WM_operator_properties_gesture_circle(wmOperatorType *ot) const int radius_default = 25; static const EnumPropertyItem face_select_items[] = { - {FACE_AUTO, - "FACE_AUTO", + {FACE_DEFAULT, + "FACE_DEFAULT", 0, - "Auto", + "Default", "Select faces that are touched by the selection area in near select. Select faces whose " "center is touched by the selection area in X-Ray select"}, {FACE_TOUCH, -- 2.30.2