modules.gui.types#

class modules.gui.types.CustomEvent(*args: Any, **kwargs: Any)#

Bases: Context

__init__()#
add(name: str, data=None)#
clear(name: str = None)#

Clear given entry by rebuilding and excluding, no argument will clear entire queue

handle(name: str, func)#

Call the given function if the event exists, then clear it automatically.

has(name: str) bool#

Return True if queue has given entry, Fales if not

class modules.gui.types.DragAndDropPayload(type_id: str = None, data_id: int = None, data: Any = None)#

Bases: object

class Type_(*values)#

Bases: StrEnum

Explicit source or acceptance types

asset = 'asset'#
hierarchy = 'hierarchy'#
__init__(type_id: str = None, data_id: int = None, data: Any = None)#

Wrapper to store additional drag and drop payload data

get_payload_data()#
get_payload_data_id() int#
get_payload_type() str#
set_payload(type_id: str, data_id: int, data: Any)#
class modules.gui.types.ExponentialFogMode_(*values)#

Bases: IntEnum

Modes to visualize rotation angles

additive = 1#
additive_clamped = 2#
none = 0#
class modules.gui.types.GameObjectTypes#

Bases: object

Bind meta data to gameObject types, currently only used for the UserInterface

Whenever this finds use in a global scope, move this to: modules.gameObjectTypes.py

class Meta(_class: type, _icon: str = '')#

Bases: object

Structure that hold meta data per gameObject type

__init__(_class: type, _icon: str = '')#
static get_gameobject_type(t: type) Meta#

Get the gameObject type meta

Parameters:

t (type) – The type of a variable, e.g., type(variable)

Returns:

Meta object if t is a registered gameObject type, None if not

Return type:

Meta

static is_gameobject_type(t: type) bool#

Check wheter a type is registered as gameObject type

Parameters:

t (type) – The type of a variable, e.g., type(variable)

Returns:

True if t is a registered gameObject type

Return type:

bool

static registry()#

Singleton registry of the gameObject types (inherting GameObject).

_registry is stored as a class variable, meaniung:

  • initialized only once per Python process

  • shared across all imports and all scripts

Returns:

Map of gameObject type classes to Meta

Return type:

dict

class modules.gui.types.RadioStruct#

Bases: TypedDict

flag: int#
hide: Callable#
icon: str#
name: str#
class modules.gui.types.RotationMode_(*values)#

Bases: IntEnum

Modes to visualize rotation angles

degrees = 2#
radians = 1#
class modules.gui.types.ToggleStruct#

Bases: TypedDict

icon: str#
name: str#
class modules.gui.types.TransformMask(values=None)#

Bases: object

__init__(values=None)#
is_enabled(key)#
is_visible(key)#
position: int = 0#
rotation: int = 1#
scale: int = 2#