EditorSceneFormatImporter

Успадковує: RefCounted < Object

Успадковано від: EditorSceneFormatImporterBlend, EditorSceneFormatImporterFBX2GLTF, EditorSceneFormatImporterGLTF, EditorSceneFormatImporterUFBX

Імпортні сцени з 3D файлів.

Опис

EditorSceneFormatImporter дозволяє визначити скрипт імпортера для третього формату 3D.

Для використання EditorSceneFormatImporter, зареєструйте його за допомогою EditorPlugin.add_scene_format_importer_plugin().

Методи

PackedStringArray

_get_extensions() virtual const

void

_get_import_options(path: String) virtual

Variant

_get_option_visibility(path: String, for_animation: bool, option: String) virtual const

Object

_import_scene(path: String, flags: int, options: Dictionary) 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)


Константи

IMPORT_SCENE = 1 🔗

There is currently no description for this constant. Please help us by contributing one!

IMPORT_ANIMATION = 2 🔗

There is currently no description for this constant. Please help us by contributing one!

IMPORT_FAIL_ON_MISSING_DEPENDENCIES = 4 🔗

There is currently no description for this constant. Please help us by contributing one!

IMPORT_GENERATE_TANGENT_ARRAYS = 8 🔗

There is currently no description for this constant. Please help us by contributing one!

IMPORT_USE_NAMED_SKIN_BINDS = 16 🔗

There is currently no description for this constant. Please help us by contributing one!

IMPORT_DISCARD_MESHES_AND_MATERIALS = 32 🔗

There is currently no description for this constant. Please help us by contributing one!

IMPORT_FORCE_DISABLE_MESH_COMPRESSION = 64 🔗

There is currently no description for this constant. Please help us by contributing one!


Описи методів

PackedStringArray _get_extensions() virtual const 🔗

Повернути підтримувані розширення файлів для цього імпортера сцен.


void _get_import_options(path: String) virtual 🔗

Перевизначте, щоб додати загальні параметри імпорту. Вони з’являться в головній панелі імпорту в редакторі. Додайте параметри за допомогою add_import_option() і add_import_option_advanced().

Примітка. Усі екземпляри EditorSceneFormatImporter і EditorScenePostImportPlugin додадуть параметри для всіх файлів. Рекомендується перевіряти розширення файлу, якщо path не порожній.

Коли користувач редагує параметри проекту, path буде порожнім. Рекомендується додавати всі параметри, коли path порожній, щоб дозволити користувачеві налаштувати імпорт за замовчуванням.


Variant _get_option_visibility(path: String, for_animation: bool, option: String) virtual const 🔗

Має повернути true, щоб показати заданий параметр, false, щоб приховати вказаний параметр, або null, щоб проігнорувати.


Object _import_scene(path: String, flags: int, options: Dictionary) virtual 🔗

Виконайте основну частину логіки імпорту сцени тут, наприклад, використовуючи GLTFDocument або FBXDocument.


void add_import_option(name: String, value: Variant) 🔗

Додайте певний параметр імпорту (лише ім’я та значення за замовчуванням). Цю функцію можна викликати лише з _get_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().