Notifications
Clear all

[Closed] MaxScript to export fbx as single file

Currently I’m working on project wherein I’ve multiple objects in hierarchy. I wanted to export that file in .fbx formate as single file with some customized settings.
I’ve written below code but it can save file individually for each object available in hierarchy

SelectionObjects = #()
SelectionObjects = selection as array

	if SelectionObjects.count != 0 then
		(			
			for i=1 to SelectionObjects.count do
				(
					ObjectName = SelectionObjects[i].name
					newFilePath = pathConfig.GetDir #export
					completeFilePath = (newFilePath + "/" + ObjectName)
										FBXExporterSetParam "ASCII" false
                                        FBXExporterSetParam "Animation" false
                                        FBXExporterSetParam "Cameras" false
                                        FBXExporterSetParam "Lights" false
                                        FBXExporterSetParam "EmbedTextures" true
                                        FBXExporterSetParam "SmoothingGroups" false
                                        FBXExporterSetParam "UpAxis" "Y"

			     exportFile ObjectName #noPrompt selectedOnly:false using:FBXEXP
               )
		)

clearSelection()

Anyone assists me to export my file into a single file. Thanks in advance!

2 Replies
 MZ1

Your goal is not clear, Do you want to export selected objects to a single file? This works just fine:

exportFile FBXSavePath #noPrompt selectedOnly:true using:FBXEXP

Yes I want to export into single file. Anyway I’ve taken exportFile syntax outside the loop and it’s working fine.
Thanks @MZ for your time.