ScriptSpot

Forum topic · General Scripting

biped.createLayer and biped.setTransform

By Howard AB234 · 2009-02-27

Description

i'm trying to write a script that requires the use of biped.createLayer and biped.setTransform.  it is to rotate the fingers in a biped skeleton.  you can test it by creating a max scene and creating a standard biped skeleton in it.  then run the following code.  you should see the elbow go crazy and flip 180 degrees.  if you remove the parenthesis and run the code, it rotates the corret finger and doesn't flip the elbow.  can anybody help me figure this one out?

 

 (

resetmaxfile #noprompt

--open currentFile

loadmaxfile "E:\\hhsu\\testing ground\\test1.max"

--go to frame 0

sliderTime = 0f

--create new animation layer

biped.createLayer $Bip01LHand.controller 1 "fingerLayer"

--rotate all fingers to proper angles

Biped.setTransform $Bip01LFinger0 #rotation (eulertoquat(eulerAngles -65 55 30)) true

)