Item¶
Reference¶
- class Item¶
- module:
-
- create(type, attributes)¶
Create a new item of specified type from scratch without an underlying item.
- delete()¶
Delete an item. The item is only deleted if it is not referenced anymore. Furthermore, even after
the last reference of the item is gone, the garbage collector will remove it only after a certain period of time of no reference.
- createMaterial(attributes)¶
Create a new material from scratch without an underlying item.
- fromHandle(handle)¶
Create a scene object by handle number. Used internally
- Parameters:¶
handle (
number
)
- setFieldValue(name, value)¶
Set a field of the item to a new value
- Parameters:¶
name (
str
)value (
str
)
- setFieldColorValue(name, value)¶
Set a field of the item to a new color value
- setFieldNumberValue(name, value)¶
Set a field of the item to a new number value
- Parameters:¶
name (
str
)value (
number
)
- setFieldEnumValue(name, value, refEnum)¶
Set a field of the item to a new enum value
- Parameters:¶
name (
str
)value (
number
)refEnum (
table
) – reference enum table to verify value against
- setFieldBooleanValue(name, value)¶
Set a field of the item to a new boolean value
- Parameters:¶
name (
str
)value (
boolean
)
- getFieldColorValue()¶
Get the value of an item’s field as color value
- getFieldNumberValue()¶
Get the value of an item’s field as number value
- getFieldEnumValue()¶
Get the value of an item’s field as string value
- getFieldBooleanValue()¶
Get the value of an item’s field as boolean value
- getLinkItem(name)¶
Get a link of the item to a new value