EditorScenePostImportPlugin
Plugin to control and modifying the process of importing a scene.
Plugin to control and modifying the process of importing a scene.
This plugin type exists to modify the process of importing scenes, allowing to change the content as well as add importer options at every stage of the process.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
EditorScenePostImportPluginConstructor
public EditorScenePostImportPlugin();Methods11
AddImportOptionvoid
public void AddImportOption(string name, Variant value);Add a specific import option (name and default value only). This function can only be called from EditorScenePostImportPlugin._GetImportOptions and EditorScenePostImportPlugin._GetInternalImportOptions.
| Name | Type | Default |
|---|---|---|
name | string | — |
value | Variant | — |
AddImportOptionAdvancedvoid
public void AddImportOptionAdvanced(Variant.Type type, string name, Variant defaultValue, PropertyHint hint = PropertyHint.None, string hintString = "", int usageFlags = 6);Add a specific import option. This function can only be called from EditorScenePostImportPlugin._GetImportOptions and EditorScenePostImportPlugin._GetInternalImportOptions.
| Name | Type | Default |
|---|---|---|
type | Variant.Type | — |
name | string | — |
defaultValue | Variant | — |
hint | PropertyHint | PropertyHint.None |
hintString | string | "" |
usageFlags | int | 6 |
GetOptionValueVariant
public Variant GetOptionValue(StringName name);Query the value of an option. This function can only be called from those querying visibility, or processing.
| Name | Type | Default |
|---|---|---|
name | StringName | — |
Variant_GetImportOptionsvoid
public virtual void _GetImportOptions(string path);Override to add general import options. These will appear in the main import dock on the editor. Add options via EditorScenePostImportPlugin.AddImportOption and EditorScenePostImportPlugin.AddImportOptionAdvanced.
| Name | Type | Default |
|---|---|---|
path | string | — |
_GetInternalImportOptionsvoid
public virtual void _GetInternalImportOptions(int category);Override to add internal import options. These will appear in the 3D scene import dialog. Add options via EditorScenePostImportPlugin.AddImportOption and EditorScenePostImportPlugin.AddImportOptionAdvanced.
| Name | Type | Default |
|---|---|---|
category | int | — |
_GetInternalOptionUpdateViewRequiredVariant
public virtual Variant _GetInternalOptionUpdateViewRequired(int category, string option);Should return true if the 3D view of the import dialog needs to update when changing the given option.
| Name | Type | Default |
|---|---|---|
category | int | — |
option | string | — |
Variant_GetInternalOptionVisibilityVariant
public virtual Variant _GetInternalOptionVisibility(int category, bool forAnimation, string option);Should return true to show the given option, false to hide the given option, or null to ignore.
| Name | Type | Default |
|---|---|---|
category | int | — |
forAnimation | bool | — |
option | string | — |
Variant_GetOptionVisibilityVariant
public virtual Variant _GetOptionVisibility(string path, bool forAnimation, string option);Should return true to show the given option, false to hide the given option, or null to ignore.
| Name | Type | Default |
|---|---|---|
path | string | — |
forAnimation | bool | — |
option | string | — |
Variant_InternalProcessvoid
public virtual void _InternalProcess(int category, Entity baseNode, Entity node, Resource resource);Process a specific node or resource for a given category.
| Name | Type | Default |
|---|---|---|
category | int | — |
baseNode | Entity | — |
node | Entity | — |
resource | Resource | — |
_PostProcessvoid
public virtual void _PostProcess(Entity scene);Post-process the scene. This function is called after the final scene has been configured.
| Name | Type | Default |
|---|---|---|
scene | Entity | — |
_PreProcessvoid
public virtual void _PreProcess(Entity scene);Pre-process the scene. This function is called right after the scene format loader loaded the scene and no changes have been made.
Pre-process may be used to adjust internal import options in the "nodes", "meshes", "animations" or "materials" keys inside get_option_value("_subresources").
| Name | Type | Default |
|---|---|---|
scene | Entity | — |