EditorSceneFormatImporter

package
v0.0.0-...-a66c66c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package EditorSceneFormatImporter provides methods for working with EditorSceneFormatImporter object instances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced

type Advanced = class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

type Any

type Any interface {
	gd.IsClass
	AsEditorSceneFormatImporter() Instance
}

type Expanded

func (Expanded) AddImportOptionAdvanced

func (self Expanded) AddImportOptionAdvanced(atype variant.Type, name string, default_value any, hint ClassDB.PropertyHint, hint_string string, usage_flags Flags)

Add a specific import option. This function can only be called from [method _get_import_options].

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension

func (*Extension[T]) AsEditorSceneFormatImporter

func (self *Extension[T]) AsEditorSceneFormatImporter() Instance

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsRefCounted

func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted

type Flags

type Flags int
const ImportAnimation Flags = 2 //gd:EditorSceneFormatImporter.IMPORT_ANIMATION
const ImportDiscardMeshesAndMaterials Flags = 32 //gd:EditorSceneFormatImporter.IMPORT_DISCARD_MESHES_AND_MATERIALS
const ImportFailOnMissingDependencies Flags = 4 //gd:EditorSceneFormatImporter.IMPORT_FAIL_ON_MISSING_DEPENDENCIES
const ImportForceDisableMeshCompression Flags = 64 //gd:EditorSceneFormatImporter.IMPORT_FORCE_DISABLE_MESH_COMPRESSION
const ImportGenerateTangentArrays Flags = 8 //gd:EditorSceneFormatImporter.IMPORT_GENERATE_TANGENT_ARRAYS
const ImportScene Flags = 1 //gd:EditorSceneFormatImporter.IMPORT_SCENE
const ImportUseNamedSkinBinds Flags = 16 //gd:EditorSceneFormatImporter.IMPORT_USE_NAMED_SKIN_BINDS

type ID

type ID Object.ID

ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Implementation

type Implementation = implementation

Implementation implements Interface with empty methods.

type Instance

[EditorSceneFormatImporter] allows to define an importer script for a third-party 3D format. To use [EditorSceneFormatImporter], register it using the [method EditorPlugin.add_scene_format_importer_plugin] method first.

See [Interface] for methods that can be overridden by a [Class] that extends it.
var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AddImportOption

func (self Instance) AddImportOption(name string, value any)

Add a specific import option (name and default value only). This function can only be called from [method _get_import_options].

func (Instance) AddImportOptionAdvanced

func (self Instance) AddImportOptionAdvanced(atype variant.Type, name string, default_value any)

Add a specific import option. This function can only be called from [method _get_import_options].

func (Instance) AsEditorSceneFormatImporter

func (self Instance) AsEditorSceneFormatImporter() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) ID

func (self Instance) ID() ID

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

type Interface

type Interface interface {
	//Return supported file extensions for this scene importer.
	GetExtensions() []string
	//Perform the bulk of the scene import logic here, for example using [GLTFDocument] or [FBXDocument].
	ImportScene(path string, flags Flags, options map[any]any) Object.Instance
	//Override to add general import options. These will appear in the main import dock on the editor. Add options via [method add_import_option] and [method add_import_option_advanced].
	//[b]Note:[/b] All [EditorSceneFormatImporter] and [EditorScenePostImportPlugin] instances will add options for all files. It is good practice to check the file extension when [param path] is non-empty.
	//When the user is editing project settings, [param path] will be empty. It is recommended to add all options when [param path] is empty to allow the user to customize Import Defaults.
	GetImportOptions(path string)
	//Should return [code]true[/code] to show the given option, [code]false[/code] to hide the given option, or [code]null[/code] to ignore.
	GetOptionVisibility(path string, for_animation bool, option string) any
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL