Documentation
¶
Overview ¶
graphics.gd/classdb/EditorSceneFormatImporter allows to define an importer script for a third-party 3D format.
To use graphics.gd/classdb/EditorSceneFormatImporter, register it using the graphics.gd/classdb/EditorPlugin.Instance.AddSceneFormatImporterPlugin method first.
Index ¶
- type Advanced
- type Any
- type Expanded
- type Extension
- type Flags
- type ID
- type Implementation
- type Instance
- func (self Instance) AddImportOption(name string, value any)
- func (self Instance) AddImportOptionAdvanced(atype variant.Type, name string, default_value any)
- func (self Instance) AsEditorSceneFormatImporter() Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) ID() ID
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) Virtual(name string) reflect.Value
- type Interface
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 Expanded ¶
type Expanded [1]gdclass.EditorSceneFormatImporter
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 [Interface.GetImportOptions].
type Extension ¶
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]See Interface for methods that can be overridden by T.
func (*Extension[T]) AsEditorSceneFormatImporter ¶
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 ¶
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.
type Implementation ¶
type Implementation = implementation
Implementation implements Interface with empty methods.
type Instance ¶
type Instance [1]gdclass.EditorSceneFormatImporter
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AddImportOption ¶
Add a specific import option (name and default value only). This function can only be called from [Interface.GetImportOptions].
func (Instance) AddImportOptionAdvanced ¶
Add a specific import option. This function can only be called from [Interface.GetImportOptions].
func (Instance) AsEditorSceneFormatImporter ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
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 [graphics.gd/classdb/GLTFDocument] or [graphics.gd/classdb/FBXDocument]. ImportScene(path string, flags Flags, options map[string]interface{}) Object.Instance // Override to add general import options. These will appear in the main import dock on the editor. Add options via [Instance.AddImportOption] and [Instance.AddImportOptionAdvanced]. // // Note: All [graphics.gd/classdb/EditorSceneFormatImporter] and [graphics.gd/classdb/EditorScenePostImportPlugin] instances will add options for all files. It is good practice to check the file extension when 'path' is non-empty. // // When the user is editing project settings, 'path' will be empty. It is recommended to add all options when 'path' is empty to allow the user to customize Import Defaults. GetImportOptions(path string) // Should return true to show the given option, false to hide the given option, or null to ignore. GetOptionVisibility(path string, for_animation bool, option string) any }