Max Script: copy keys from object to object

My beginner problems & solutions

Moderator: Falk

Antworten
Simon
Site Admin
Beiträge: 1678
Registriert: 10.10.2006, 16:41

Max Script: copy keys from object to object

Beitrag von Simon »

Code: Alles auswählen

with animate on
(
	for t = animationrange.start to animationrange.end do
	(
		--sliderTime = t;
		at time t $dummy01.controller.position = $bone03.position.controller.value;		
		at time t $dummy01.controller.rotation = $bone03.rotation.controller.value;		
	)
)
bone03: geometry object
dummy01: bone dummy
goal: copy keys from physic simulated bone03 to the dummy-bone.

You can't get the key-information directly. You need to use a controller. To read the key data, use object.controller.position.value. To write you need to use only object.controller.position!

IMPORTANT: the order! i tried it first with object.position.controller but this will not work!

In this case you will create keys from start to end of the timeline.
Antworten