AnimationController QML Type

A controller type for animations More...

Import Statement: import Qt3D.Animation 2.9
Since: Qt 5.9
Instantiates: QAnimationController



Detailed Description

AnimationController type controls the selection and playback of animations. The type can be used to find all animations from Entity tree and create AnimationGroups 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.

Property Documentation

activeAnimationGroup : int

Holds the currectly active animation group.

animationGroups : list<AnimationGroup>

Holds the list of animation groups in the controller.

entity : Entity

Holds the entity animations are gathered and grouped from. If the controller already holds animations, they are cleared.

position : real

Holds the current position of the animation. When the position is set, it is scaled and offset with positionScale/positionOffset and propagated to the active animation group.

positionOffset : real

Holds the position offset of the animation.

positionScale : real

Holds the position scale of the animation.

recursive : bool

Holds whether the recursively search the entity tree when gathering animations from the entity. If set to true, the animations are searched also from the child entities of the entity. If set to false, only the entity passed to the controller is searched.

Method Documentation

int getAnimationIndex(name)

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

AnimationGroup getGroup(index)

Returns the AnimationGroup with the given index.

© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.