Last active
March 11, 2016 04:44
-
-
Save hogjonny/d3e176dda26e2407fe55 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import maya.cmds as mc | |
filePath = mc.file(q=True, sceneName=True) | |
parentDir = os.path.abspath(os.path.join(filePath, os.pardir)) | |
selSet= mc.ls( selection=True ) | |
for thing in selSet: | |
selThing = mc.select(thing) | |
newFile = os.path.abspath(os.path.join(parentDir, '{0}.ma'.format(thing))) | |
cmds.file(newFile, type='mayaAscii', force=True, exportSelected=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment