Skip to content

Use fuzzy selection in more places #346

Open
@rcorre

Description

Describe the project you are working on:

Applies to any project.

Describe the problem or limitation you are having in your project:

Assigning a Resource to an exported field in the editor is tedious.
For example, suppose I want to assign the sound shield_break.wav to an AudioStreamPlayer. I have two options:

  1. Click stream > Load, and click through multiple folders until I find the sound I need.
  2. Type a string like shield_b in the FileSystem tab, then click-and-drag that file into to stream field.

I propose that clicking Load on any Resource field should show a fuzzy selector that shows only files of the appropriate type (e.g. wav/ogg for an AudioStream). There are 3 examples of such selectors in the editor already:

  1. The FileSystem tab:

1577914739

  1. The Call Method selector for an AnimationPlayer:

1577915203

  1. The "Quick Open Scene" selector:

1577915171

I think the 3rd has the best behavior (it can filter by a non-continuous string, e.g. "lats" will select "lab.tscn"), however the first might be the easiest to leverage as it is already designed for the filesystem.

(Maybe a future proposal is to use the same matching logic across all of these)

Describe how this feature / enhancement will help you overcome this problem or limitation:

It will make selecting resources easier as it requires less clicks than navigating through folders, and avoids the click-and-drag aspect of using the FileSystem tab.

Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:

  1. Click on [empty] and click load:

1577915642

  1. See one of the dialogs shown above, but filtered to files of the appropriate type
  2. Type into the search box, files are fuzzy-filtered
  3. Press Enter to select the file you want

Describe implementation detail for your proposal (in code), if possible:

When load is clicked, spawn one of the existing fuzzy selection dialogs populated with files of the correct type, then assign the result to the selected field.

If this enhancement will not be used often, can it be worked around with a few lines of script?:

It will be used often, and I don't see an easy way to script it.

Is there a reason why this should be core and not an add-on in the asset library?:

I believe it will provide a superior user experience for everyone.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions