Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow defining descriptions in EditorImportPlugin::_get_import_options() #8398

Open
Flynsarmy opened this issue Nov 11, 2023 · 2 comments
Open

Comments

@Flynsarmy
Copy link

Describe the project you are working on

A CSV to Resource importer. I have a CSV of data and an EditorImportPlugin addon that lets me map the CSV columns to fields on a custom resource for one-click mass import. Basically the CSV Translation importer but for custom resources.

Describe the problem or limitation you are having in your project

My EditorImportPlugin defines multiple options the user can change depending on the format of the CSV, however it does not allow defining descriptions for those columns:
image

A first time user would have no clue what some columns do or how they work. The ability to define helpful descriptions is essential for ease of use of editor tooling.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

EditorImportPlugin::_get_import_options() currently returns an array of Dictionaries with 5 poorly documented keys:
name, default_value, property_hint (optional), hint_string (optional), usage (optional)

I suggest adding support for a description key which, when used, fills the description field in the tooltip of your import option.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Here's an example of what the description field cool look like:

func _get_import_options(_path, preset):
	return [
		{
			name="resource_name_column",
			description="The 0-based CSV column number that will be used to generate sluggified resource file names upon import.",
			default_value=0,
		},
	]

image

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

I don't believe this can currently be worked around as per this comment.

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

N/A

@Calinou
Copy link
Member

Calinou commented Nov 12, 2023

@jitspoe
Copy link

jitspoe commented Oct 23, 2024

This would be nice. We can simply add a ## Comment above @export values to get tooltip descriptions, but it seems there is no way to do this for importer options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants