PDA

View Full Version : Swivel angle of an HIK handle as an input for a float expression


griffinryan
05-08-2012, 05:37 PM
Hi again Max folks. I almost have this spine done, but I am stuck on one last thing. I am trying to use the swivel angle of an HIK handle as an input for a float expression, but I can't find the correct syntax. Here is an example of what I have so far.

addIndex = sp + 1
splineIkInput[sp].transform.controller.swivelAngle.controller = Float_Expression ()
splineFloatExpression = "(midSwvl + hipCtrl) / 2"
splineIkInput[sp].transform.controller.swivelAngle.controller.AddScalarTarget"hipCtrl" splineCtlInput[1].rotation.controller.Z_Rotation.controller
splineIkInput[sp].transform.controller.swivelAngle.controller.AddScalarTarget"midSwvl" ( Stuck HERE)
splineIkInput[sp].transform.controller.swivelAngle.controller.setExpression splineFloatExpression

griffinryan
05-10-2012, 05:25 PM
Problem solved.
if sp == 2 do(
addIndex = sp + 1
splineIkInput[sp].transform.controller.swivelAngle.controller = Float_Expression ()
splineFloatExpression = "(midSwvl + hipCtrl) / 2"
splineIkInput[sp].transform.controller.swivelAngle.controller.AddScalarTarget"hipCtrl" splineCtlInput[1].rotation.Zero_Euler_XYZ.Z_Rotation.controller
splineIkInput[sp].transform.controller.swivelAngle.controller.AddScalarTarget"midSwvl" splineIkInput[3].controller[1] -- Or .controller[SwivelAngle]. Get SubAnim
splineIkInput[sp].transform.controller.swivelAngle.controller.setExpression splineFloatExpression

CGTalk Moderation
05-10-2012, 05:25 PM
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.