Notifications
Clear all

[Closed] how to record animation?

cite a case.there is a animated box,then link another box to the first one.how to record the animation of the sceond box by script?i attempt to use “max set key keys”to record the animation.the key is set,but when i delete the first box,no animation on second one?how to do that?

2 Replies
 eek

Use a null to track the second boxes position.

for f = 1 to 100 do
(
animate on
slidertime = f
null.pos = secondbox.pos
)

Then delete the parent box and track the second box onto the null.

for f = 1 to 100 do
(
animate on
slidertime = f
secondbox.pos = null.pos
)
delete null

eek

it’s good idea!!! i improve the script which u provided and it works now!
thx
script here:
obj=box()
obj.name=“test1”
animate on
(
at time 0 (obj.pos = [-100, 0, 0]; obj.scale = [1, 1, 1])
at time 100 (obj.pos = [100, 0, 0]; obj.scale = [1, 1, 1])
)
obj2=box()
obj2.name=“test2”
obj2.parent=obj
obj3=box()
obj3.name=“test3”
for f = 0 to 100 do
(
animate on
(
slidertime = f
at time f(obj3.pos = obj.pos;obj3.scale=obj.scale)
)
)
delete obj
for f = 0 to 100 do
(
animate on
(
slidertime = f
at time f(obj2.pos = obj3.pos;obj2.scale=obj3.scale)
)
)
delete obj3