I'm wondering if anybody could shed a light on issues I'm having with
setting up animCurves through the API, or more specifically the key
Tangents.

Basically I've moving our animFormat into API and have pretty much got
everything running but one of the regression tests is failing. It seems
like the order in which you set the MFnAnimCurve tangent vars affects the
resulting curve and how the tangents are built

I'm running the following for key in keys on an MFnAnimCurve to try and
rebuild the tangents as per the original ....


crvFnc.setTangentsLocked(kindex, lockedTangents)

if weightedTans:
    # only settable if the curve has weighted tangents
    crvFnc.setWeight(kindex, iw, 1)
    crvFnc.setWeight(kindex, ow, 0)
    crvFnc.setWeightsLocked(kindex, wl)

crvFnc.setAngle(kindex, OpenMaya.MAngle(math.radians(inAngle)), 1)
crvFnc.setAngle(kindex, OpenMaya.MAngle(math.radians(outAngle)), 0)

crvFnc.setInTangentType(kindex, AC_TANGENT_TYPES[inTangentType])
crvFnc.setOutTangentType(kindex, AC_TANGENT_TYPES[outTangentType])


.... but it seems like the order I set this data changes the results and
I'll be damned if I can get a sequence that loads everything back as
intended, even though the saved data is all correct

Can anybody shed any light on this?

cheers

Mark


-------------------------------------
Mark Jackson
CEO / Technical Director
red9consultancy.com

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAGQH2FG0gm3oUP5uJTTg4Pu1W4E_Ro2bM2K2%2BoL6vZUr5KdQng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to