diff --git a/editor_modules/gltf/doc_classes/GLTFDocumentExtension.xml b/editor_modules/gltf/doc_classes/GLTFDocumentExtension.xml index 8f3abc8c0..9e3e72995 100644 --- a/editor_modules/gltf/doc_classes/GLTFDocumentExtension.xml +++ b/editor_modules/gltf/doc_classes/GLTFDocumentExtension.xml @@ -12,9 +12,9 @@ - - - + + + Part of the export process. This method is run after [method _export_preflight] and before [method _export_node]. Runs when converting the data from a Godot scene node. This method can be used to process the Godot scene node data into a format that can be used by [method _export_node]. @@ -22,10 +22,10 @@ - - + + - + Part of the export process. This method is run after [method _convert_scene_node] and before [method _export_post]. This method can be used to modify the final JSON of each node. @@ -33,7 +33,7 @@ - + Part of the export process. This method is run last, after all other parts of the export process. This method can be used to modify the final JSON of the generated GLTF file. @@ -41,8 +41,8 @@ - - + + Part of the export process. This method is run first, before all other parts of the export process. The return value is used to determine if this [GLTFDocumentExtension] instance should be used for exporting a given GLTF file. If [constant OK], the export will use this [GLTFDocumentExtension] instance. If not overridden, [constant OK] is returned. @@ -50,9 +50,9 @@ - - - + + + Part of the import process. This method is run after [method _parse_node_extensions] and before [method _import_post_parse]. Runs when generating a Godot scene node from a GLTFNode. The returned node will be added to the scene tree. Multiple nodes can be generated in this step if they are added as a child of the returned node. @@ -67,10 +67,10 @@ - - + + - + Part of the import process. This method is run after [method _import_post_parse] and before [method _import_post]. This method can be used to make modifications to each of the generated Godot scene nodes. @@ -78,8 +78,8 @@ - - + + Part of the import process. This method is run last, after all other parts of the import process. This method can be used to modify the final Godot scene generated by the import process. @@ -87,7 +87,7 @@ - + Part of the import process. This method is run after [method _generate_scene_node] and before [method _import_node]. This method can be used to modify any of the data imported so far, including any scene nodes, before running the final per-node import step. @@ -95,7 +95,7 @@ - + Part of the import process. This method is run first, before all other parts of the import process. @@ -104,8 +104,8 @@ - - + + Part of the import process. This method is run after [method _get_supported_extensions] and before [method _generate_scene_node]. diff --git a/editor_modules/gltf/extensions/gltf_document_extension.cpp b/editor_modules/gltf/extensions/gltf_document_extension.cpp index 478f47b4c..b399a517e 100644 --- a/editor_modules/gltf/extensions/gltf_document_extension.cpp +++ b/editor_modules/gltf/extensions/gltf_document_extension.cpp @@ -36,18 +36,18 @@ void GLTFDocumentExtension::_bind_methods() { // Import process. - BIND_VMETHOD(MethodInfo(Variant::INT, "_import_preflight", PropertyInfo(Variant::OBJECT, "state"), PropertyInfo(Variant::POOL_STRING_ARRAY, "extensions"))); + BIND_VMETHOD(MethodInfo(Variant::INT, "_import_preflight", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "GLTFState"), PropertyInfo(Variant::POOL_STRING_ARRAY, "extensions"))); BIND_VMETHOD(MethodInfo(Variant::ARRAY, "_get_supported_extensions")); - BIND_VMETHOD(MethodInfo(Variant::INT, "_parse_node_extensions", PropertyInfo(Variant::OBJECT, "state"), PropertyInfo(Variant::OBJECT, "gltf_node"), PropertyInfo(Variant::DICTIONARY, "extensions"))); - BIND_VMETHOD(MethodInfo(Variant::OBJECT, "_generate_scene_node", PropertyInfo(Variant::OBJECT, "state"), PropertyInfo(Variant::OBJECT, "gltf_node"), PropertyInfo(Variant::OBJECT, "scene_parent"))); - BIND_VMETHOD(MethodInfo(Variant::INT, "_import_post_parse", PropertyInfo(Variant::OBJECT, "state"))); - BIND_VMETHOD(MethodInfo(Variant::INT, "_import_node", PropertyInfo(Variant::OBJECT, "state"), PropertyInfo(Variant::OBJECT, "gltf_node"), PropertyInfo(Variant::DICTIONARY, "json"), PropertyInfo(Variant::OBJECT, "node"))); - BIND_VMETHOD(MethodInfo(Variant::INT, "_import_post", PropertyInfo(Variant::OBJECT, "state"), PropertyInfo(Variant::OBJECT, "root"))); + BIND_VMETHOD(MethodInfo(Variant::INT, "_parse_node_extensions", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "GLTFState"), PropertyInfo(Variant::OBJECT, "gltf_node", PROPERTY_HINT_RESOURCE_TYPE, "GLTFNode"), PropertyInfo(Variant::DICTIONARY, "extensions"))); + BIND_VMETHOD(MethodInfo(Variant::OBJECT, "_generate_scene_node", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "GLTFState"), PropertyInfo(Variant::OBJECT, "gltf_node", PROPERTY_HINT_RESOURCE_TYPE, "GLTFNode"), PropertyInfo(Variant::OBJECT, "scene_parent", PROPERTY_HINT_RESOURCE_TYPE, "Node"))); + BIND_VMETHOD(MethodInfo(Variant::INT, "_import_post_parse", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "GLTFState"))); + BIND_VMETHOD(MethodInfo(Variant::INT, "_import_node", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "GLTFState"), PropertyInfo(Variant::OBJECT, "gltf_node", PROPERTY_HINT_RESOURCE_TYPE, "GLTFNode"), PropertyInfo(Variant::DICTIONARY, "json"), PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node"))); + BIND_VMETHOD(MethodInfo(Variant::INT, "_import_post", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "GLTFState"), PropertyInfo(Variant::OBJECT, "root", PROPERTY_HINT_RESOURCE_TYPE, "Node"))); // Export process. - BIND_VMETHOD(MethodInfo(Variant::INT, "_export_preflight", PropertyInfo(Variant::OBJECT, "state"), PropertyInfo(Variant::OBJECT, "root"))); - BIND_VMETHOD(MethodInfo("_convert_scene_node", PropertyInfo(Variant::OBJECT, "state"), PropertyInfo(Variant::OBJECT, "gltf_node"), PropertyInfo(Variant::OBJECT, "scene_node"))); - BIND_VMETHOD(MethodInfo(Variant::INT, "_export_node", PropertyInfo(Variant::OBJECT, "state"), PropertyInfo(Variant::OBJECT, "gltf_node"), PropertyInfo(Variant::DICTIONARY, "json"), PropertyInfo(Variant::OBJECT, "node"))); - BIND_VMETHOD(MethodInfo(Variant::INT, "_export_post", PropertyInfo(Variant::OBJECT, "state"))); + BIND_VMETHOD(MethodInfo(Variant::INT, "_export_preflight", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "GLTFState"), PropertyInfo(Variant::OBJECT, "root", PROPERTY_HINT_RESOURCE_TYPE, "Node"))); + BIND_VMETHOD(MethodInfo("_convert_scene_node", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "GLTFState"), PropertyInfo(Variant::OBJECT, "gltf_node", PROPERTY_HINT_RESOURCE_TYPE, "GLTFNode"), PropertyInfo(Variant::OBJECT, "scene_node", PROPERTY_HINT_RESOURCE_TYPE, "Node"))); + BIND_VMETHOD(MethodInfo(Variant::INT, "_export_node", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "GLTFState"), PropertyInfo(Variant::OBJECT, "gltf_node", PROPERTY_HINT_RESOURCE_TYPE, "GLTFNode"), PropertyInfo(Variant::DICTIONARY, "json"), PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node"))); + BIND_VMETHOD(MethodInfo(Variant::INT, "_export_post", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "GLTFState"))); } // Import process.