Notifications
Clear all
[Closed] Max Batch Help
Dec 24, 2019 4:53 pm
Hey all ,
i need help with running a batch usinf maxscript .
i have a banch of shots that i need to open one by one , run a script and then save .
i found thattool but for some reason its crashing when ever it gets to the stage that it executes my script .
maybe there is an easier way ?
thanks,
D.
5 Replies
Dec 24, 2019 4:53 pm
You can do it like this:
fn Batch DirectoryPath ScriptToRun =
(
Files = GetFiles (DirectoryPath + "/*.max")
DisableSceneRedraw()
for f in Files do
(
try
(
LoadMaxFile f quiet:true
Filein ScriptToRun
)catch(print f)
)
EnableSceneRedraw()
RedrawViews()
messageBox "Done."
)
Batch "D:/FolderToBatch" "E:/MyScript.ms"
Dec 24, 2019 4:53 pm
so it seems to work but for some reaon it skeeps a large part of my script and just saves the file to a diffrent name.
Dec 24, 2019 4:53 pm
I don’t know about your script, My code doesn’t save the files. To save, you should add some more lines of code.
Dec 24, 2019 4:53 pm
do you mind to take a look on the script that i am running and maybe you will understand whats wrong with it ?
thanks
D