View Full Version : Force position script to update

11-04-2010, 05:13 PM
Hey everyone...
I have the following script to position an object at the centre of the bounding box of a group. It works fine when stepping through the timeline or creating a preview but doesn't update when scrubbing the timeline or when rendering a sequence of frames. Is there a way to force the script to evaluate on every frame? The timeline scrubbing isn't a big deal but I need the script to update when I render...

I'm using max 2011 on windows 7 64bit

bb = nodeLocalBoundingBox grp -- the group is open and 'grp' is assigned to the group node
p1 = bb[1]
p2 = bb[2]

v1 = p2 - p1
p3 = p1 + (v1*0.5)

Thanks for looking - any suggestions greatly appreciated...

11-04-2010, 06:12 PM
OK, small amount of progress - the timeline scrubbing works as long as there's a viewport visible which shows the entire group bounding box - when I maximise my camera viewport the bounding box isn't completely visible in frame at all times which causes the original problem.

However, this still doesn't solve the rendertime issue...

11-04-2010, 09:26 PM
If you use a script controller, try adding a track from some object that has animation on it. This triggers the script controller to update, even though you're not actually using that value.


CGTalk Moderation
11-04-2010, 09: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.