Help with InterpSetting class
Posted: Fri Sep 02, 2022 1:34 pm
Can anyone offer insight to working with the InterpSetting class? I'm trying to write a tool for myself to be able to apply certain easing settings that I frequently use to selected keyframes with a single tool button click. My stumbling block is in setting Bezier curve parameters ... I know what values the parameters should have but I can't figure out how to apply them to a keyframe using code.
According to the documentation for the AnimChannel class, the SetKeyInterp() method can be called in two ways -- by passing an integer Interpolation Method (like 2 for Ease In/Out) or an instance of the InterpSetting class. The first way works as expected, but in order to set Bezier curve parameters you need to use the second way.
The documentation for the InterpSetting class lists several methods -- SetBezierInAngle(), SetBezierInPercentage(), SetBezierOutAngle(), SetBezierOutPercentage() -- that look to provide the solution but they each require two parameters: component, and angle or percentage. I know what angle and percentage ought to be, but what is the component parameter?
According to the documentation for the AnimChannel class, the SetKeyInterp() method can be called in two ways -- by passing an integer Interpolation Method (like 2 for Ease In/Out) or an instance of the InterpSetting class. The first way works as expected, but in order to set Bezier curve parameters you need to use the second way.
The documentation for the InterpSetting class lists several methods -- SetBezierInAngle(), SetBezierInPercentage(), SetBezierOutAngle(), SetBezierOutPercentage() -- that look to provide the solution but they each require two parameters: component, and angle or percentage. I know what angle and percentage ought to be, but what is the component parameter?