def save_scene_as(path = None, file_name = None): if os.path.exists(path): if file_name: fullpath = os.path.join(path,file_name) cmds.file(rename = fullpath) return cmds.file(s=True, type="mayaAscii")