splineIK.utils.math module

splineIK.utils.math.convertAxisToVector(axis)

Convert an axis to a normalized vector.

Parameters:axis (str) – options are x, y, z.
Returns:vector
Return type:list
splineIK.utils.math.lookRotation(forward, up)

Get a quaternion based on the forward and up vector, this util can be used to easilty get rotational values to input into the rotation of a node, based on just two vectors.

Parameters:
  • forward (list/OpenMaya.MVector) –
  • up (list/OpenMaya.MVector) –
Returns:

Quaternion with the orientation of the 2 vectors.

Return type:

OpenMaya.MQuaternion

splineIK.utils.math.remap(value, oldMin, oldMax, newMin, newMax)

Remap a value based on input and output minimin and maximum.

Parameters:
  • value (float) – Value to remap
  • oldMin (float) – Original minimum
  • oldMax (float) – Original maximum
  • newMin (float) – New minimum
  • newMax (float) – New maximum
Returns:

remapped value

Return type:

float

splineIK.utils.math.remapWeighting(values1, values2)

Get a weighting list how to blend values1 and values2, this math function is usefull to get the parenting weights, between lists with different parameters.

Parameters:
  • values1 (list) –
  • values2 (list) –
Returns:

list of dictionaries with blend weighting values

Return type:

list