Hey guys, I have around 600 or so .model files.
I already have a .model importer script for max.
it only opens files 1 at a time, and does not auto save.
what I'm trying to do is open multiple files within a directory and auto save them all in another format.
Anyone have a good max script that i could use to integrate within my other script.
((looking for something like Photo shop's batch function.))
Open
Save as: *file type*
Than open next file and repeat above.
Replies
Obviously just changing the path to point to your folder and ".max" to be whatever extension you're looking for. If you want the script to handle subdirectories then it can get a little more complicated (e.g. if you want to mirror the directory structure within another root path or something like that). It's not that hard though and I'm sure myself or someone else here could help with that if it was needed.
If you search the maxScript help for "External File Methods" then there's more info about this type of stuff there.
Yeah something like that,
and loadMAXFile f; would need to load a .model so I'm guessing this needs to be changed?
.fbx .dae .obj .3ds .max are the export formats I'm interested in,
and .model is import.
this should do it. havent tested it but is not exactly complex.. I dont know whether all formats support the #noPrompt flag so you may be clicking through UI's a bit. but thats not avoidable.
Yea, like you said you need to replace that loadMAXFile function call with your import function. e.g. "importModelFile f" (assuming it's got a load function that accepts the path to a file as an argument).
Is it your import script? If not and you're not sure how it works then it might be worth posting it or a link to where you got it from and we can help modify/wrap it to do this.
Edit:
Just saw r_fletch_r's post. Yea, that should work assuming your .model reader is a plugin and not a script.