Notifications
Clear all

[Closed] Force position script to update

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)
p3

Thanks for looking – any suggestions greatly appreciated…

2 Replies

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…

 JHN

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.

-Johan