View Full Version : maxscript does not run when rendering a sequence of frames

12 December 2008, 02:25 PM

I have a maxscript that changes a textarea depending on the radius of a dummy object (cylinder).

q=($dimMNcontrol.radius*25.4) --dimMNcontrol is the dummy cylinder
r=formattedPrint q format:".2f mm"
$dimMN.text=r --dimMN is the text field

This works fine in the viewport and renders ok in single frames but when I render a sequence or active segment, the code does not run. This problem happens when rendering on my own computer and with Backburner.

Any suggestions are appreciated, thanks!
(3ds Max Design 2009, creativity extension, sp1)


12 December 2008, 05:25 AM
Where did you place the script? Is it a scripted controller or a callback script?


12 December 2008, 01:45 PM
Hi Martijn,

The script was placed on a dummy object using the expression editor. So there were 2 dummy objects, one to hold the script and one to animate the upper/lower limits. Roundabout method perhaps.

My co-worker actually just got this working by running the script in the text field's Kerning property and animating the Leading to the desired values. This gets around using dummy objects.

$dim_Text.text=formattedPrint($dim_Text.Leading*25.4) format:".1f" as string+" mm"

This works however I'd be interested to know why essentially the same code doesn't work using my original method when rendering a sequence.


12 December 2008, 03:52 PM
As Martijn said you need a callback or some time context, otherwise it is executed on the first frame and that is it.


12 December 2008, 05:26 PM
Hi Jason,

this is a validity interval issue - have a look here, it might help you!

CGTalk Moderation
12 December 2008, 05:26 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.