QAnimationController

A controller class for animations. More

Inheritance diagram of PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController

Synopsis

Functions

Detailed Description

QAnimationController class controls the selection and playback of animations. The class can be used to find all animations from QEntity tree and create QAnimationGroups from the animations with the same name. The user can select which animation group is currently controlled with the animation controller by setting the active animation. The animation position is then propagated to that group after scaling and offsetting the provided position value with the positionScale and positionOffset values.

Note

that the animation controller doesn’t have internal timer, but instead the user is responsible for updating the position property in timely manner.

class PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController([parent=None])
Parameters

parentPySide6.QtCore.QObject

Constructs a new QAnimationController with parent.

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.activeAnimationGroup()
Return type

int

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.activeAnimationGroupChanged(index)
Parameters

index – int

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.addAnimationGroup(animationGroups)
Parameters

animationGroupsPySide6.Qt3DAnimation.Qt3DAnimation.QAnimationGroup

Adds the given animationGroup to the controller.

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.animationGroupList()
Return type

Returns the list of animation groups the conroller is currently holding.

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.entity()
Return type

PySide6.Qt3DCore.Qt3DCore.QEntity

See also

setEntity()

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.entityChanged(entity)
Parameters

entityPySide6.Qt3DCore.Qt3DCore.QEntity

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.getAnimationIndex(name)
Parameters

name – str

Return type

int

Returns the index of the animation with name. Returns -1 if no AnimationGroup with the given name is found.

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.getGroup(index)
Parameters

index – int

Return type

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationGroup

Returns the AnimationGroup with the given index.

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.position()
Return type

float

See also

setPosition()

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.positionChanged(position)
Parameters

position – float

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.positionOffset()
Return type

float

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.positionOffsetChanged(offset)
Parameters

offset – float

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.positionScale()
Return type

float

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.positionScaleChanged(scale)
Parameters

scale – float

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.recursive()
Return type

bool

See also

setRecursive()

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.recursiveChanged(recursive)
Parameters

recursive – bool

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.removeAnimationGroup(animationGroups)
Parameters

animationGroupsPySide6.Qt3DAnimation.Qt3DAnimation.QAnimationGroup

Removes the given animationGroup from the controller.

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.setActiveAnimationGroup(index)
Parameters

index – int

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.setAnimationGroups(animationGroups)
Parameters

animationGroups

Sets the animationGroups for the controller. Old groups are cleared.

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.setEntity(entity)
Parameters

entityPySide6.Qt3DCore.Qt3DCore.QEntity

See also

entity()

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.setPosition(position)
Parameters

position – float

See also

position()

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.setPositionOffset(offset)
Parameters

offset – float

See also

positionOffset()

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.setPositionScale(scale)
Parameters

scale – float

See also

positionScale()

PySide6.Qt3DAnimation.Qt3DAnimation.QAnimationController.setRecursive(recursive)
Parameters

recursive – bool

See also

recursive()