Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

EditorScenePostImportPlugin

繼承: RefCounted < Object

用於控制和修改匯入場景的過程的外掛程式。

說明

這種外掛程式型別的存在是為了修改匯入場景的處理,允許在處理的每個階段更改內容以及新增匯入器選項。

方法

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: 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)

Variant

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 🔗

Should return true if the 3D view of the import dialog needs to update when changing the given option.


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.


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.


void _internal_process(category: int, base_node: Node, node: Node, resource: Resource) virtual 🔗

處理給定類別的特定節點或資源。


void _post_process(scene: Node) virtual 🔗

Post-process the scene. This function is called after the final scene has been configured.


void _pre_process(scene: Node) 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").


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 🔗

查詢選項的值。該函式只能從查詢可見性的函式或處理函式中被呼叫。