Exemple #1
0
def openFile(filepath, silent=False):
    filepath = Path(filepath)
    ext = filepath.getExtension().lower()
    if ext == 'ma' or ext == 'mb':
        mel.saveChanges('file -f -prompt %d -o "%s"' % (silent, filepath))
        mel.addRecentFile(
            filepath,
            'mayaAscii' if Path(filepath).hasExtension('ma') else 'mayaBinary')
Exemple #2
0
def openFile( filepath, silent=False ):
	filepath = Path( filepath )
	ext = filepath.getExtension().lower()
	if ext == 'ma' or ext == 'mb':
		mel.saveChanges( 'file -f -prompt %d -o "%s"' % (silent, filepath) )
		mel.addRecentFile( filepath, 'mayaAscii' if Path( filepath ).hasExtension( 'ma' ) else 'mayaBinary' )
	elif ext == 'smd':
		mel.saveChanges( 'file -f -new' )
		cmd.vstSmdIO( i=True, importSkeleton=True, filename=filepath )
Exemple #3
0
def openFile( filepath, silent=False ):
	filepath = Path( filepath )
	ext = filepath.getExtension().lower()
	if ext == 'ma' or ext == 'mb':
		mel.saveChanges( 'file -f -prompt %d -o "%s"' % (silent, filepath) )
		mel.addRecentFile( filepath, 'mayaAscii' if Path( filepath ).hasExtension( 'ma' ) else 'mayaBinary' )
	elif ext == 'smd':
		mel.saveChanges( 'file -f -new' )
		cmd.vstSmdIO( i=True, importSkeleton=True, filename=filepath )
Exemple #4
0
def openFile( filepath, silent=False ):
	filepath = Path( filepath )
	ext = filepath.getExtension().lower()
	if ext == 'ma' or ext == 'mb':
		mel.saveChanges( 'file -f -prompt %d -o "%s"' % (silent, filepath) )
		mel.addRecentFile( filepath, 'mayaAscii' if Path( filepath ).hasExtension( 'ma' ) else 'mayaBinary' )