EditorScenePostImportPlugin
Inherits: RefCounted < Object
Description
Section titled “Description”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.
Methods
Section titled “Methods”| Returns | Method |
|---|---|
| void | _get_import_options(path: String) virtual |
| void | _get_internal_import_options(category: int) virtual |
| Variant | _get_internal_option_update_view_required(category: int, option: String) virtual const |
| Variant | _get_internal_option_visibility(category: int, for_animation: bool, option: String) virtual const |
| Variant | _get_option_visibility(path: String, for_animation: bool, option: String) virtual const |
| void | _internal_process(category: int, base_node: Entity, node: Entity, resource: Resource) virtual |
| void | _post_process(scene: Entity) virtual |
| void | _pre_process(scene: Entity) virtual |
| void | add_import_option(name: String, value: Variant) |
| void | add_import_option_advanced(type: Variant.Type, name: String, default_value: Variant, hint: PropertyHint = 0, hint_string: String = "", usage_flags: int = 6) |
| Variant | get_option_value(name: StringName) const |
Enumerations
Section titled “Enumerations”InternalImportCategory
enum InternalImportCategory
INTERNAL_IMPORT_CATEGORY_NODE = 0
INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE = 1
INTERNAL_IMPORT_CATEGORY_MESH = 2
INTERNAL_IMPORT_CATEGORY_MATERIAL = 3
INTERNAL_IMPORT_CATEGORY_ANIMATION = 4
INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE = 5
INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE = 6
INTERNAL_IMPORT_CATEGORY_MAX = 7
Method descriptions
Section titled “Method descriptions”_get_import_options
void _get_import_options(path: String) virtual
Override to add general import options. These will appear in the main import dock on the editor. Add options via add_import_option() and add_import_option_advanced().
_get_internal_import_options
void _get_internal_import_options(category: int) virtual
Override to add internal import options. These will appear in the 3D scene import dialog. Add options via add_import_option() and add_import_option_advanced().
_get_internal_option_update_view_required
Variant _get_internal_option_update_view_required(category: int, option: String) virtual const
Should return true if the 3D view of the import dialog needs to update when changing the given option.
_get_internal_option_visibility
Variant _get_internal_option_visibility(category: int, for_animation: bool, option: String) virtual const
Should return true to show the given option, false to hide the given option, or null to ignore.
_get_option_visibility
Variant _get_option_visibility(path: String, for_animation: bool, option: String) virtual const
Should return true to show the given option, false to hide the given option, or null to ignore.
_internal_process
void _internal_process(category: int, base_node: Entity, node: Entity, resource: Resource) virtual
Process a specific node or resource for a given category.
_post_process
void _post_process(scene: Entity) virtual
Post-process the scene. This function is called after the final scene has been configured.
_pre_process
void _pre_process(scene: Entity) virtual
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").
add_import_option
void add_import_option(name: String, value: Variant)
Add a specific import option (name and default value only). This function can only be called from _get_import_options() and _get_internal_import_options().
add_import_option_advanced
void add_import_option_advanced(type: Variant.Type, name: String, default_value: Variant, hint: PropertyHint = 0, hint_string: String = "", usage_flags: int = 6)
Add a specific import option. This function can only be called from _get_import_options() and _get_internal_import_options().
get_option_value
Variant get_option_value(name: StringName) const
Query the value of an option. This function can only be called from those querying visibility, or processing.
