PDA

View Full Version : how to record animation?


Supermouse
02-05-2006, 03:54 AM
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?

eek
02-05-2006, 06:56 AM
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

Supermouse
02-05-2006, 10:31 AM
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

CGTalk Moderation
02-05-2006, 10:31 AM
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.