EditorScenePostImportPlugin
继承: RefCounted < Object
用于控制和修改导入场景的过程的插件。
描述
这种插件类型的存在是为了修改导入场景的处理,允许在处理的每个阶段更改内容以及添加导入器选项。
方法
void |
_get_import_options(path: String) virtual |
void |
_get_internal_import_options(category: int) virtual |
_get_internal_option_update_view_required(category: int, option: String) virtual const |
|
_get_internal_option_visibility(category: int, for_animation: bool, option: String) virtual const |
|
_get_option_visibility(path: String, for_animation: bool, option: String) virtual const |
|
void |
_internal_process(category: int, base_node: Node, node: Node, resource: Resource) virtual |
void |
_post_process(scene: Node) virtual |
void |
_pre_process(scene: Node) 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) |
get_option_value(name: StringName) const |
枚举
enum InternalImportCategory: 🔗
InternalImportCategory INTERNAL_IMPORT_CATEGORY_NODE = 0
There is currently no description for this enum. Please help us by contributing one!
InternalImportCategory INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE = 1
There is currently no description for this enum. Please help us by contributing one!
InternalImportCategory INTERNAL_IMPORT_CATEGORY_MESH = 2
There is currently no description for this enum. Please help us by contributing one!
InternalImportCategory INTERNAL_IMPORT_CATEGORY_MATERIAL = 3
There is currently no description for this enum. Please help us by contributing one!
InternalImportCategory INTERNAL_IMPORT_CATEGORY_ANIMATION = 4
There is currently no description for this enum. Please help us by contributing one!
InternalImportCategory INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE = 5
There is currently no description for this enum. Please help us by contributing one!
InternalImportCategory INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE = 6
There is currently no description for this enum. Please help us by contributing one!
InternalImportCategory INTERNAL_IMPORT_CATEGORY_MAX = 7
There is currently no description for this enum. Please help us by contributing one!
方法说明
void _get_import_options(path: String) virtual 🔗
覆盖以添加常规导入选项。这些将出现在编辑器的主导入停靠面板中。通过 add_import_option() 和 add_import_option_advanced() 添加选项。
void _get_internal_import_options(category: int) virtual 🔗
覆盖以添加内部导入选项。这些将出现在 3D 场景导入对话框中。通过 add_import_option() 和 add_import_option_advanced() 添加选项。
Variant _get_internal_option_update_view_required(category: int, option: String) virtual const 🔗
返回在选项已更改时是否需要更新导入对话框的 3D 视图,若更新则返回 true。
Variant _get_internal_option_visibility(category: int, for_animation: bool, option: String) virtual const 🔗
显示给定的选项应返回 true,隐藏给定的选项应返回 false,忽略应返回 null。
Variant _get_option_visibility(path: String, for_animation: bool, option: String) virtual const 🔗
显示给定的选项应返回 true,隐藏给定的选项应返回 false,忽略应返回 null。
void _internal_process(category: int, base_node: Node, node: Node, resource: Resource) virtual 🔗
处理给定类别的特定节点或资源。
void _post_process(scene: Node) virtual 🔗
对场景进行后期处理。该方法会在最终场景配置完成后调用。
void _pre_process(scene: Node) virtual 🔗
对场景进行预处理。场景格式加载器加载场景后会立即调用该函数,此时尚未进行任何更改。
预处理可用于调整 "nodes"、"meshes"、"animations"、"materials" 等内部导入选项,这些字段位于 get_option_value("_subresources") 中。
void add_import_option(name: String, value: Variant) 🔗
添加特定的导入选项(仅限名称和默认值)。该函数只能从 _get_import_options() 和 _get_internal_import_options() 被调用。
void add_import_option_advanced(type: Variant.Type, name: String, default_value: Variant, hint: PropertyHint = 0, hint_string: String = "", usage_flags: int = 6) 🔗
添加特定的导入选项。该函数只能从 _get_import_options() 和 _get_internal_import_options() 被调用。
Variant get_option_value(name: StringName) const 🔗
查询选项的值。该函数只能从查询可见性的函数或处理函数中被调用。