Notifications
Clear all

[Closed] Max Batch Help

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
 MZ1

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"

thanks alot
ill give it a try

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.

 MZ1

I don’t know about your script, My code doesn’t save the files. To save, you should add some more lines of code.

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