-
-
Save tokejepsen/c0588db9a9a15029d3cf to your computer and use it in GitHub Desktop.
multi obj export
This file contains hidden or 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 os | |
import maya.cmds as cmds | |
path = cmds.fileDialog2(dialogStyle=1, fileMode=3) | |
if path: | |
path = path[0] | |
sel = cmds.ls(selection=True) | |
for node in sel: | |
cmds.select(cl=True) | |
cmds.select(node) | |
filename = os.path.join(path, '%s.obj' % node) | |
cmds.file(filename, force=True, typ="OBJexport", es=1) | |
cmds.select(sel) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment