Triple (hwx.inspire.Attributes)#

class Triple(default=(0, 0, 0), **kwds)#

Bases: Attribute

Store 3 float values.

Base class for Color, Direction, Location.

Attribute Table#

Name

Type

components

tuple

Method Table#

Name

Description

castForSet (self, obj, value)

create (self, obj)

getGuiValue (self, obj, format=’modeling’)

getValue (self, obj)

populateGuiValue (self, obj, prop, component=None)

setValue (self, obj, value)

Value#

alias of Value

class Vector(x=0, y=0, z=0)#

Bases: Vector

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)

populateGuiValue(obj, prop, component=None)#

Override to customize, prop.value, displayValue, allowedValues.

The prop.value type determines which editor widget used: - bool -> checkbox - str -> line edit - hwtypes.Color -> color picker

Setting prop.allowedValues yields a ComboBox.

prop.displayValue is a str shown when the editor loses focus.

getGuiValue(obj, format='modeling')#

Returns the formatted value, as shown in the Property Editor.