예제 #1
0
    def unapply_rotation(self, euler):
        euler = mathutils.Euler([euler[0], euler[1],
                                        euler[2]])
        try:
            q = euler.to_quaternion()
        except:
            # blender 2.56
            q = euler.to_quat()

        return [q.x, q.y, q.z, q.w]
예제 #2
0
def rotToEuler(rot):
    return Mathutils.Euler(radToDeg(rot[0]), radToDeg(rot[1]),
                           radToDeg(rot[2]))
예제 #3
0
 def unapply_rotation(self, euler):
     r = 180.0/math.pi
     euler = mathutils.Euler([euler[0]*r, euler[1]*r,
                                     (euler[2]*r)])
     q = euler.toQuat()
     return [q.x, q.y, q.z, q.w]