Skip to content

Instantly share code, notes, and snippets.

@tokejepsen
Created July 30, 2015 18:01
Show Gist options
  • Save tokejepsen/c0588db9a9a15029d3cf to your computer and use it in GitHub Desktop.
Save tokejepsen/c0588db9a9a15029d3cf to your computer and use it in GitHub Desktop.
multi obj export
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