The goal is to make the search faster to use by dynamically adapting to the user. This can be achieved using the simple but common approach of showing recently selected items at the top. Note, that the "matching score" between the query and each search item still has precedence when determining the order. So the last used item is only at the top, if there is no other search item that matches the query better. Besides making the search generally faster to use, my hope is that this can also reduce the need for manually weighting search items in some places. This is because while the ordering might not be perfect the first time, it will always be once the user selected the element that should be at the top once. This patch includes: * Support for taking recent searches into account in string searching. * Keep track of a global list of recent searches. * Store recent searches on disk similar to recently opened files. * A new setting in the user preferences that allows disabling the functionality. This can be used if deterministic key strokes are required, e.g. for automated tests. In the future this could be improved in different ways: * Add some kind of separator in the search list to indicate which elements are at the top because they have been used recently. * Store the recent search items per search, instead of in a global list. This way it could adapt to the user even better. Pull Request: https://projects.blender.org/blender/blender/pulls/110828
130 lines
2.7 KiB
CMake
130 lines
2.7 KiB
CMake
# SPDX-FileCopyrightText: 2023 Blender Authors
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
set(INC
|
|
.
|
|
../include
|
|
../../asset_system
|
|
../../blenfont
|
|
../../blenkernel
|
|
../../blenloader
|
|
../../blentranslation
|
|
../../depsgraph
|
|
../../draw
|
|
../../functions
|
|
../../gpu
|
|
../../imbuf
|
|
../../makesrna
|
|
../../nodes
|
|
../../python
|
|
../../render
|
|
../../windowmanager
|
|
../../../../intern/ghost
|
|
../../../../extern/fmtlib/include
|
|
../../bmesh
|
|
# RNA_prototypes.h
|
|
${CMAKE_BINARY_DIR}/source/blender/makesrna
|
|
)
|
|
|
|
set(INC_SYS
|
|
)
|
|
|
|
set(SRC
|
|
eyedroppers/eyedropper_color.cc
|
|
eyedroppers/eyedropper_colorband.cc
|
|
eyedroppers/eyedropper_datablock.cc
|
|
eyedroppers/eyedropper_depth.cc
|
|
eyedroppers/eyedropper_driver.cc
|
|
eyedroppers/eyedropper_gpencil_color.cc
|
|
eyedroppers/interface_eyedropper.cc
|
|
interface.cc
|
|
interface_align.cc
|
|
interface_anim.cc
|
|
interface_button_group.cc
|
|
interface_context_menu.cc
|
|
interface_context_path.cc
|
|
interface_drag.cc
|
|
interface_draw.cc
|
|
interface_drop.cc
|
|
interface_dropboxes.cc
|
|
interface_handlers.cc
|
|
interface_icons.cc
|
|
interface_icons_event.cc
|
|
interface_layout.cc
|
|
interface_ops.cc
|
|
interface_panel.cc
|
|
interface_query.cc
|
|
interface_region_color_picker.cc
|
|
interface_region_hud.cc
|
|
interface_region_menu_pie.cc
|
|
interface_region_menu_popup.cc
|
|
interface_region_popover.cc
|
|
interface_region_popup.cc
|
|
interface_region_search.cc
|
|
interface_region_tooltip.cc
|
|
interface_regions.cc
|
|
interface_string_search.cc
|
|
interface_style.cc
|
|
interface_template_asset_view.cc
|
|
interface_template_attribute_search.cc
|
|
interface_template_grease_pencil_layer_tree.cc
|
|
interface_template_light_linking.cc
|
|
interface_template_list.cc
|
|
interface_template_node_tree_interface.cc
|
|
interface_template_search_menu.cc
|
|
interface_template_search_operator.cc
|
|
interface_templates.cc
|
|
interface_undo.cc
|
|
interface_utils.cc
|
|
interface_widgets.cc
|
|
resources.cc
|
|
view2d.cc
|
|
view2d_draw.cc
|
|
view2d_edge_pan.cc
|
|
view2d_gizmo_navigate.cc
|
|
view2d_ops.cc
|
|
views/abstract_view.cc
|
|
views/abstract_view_item.cc
|
|
views/grid_view.cc
|
|
views/interface_view.cc
|
|
views/tree_view.cc
|
|
|
|
eyedroppers/eyedropper_intern.hh
|
|
interface_intern.hh
|
|
interface_regions_intern.hh
|
|
view2d_intern.hh
|
|
)
|
|
|
|
set(LIB
|
|
bf_blenkernel
|
|
PRIVATE bf::blenlib
|
|
PRIVATE bf::dna
|
|
bf_editor_datafiles
|
|
PRIVATE bf::intern::guardedalloc
|
|
)
|
|
|
|
if(WITH_INTERNATIONAL)
|
|
add_definitions(-DWITH_INTERNATIONAL)
|
|
endif()
|
|
|
|
if(WITH_HEADLESS)
|
|
add_definitions(-DWITH_HEADLESS)
|
|
endif()
|
|
|
|
if(WITH_PYTHON)
|
|
add_definitions(-DWITH_PYTHON)
|
|
endif()
|
|
|
|
if(WIN32 OR APPLE)
|
|
if(WITH_INPUT_IME)
|
|
add_definitions(-DWITH_INPUT_IME)
|
|
endif()
|
|
endif()
|
|
|
|
|
|
blender_add_lib(bf_editor_interface "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
|
|
|
# RNA_prototypes.h
|
|
add_dependencies(bf_editor_interface bf_rna)
|