SkinningTools.Maya.tools.enumerators

@Brief: RigSystem - automated rigging system for facial rigs based on bone and guide positions @author Perry Leijten @since 05/03/2018

Module Contents

Classes

_AxisEnumerator

axis enumerator class for easy axis handling

_Space

simple class for space enumaration

__Enumerator

sort of enumarators added (similar to dict)

SkinningTools.Maya.tools.enumerators.AxisEnumerator
SkinningTools.Maya.tools.enumerators.Space
class SkinningTools.Maya.tools.enumerators._AxisEnumerator

axis enumerator class for easy axis handling

getVector(self, axis)

get vector allocated to given axis

Parameters

axis (Vector) – axis to check for

:return :type: Vector

invert(self, axis)

return the inverse value of the Vector given.

Parameters

axis (Vector) – axis to check for

Returns

the opposite vector

Return type

Vector

static isNegative(axis)

check if current axis is negative

Parameters

axis (Vector) – axis to check for

Returns

True if the axis is negative

Return type

bool

static isPositive(axis)

check if current axis is positive

Parameters

axis (Vector) – axis to check for

Returns

True if the axis is positive

Return type

bool

isX(self, axis)

check if the axis is either PosAxisX or NegAxisX

Parameters

axis (Vector) – axis to check for

Returns

if the vector is in the X direction

Return type

Vector

isY(self, axis)

check if the axis is either PosAxisY or NegAxisY

Parameters

axis (Vector) – axis to check for

Returns

if the vector is in the Y direction

Return type

Vector

isZ(self, axis)

check if the axis is either PosAxisZ or NegAxisZ

Parameters

axis – axis to check for

Typeaxis

Vector

Returns

if the vector is in the Z direction

Return type

Vector

class SkinningTools.Maya.tools.enumerators._Space

simple class for space enumaration

class SkinningTools.Maya.tools.enumerators.__Enumerator(x)

sort of enumarators added (similar to dict)

__getattr__(self, val)
static __setLocked()

remove attr setting functionality on object

__setattr__(self, att, val)

single attr setter possible: “_Enumerator__x”

Parameters
  • att (string) – string representation of the enumerator

  • val (object) – object that is measured against the key

__setitem__(self, i, val)
__str__(self)

string representation

Returns

the representation of the enumerator

Return type

string

getKeys(self)

get current enumerator keys

Returns

Return type

list

validate(self, val)

validate enumarator value

Returns

check if the value is a vector

Return type

bool