0 votes

I can't figure out what the optional parameters given in this function do: http://docs.godotengine.org/en/latest/classes/class_editorimportplugin.html#class-editorimportplugin-get-import-options

The docs don't really explain any of them.
The only one that has any visible effect at all is the usage key, which completely removes the option from the menu when set to any string.

Namely, I'm trying to figure out how to give each property a tooltip for when the user hovers over them for more information (neither hint_string nor usage do this), as well as how to change the type of one property to become an image-flags selector, like the ones built into Godot, so the user can choose different flags as they need them.

Below is my current get_import_options just as an example, the commented-out portions are me changing values to try and find which does what.

func get_import_options(preset):
var options =  [
        {
            name = "post_script",
            default_value = "",
            #hint_string = "Post-Import Script",
            #usage = "A script to run and tweak the generated scene. Calls post_import(scene) on the script, post_import() has to return the changed scene. (optional)",
        },
        {
            name = "custom_properties",
            default_value = true,
            #hint_string = "Custom properties",
            #usage = "Whether to import custom properties as meta data.",
        },
        {
            name = "single_tileset",
            default_value = true,
            #hint_string = "Single TileSet",
            #usage = "Mix all Tiled TileSets into a single Godot resource. Needed if your layers uses more than one tileset each.",
        },
        {
            name = "embed",
            default_value = false,
            #hint_string = "Embed resources",
            #usage = "Save the resources (images, tilesets) embedded in the scene, as opposed to saving as external files.",
        },
        (etc..)
    ]

    return options
asked Nov 5 in Engine by leod (25 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.