PDA

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


jdulberg
12-15-2008, 01:25 PM
Hello,

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)

Jason

magicm
12-18-2008, 04:25 AM
Where did you place the script? Is it a scripted controller or a callback script?

Martijn

jdulberg
12-18-2008, 12: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.

Jason

PiXeL_MoNKeY
12-18-2008, 02: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.

-Eric

LoneRobot
12-18-2008, 04:26 PM
Hi Jason,

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

http://forums.cgsociety.org/showthread.php?f=98&t=684033&highlight=validity+interval
http://forums.cgsociety.org/showthread.php?f=98&t=656094&highlight=validity+interval

CGTalk Moderation
12-18-2008, 04: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.