Debian Codegraph @

doc/classes/EditorSceneFormatImporter.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <class name="EditorSceneFormatImporter" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 Imports scenes from third-parties' 3D files.
5 </brief_description>
6 <description>
7 [EditorSceneFormatImporter] allows to define an importer script for a third-party 3D format.
8 To use [EditorSceneFormatImporter], register it using the [method EditorPlugin.add_scene_format_importer_plugin] method first.
9 </description>
10 <tutorials>
11 </tutorials>
12 <methods>
13 <method name="_get_extensions" qualifiers="virtual required const">
14 <return type="PackedStringArray" />
15 <description>
16 Return supported file extensions for this scene importer.
17 </description>
18 </method>
19 <method name="_get_import_options" qualifiers="virtual">
20 <return type="void" />
21 <param index="0" name="path" type="String" />
22 <description>
23 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].
24 [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.
25 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.
26 </description>
27 </method>
28 <method name="_get_option_visibility" qualifiers="virtual const">
29 <return type="Variant" />
30 <param index="0" name="path" type="String" />
31 <param index="1" name="for_animation" type="bool" />
32 <param index="2" name="option" type="String" />
33 <description>
34 Should return [code]true[/code] to show the given option, [code]false[/code] to hide the given option, or [code]null[/code] to ignore.
35 </description>
36 </method>
37 <method name="_import_scene" qualifiers="virtual required">
38 <return type="Object" />
39 <param index="0" name="path" type="String" />
40 <param index="1" name="flags" type="int" />
41 <param index="2" name="options" type="Dictionary" />
42 <description>
43 Perform the bulk of the scene import logic here, for example using [GLTFDocument] or [FBXDocument].
44 </description>
45 </method>
46 <method name="add_import_option">
47 <return type="void" />
48 <param index="0" name="name" type="String" />
49 <param index="1" name="value" type="Variant" />
50 <description>
51 Add a specific import option (name and default value only). This function can only be called from [method _get_import_options].
52 </description>
53 </method>
54 <method name="add_import_option_advanced">
55 <return type="void" />
56 <param index="0" name="type" type="int" enum="Variant.Type" />
57 <param index="1" name="name" type="String" />
58 <param index="2" name="default_value" type="Variant" />
59 <param index="3" name="hint" type="int" enum="PropertyHint" default="0" />
60 <param index="4" name="hint_string" type="String" default="&quot;&quot;" />
61 <param index="5" name="usage_flags" type="int" default="6" />
62 <description>
63 Add a specific import option. This function can only be called from [method _get_import_options].
64 </description>
65 </method>
66 </methods>
67 <constants>
68 <constant name="IMPORT_SCENE" value="1">
69 </constant>
70 <constant name="IMPORT_ANIMATION" value="2">
71 </constant>
72 <constant name="IMPORT_FAIL_ON_MISSING_DEPENDENCIES" value="4">
73 </constant>
74 <constant name="IMPORT_GENERATE_TANGENT_ARRAYS" value="8">
75 </constant>
76 <constant name="IMPORT_USE_NAMED_SKIN_BINDS" value="16">
77 </constant>
78 <constant name="IMPORT_DISCARD_MESHES_AND_MATERIALS" value="32">
79 </constant>
80 <constant name="IMPORT_FORCE_DISABLE_MESH_COMPRESSION" value="64">
81 </constant>
82 </constants>
83 </class>