def get_object_rotational_matrix(): return mathutils.Matrix(bpy.context.active_object.matrix_world).to_quaternion().to_matrix()