[Closed] Export with mesh name
Is there a way to tell Max that the name of an exported file should default to the mesh’s given name in the scene? There by saving the step of needing to specify a name on export- every single time!!!
yep, i do that, is really usefull
try this
exportFile obj.name
or something like this, if you want to give the path to export
filetoexport = (path.text + “\” + obj.name)
exportFile filetoexport
path.txt could be a dropdownlist or text input
I tried it out, but must be doing something wrong: “Unkown property: “name” in undefined”
Of course I tried entering the name of the object instead of “name” I used “midInset_mesh” or what have you.
i work with the object name and the extension, like this
box.fbx
so
filetoexport = (path.text + “\” + obj.name) – obj.name need to have the extension
exportFile filetoexport
The error occured as the object has not been assigned to the variable “obj”. With “.name” you access the name property of the object. Here’s an example which however will only run if 1 object is selected. If you only want to export geometry, you should check the selection for that as well.
if selection.count == 1 do (
nNode = selection[1]
iType = 16 -- obj filetype
pDir = "C:\\EXPORT\\"
aClasses = exporterPlugin.classes
exportFile (pDir + nNode.name ) using:aClasses[iType]
)
Exporter classes (from maxR8), set by iType
[ol]
[li][size=1]3D_StudioExporterPlugin[/size][/li][li][size=1] Adobe_Illustrator[/size][/li][li][size=1] DWG_ExportExporterPlugin[/size][/li][li][size=1] DWG_Export[/size][/li][li][size=1] Wavefront_MaterialExporterPlugin[/size][/li][li][size=1] Lightscape_Layers[/size][/li][li][size=1] STL_Export[/size][/li][li][size=1] Lightscape_Material[/size][/li][li][size=1] FBXEXP[/size][/li][li][size=1] Lightscape_Preparation[/size][/li][li][size=1] IGES_Export[/size][/li][li][size=1] Lightscape_Parameter[/size][/li][li][size=1] Lightscape_Blocks[/size][/li][li][size=1] SW3D_Exp[/size][/li][li][size=1] nif_export_class[/size][/li][li][size=1] Wavefront_ObjectExporterPlugin[/size][/li][li][size=1] Lightscape_View[/size][/li][li][size=1] ExportHTR[/size][/li][li][size=1] JSR184Exporter[/size][/li][li][size=1] AsciiExp[/size][/li][li][size=1] VRBL_Export[/size][/li][li][size=1] DWF_Exporter[/size][/li][/ol]