2017-12-10 00:43:30 +01:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 10:08:05 +02:00
<class name= "EditorSceneFormatImporter" inherits= "RefCounted" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2017-12-10 00:43:30 +01:00
<brief_description >
2019-07-20 10:41:42 -03:00
Imports scenes from third-parties' 3D files.
2017-12-10 00:43:30 +01:00
</brief_description>
<description >
2021-10-15 14:30:58 +02:00
[EditorSceneFormatImporter] allows to define an importer script for a third-party 3D format.
To use [EditorSceneFormatImporter], register it using the [method EditorPlugin.add_scene_format_importer_plugin] method first.
2017-12-10 00:43:30 +01:00
</description>
<tutorials >
</tutorials>
<methods >
2025-06-25 22:24:07 +02:00
<method name= "_get_extensions" qualifiers= "virtual required const" >
2021-08-21 22:52:44 -03:00
<return type= "PackedStringArray" />
2017-12-10 00:43:30 +01:00
<description >
2024-12-24 02:49:01 -08:00
Return supported file extensions for this scene importer.
2017-12-10 00:43:30 +01:00
</description>
</method>
2021-11-14 14:02:38 -03:00
<method name= "_get_import_options" qualifiers= "virtual" >
<return type= "void" />
2022-08-06 21:11:48 +03:00
<param index= "0" name= "path" type= "String" />
2021-11-14 14:02:38 -03:00
<description >
2024-12-24 02:49:01 -08:00
Override to add general import options. These will appear in the main import dock on the editor. Add options via [method add_import_option] and [method add_import_option_advanced].
[b]Note:[/b] All [EditorSceneFormatImporter] and [EditorScenePostImportPlugin] instances will add options for all files. It is good practice to check the file extension when [param path] is non-empty.
When the user is editing project settings, [param path] will be empty. It is recommended to add all options when [param path] is empty to allow the user to customize Import Defaults.
2021-11-14 14:02:38 -03:00
</description>
</method>
<method name= "_get_option_visibility" qualifiers= "virtual const" >
<return type= "Variant" />
2022-08-06 21:11:48 +03:00
<param index= "0" name= "path" type= "String" />
<param index= "1" name= "for_animation" type= "bool" />
<param index= "2" name= "option" type= "String" />
2017-12-10 00:43:30 +01:00
<description >
2024-12-24 02:49:01 -08:00
Should return [code]true[/code] to show the given option, [code]false[/code] to hide the given option, or [code]null[/code] to ignore.
2017-12-10 00:43:30 +01:00
</description>
</method>
2025-06-25 22:24:07 +02:00
<method name= "_import_scene" qualifiers= "virtual required" >
2021-08-21 22:52:44 -03:00
<return type= "Object" />
2022-08-06 21:11:48 +03:00
<param index= "0" name= "path" type= "String" />
<param index= "1" name= "flags" type= "int" />
<param index= "2" name= "options" type= "Dictionary" />
2017-12-10 00:43:30 +01:00
<description >
2024-12-24 02:49:01 -08:00
Perform the bulk of the scene import logic here, for example using [GLTFDocument] or [FBXDocument].
</description>
</method>
<method name= "add_import_option" >
<return type= "void" />
<param index= "0" name= "name" type= "String" />
<param index= "1" name= "value" type= "Variant" />
<description >
Add a specific import option (name and default value only). This function can only be called from [method _get_import_options].
</description>
</method>
<method name= "add_import_option_advanced" >
<return type= "void" />
<param index= "0" name= "type" type= "int" enum= "Variant.Type" />
<param index= "1" name= "name" type= "String" />
<param index= "2" name= "default_value" type= "Variant" />
<param index= "3" name= "hint" type= "int" enum= "PropertyHint" default= "0" />
<param index= "4" name= "hint_string" type= "String" default= """" />
<param index= "5" name= "usage_flags" type= "int" default= "6" />
<description >
Add a specific import option. This function can only be called from [method _get_import_options].
2017-12-10 00:43:30 +01:00
</description>
</method>
</methods>
<constants >
<constant name= "IMPORT_SCENE" value= "1" >
</constant>
<constant name= "IMPORT_ANIMATION" value= "2" >
</constant>
2021-03-25 12:19:51 +01:00
<constant name= "IMPORT_FAIL_ON_MISSING_DEPENDENCIES" value= "4" >
2017-12-10 00:43:30 +01:00
</constant>
2021-03-25 12:19:51 +01:00
<constant name= "IMPORT_GENERATE_TANGENT_ARRAYS" value= "8" >
2017-12-10 00:43:30 +01:00
</constant>
2021-03-25 12:19:51 +01:00
<constant name= "IMPORT_USE_NAMED_SKIN_BINDS" value= "16" >
2017-12-10 00:43:30 +01:00
</constant>
2022-04-12 16:07:09 +02:00
<constant name= "IMPORT_DISCARD_MESHES_AND_MATERIALS" value= "32" >
</constant>
2023-08-29 21:04:32 +02:00
<constant name= "IMPORT_FORCE_DISABLE_MESH_COMPRESSION" value= "64" >
</constant>
2017-12-10 00:43:30 +01:00
</constants>
</class>