[Closed] USDZ Exporter issue
filePath = (maxfilepath + trimRight (maxFileName) ".max" + "\\" + "final.usdz") opt = USDExporter.CreateOptions() opt.reset() opt.FileFormat = #usdz opt.Lights=false opt.Cameras=false ExportFile filePath #noPrompt exportOptions:opt selectedOnly:true
This gives me an error unless I export the file manually first.
UsdExporter error : #binary or #ascii are not valid file formats for the “.usdz” extension, consider using #usdz instead.
I think it has something to do with the file needing the .usdz extension before it can export a usdz. Anyone have any ideas on how to get around this?
from pymxs import runtime as mxs
myfile = “filePath”
opts = mxs.USDExporter.CreateOptions()
opts.FileFormat = “#usdz”
mxs.USDExporter.exportFile( myfile, exportOptions=opts)
Tried with python but get the same response back.
Try this instead for the line to run the export:
USDExporter.ExportFile filePath exportOptions:opt nodeList:selection
When using the parameters that are non-standard for the ExportFile() function in Max, you need to run it as a method of USDExporter.