Class reference
EditorSceneFormatImporter
Inherits RefCounted
Imports scenes from third-parties' 3D files.
Description
EditorSceneFormatImporter allows to define an importer script for a third-party 3D format. To use EditorSceneFormatImporter, register it using the EditorPlugin.add_scene_format_importer_plugin() method first.
Methods
PackedStringArray _get_extensions() virtual const
PackedStringArray _get_extensions() virtual constReturn supported file extensions for this scene importer.
void _get_import_options(String path) virtual
String path) virtualOverride to add general import options. These will appear in the main import dock on the editor. Add options via add_import_option() and add_import_option_advanced(). Note: All EditorSceneFormatImporter and EditorScenePostImportPlugin instances will add options for all files. It is good practice to check the file extension when path is non-empty. When the user is editing project settings, path will be empty. It is recommended to add all options when path is empty to allow the user to customize Import Defaults.
Variant _get_option_visibility(String path, bool for_animation, String option) virtual const
Variant _get_option_visibility(String path, bool for_animation, String option) virtual constShould return true to show the given option, false to hide the given option, or null to ignore.
Object _import_scene(String path, int flags, Dictionary options) virtual
Object _import_scene(String path, int flags, Dictionary options) virtualPerform the bulk of the scene import logic here, for example using GLTFDocument or FBXDocument.
void add_import_option(String name, Variant value)
String name, Variant value)Add a specific import option (name and default value only). This function can only be called from _get_import_options().
void add_import_option_advanced(int type, String name, Variant default_value, int hint = 0, String hint_string = "", int usage_flags = 6)
int type, String name, Variant default_value, int hint = 0, String hint_string = "", int usage_flags = 6)Add a specific import option. This function can only be called from _get_import_options().