SBAnimation#

See Presenting and animating section to learn how to create animations.

See also

Example: Presentation: play path

SAMSON SDK: SBDDocumentAnimation

class samson.SBAnimation(*args, **kwargs)#

Bases: SBNode

This class describes an animation.

Overloaded function.

  1. __init__(self: samson.SBAnimation) -> None

Constructs an animation

  1. __init__(self: samson.SBAnimation, arg0: str, arg1: samson.SBNodeIndexer, arg2: float) -> None

Constructs an animation with name from the nodes in nodeIndexer at given frame

class Category(self: samson.SBAnimation.Category, value: int)#

Bases: pybind11_object

Members:

Entrance

Highlight

Motion

Exit

Camera

Other

Camera = <Category.Camera: 5>#
Entrance = <Category.Entrance: 1>#
Exit = <Category.Exit: 4>#
Highlight = <Category.Highlight: 2>#
Motion = <Category.Motion: 3>#
Other = <Category.Other: 6>#
property name#
property value#
addKeyframe(self: samson.SBAnimation, frame: float) bool#

Adds a keyframe at frame frame

canAddKeyframe(self: samson.SBAnimation, frame: float) bool#

Returns whether it is possible to add a keyframe at frame frame

canMoveKeyframe(self: samson.SBAnimation, fromFrame: float, toFrame: float) bool#

Returns whether it is possible to move the keyframe from frame fromFrame to frame toFrame

canRemoveKeyframe(self: samson.SBAnimation, frame: float) bool#

Returns whether it is possible to remove a keyframe at frame frame

categoryString(self: samson.SBAnimation, humanReadable: bool = False) str#

Returns a string describing the category of the animation

static getCategoryString(category: samson.SBAnimation.Category, humanReadable: bool = False) str#

Returns a string describing the category of the animation

getKeyframeIndex(self: samson.SBAnimation, keyframe: float) int#

Returns the index of keyframe in the vector of keyframes (-1 if the keyframe is not present)

getNextAnimation(self: samson.SBAnimation) samson.SBAnimation#

Returns the next animation

getPreviousAnimation(self: samson.SBAnimation) samson.SBAnimation#

Returns the previous animation

hasKeyframe(self: samson.SBAnimation, frame: float) bool#

Returns whether the animation has a keyframe at frame frame

hasKeyframes(self: samson.SBAnimation) bool#

Returns whether the animation has keyframes

moveKeyframe(self: samson.SBAnimation, fromFrame: float, toFrame: float) bool#

Moves the keyframe from frame fromFrame to frame toFrame

removeKeyframe(self: samson.SBAnimation, frame: float) bool#

Removes a keyframe at frame frame

Camera = <Category.Camera: 5>#
Entrance = <Category.Entrance: 1>#
Exit = <Category.Exit: 4>#
Highlight = <Category.Highlight: 2>#
Motion = <Category.Motion: 3>#
Other = <Category.Other: 6>#
property beginKeyframe#

Returns the first keyframe, or zero if there are no key frames. A read-only property.

property category#

Returns the category of the animation. A read-only property.

property endKeyframe#

Returns the last keyframe, or zero if there are no key frames. A read-only property.

property numberOfKeyframes#

Returns the number of keyframes. A read-only property.