List (hwx.inspire.Attributes)#
- class List(type, default=[], **kwds)#
Bases:
Attribute
Store a list of values in a single attribute.
- For example:
integers = List(Int) features = List(Reference(Feature))
# Name
Description
castForSet
(self, obj, value)create
(self, obj)disable
(self, obj)enable
(self, obj)getGuiValue
(self, obj)getInCoreValue
(self, obj)getValue
(self, obj)initialize
(self, objCls, name)setInCoreValue
(self, obj, value)setValue
(self, obj, value)- initialize(objCls, name)#
Initializes the attribute.
- Parameters:
objCls (class) – Object class this attribute belongs to.
name (str) – Name of the attribute.
- create(obj)#
bool(x) -> bool
Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.
- castForSet(obj, value)#
Converts and validates the value of the attribute before setting.
Converts the value it to its internal type (and base units if applicable).
- Parameters:
obj (GeneralObject) – Object this attribute belongs to.
value (Any) – Value of the attribute to set.
- Returns:
Validated and converted value.
- Return type:
value (Any)
- enable(obj)#
Called by GeneralObject when created (or undo of a destroy)
- disable(obj)#
Called by GeneralObject when destroyed (or undo of a create)
- getGuiValue(obj)#
Returns the formatted value, as shown in the Property Editor.