EditorScenePostImportPlugin

package
v0.0.0-...-e10d1cd Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

This plugin type exists to modify the process of importing scenes, allowing to change the content as well as add importer options at every stage of the process.

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
	AsEditorScenePostImportPlugin() Instance
}

type Expanded

type Expanded = MoreArgs

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]See Interface for methods that can be overridden by T.

func (*Extension[T]) AsEditorScenePostImportPlugin

func (self *Extension[T]) AsEditorScenePostImportPlugin() 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 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

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 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 GetImportOptions and GetInternalImportOptions.

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 GetImportOptions and GetInternalImportOptions.

func (Instance) AsEditorScenePostImportPlugin

func (self Instance) AsEditorScenePostImportPlugin() Instance

func (Instance) AsObject

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

func (Instance) AsRefCounted

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

func (Instance) GetOptionValue

func (self Instance) GetOptionValue(name string) any

Query the value of an option. This function can only be called from those querying visibility, or processing.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) MoreArgs

func (self Instance) MoreArgs() MoreArgs

MoreArgs enables certain functions to be called with additional 'optional' arguments.

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 {
	// Override to add internal import options. These will appear in the 3D scene import dialog. Add options via [AddImportOption] and [AddImportOptionAdvanced].
	//
	// [AddImportOption]: https://pkg.go.dev/graphics.gd/classdb/EditorScenePostImportPlugin#Instance.AddImportOption
	// [AddImportOptionAdvanced]: https://pkg.go.dev/graphics.gd/classdb/EditorScenePostImportPlugin#Instance.AddImportOptionAdvanced
	GetInternalImportOptions(category int)
	// Should return true to show the given option, false to hide the given option, or null to ignore.
	GetInternalOptionVisibility(category int, for_animation bool, option string) any
	// Should return true if the 3D view of the import dialog needs to update when changing the given option.
	GetInternalOptionUpdateViewRequired(category int, option string) any
	// Process a specific node or resource for a given category.
	InternalProcess(category int, base_node Node.Instance, node Node.Instance, resource Resource.Instance)
	// Override to add general import options. These will appear in the main import dock on the editor. Add options via [AddImportOption] and [AddImportOptionAdvanced].
	//
	// [AddImportOption]: https://pkg.go.dev/graphics.gd/classdb/EditorScenePostImportPlugin#Instance.AddImportOption
	// [AddImportOptionAdvanced]: https://pkg.go.dev/graphics.gd/classdb/EditorScenePostImportPlugin#Instance.AddImportOptionAdvanced
	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
	// 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").
	PreProcess(scene Node.Instance)
	// Post-process the scene. This function is called after the final scene has been configured.
	PostProcess(scene Node.Instance)
}

type InternalImportCategory

type InternalImportCategory int //gd:EditorScenePostImportPlugin.InternalImportCategory
const (
	InternalImportCategoryNode           InternalImportCategory = 0
	InternalImportCategoryMesh3dNode     InternalImportCategory = 1
	InternalImportCategoryMesh           InternalImportCategory = 2
	InternalImportCategoryMaterial       InternalImportCategory = 3
	InternalImportCategoryAnimation      InternalImportCategory = 4
	InternalImportCategoryAnimationNode  InternalImportCategory = 5
	InternalImportCategorySkeleton3dNode InternalImportCategory = 6
	InternalImportCategoryMax            InternalImportCategory = 7
)

type MoreArgs

MoreArgs is a container for Instance functions with additional 'optional' arguments.

func (MoreArgs) AddImportOptionAdvanced

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

Add a specific import option. This function can only be called from GetImportOptions and GetInternalImportOptions.

Jump to

Keyboard shortcuts

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