Integrated most recent changes from the Blender branch