diff options
author | reduz <reduzio@gmail.com> | 2021-11-14 14:02:38 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2021-11-14 14:06:10 -0300 |
commit | cd2a4990844fac72ae624a51bb797716e69ce2c3 (patch) | |
tree | 4f6461c676d35ac1974a6c28fedf88d7008741f4 /doc | |
parent | ed300d7be536b1ec325ba77521eceee73dd0e5fb (diff) |
Add path to functions that return iporter options
-Allows displaying custom options for specific file format variants
-Added support for scene format import to retrieve custom options
This PR is necessary for #54886 to be implemented properly.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/EditorImportPlugin.xml | 8 | ||||
-rw-r--r-- | doc/classes/EditorSceneFormatImporter.xml | 13 | ||||
-rw-r--r-- | doc/classes/EditorScenePostImportPlugin.xml | 4 |
3 files changed, 21 insertions, 4 deletions
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index cb33f159ef..28f4c65384 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -116,7 +116,8 @@ <methods> <method name="_get_import_options" qualifiers="virtual const"> <return type="Array" /> - <argument index="0" name="preset_index" type="int" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="preset_index" type="int" /> <description> Gets the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: [code]name[/code], [code]default_value[/code], [code]property_hint[/code] (optional), [code]hint_string[/code] (optional), [code]usage[/code] (optional). </description> @@ -135,8 +136,9 @@ </method> <method name="_get_option_visibility" qualifiers="virtual const"> <return type="bool" /> - <argument index="0" name="option_name" type="StringName" /> - <argument index="1" name="options" type="Dictionary" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="option_name" type="StringName" /> + <argument index="2" name="options" type="Dictionary" /> <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: [codeblocks] diff --git a/doc/classes/EditorSceneFormatImporter.xml b/doc/classes/EditorSceneFormatImporter.xml index 6dbd80604e..5b5d6c4598 100644 --- a/doc/classes/EditorSceneFormatImporter.xml +++ b/doc/classes/EditorSceneFormatImporter.xml @@ -20,6 +20,19 @@ <description> </description> </method> + <method name="_get_import_options" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="path" type="String" /> + <description> + </description> + </method> + <method name="_get_option_visibility" qualifiers="virtual const"> + <return type="Variant" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="option" type="String" /> + <description> + </description> + </method> <method name="_import_animation" qualifiers="virtual"> <return type="Animation" /> <argument index="0" name="path" type="String" /> diff --git a/doc/classes/EditorScenePostImportPlugin.xml b/doc/classes/EditorScenePostImportPlugin.xml index 07d8fa28b9..904b22d9d3 100644 --- a/doc/classes/EditorScenePostImportPlugin.xml +++ b/doc/classes/EditorScenePostImportPlugin.xml @@ -11,6 +11,7 @@ <methods> <method name="_get_import_options" qualifiers="virtual"> <return type="void" /> + <argument index="0" name="path" type="String" /> <description> 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]. </description> @@ -40,7 +41,8 @@ </method> <method name="_get_option_visibility" qualifiers="virtual const"> <return type="Variant" /> - <argument index="0" name="option" type="String" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="option" type="String" /> <description> Return true or false whether a given option should be visible. Return null to ignore. </description> |