GLTFObjectModelProperty

package
v0.0.0-...-568b220 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package GLTFObjectModelProperty provides methods for working with GLTFObjectModelProperty 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
	AsGLTFObjectModelProperty() Instance
}

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]) AsGLTFObjectModelProperty

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

type GLTFObjectModelType int //gd:GLTFObjectModelProperty.GLTFObjectModelType
const (
	/*Unknown or not set object model type. If the object model type is set to this value, the real type still needs to be determined.*/
	GltfObjectModelTypeUnknown GLTFObjectModelType = 0
	/*Object model type "bool". Represented in the glTF JSON as a boolean, and encoded in a [GLTFAccessor] as "SCALAR". When encoded in an accessor, a value of [code]0[/code] is [code]false[/code], and any other value is [code]true[/code].*/
	GltfObjectModelTypeBool GLTFObjectModelType = 1
	/*Object model type "float". Represented in the glTF JSON as a number, and encoded in a [GLTFAccessor] as "SCALAR".*/
	GltfObjectModelTypeFloat GLTFObjectModelType = 2
	/*Object model type "float[lb][rb]". Represented in the glTF JSON as an array of numbers, and encoded in a [GLTFAccessor] as "SCALAR".*/
	GltfObjectModelTypeFloatArray GLTFObjectModelType = 3
	/*Object model type "float2". Represented in the glTF JSON as an array of two numbers, and encoded in a [GLTFAccessor] as "VEC2".*/
	GltfObjectModelTypeFloat2 GLTFObjectModelType = 4
	/*Object model type "float3". Represented in the glTF JSON as an array of three numbers, and encoded in a [GLTFAccessor] as "VEC3".*/
	GltfObjectModelTypeFloat3 GLTFObjectModelType = 5
	/*Object model type "float4". Represented in the glTF JSON as an array of four numbers, and encoded in a [GLTFAccessor] as "VEC4".*/
	GltfObjectModelTypeFloat4 GLTFObjectModelType = 6
	/*Object model type "float2x2". Represented in the glTF JSON as an array of four numbers, and encoded in a [GLTFAccessor] as "MAT2".*/
	GltfObjectModelTypeFloat2x2 GLTFObjectModelType = 7
	/*Object model type "float3x3". Represented in the glTF JSON as an array of nine numbers, and encoded in a [GLTFAccessor] as "MAT3".*/
	GltfObjectModelTypeFloat3x3 GLTFObjectModelType = 8
	/*Object model type "float4x4". Represented in the glTF JSON as an array of sixteen numbers, and encoded in a [GLTFAccessor] as "MAT4".*/
	GltfObjectModelTypeFloat4x4 GLTFObjectModelType = 9
	/*Object model type "int". Represented in the glTF JSON as a number, and encoded in a [GLTFAccessor] as "SCALAR". The range of values is limited to signed integers. For [code]KHR_interactivity[/code], only 32-bit integers are supported.*/
	GltfObjectModelTypeInt GLTFObjectModelType = 10
)

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 Instance

type Instance [1]gdclass.GLTFObjectModelProperty

GLTFObjectModelProperty defines a mapping between a property in the glTF object model and a NodePath in the Godot scene tree. This can be used to animate properties in a glTF file using the [code]KHR_animation_pointer[/code] extension, or to access them through an engine-agnostic script such as a behavior graph as defined by the [code]KHR_interactivity[/code] extension. The glTF property is identified by JSON pointer(s) stored in [member json_pointers], while the Godot property it maps to is defined by [member node_paths]. In most cases [member json_pointers] and [member node_paths] will each only have one item, but in some cases a single glTF JSON pointer will map to multiple Godot properties, or a single Godot property will be mapped to multiple glTF JSON pointers, or it might be a many-to-many relationship. [Expression] objects can be used to define conversions between the data, such as when glTF defines an angle in radians and Godot uses degrees. The [member object_model_type] property defines the type of data stored in the glTF file as defined by the object model, see [enum GLTFObjectModelType] for possible values.

var Nil Instance

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

func New

func New() Instance

func (Instance) AppendNodePath

func (self Instance) AppendNodePath(node_path string)

Appends a [NodePath] to [member node_paths]. This can be used by [GLTFDocumentExtension] classes to define how a glTF object model property maps to a Godot property, or multiple Godot properties. Prefer using [method append_path_to_property] for simple cases. Be sure to also call [method set_types] once (the order does not matter).

func (Instance) AppendPathToProperty

func (self Instance) AppendPathToProperty(node_path string, prop_name string)

High-level wrapper over [method append_node_path] that handles the most common cases. It constructs a new [NodePath] using [param node_path] as a base and appends [param prop_name] to the subpath. Be sure to also call [method set_types] once (the order does not matter).

func (Instance) AsGLTFObjectModelProperty

func (self Instance) AsGLTFObjectModelProperty() Instance

func (Instance) AsObject

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

func (Instance) AsRefCounted

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

func (Instance) GetAccessorType

func (self Instance) GetAccessorType() GLTFAccessor.GLTFAccessorType

The GLTF accessor type associated with this property's [member object_model_type]. See [member GLTFAccessor.accessor_type] for possible values, and see [enum GLTFObjectModelType] for how the object model type maps to accessor types.

func (Instance) GltfToGodotExpression

func (self Instance) GltfToGodotExpression() Expression.Instance

func (Instance) GodotToGltfExpression

func (self Instance) GodotToGltfExpression() Expression.Instance

func (Instance) HasJsonPointers

func (self Instance) HasJsonPointers() bool

Returns [code]true[/code] if [member json_pointers] is not empty. This is used during export to determine if a [GLTFObjectModelProperty] can handle converting a Godot property to a glTF object model property.

func (Instance) HasNodePaths

func (self Instance) HasNodePaths() bool

Returns [code]true[/code] if [member node_paths] is not empty. This is used during import to determine if a [GLTFObjectModelProperty] can handle converting a glTF object model property to a Godot property.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) JsonPointers

func (self Instance) JsonPointers() [][]string

func (Instance) NodePaths

func (self Instance) NodePaths() []string

func (Instance) ObjectModelType

func (self Instance) ObjectModelType() GLTFObjectModelType

func (Instance) SetGltfToGodotExpression

func (self Instance) SetGltfToGodotExpression(value Expression.Instance)

func (Instance) SetGodotToGltfExpression

func (self Instance) SetGodotToGltfExpression(value Expression.Instance)

func (Instance) SetJsonPointers

func (self Instance) SetJsonPointers(value [][]string)

func (Instance) SetNodePaths

func (self Instance) SetNodePaths(value []string)

func (*Instance) SetObject

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

func (Instance) SetObjectModelType

func (self Instance) SetObjectModelType(value GLTFObjectModelType)

func (Instance) SetTypes

func (self Instance) SetTypes(variant_type variant.Type, obj_model_type GLTFObjectModelType)

Sets the [member variant_type] and [member object_model_type] properties. This is a convenience method to set both properties at once, since they are almost always known at the same time. This method should be called once. Calling it again with the same values will have no effect.

func (Instance) SetVariantType

func (self Instance) SetVariantType(value variant.Type)

func (Instance) VariantType

func (self Instance) VariantType() variant.Type

func (Instance) Virtual

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

Jump to

Keyboard shortcuts

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