Context: Exporting from 3dsMax 2024 with SDK 1.5.7
Bug description: We are having an issue when exporting the airplane with the Selective Bake option enabled. It looks like the first time you export, the exporter ignores the selected export preset (Selective Bake). You have to export a second time for the exporter to correctly apply Selective Baking. In some situations, clicking on “Run Resolve Unique IDs” makes the exporter use the correct preset options.
Repro steps: Export once, then check your log for [BABYLON][PRE-EXPORT] Bake Selective Animation status.
Hi,
I work with LioC18. I found a solution, I have tracked the “bakeAnimationType” value for :
”RT.param”, “babylonParameter” and “exportParameterWithSceneModifications”
To infinity, and beyond in “multiExporter.py”
I notice in the definition “def sendPresetsWithOptionsToExporter(self, presetsAndOptions)” ( ligne 2488)
# region Export with pre-process
if hasPreExportProcess:
RT.holdMaxFile()
success = babylonPYMXS2024.runPreExportProcess()
if not success:
RT.fetchMaxFile(quiet=True)
return exportedGltfs
When babylonPYMXS2024.runPreExportProcess() is executed, the RT.param was not set correctly.
I add this and now it works perfectly.
# region Export with pre-process
if hasPreExportProcess:
RT.holdMaxFile()
# // EDIT
# // ADD this line for getting the MultiExporter options
# // and set them to the python globals var
# // yann.lepeu@gmail.com
# // for flightFX
babylonPYMXS2024._setRTParameters(babylonParameter)
# // END EDIT
success = babylonPYMXS2024.runPreExportProcess()
if not success:
RT.fetchMaxFile(quiet=True)
return exportedGltfs