Qt3DAnimation.QAnimationController¶
A controller class for animations. More…
Synopsis¶
Functions¶
def
activeAnimationGroup
()def
addAnimationGroup
(animationGroups)def
animationGroupList
()def
entity
()def
getAnimationIndex
(name)def
getGroup
(index)def
position
()def
positionOffset
()def
positionScale
()def
recursive
()def
removeAnimationGroup
(animationGroups)def
setAnimationGroups
(animationGroups)
Slots¶
def
setActiveAnimationGroup
(index)def
setEntity
(entity)def
setPosition
(position)def
setPositionOffset
(offset)def
setPositionScale
(scale)def
setRecursive
(recursive)
Signals¶
def
activeAnimationGroupChanged
(index)def
entityChanged
(entity)def
positionChanged
(position)def
positionOffsetChanged
(offset)def
positionScaleChanged
(scale)def
recursiveChanged
(recursive)
Detailed Description¶
QAnimationController
class controls the selection and playback of animations. The class can be used to find all animations fromQEntity
tree and createQAnimationGroups
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 thepositionScale
andpositionOffset
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
PySide2.Qt3DAnimation.Qt3DAnimation.
QAnimationController
([parent=None])¶ - param parent
QObject
Constructs a new
QAnimationController
withparent
.
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
activeAnimationGroup
()¶ - Return type
int
See also
setActiveAnimationGroup()
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
activeAnimationGroupChanged
(index)¶ - Parameters
index –
int
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
addAnimationGroup
(animationGroups)¶ - Parameters
animationGroups –
QAnimationGroup
Adds the given
animationGroup
to the controller.
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
animationGroupList
()¶ - Return type
Returns the list of animation groups the conroller is currently holding.
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
entity
()¶ - Return type
QEntity
See also
setEntity()
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
entityChanged
(entity)¶ - Parameters
entity –
QEntity
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
getAnimationIndex
(name)¶ - Parameters
name – unicode
- Return type
int
Returns the index of the animation with
name
. Returns -1 if no AnimationGroup with the given name is found.
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
getGroup
(index)¶ - Parameters
index –
int
- Return type
QAnimationGroup
Returns the AnimationGroup with the given
index
.
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
position
()¶ - Return type
float
See also
setPosition()
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
positionChanged
(position)¶ - Parameters
position –
float
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
positionOffset
()¶ - Return type
float
See also
setPositionOffset()
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
positionOffsetChanged
(offset)¶ - Parameters
offset –
float
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
positionScale
()¶ - Return type
float
See also
setPositionScale()
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
positionScaleChanged
(scale)¶ - Parameters
scale –
float
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
recursive
()¶ - Return type
bool
See also
setRecursive()
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
recursiveChanged
(recursive)¶ - Parameters
recursive –
bool
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
removeAnimationGroup
(animationGroups)¶ - Parameters
animationGroups –
QAnimationGroup
Removes the given
animationGroup
from the controller.
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
setActiveAnimationGroup
(index)¶ - Parameters
index –
int
See also
activeAnimationGroup()
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
setAnimationGroups
(animationGroups)¶ - Parameters
animationGroups –
Sets the
animationGroups
for the controller. Old groups are cleared.
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
setEntity
(entity)¶ - Parameters
entity –
QEntity
See also
entity()
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
setPosition
(position)¶ - Parameters
position –
float
See also
position()
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
setPositionOffset
(offset)¶ - Parameters
offset –
float
See also
positionOffset()
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
setPositionScale
(scale)¶ - Parameters
scale –
float
See also
positionScale()
-
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
setRecursive
(recursive)¶ - Parameters
recursive –
bool
See also
recursive()
© 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.