PluginList = exporterPlugin.classes ExportList = for i in PluginList Collect i as string SelectedPlugin = 1 rollout ExportObjs "Export Objects" width:162 height:256 ( dropdownList 'list' "Export to:" pos:[15,8] width:127 height:40 items:#("3D_StudioExporterPlugin", "Adobe_Illustrator", "DWG_ExportExporterPlugin", "DWG_Export", "STL_Export", "Alembic_Export", "ACIS_SAT", "PhysX_and_APEX_Exporter", "FBXEXP", "DAEEXP", "IGES_Export", "SW3D_Exp", "OpenFltExport", "ObjExp", "ExportHTR", "Radeon_ProRender_Material_Exporter", "AsciiExp", "VRBL_Export", "DWF_Exporter") align:#left button 'SaveTobtn' "Save to..." pos:[14,128] width:123 height:23 align:#left button 'Exportbtn' "Export" pos:[16,161] width:120 height:37 enabled:false align:#left label 'lbl1' "Version: 0.1 \n By Juan Camilo Alcaraz \n www.camiloalcaraz.com" pos:[13,212] width:130 height:50 align:#left radioButtons 'Type' "Type" pos:[19,57] width:67 height:62 labels:#("Selection", "Selected Groups", "Layers") default:1 columns:1 align:#left on list selected itm do ( SelectedPlugin = itm ) on SaveTobtn pressed do ( global Dir = getSavePath() --print Dir if Dir != undefined do ( ExportByLayers.SaveTobtn.caption = Dir ExportByLayers.Exportbtn.enabled = true ) ) on Exportbtn pressed do ( case Type.state of ( 1: ( seleccion = selection as array for i = 1 to seleccion.count do ( select seleccion[i] if classof seleccion[i] != Dummy do ( exportFile (Dir + "/" + seleccion[i].name ) #noPrompt selectedOnly: true using: exporterPlugin.classes[SelectedPlugin] ) progressUpdate (i * 100 / seleccion.count) ) ) 2: ( seleccion = for i in selection where classof i == dummy collect i max create mode for i = 1 to seleccion.count do ( Exist = false for p = 1 to Files.count do ( windows.processPostedMessages() --avoid script freezes Filename = (substring Files[p] (Dir.count + 2) 100) if matchPattern Filename pattern: (seleccion[i].name + "*") == true do ( Exist = true ) ) if Exist != true do ( select seleccion[i].children exportFile (Dir + "/" + seleccion[i].name ) #noPrompt selectedOnly: true using: exporterPlugin.classes[SelectedPlugin] ) ) ) 3: ( for i = 0 to layermanager.count - 1 do ( Layer = layermanager.getlayer i SelectedLayer = Layer.select true exportFile (Dir + "/" + Layer.name ) #noPrompt selectedOnly: true using: exporterPlugin.classes[SelectedPlugin] Layer.select false ) ) ) ) ) createdialog ExportObjs ExportObjs.width ExportObjs.height