Hi @Anonymous ,
sorry for the delay in response.
Here is what I tried on my side, using Max 2020 update 1.
I've created a little script to create a bunch of Max files.
Of course, these are not production files, so it does not reflect exactly your environment.
Then the script loads and export as fbx all the max files. Fbx is exported Y up and as ascii to validate the up axis.
If the up axis is not as expected, the script prints out an error.
I've tried to batch export up to 2500 files with no variations on up-axis export, always the expected up axis.
Of course, this test is limited compared to using production files.
If you are open to the idea, if you could try to batch test your production files and see if you find if there are specific files that generate the problem.
You may try to add the read fbx file test with your exporting tool to see if it is possible to isolate the issue.
Sorry, I don't have much better 😕
Regards
-- working folder: set Root folder for script execution
-- execute script using: filein @"script path\scriptname.ms"
root_dir = (getFilenamePath (getSourceFileName()))
/*
create a bunch of max files inside a folder name scenefiles
using this to create max files for export test
if files already exists, no need to create these
*/
scenefilepath = root_dir + "\scenefiles\file_"
for i = 1 to 2500 do (
teapot()
saveMaxFile (scenefilepath + i as string + ".max")
resetmaxfile(#noprompt)
)
/*
laod and export files
*/
-- fbx file name to export, test export, read for Up Axis and report if not Y up
filename = root_dir + "\\test.fbx"
clearListener()
-- get all Max files in this location and recursive
-- this line expects root_dir to be defined and the folder scenefiles to exist
-- change the folder location for root of max production files to batch export and test for up axis
allmaxfiles = (getFiles (root_dir+"\scenefiles\*.max") recurse:true)
-- for all max files: export as fbx y-up and ascii, open fbx file ans seek for UpAxis line, find value and check if it matches the expected up axis. If not report error
for i = 1 to allmaxfiles.count do (
-- open max file
loadMaxFile allmaxfiles[i]
-- set export options and export
FbxExporterSetParam "ASCII" true
FbxExporterSetParam "UpAxis" #y
exportFile filename #noprompt using:FBXEXP
-- verify that file exists
if (doesFileExist filename) then (
-- open fbx file for read
readOpenfile = openFile filename
-- read up to UpAxis
skipToString readOpenfile "UpAxis"
-- read the full line
thisline = readLine readOpenfile
-- print it for record
print thisline
-- validate the Up Axis value, if not 1 (Y up) then error
if thisline[thisline.count] != "1" then (format "Error: Not expected Up Axis in file:\n\t%\n" allmaxfiles[i])
-- close fbx file
close readOpenfile
-- delecte fbx file
deleteFile filename
) else (format "File % does not exists" filename)
)