-1

I'm working on a toolbox and come to notice that we don't have a very versatile solution for importing/exporting fbx to/from max externally.

For max it's pretty hard to pass parameters directly through command line (or impossible? as I haven't found any solutions yet). So my current workaround is: 1. write out parameters in an external file 2. run command line to execute the maxscript 3. inside that maxscript, read the file in step 1 and do stuff

The problem with this is that this function cannot be shared with other projects since the written external file is hard coded.

Is there a way to standardize the process, put into library, and reuse in the future?

1 Answers1

0

Yes, MAXScript is the way to batch and use command-line to process FBX files. But I am not sure I understand the second part where you say β€œThe problem with this is that this function cannot be shared with other projects since the written external file is hard coded.” I think you want to pass file name or path at command-line?

Here is the MAXScript docs for FBX import/export settings: http://help.autodesk.com/view/3DSMAX/2016/ENU/?guid=__files_GUID_B9ACAA8C_DBD6_46D7_BB39_244680ECE94C_htm

To pass in the file name or path of files, it requires to use maxscript at the command-line. There is a post here that discusses this approach and shows this key example: http://forums.cgsociety.org/archive/index.php?t-1003362.html

3dsmax -mxs "global inputdir = @\"C:\\TEST_INPUT\";global outputdir = @\"C:\\TEST_OUTPUT\";filein \"C:\\batchexporter.ms\""

There is a free script I see too: http://www.scriptspot.com/3ds-max/scripts/batch-exportimport

cyrille
  • 2,616
  • 1
  • 10
  • 18
  • Thanks Cyrille! Just had a test with the script. This works for exporting perfectly! However using "-mxs" will cause max to open and close instantly, so it doesn't work for importing... – Valentim Au Jan 18 '16 at 20:36
  • @ValentimAu, I guess you would need to write a 3ds Max tool plug-in. Is that an option you are ready to use? – cyrille Apr 06 '16 at 14:56