Batch export from .max to .fbx gives empty files

Batch export from .max to .fbx gives empty files

Anonymous
Not applicable
4,512 Views
7 Replies
Message 1 of 8

Batch export from .max to .fbx gives empty files

Anonymous
Not applicable

I need to batch export a huge amount of files (around 80 000) from .MAX to .FBX format. The files are from different versions of .MAX so there are prompts showing up. 

 

I've done the export successfully when opening files manually and then running my export Max script. When opening the files manually I answer some prompts, note that if I don't answer them, the models can't be opened. 

 

When doing it through my bash script, I suppose that the automated answers (if there are any) aren't the correct ones. Below is my line of code that calls the batch program from my WLS environment (Linux environment on Windows).  To clarify, everything compiles fine and the export is done, just that the exported .FBX file is 8 kb and can't be opened. 

 

/mnt/c/"Program Files"/Autodesk/"3ds Max 2019"/3dsmaxbatch.exe $EXPORT_SCRIPT -dm yes -mxsString out:$OUT_PATH -mxsString file:"/$FILENAME_WO_EXTENSION" -listenerLog "C:\Users\Max\Documents\test.log"

 

I've experimented with the -dm flag, without any luck. 

 

See the prompts and my answers in red. I suppose that I need to make these answers default in my script, in some way. Screen Shot 2018-09-05 at 16.10.53.png

 

Screen Shot 2018-09-05 at 16.11.06.png

 

Screen Shot 2018-09-05 at 16.11.21.png

 

Screen Shot 2018-09-05 at 16.11.32.png

 

 

 

0 Likes
Accepted solutions (2)
4,513 Views
7 Replies
Replies (7)
Message 2 of 8

Anonymous
Not applicable

I forgot to include the MAXscript it self. Here it comes: 

opts = maxOps.mxsCmdLineArgs
filepath = opts[#out] as string
file = opts[#file] as string

fullpath = (filepath + file)
print fullpath

exportfile fullpath #noprompt selectedOnly:false using:ExporterPlugin.Classes[9]
quitMAX #noprompt
0 Likes
Message 3 of 8

francesco.torchia
Alumni
Alumni

Hi @Anonymous,

 

I will investigate on the data you posted and be back to you as soon as I have an update.

 

Regards,


Francesco Torchia
Technical Support Specialist – M&E (3ds Max, Maya)
Message 4 of 8

ads_royje
Alumni
Alumni
Accepted solution

Hi @Anonymous,

 

your script does not seem to load any max file at all...

that may explain the fbx to be empty.

 

in the Script, before the export can you try to load the file using these args :

loadmaxfile @"drive:\filepath\name.max" quiet:true allowPrompts:false

Message 5 of 8

Anonymous
Not applicable

Hi 

That seems to have solved it, I missed that detail totally. 

For helping other people, I also had to had setVRaySilentMode() to silence VRay propmts as well. Now all seems OK. 

Thank you for your support @francesco.torchia and @ads_royje

0 Likes
Message 6 of 8

ads_royje
Alumni
Alumni

@Anonymous , great to know it works now ! 🙂

 

Thanks for your feedback!

 

 

0 Likes
Message 7 of 8

francesco.torchia
Alumni
Alumni
Accepted solution

Hi @Anonymous,

 

could you please click Accept as Solution on the posts that helped you so others in the community can find them easily?

 

Thanks,


Francesco Torchia
Technical Support Specialist – M&E (3ds Max, Maya)
Message 8 of 8

Anonymous
Not applicable

Where is the final solution?

0 Likes