Skip to main content

Module schema

Module schema 

Source
Expand description

Schema definitions for engine node types, properties, inheritance, and validation.

Re-exports§

pub use crate::nodes::ALL_NODES as NODE_SCHEMAS;

Structs§

NodeTypeSchema
Schema metadata defining a node type and its inheritance relationships.
PropSchema
Schema metadata defining an individual node property.

Enums§

DefaultPropVal
Static representation of a property’s default value defined in a node schema.
PropHint
UI presentation and editing hint for inspector property widgets.

Functions§

all_props
All props for type_name, walking the inheritance chain from leaf to root and deduplicating by key (leaf declarations shadow ancestors). The leaf’s version of an overridden prop (its default, hint, read_only) wins, so Button.color sees [51, 65, 85, 255], not Control.color’s white. Unknown types fall through to Node (which declares no props).
inheritance_chain
Computes the inheritance chain for a node type from leaf to root (e.g. ["Sprite2D", "Node2D", "Node"]).
is_valid_custom_prop_type
True when type_str names a type a [props] entry may declare. Accepts aliases so hand-written manifests stay forgiving.
node_type_schema
Retrieves the schema definition for a given node type by name.
type_props
Returns the direct properties declared specifically on type_name.
validate_custom_prop_type
Check a PropValue against a [props] declared type name. Errors name the expected and actual types so pite check and Python set_custom_property surface the same message.