73c673a614
Also move GLTFDocumentExtension into the extensions folder
73 lines
3.1 KiB
XML
73 lines
3.1 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="GLTFDocumentExtension" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
|
<brief_description>
|
|
[GLTFDocument] extension class.
|
|
</brief_description>
|
|
<description>
|
|
Extends the functionality of the [GLTFDocument] class by allowing you to run arbitrary code at various stages of GLTF import or export.
|
|
To use, make a new class extending GLTFDocumentExtension, override any methods you need, make an instance of your class, and register it using [method GLTFDocument.register_gltf_document_extension].
|
|
[b]Note:[/b] Like GLTFDocument itself, all GLTFDocumentExtension classes must be stateless in order to function properly. If you need to store data, use the [code]set_additional_data[/code] and [code]get_additional_data[/code] methods in [GLTFState] or [GLTFNode].
|
|
</description>
|
|
<tutorials>
|
|
</tutorials>
|
|
<methods>
|
|
<method name="_export_node" qualifiers="virtual">
|
|
<return type="int" />
|
|
<param index="0" name="state" type="GLTFState" />
|
|
<param index="1" name="gltf_node" type="GLTFNode" />
|
|
<param index="2" name="json" type="Dictionary" />
|
|
<param index="3" name="node" type="Node" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="_export_post" qualifiers="virtual">
|
|
<return type="int" />
|
|
<param index="0" name="state" type="GLTFState" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="_export_preflight" qualifiers="virtual">
|
|
<return type="int" />
|
|
<param index="0" name="root" type="Node" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="_get_supported_extensions" qualifiers="virtual">
|
|
<return type="PackedStringArray" />
|
|
<description>
|
|
Returns an array of the GLTF extensions supported by this GLTFDocumentExtension class. This is used to validate if a GLTF file with required extensions can be loaded.
|
|
</description>
|
|
</method>
|
|
<method name="_import_node" qualifiers="virtual">
|
|
<return type="int" />
|
|
<param index="0" name="state" type="GLTFState" />
|
|
<param index="1" name="gltf_node" type="GLTFNode" />
|
|
<param index="2" name="json" type="Dictionary" />
|
|
<param index="3" name="node" type="Node" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="_import_post" qualifiers="virtual">
|
|
<return type="int" />
|
|
<param index="0" name="state" type="GLTFState" />
|
|
<param index="1" name="root" type="Node" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="_import_post_parse" qualifiers="virtual">
|
|
<return type="int" />
|
|
<param index="0" name="state" type="GLTFState" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="_import_preflight" qualifiers="virtual">
|
|
<return type="int" />
|
|
<param index="0" name="state" type="GLTFState" />
|
|
<param index="1" name="extensions" type="PackedStringArray" />
|
|
<description>
|
|
This callback is run first. It is used to determine if this GLTFDocumentExtension class should be used for importing a given GLTF file. If [constant OK], the import will use this GLTFDocumentExtension class.
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
</class>
|