summaryrefslogtreecommitdiff
path: root/doc/classes/EditorImportPlugin.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/EditorImportPlugin.xml')
-rw-r--r--doc/classes/EditorImportPlugin.xml12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index 0aac59c727..ea2dfae9a5 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -83,6 +83,16 @@
<argument index="1" name="options" type="Dictionary">
</argument>
<description>
+ This method can be overridden to hide specific import options if conditions are met. This is mainly useful for hiding options that depend on others if one of them is disabled. For example:
+ [codeblock]
+ func get_option_visibility(option, options):
+ # Only show the lossy quality setting if the compression mode is set to "Lossy".
+ if option == "compress/lossy_quality" and options.has("compress/mode"):
+ return int(options["compress/mode"]) == COMPRESS_LOSSY
+
+ return true
+ [/codeblock]
+ Return [code]true[/code] to make all options always visible.
</description>
</method>
<method name="get_preset_count" qualifiers="virtual">
@@ -150,6 +160,8 @@
<argument index="4" name="gen_files" type="Array">
</argument>
<description>
+ Imports [code]source_file[/code] into [code]save_path[/code] with the import [code]options[/code] specified. The [code]platform_variants[/code] and [code]gen_files[/code] arrays will be modified by this function.
+ This method must be overridden to do the actual importing work. See this class' description for an example of overriding this method.
</description>
</method>
</methods>