示例#1
0
    def Button_Open(self, *args):
        ''' When Open Button is pressed.'''
        sAllPath = self.GetScenePathFromUISelection()
        if cmds.file(q=True, amf=True):
            self.MessageBox('Save?', sAllPath)

        else:
            # cmds.file(sAllPath, o = True)
            StudioSettings.OpenSceneCommand(sAllPath)
	def Button_OpenFile(self, sPath, iVal, *args):
		if iVal == 1: # Don't save
			cmds.file(modified = False) # Fake the maya scene to force open that is has been saved already so it will load without asking.
		elif iVal == 2: # Save
			cmds.file(s = True, f = True)
		elif iVal == 3: # Increment Save
			mel.eval('incrementalSave;')

		if iVal: # if not Cancelled.
			StudioSettings.OpenSceneCommand(sPath)

		if self.oWindow:
			cmds.deleteUI(self.oWindow)