Class InterpSetting

Version added: before 9.5
To create a new object of this class, use the following:

- Local variable:
local interp = MOHO.InterpSetting:new_local()

- Global (see Script Structure about conventions for naming globals):
XX_interp = MOHO.InterpSetting:new()

val1 and val2 have specific meanings for different interpolation types:

val1 = noise amplitude: how far from the previous position the "jump" might be. (The magnitude and direction are random.)
val2 = noise scale: Whilst the UI refers to this as "Scale" it is better defined as "Frequency", i.e. how often a new position is created in time. The value in the API is the inverse of that presented in the UI. (e.g. UI says 10, script will see 0.1). Empirical observation suggests that the UI-number is the number of frames between position recalculation. IOW a script value of 0.1 is "recalculate every 10 frames". Fractional values do not appear to generate any sub-frame animation, but if an value of 0.1 is entered in the UI (or a script provides a value of 10), it appears that every frame the item actually jumps by the (vector) sum of 10 jumps.

INTERP_CYCLE - val1 = relative starting frame (count back this many frames and start again), val2 = absolute starting frame (count back to exactly this frame, use -1 to ignore this field)

INTERP_POSE - val1 = index to the pose

Methods of InterpSetting:

Name Returns Description Ver
BezierInAngle real < 9.5
BezierInPercentage real < 9.5
BezierOutAngle real < 9.5
BezierOutPercentage real < 9.5
IsAdditiveCycle bool Returns true if the cycle is additive. 12
Reset void < 9.5
SetAdditiveCycle void Sets the cycle to be additive or not 12
SetBezierInAngle void < 9.5
SetBezierInPercentage void < 9.5
SetBezierOutAngle void < 9.5
SetBezierOutPercentage void < 9.5

Properties of InterpSetting:

Name Type Description Ver
flags uint8 < 9.5
hold int32 how many frames to hold the previous value before interpolating to the next < 9.5
interpMode int32 < 9.5
interval int32 1 to interpolate every frame, 2 to animate on 2's, 3 to animate on 3's, etc. < 9.5
stagger bool Added in version 10 10
tags int32 Used for keyframe color, and possibly other stuff in the future. The color codes are the same as for bone tags. < 9.5
val1 real < 9.5
val2 real < 9.5