Simple export script wanted.

I want a script that can export a mesh to the scene directory (fbx). The scene directory being the last saved or opened directory. or if no directory (new document) don't export.

The exported mesh gets its name from the mesh name. If more than one mesh is selected get the name from the last selected mesh. export all meshes as one fbx.

If a "singular mesh is selected" move to 0,0,0 export then move back. if more than one is selected export in world space.

I want this to be a keybindable action. (no menu)

The main function I'm looking for in the script is exporting to the scene directory.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

.

Change the tooltip and the buttonText if you want. Save as mcr and drag and drop onto your 3ds max vierpots.

macroscript miauuCustomFBXExport
category:"miauu"
tooltip:"Custom FBX export"
buttonText:"Custom FBX export"
(
	selObjsArr = selection as array
	if selObjsArr.count != 0 and maxFilePath != "" do
	(
		fileName = (selObjsArr[selObjsArr.count]).name
 
		if selObjsArr.count == 1 do selObjsArr[selObjsArrw.count].pos = [0,0,0]
 
		exportFile (maxFilePath + fileName + ".fbx") #noPrompt selectedOnly:true
	)
)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.