| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="EditorScenePostImportPlugin" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> |
| 3 | <brief_description> |
| 4 | Plugin to control and modifying the process of importing a scene. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | This plugin type exists to modify the process of importing scenes, allowing to change the content as well as add importer options at every stage of the process. |
| 8 | </description> |
| 9 | <tutorials> |
| 10 | </tutorials> |
| 11 | <methods> |
| 12 | <method name="_get_import_options" qualifiers="virtual"> |
| 13 | <return type="void" /> |
| 14 | <param index="0" name="path" type="String" /> |
| 15 | <description> |
| 16 | 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]. |
| 17 | </description> |
| 18 | </method> |
| 19 | <method name="_get_internal_import_options" qualifiers="virtual"> |
| 20 | <return type="void" /> |
| 21 | <param index="0" name="category" type="int" /> |
| 22 | <description> |
| 23 | Override to add internal import options. These will appear in the 3D scene import dialog. Add options via [method add_import_option] and [method add_import_option_advanced]. |
| 24 | </description> |
| 25 | </method> |
| 26 | <method name="_get_internal_option_update_view_required" qualifiers="virtual const"> |
| 27 | <return type="Variant" /> |
| 28 | <param index="0" name="category" type="int" /> |
| 29 | <param index="1" name="option" type="String" /> |
| 30 | <description> |
| 31 | Should return [code]true[/code] if the 3D view of the import dialog needs to update when changing the given option. |
| 32 | </description> |
| 33 | </method> |
| 34 | <method name="_get_internal_option_visibility" qualifiers="virtual const"> |
| 35 | <return type="Variant" /> |
| 36 | <param index="0" name="category" type="int" /> |
| 37 | <param index="1" name="for_animation" type="bool" /> |
| 38 | <param index="2" name="option" type="String" /> |
| 39 | <description> |
| 40 | Should return [code]true[/code] to show the given option, [code]false[/code] to hide the given option, or [code]null[/code] to ignore. |
| 41 | </description> |
| 42 | </method> |
| 43 | <method name="_get_option_visibility" qualifiers="virtual const"> |
| 44 | <return type="Variant" /> |
| 45 | <param index="0" name="path" type="String" /> |
| 46 | <param index="1" name="for_animation" type="bool" /> |
| 47 | <param index="2" name="option" type="String" /> |
| 48 | <description> |
| 49 | Should return [code]true[/code] to show the given option, [code]false[/code] to hide the given option, or [code]null[/code] to ignore. |
| 50 | </description> |
| 51 | </method> |
| 52 | <method name="_internal_process" qualifiers="virtual"> |
| 53 | <return type="void" /> |
| 54 | <param index="0" name="category" type="int" /> |
| 55 | <param index="1" name="base_node" type="Node" /> |
| 56 | <param index="2" name="node" type="Node" /> |
| 57 | <param index="3" name="resource" type="Resource" /> |
| 58 | <description> |
| 59 | Process a specific node or resource for a given category. |
| 60 | </description> |
| 61 | </method> |
| 62 | <method name="_post_process" qualifiers="virtual"> |
| 63 | <return type="void" /> |
| 64 | <param index="0" name="scene" type="Node" /> |
| 65 | <description> |
| 66 | Post-process the scene. This function is called after the final scene has been configured. |
| 67 | </description> |
| 68 | </method> |
| 69 | <method name="_pre_process" qualifiers="virtual"> |
| 70 | <return type="void" /> |
| 71 | <param index="0" name="scene" type="Node" /> |
| 72 | <description> |
| 73 | Pre-process the scene. This function is called right after the scene format loader loaded the scene and no changes have been made. |
| 74 | Pre-process may be used to adjust internal import options in the [code]"nodes"[/code], [code]"meshes"[/code], [code]"animations"[/code] or [code]"materials"[/code] keys inside [code]get_option_value("_subresources")[/code]. |
| 75 | </description> |
| 76 | </method> |
| 77 | <method name="add_import_option"> |
| 78 | <return type="void" /> |
| 79 | <param index="0" name="name" type="String" /> |
| 80 | <param index="1" name="value" type="Variant" /> |
| 81 | <description> |
| 82 | Add a specific import option (name and default value only). This function can only be called from [method _get_import_options] and [method _get_internal_import_options]. |
| 83 | </description> |
| 84 | </method> |
| 85 | <method name="add_import_option_advanced"> |
| 86 | <return type="void" /> |
| 87 | <param index="0" name="type" type="int" enum="Variant.Type" /> |
| 88 | <param index="1" name="name" type="String" /> |
| 89 | <param index="2" name="default_value" type="Variant" /> |
| 90 | <param index="3" name="hint" type="int" enum="PropertyHint" default="0" /> |
| 91 | <param index="4" name="hint_string" type="String" default="""" /> |
| 92 | <param index="5" name="usage_flags" type="int" default="6" /> |
| 93 | <description> |
| 94 | Add a specific import option. This function can only be called from [method _get_import_options] and [method _get_internal_import_options]. |
| 95 | </description> |
| 96 | </method> |
| 97 | <method name="get_option_value" qualifiers="const"> |
| 98 | <return type="Variant" /> |
| 99 | <param index="0" name="name" type="StringName" /> |
| 100 | <description> |
| 101 | Query the value of an option. This function can only be called from those querying visibility, or processing. |
| 102 | </description> |
| 103 | </method> |
| 104 | </methods> |
| 105 | <constants> |
| 106 | <constant name="INTERNAL_IMPORT_CATEGORY_NODE" value="0" enum="InternalImportCategory"> |
| 107 | </constant> |
| 108 | <constant name="INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE" value="1" enum="InternalImportCategory"> |
| 109 | </constant> |
| 110 | <constant name="INTERNAL_IMPORT_CATEGORY_MESH" value="2" enum="InternalImportCategory"> |
| 111 | </constant> |
| 112 | <constant name="INTERNAL_IMPORT_CATEGORY_MATERIAL" value="3" enum="InternalImportCategory"> |
| 113 | </constant> |
| 114 | <constant name="INTERNAL_IMPORT_CATEGORY_ANIMATION" value="4" enum="InternalImportCategory"> |
| 115 | </constant> |
| 116 | <constant name="INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE" value="5" enum="InternalImportCategory"> |
| 117 | </constant> |
| 118 | <constant name="INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE" value="6" enum="InternalImportCategory"> |
| 119 | </constant> |
| 120 | <constant name="INTERNAL_IMPORT_CATEGORY_MAX" value="7" enum="InternalImportCategory"> |
| 121 | </constant> |
| 122 | </constants> |
| 123 | </class> |