diff options
author | Hans Goudey <h.goudey@me.com> | 2021-12-13 22:57:55 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-12-13 22:58:30 +0300 |
commit | 0606adceb3b6efa020c7389bdb31fe541b7d1d5f (patch) | |
tree | f61b37c6f495c8e5643e1ee4a3fd5803e2b1d4fc /source/blender/editors/space_node | |
parent | a90c3564676649aa4a0b74112c852a75de6d3521 (diff) |
UI: String Search: Add an optional weight parameter
This builds off of rBf951aa063f7, adding a weight parameter which can
be used to change the order of items when they have the same match
score. In the future, if string searching gets a C++ API, we could
use an optional parameter for the weight, since it is not used yet.
This will be used for the node link drag search menu (D8286).
Differential Revision: https://developer.blender.org/D13559
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/node_select.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_select.cc b/source/blender/editors/space_node/node_select.cc index 0439f773866..334ca1f76ee 100644 --- a/source/blender/editors/space_node/node_select.cc +++ b/source/blender/editors/space_node/node_select.cc @@ -1204,7 +1204,7 @@ static void node_find_update_fn(const struct bContext *C, LISTBASE_FOREACH (bNode *, node, &snode->edittree->nodes) { char name[256]; node_find_create_label(node, name, ARRAY_SIZE(name)); - BLI_string_search_add(search, name, node); + BLI_string_search_add(search, name, node, 0); } bNode **filtered_nodes; |