Saturday, November 9, 2013

Heres a large update of the script it integrated gui and export
I original wrote it in mel then converted  it to python(albeit with help)
 Use it freely, nobody will stop you, do as you please. Ill be working on the obj capabilities later this week


import maya.cmds as cmds

#import maya.mel as mel

 

def ExporterWindow():

 

    #Checks if a window exists, if it does delete it

    if cmds.window("ExpWin", exists = True):

        cmds.deleteUI("ExpWin", window = True)

       

    #Create a window

    myWin = cmds.window("ExpWin", t = "Exporter of Kirlis")

    cmds.columnLayout()

    cmds.text(l = "Script of Kirlis")

    cmds.button(l = "FBX", c = "FBXExport()")

    cmds.button(l = "OBJ", c = "command2")

    cmds.text(l = "Coming Soon")

    cmds.button(l = "Quit", c = "command3")

    cmds.showWindow("ExpWin")

   

def FBXExport():

    #Nicholas_Kirlis

    #Special Morrissey Alexander
    # Special Roman Parez

    #Fbx_Export_Script

    #import maya.cmds as cmds

       

    #Center selection

    cmds.move(0,0,0, rpr = True)

        

    #Freeze transformations

    #cmds.makeIdentity(apply=True, t=1, r=1, s=1, n=0)

       

    #Delete all history

    cmds.delete (ch=True)

       

    #Group

    #cmds.group(n='assets')

    #export selection

       

    basicFilter = "*.fbx"

       

    filename = cmds.fileDialog2(fileFilter=basicFilter, fileMode=0, caption="FBX export")

       

    cmds.file (filename[0], force=True,  typ= "FBX export" , pr=1, es=1  )

       

ExporterWindow()

No comments:

Post a Comment