Module Mathutils :: Class Euler

Class Euler

source code

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 = Object(wrappedObject) #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.
source code
 
zero()
Set all values to zero.
source code
 
copy()
Returns: a copy of this euler.
source code
 
unique()
Calculate a unique rotation for this euler.
source code
Matrix object
toMatrix()
Return a matrix representation of the euler.
source code
Quaternion object
toQuat()
Return a quaternion representation of the euler.
source code
Instance Variables
  wrapped
Whether or not this object is wrapping data directly
  x
The heading value in degrees.
  y
The pitch value in degrees.
  z
The roll value in degrees.
Method Details

__init__(list=None)
(Constructor)

source code 

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()

source code 
Set all values to zero.
Returns:
an instance of itself

copy()

source code 
Returns:
a copy of this euler.

unique()

source code 
Calculate a unique rotation for this euler. Avoids gimble lock.
Returns:
an instance of itself

toMatrix()

source code 
Return a matrix representation of the euler.
Returns: Matrix object
A roation matrix representation of the euler.

toQuat()

source code 
Return a quaternion representation of the euler.
Returns: Quaternion object
Quaternion representation of the euler.