Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / How to export models in FBX using Maxscript?
  RSS 2.0 ATOM  

How to export models in FBX using Maxscript?
Rate this thread
 
25796
 
Permlink of this thread  
avatar
  • Total Posts: 13
  • Joined: 19 March 2009 12:00 AM

Getting the hang of Maxscript now but I want to export each model as a seperate FBX but not sure how to go about it. There seems to be a considerable lack of documentation on how to use this.

I want to export each model as its own FBX and name the FBX to the model name.

Currently I select each model one by one and “Export Selected” as FBX.



Max 2010 (SP1), Windows Vista 64bit
NVIDIA Quadro FX 1600M, 4GB RAM

Replies: 0
avatar
  • deftang1
  • Posted: 19 April 2009 01:42 PM

The documentation for the FBX plugin can be found in Help -> MaxScript Help -> and search “FBX”.  It will show you basically everything you need to know.  How to export objects as an fbx (or any other format) can be found under the “3ds Max File Loading and Saving” heading.  The following script will export each geometric object to an fbx file in your current project folders export folder using whatever fbx settings are already loaded.

for current in geometry do
(
    
select current
    newFileName 
current.name
    newFilePath 
pathConfig.GetDir #export
    
completeFilePath = (newFilePath "/" newFileName)
    
    
exportFile completeFilePath #noPrompt selectedOnly:true using:FBXEXP
)

clearSelection()


Replies: 0
avatar

Thanks deftang1. Works like a dream.

When I searched for “FBX” in the maxscript it only brought up changing parameters and didn’t actually give an example on how actually export it.

By any chance would you know how to get maxscript to automate shadowmap rendering for each model...? Thats the next issue.



Max 2010 (SP1), Windows Vista 64bit
NVIDIA Quadro FX 1600M, 4GB RAM

Replies: 0
avatar
  • deftang1
  • Posted: 19 April 2009 11:07 PM

Could you be more specific on what you are trying to do?  Are you talking about the shadows and displacement rollout in the mental ray renderer?



Replies: 0