hou.BaseKeyframe class
Abstract base class for all keyframe class.
Subclasses: hou.Keyframe , hou.StringKeyframe
Methods
asCode(self, save_keys_in_frames=False, function_name=None)→str-
Prints the Python code necessary to recreate a keyframe.
save_keys_in_frames
Output channel and key times in samples (frames) instead of seconds.
function_name
If a function_name is specified, the output will be wrapped in a Python function.
evaluatedType(self)→ hou.parmData enum value-
Returns the type that the keyframe evaluates to.
expression(self)→str-
Returns the keyframe’s expression. For example, in cases where the keyframe has had two values set the interpolating function is returned e.g. “bezier()”, “spline()” etc.
This function raises if an expression has not been set.
See
setExpression()andisExpressionSet(). expressionLanguage(self)→ hou.exprLanguage enum value-
Returns the keyframe’s expression’s language.
This function raises hou.KeyframeValueNotSet if an expresion language has not ben set.
See
setExpression(), andisExpressionLanguageSet(). frame(self)→double-
Returns the keyframe’s frame number.
This function raises hou.KeyframeValueNotSet if the frame or time has not been set.
See
setFrame()andsetTime(). getReferencedParm(self)→ hou.ParmisExpressionLanguageSet(self)→bool-
Returns whether the keyframe expression’s language is set.
See
setExpression()andexpressionLanguage(). isExpressionSet(self)→bool-
Returns whether the keyframe’s expression is set.
See
setExpression()andexpression(). isLocked(self)→boolisParmReference(self)→boolisTimeDependent(self)→boolisTimeSet(self)→bool-
Returns whether the keyframe’s time is set.
See
setTime()andtime(). Keyframe(self)lock(self, value=None)moveToIntegerKeyframes(self, mode)setExpression(self, expression, language=None)-
Sets the keyframe’s expression and language.
This function raises hou.TypeError if
languageis not a value from hou.exprLanguage.See
expression(),expressionLanguage(),isExpressionSet(),isExpressionLanguageSet(). setFrame(self, frame)-
Sets the keyframe’s frame number. Using the number of frames per second (hou.fps), setting the frame number also sets the time. For example, with an fps of 24, then setting the frame number to 49 will set the time to 2 seconds.
See
frame(). setTime(self, time)-
Sets the keyframe’s time in seconds. Using the number of frames per second (hou.fps), setting the time also sets the frame number. For example, with an fps of 24, then setting the time to 2 seconds will set the frame number to 49.
See
time(). time(self)→double-
Returns the keyframe’s time in seconds.
This function raises if the time or frame has not been set.
See
setTime()andsetFrame().