hou.BaseKeyframe class

Abstract base class for all keyframe class.

All Methods Replaces

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() and isExpressionSet().

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(), and isExpressionLanguageSet().

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() and setTime().

getReferencedParm(self)hou.Parm

Not implemented yet

isExpressionLanguageSet(self)bool

Returns whether the keyframe expression’s language is set.

See setExpression() and expressionLanguage().

isExpressionSet(self)bool

Returns whether the keyframe’s expression is set.

See setExpression() and expression().

isLocked(self)bool

Not implemented yet

isParmReference(self)bool

Not implemented yet

isTimeDependent(self)bool

Not implemented yet

isTimeSet(self)bool

Returns whether the keyframe’s time is set.

See setTime() and time().

Keyframe(self)

Not implemented yet

lock(self, value=None)

Not implemented yet

moveToIntegerKeyframes(self, mode)

Not implemented yet

setExpression(self, expression, language=None)

Sets the keyframe’s expression and language.

This function raises hou.TypeError if language is 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() and setFrame().

Replaces

chkey command , chkeyls command , chkey command , chround command , chsraw expression function , lock expression function , opscript command