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]
def rotToEuler(rot): return Mathutils.Euler(radToDeg(rot[0]), radToDeg(rot[1]), radToDeg(rot[2]))
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]