Notifications
Clear all

[Closed] adding render details to a maxscript

Let me preface this by stating that I haven’t got time to become a maxscript master and right now only need this one script. I’m throwing it out this forum community in the hope that someone has the time and the understanding to finish the script for me.

Here’s what I want, ideally this would be a batch operation that I could run on a folder of max files.

1-open file
2-set active viewport to left viewport
3-zoom extents all & set slider to last frame
4-open render dialog
5-check active time segment
6-set to 320×240
7-set output path to original dir
8-use the max file name for saving the render
9-render to avi using indeo 5.1 codec at 75%
10-close max file

Here’s what I have. Steps 1 – 4, and then I’m stuck.

	(
	
	max vpt left
		sliderTime = 500f
		max tool zoomextents all
		max render scene
	)

Any and all help would be greatly appreciated.

Fred

3 Replies

thepath = getSavePath() –get a directory to render
if thepath != undefined then –if selection was valid (no cancel), then
(
theFiles = getFiles (thepath + “/*.max”) –collect all max files in the directory
for f in theFiles do –go through all files
(
loadMaxFile f –load the file
max vpt left –set left view
sliderTime = animationRange.end –set time slider to last frame of segment
max tool zoomextents all –zoom extents
out_file = getFileNamePath f + getFileNameFile f + “.avi” –define the AVI name
–9-render to avi using indeo 5.1 codec at 75%
–This one is tricky because there is no control over the Avi CODEC.
–Make sure you have specified the Indeo codec manually last time you output to AVI,
–the settings are persistent and will be reused by the script…
render outputsize:[320,240] frameRange:animationrange outputFile:out_file –render segment at 320×240 to the AVI
)
resetMaxFile #noPrompt –reset when finished.
)–end if

Originally posted by fgalpern
[B]Let me preface this by stating that I haven’t got time to become a maxscript master and right now only need this one script. I’m throwing it out this forum community in the hope that someone has the time and the understanding to finish the script for me.

Any and all help would be greatly appreciated.

Fred [/B]

Amazing! This script is perfect, exactly what I need. Bobo, you are the man.

Originally posted by fgalpern
This script is perfect…

Well, it is not, but your description of the steps was very professional, I wish everybody would explain their desired program flows in such well-structured manner!
See the “How To…” tutorials in the MAXScript Help – I have been preaching for this approach for years ;o)

Glad it worked!

Take care,
Bobo