A controller class for animations. 更多 …
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)
def
setActiveAnimationGroup
(index)
def
setEntity
(entity)
def
setPosition
(position)
def
setPositionOffset
(offset)
def
setPositionScale
(scale)
def
setRecursive
(recursive)
def
activeAnimationGroupChanged
(index)
def
entityChanged
(entity)
def
positionChanged
(position)
def
positionOffsetChanged
(offset)
def
positionScaleChanged
(scale)
def
recursiveChanged
(recursive)
QAnimationControllerclass controls the selection and playback of animations. The class can be used to find all animations fromQEntitytree and createQAnimationGroupsfrom 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 thepositionScaleandpositionOffset值。注意
that the animation controller doesn’t have internal timer, but instead the user is responsible for updating the position property in timely manner.
PySide2.Qt3DAnimation.Qt3DAnimation.
QAnimationController
(
[
parent=None
]
)
¶
- param parent
QObject
构造新
QAnimationController
with
parent
.
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
activeAnimationGroup
(
)
¶
int
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
activeAnimationGroupChanged
(
index
)
¶
index
–
int
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
addAnimationGroup
(
animationGroups
)
¶
animationGroups
–
QAnimationGroup
添加给定
animationGroup
to the controller.
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
animationGroupList
(
)
¶
Returns the list of animation groups the conroller is currently holding.
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
entity
(
)
¶
QEntity
另请参阅
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
entityChanged
(
entity
)
¶
entity
–
QEntity
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
getAnimationIndex
(
name
)
¶
name – unicode
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
)
¶
index
–
int
QAnimationGroup
返回
AnimationGroup
采用给定
index
.
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
position
(
)
¶
float
另请参阅
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
positionChanged
(
position
)
¶
position
–
float
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
positionOffset
(
)
¶
float
另请参阅
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
positionOffsetChanged
(
offset
)
¶
offset
–
float
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
positionScale
(
)
¶
float
另请参阅
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
positionScaleChanged
(
scale
)
¶
scale
–
float
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
recursive
(
)
¶
bool
另请参阅
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
recursiveChanged
(
recursive
)
¶
recursive
–
bool
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
removeAnimationGroup
(
animationGroups
)
¶
animationGroups
–
QAnimationGroup
移除给定
animationGroup
from the controller.
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
setActiveAnimationGroup
(
index
)
¶
index
–
int
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
setAnimationGroups
(
animationGroups
)
¶
animationGroups –
设置
animationGroups
for the controller. Old groups are cleared.
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
setEntity
(
entity
)
¶
entity
–
QEntity
另请参阅
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
setPosition
(
position
)
¶
position
–
float
另请参阅
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
setPositionOffset
(
offset
)
¶
offset
–
float
另请参阅
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
setPositionScale
(
scale
)
¶
scale
–
float
另请参阅
PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController.
setRecursive
(
recursive
)
¶
recursive
–
bool
另请参阅