reverse biped animation

reverse biped animation, how can i do this via maxscript?

some ways i tried:

- reverse the animation by hand without script via scaling = works, but i need it scripted
- reverse the order of keys via moveKey-function = animation gets broken
- scale the timeinterval via scaleTime-function and scalefactor of -1 = animation gets broken
- reverseTime-function = does nothing

does anyone have a hint or something? big thanks :)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
real08121985's picture

i tested with the arm of a

i tested with the arm of a biped that got 2 keys: 1 = arm is up, 2 = arm is down. and i searched via google to find a solution and found this little topic at cgsociety http://forums.cgsociety.org/showthread.php?f=98&t=731337&highlight=biped.... that brought me to the biped.setTransform-function which i didnt knew until then and i started some testing.

the following testcode reverses the 2 keys at frame 10 and 30 .. looks promising, i think thats gonna work. hope it helps :]

(
	Obj = selection[1]
 
	time1 = Obj.controller.keys[1].time
	time2 = Obj.controller.keys[2].time
 
	at time time1 (
		pos1 = biped.getTransform Obj #pos
		rot1 = biped.getTransform Obj #rotation
		scl1 = biped.getTransform Obj #scale
	)
 
	at time time2 (
		pos2 = biped.getTransform Obj #pos
		rot2 = biped.getTransform Obj #rotation
		scl2 = biped.getTransform Obj #scale
	)
 
	setAkey = true
 
	at time -time2 (
		biped.setTransform Obj #pos pos2 setAkey
		biped.setTransform Obj #rotation rot2 setAkey
		biped.setTransform Obj #scale scl2 setAkey
	)
 
	at time -time1 (
		biped.setTransform Obj #pos pos1 setAkey
		biped.setTransform Obj #rotation rot1 setAkey
		biped.setTransform Obj #scale scl1 setAkey
	)
 
	deleteKey Obj.controller 3
	deleteKey Obj.controller 3
 
	movekeys Obj.controller (time1+time2)
)
Anubis's picture

yeah, you are right, too

yeah, you are right, too many limitations in maxscript when come to bipped :/

my recent MAXScripts RSS (archive here)

real08121985's picture

yeah, try it for yourself,

yeah, try it for yourself, maybe i've done something wrong but simply nothing happened. :0

Anubis's picture

reverseTime-function = does

reverseTime-function = does nothing ??

my recent MAXScripts RSS (archive here)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.