mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
dync classref with current source
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
EditorImportPlugin
|
||||
==================
|
||||
|
||||
**Inherits:** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
||||
**Inherits:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
**Category:** Core
|
||||
|
||||
@@ -50,7 +50,7 @@ Description
|
||||
|
||||
EditorImportPlugins provide a way to extend the editor's resource import functionality. Use them to import resources from custom files or to provide alternatives to the editor's existing importers. Register your :ref:`EditorPlugin<class_EditorPlugin>` with :ref:`EditorPlugin.add_import_plugin<class_EditorPlugin_method_add_import_plugin>`.
|
||||
|
||||
EditorImportPlugins work by associating with specific file extensions and a resource type. See :ref:`get_recognized_extensions<class_EditorImportPlugin_method_get_recognized_extensions>` and :ref:`get_resource_type<class_EditorImportPlugin_method_get_resource_type>`). They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the ``.import`` directory.
|
||||
EditorImportPlugins work by associating with specific file extensions and a resource type. See :ref:`get_recognized_extensions<class_EditorImportPlugin_method_get_recognized_extensions>` and :ref:`get_resource_type<class_EditorImportPlugin_method_get_resource_type>`. They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the ``.import`` directory.
|
||||
|
||||
Below is an example EditorImportPlugin that imports a :ref:`Mesh<class_Mesh>` from a file with the extension ".special" or ".spec":
|
||||
|
||||
@@ -89,7 +89,7 @@ Below is an example EditorImportPlugin that imports a :ref:`Mesh<class_Mesh>` fr
|
||||
return FAILED
|
||||
|
||||
var mesh = Mesh.new()
|
||||
# Fill the Mesh with data read in 'file', left as exercise to the reader
|
||||
# Fill the Mesh with data read in "file", left as an exercise to the reader
|
||||
|
||||
var filename = save_path + "." + get_save_extension()
|
||||
ResourceSaver.save(filename, mesh)
|
||||
@@ -107,19 +107,19 @@ Method Descriptions
|
||||
|
||||
- :ref:`Array<class_Array>` **get_import_options** **(** :ref:`int<class_int>` preset **)** virtual
|
||||
|
||||
Get the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: ``name``, ``default_value``, ``property_hint`` (optional), ``hint_string`` (optional), ``usage`` (optional).
|
||||
Gets the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: ``name``, ``default_value``, ``property_hint`` (optional), ``hint_string`` (optional), ``usage`` (optional).
|
||||
|
||||
.. _class_EditorImportPlugin_method_get_import_order:
|
||||
|
||||
- :ref:`int<class_int>` **get_import_order** **(** **)** virtual
|
||||
|
||||
Get the order of this importer to be run when importing resources. Higher values will be called later. Use this to ensure the importer runs after the dependencies are already imported.
|
||||
Gets the order of this importer to be run when importing resources. Higher values will be called later. Use this to ensure the importer runs after the dependencies are already imported.
|
||||
|
||||
.. _class_EditorImportPlugin_method_get_importer_name:
|
||||
|
||||
- :ref:`String<class_String>` **get_importer_name** **(** **)** virtual
|
||||
|
||||
Get the unique name of the importer.
|
||||
Gets the unique name of the importer.
|
||||
|
||||
.. _class_EditorImportPlugin_method_get_option_visibility:
|
||||
|
||||
@@ -129,43 +129,43 @@ Get the unique name of the importer.
|
||||
|
||||
- :ref:`int<class_int>` **get_preset_count** **(** **)** virtual
|
||||
|
||||
Get the number of initial presets defined by the plugin. Use :ref:`get_import_options<class_EditorImportPlugin_method_get_import_options>` to get the default options for the preset and :ref:`get_preset_name<class_EditorImportPlugin_method_get_preset_name>` to get the name of the preset.
|
||||
Gets the number of initial presets defined by the plugin. Use :ref:`get_import_options<class_EditorImportPlugin_method_get_import_options>` to get the default options for the preset and :ref:`get_preset_name<class_EditorImportPlugin_method_get_preset_name>` to get the name of the preset.
|
||||
|
||||
.. _class_EditorImportPlugin_method_get_preset_name:
|
||||
|
||||
- :ref:`String<class_String>` **get_preset_name** **(** :ref:`int<class_int>` preset **)** virtual
|
||||
|
||||
Get the name of the options preset at this index.
|
||||
Gets the name of the options preset at this index.
|
||||
|
||||
.. _class_EditorImportPlugin_method_get_priority:
|
||||
|
||||
- :ref:`float<class_float>` **get_priority** **(** **)** virtual
|
||||
|
||||
Get the priority of this plugin for the recognized extension. Higher priority plugins will be preferred. Default value is 1.0.
|
||||
Gets the priority of this plugin for the recognized extension. Higher priority plugins will be preferred. Default value is 1.0.
|
||||
|
||||
.. _class_EditorImportPlugin_method_get_recognized_extensions:
|
||||
|
||||
- :ref:`Array<class_Array>` **get_recognized_extensions** **(** **)** virtual
|
||||
|
||||
Get the list of file extensions to associate with this loader (case insensitive). e.g. ``["obj"]``.
|
||||
Gets the list of file extensions to associate with this loader (case-insensitive). e.g. ``["obj"]``.
|
||||
|
||||
.. _class_EditorImportPlugin_method_get_resource_type:
|
||||
|
||||
- :ref:`String<class_String>` **get_resource_type** **(** **)** virtual
|
||||
|
||||
Get the Godot resource type associated with this loader. e.g. ``"Mesh"`` or ``"Animation"``.
|
||||
Gets the Godot resource type associated with this loader. e.g. ``"Mesh"`` or ``"Animation"``.
|
||||
|
||||
.. _class_EditorImportPlugin_method_get_save_extension:
|
||||
|
||||
- :ref:`String<class_String>` **get_save_extension** **(** **)** virtual
|
||||
|
||||
Get the extension used to save this resource in the ``.import`` directory.
|
||||
Gets the extension used to save this resource in the ``.import`` directory.
|
||||
|
||||
.. _class_EditorImportPlugin_method_get_visible_name:
|
||||
|
||||
- :ref:`String<class_String>` **get_visible_name** **(** **)** virtual
|
||||
|
||||
Get the name to display in the import window.
|
||||
Gets the name to display in the import window.
|
||||
|
||||
.. _class_EditorImportPlugin_method_import:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user