Triple (hwx.inspire.core)

Store 3 float values.

Base class for Color, Direction, Location.

Public Methods

castForGet (self, obj, value)
castForSet (self, obj, value)
create (self, obj)
getGuiValue (self, obj, component=None, format=’%g’)
getValue (self, obj)
setValue (self, obj, value)

Method Details

castForGet(self, obj, value)

Converts and returns the triple value to gui units.

castForSet(self, obj, value)

Converts and validates the triple value before setting.

param obj:Object this attribute belongs to.
type obj:GeneralObject
param value:Value of the attribute to set.
type value:str, List[float]
returns:Validated and converted value.
rtype:Triple
create(self, obj)

Creates a triple attribute for the specified object.

getGuiValue(self, obj, component=None, format='%g')

Formats the triple value to display it in the Property Editor.

param obj:Object to get triple value from.
type obj:GeneralObject
param component:
 Specifies which component of the triple is needs formatting. Component can be ‘x’, ‘y’ or ‘z’.
type component:str
param format:Any specific format to set for the triple values.
type format:str
returns:Formatted triple value.
rtype:Triple
getValue(self, obj)

Returns the triple value for the specified object.

setValue(self, obj, value)

Sets the triple value for the specified object.