Module Mathutils :: Class Euler
[frames] | no frames]

Class Euler

The Euler object

This object gives access to Eulers in Blender.


Notes:

Attention: Euler data can be wrapped or non-wrapped. When a object is wrapped it means that the object will give you direct access to the data inside of blender. Modification of this object will directly change the data inside of blender. To copy a wrapped object you need to use the object's constructor. If you copy and object by assignment you will not get a second copy but a second reference to the same data. Only certain functions will return wrapped data. This will be indicated in the method description. Example:

   wrappedObject = Object.getAttribute() #this is wrapped data
   print wrappedObject.wrapped #prints 'True'
   copyOfObject = wrappedObject.copy() #creates a copy of the object
   secondPointer = wrappedObject #creates a second pointer to the same data
   print wrappedObject.attribute #prints '5'
   secondPointer.attribute = 10
   print wrappedObject.attribute #prints '10'
   print copyOfObject.attribute #prints '5'

Instance Methods
Euler object
__init__(list=None)
Create a new euler object.
 
zero()
Set all values to zero.
 
copy()
Returns: a copy of this euler.
 
unique()
Calculate a unique rotation for this euler.
Matrix object
toMatrix()
Return a matrix representation of the euler.
Quaternion object
toQuat()
Return a quaternion representation of the euler.
Euler object
makeCompatible(eul_compat)
Make this euler compatible with another, so interpolating between them works as expected.
Instance Variables
  wrapped
Whether or not this object is wrapping data directly
    Axises
  x
The heading value in degrees.
  y
The pitch value in degrees.
  z
The roll value in degrees.
Method Details

__init__(list=None)
(Constructor)

 

Create a new euler object.

Example:

 euler = Euler(45,0,0)
 euler = Euler(myEuler)
 euler = Euler(sequence)
Parameters:
  • list (PyList of float/int) - 3d list to initialize euler
Returns: Euler object
Euler representing heading, pitch, bank.

Note: Values are in degrees.

zero()

 

Set all values to zero.

Returns:
an instance of itself

copy()

 
Returns:
a copy of this euler.

unique()

 

Calculate a unique rotation for this euler. Avoids gimble lock.

Returns:
an instance of itself

toMatrix()

 

Return a matrix representation of the euler.

Returns: Matrix object
A 3x3 roation matrix representation of the euler.

toQuat()

 

Return a quaternion representation of the euler.

Returns: Quaternion object
Quaternion representation of the euler.

makeCompatible(eul_compat)

 

Make this euler compatible with another, so interpolating between them works as expected.

Returns: Euler object
an instance of itself