PySide6.Qt3DAnimation.Qt3DAnimation¶
- class Qt3DAnimation¶
Contains classes from the Qt3DAnimation module. More_…
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
- class QMorphTarget¶
A class providing morph targets to blend-shape animation. More_…
Synopsis¶
Properties¶
Methods¶
def
__init__()
def
addAttribute()
def
attributeList()
def
attributeNames()
def
setAttributes()
Signals¶
Static functions¶
def
fromGeometry()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
A
QMorphTarget
class is a convenience class, which provides a list ofQAttributes
, which theQMorphingAnimation
uses to animate geometry. AQMorphTarget
can also be created based on existingQGeometry
.Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property attributeNamesᅟ: list of strings¶
Holds a list of attribute names contained in the morph target.
- Access functions:
Constructs a
QMorphTarget
with givenparent
.- addAttribute(attribute)¶
- Parameters:
attribute –
QAttribute
Adds an
attribute
the morph target. An attribute with the same name must not have been added previously to the morph target.- attributeList()¶
- Return type:
.list of Qt3DCore.QAttribute
Returns a list of attributes contained in the morph target.
- attributeNames()¶
- Return type:
list of strings
Getter of property
attributeNamesᅟ
.- attributeNamesChanged(attributeNames)¶
- Parameters:
attributeNames – list of strings
Notification signal of property
attributeNamesᅟ
.- static fromGeometry(geometry, attributes)¶
- Parameters:
geometry –
QGeometry
attributes – list of strings
- Return type:
Returns a morph target based on the
attributes
in the givengeometry
.- removeAttribute(attribute)¶
- Parameters:
attribute –
QAttribute
Removes an
attribute
from the morph target.- setAttributes(attributes)¶
- Parameters:
attributes – .list of Qt3DCore.QAttribute
Sets
attributes
to the morph target. Old attributes are cleared.
- class QKeyFrame¶
A base class for handling keyframes. More_…
Synopsis¶
Methods¶
def
__init__()
def
coordinates()
def
__ne__()
def
__eq__()
def
setCoordinates()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
- class InterpolationType¶
- __init__()¶
- __init__(coords)
- Parameters:
coords –
QVector2D
- interpolationType()¶
- Return type:
- setInterpolationType(interp)¶
- Parameters:
interp –
InterpolationType
- class QClock¶
-
Synopsis¶
Properties¶
Methods¶
def
__init__()
def
playbackRate()
Signals¶
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property playbackRateᅟ: float¶
- Access functions:
- __init__([parent=None])¶
- Parameters:
parent –
QNode
- playbackRate()¶
- Return type:
float
Getter of property
playbackRateᅟ
.- playbackRateChanged(playbackRate)¶
- Parameters:
playbackRate – float
Notification signal of property
playbackRateᅟ
.- setPlaybackRate(playbackRate)¶
- Parameters:
playbackRate – float
Setter of property
playbackRateᅟ
.
- class QChannelMapper¶
Allows to map the channels within the clip onto properties of objects in the application. More_…
Added in version 6.1.
Synopsis¶
Methods¶
def
__init__()
def
addMapping()
def
mappings()
def
removeMapping()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
- __init__([parent=None])¶
- Parameters:
parent –
QNode
- addMapping(mapping)¶
- Parameters:
mapping –
QAbstractChannelMapping
- mappings()¶
- Return type:
- removeMapping(mapping)¶
- Parameters:
mapping –
QAbstractChannelMapping
- class QChannelComponent¶
Synopsis¶
Methods¶
def
__init__()
def
appendKeyFrame()
def
begin()
def
cbegin()
def
cend()
def
clearKeyFrames()
def
end()
def
insertKeyFrame()
def
keyFrameCount()
def
name()
def
removeKeyFrame()
def
setName()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
- __init__()¶
- __init__(name)
- Parameters:
name – str
- __init__(arg__1)
- Parameters:
arg__1 –
QChannelComponent
- clearKeyFrames()¶
- keyFrameCount()¶
- Return type:
int
- name()¶
- Return type:
str
- removeKeyFrame(index)¶
- Parameters:
index – int
- setName(name)¶
- Parameters:
name – str
- class QChannel¶
Defines a channel for a
QAnimationClipData
. The animation system interpolates each channel component independently except in the case theQChannel
is called “Rotation” (case sensitive), it has four QChannelComponents and the same number of keyframes for each QChannelComponent. In that case the interpolation will be performed using SLERP. More_…Synopsis¶
Methods¶
def
__init__()
def
begin()
def
cbegin()
def
cend()
def
end()
def
jointIndex()
def
name()
def
setJointIndex()
def
setName()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
- __init__()¶
- __init__(name)
- Parameters:
name – str
- __init__(arg__1)
- Parameters:
arg__1 –
QChannel
- appendChannelComponent(component)¶
- Parameters:
component –
QChannelComponent
- begin()¶
- Return type:
- cbegin()¶
- Return type:
- cend()¶
- Return type:
- channelComponentCount()¶
- Return type:
int
- clearChannelComponents()¶
- end()¶
- Return type:
- insertChannelComponent(index, component)¶
- Parameters:
index – int
component –
QChannelComponent
- jointIndex()¶
- Return type:
int
- name()¶
- Return type:
str
- removeChannelComponent(index)¶
- Parameters:
index – int
- setJointIndex(jointIndex)¶
- Parameters:
jointIndex – int
- setName(name)¶
- Parameters:
name – str
- class QAnimationGroup¶
A class grouping animations together. More_…
Synopsis¶
Properties¶
Methods¶
def
__init__()
def
addAnimation()
def
animationList()
def
duration()
def
name()
def
position()
def
setAnimations()
Slots¶
def
setName()
def
setPosition()
Signals¶
def
nameChanged()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
QAnimationGroup
class is used to group multiple animations so that they can act as one animation. The position set to the group is also set to all animations in a group. The duration is the maximum of the individual animations. The animations can be any supported animation type and do not have to have the same name.Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property durationᅟ: float¶
Holds the maximum duration of the animations in the group.
- Access functions:
Signal
durationChanged()
- property nameᅟ: str¶
Holds the name of the animation group.
- Access functions:
Signal
nameChanged()
- property positionᅟ: float¶
Holds the animation position.
- Access functions:
Constructs an
QAnimationGroup
withparent
.- addAnimation(animation)¶
- Parameters:
animation –
QAbstractAnimation
Adds new
animation
to the group.- animationList()¶
- Return type:
.list of Qt3DAnimation.QAbstractAnimation
Returns the list of animations in the group.
- duration()¶
- Return type:
float
Getter of property
durationᅟ
.- durationChanged(duration)¶
- Parameters:
duration – float
Notification signal of property
durationᅟ
.- name()¶
- Return type:
str
See also
setName()
Getter of property
nameᅟ
.- nameChanged(name)¶
- Parameters:
name – str
Notification signal of property
nameᅟ
.- position()¶
- Return type:
float
See also
setPosition()
Getter of property
positionᅟ
.- positionChanged(position)¶
- Parameters:
position – float
Notification signal of property
positionᅟ
.- removeAnimation(animation)¶
- Parameters:
animation –
QAbstractAnimation
Removes
animation
from the group.- setAnimations(animations)¶
- Parameters:
animations – .list of Qt3DAnimation.QAbstractAnimation
Sets the
animations
to the group. Old animations are removed.- setName(name)¶
- Parameters:
name – str
See also
name()
Setter of property
nameᅟ
.- setPosition(position)¶
- Parameters:
position – float
See also
position()
Setter of property
positionᅟ
.
- class QAnimationController¶
A controller class for animations. More_…
Synopsis¶
Properties¶
Methods¶
def
__init__()
def
entity()
def
getGroup()
def
position()
def
positionOffset()
def
positionScale()
def
recursive()
Slots¶
def
setEntity()
def
setPosition()
def
setRecursive()
Signals¶
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
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.
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property activeAnimationGroupᅟ: int¶
Holds the currectly active animation group.
- Access functions:
Holds the entity animations are gathered and grouped from. If the controller already holds animations, they are cleared.
- Access functions:
Signal
entityChanged()
- property positionᅟ: float¶
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.- Access functions:
- property positionOffsetᅟ: float¶
Holds the position offset of the animation.
- Access functions:
- property positionScaleᅟ: float¶
Holds the position scale of the animation.
- Access functions:
- property 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.
- Access functions:
Constructs a new
QAnimationController
withparent
.- activeAnimationGroup()¶
- Return type:
int
See also
Getter of property
activeAnimationGroupᅟ
.- activeAnimationGroupChanged(index)¶
- Parameters:
index – int
Notification signal of property
activeAnimationGroupᅟ
.- addAnimationGroup(animationGroups)¶
- Parameters:
animationGroups –
QAnimationGroup
Adds the given
animationGroup
to the controller.- animationGroupList()¶
- Return type:
.list of Qt3DAnimation.QAnimationGroup
Returns the list of animation groups the conroller is currently holding.
- entity()¶
- Return type:
QEntity
See also
Getter of property
entityᅟ
.- entityChanged(entity)¶
- Parameters:
entity –
QEntity
Notification signal of property
entityᅟ
.- 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.- getGroup(index)¶
- Parameters:
index – int
- Return type:
Returns the AnimationGroup with the given
index
.- position()¶
- Return type:
float
See also
Getter of property
positionᅟ
.- positionChanged(position)¶
- Parameters:
position – float
Notification signal of property
positionᅟ
.- positionOffset()¶
- Return type:
float
See also
Getter of property
positionOffsetᅟ
.- positionOffsetChanged(offset)¶
- Parameters:
offset – float
Notification signal of property
positionOffsetᅟ
.- positionScale()¶
- Return type:
float
See also
Getter of property
positionScaleᅟ
.- positionScaleChanged(scale)¶
- Parameters:
scale – float
Notification signal of property
positionScaleᅟ
.- recursive()¶
- Return type:
bool
See also
Getter of property
recursiveᅟ
.- recursiveChanged(recursive)¶
- Parameters:
recursive – bool
Notification signal of property
recursiveᅟ
.- removeAnimationGroup(animationGroups)¶
- Parameters:
animationGroups –
QAnimationGroup
Removes the given
animationGroup
from the controller.- setActiveAnimationGroup(index)¶
- Parameters:
index – int
See also
Setter of property
activeAnimationGroupᅟ
.- setAnimationGroups(animationGroups)¶
- Parameters:
animationGroups – .list of Qt3DAnimation.QAnimationGroup
Sets the
animationGroups
for the controller. Old groups are cleared.Setter of property
entityᅟ
.- setPosition(position)¶
- Parameters:
position – float
See also
Setter of property
positionᅟ
.- setPositionOffset(offset)¶
- Parameters:
offset – float
See also
Setter of property
positionOffsetᅟ
.- setPositionScale(scale)¶
- Parameters:
scale – float
See also
Setter of property
positionScaleᅟ
.- setRecursive(recursive)¶
- Parameters:
recursive – bool
See also
Setter of property
recursiveᅟ
.
- class QAnimationClipData¶
Class containing the animation data. More_…
Added in version 6.1.
Synopsis¶
Methods¶
def
__init__()
def
appendChannel()
def
begin()
def
cbegin()
def
cend()
def
channelCount()
def
clearChannels()
def
end()
def
insertChannel()
def
isValid()
def
name()
def
__ne__()
def
__eq__()
def
removeChannel()
def
setName()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
- __init__()¶
- __init__(arg__1)
- Parameters:
arg__1 –
QAnimationClipData
- channelCount()¶
- Return type:
int
- clearChannels()¶
- isValid()¶
- Return type:
bool
- name()¶
- Return type:
str
- __ne__(rhs)¶
- Parameters:
rhs –
QAnimationClipData
- Return type:
bool
- __eq__(rhs)¶
- Parameters:
rhs –
QAnimationClipData
- Return type:
bool
- removeChannel(index)¶
- Parameters:
index – int
- setName(name)¶
- Parameters:
name – str
- class QAnimationCallback¶
Represents an animation callback object. More_…
Synopsis¶
Virtual methods¶
def
valueChanged()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
- class Flag¶
(inherits
enum.Flag
) Flags to indicate how thevalueChanged()
function is called.Constant
Description
Qt3DAnimation.QAnimationCallback.OnOwningThread
Callback function is called on the owning (GUI or main) thread.
Qt3DAnimation.QAnimationCallback.OnThreadPool
Callback function is called on the thread pool’s worker thread.
- abstract valueChanged(value)¶
- Parameters:
value – object
Callback function that is triggered for changes in the animated
value
.See also
- class QAnimationAspect¶
Provides key-frame animation capabilities to Qt 3D. More_…
Synopsis¶
Methods¶
def
__init__()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
QAnimationAspect
provides key-frame animation to Qt 3D.Constructs a new
QAnimationAspect
withparent
.
- class QAbstractClipBlendNode¶
QAbstractClipBlendNode
is the base class for types used to construct animation blend trees. More_…Inherited by:
QLerpClipBlend
,QClipBlendValue
,QAdditiveClipBlend
Synopsis¶
Methods¶
def
__init__()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
Animation blend trees are used with a
QBlendedClipAnimator
to dynamically blend a set of animation clips together. The way in which the blending of animation clips is performed is controlled by the structure of the blend tree and the properties on the nodes it contains.The leaf nodes in a blend tree are containers for the input animation clips. These clips can be baked clips read from file via
QAnimationClipLoader
, or they can be clips that you build within your application with QAnimatitonClip andQAnimationClipData
. To include a clip in your blend tree, wrap it in aQClipBlendValue
node.The interior nodes of a blend tree represent blending operations that will be applied to their arguments which hold the input clips or even entire sub-trees of other blend tree nodes.
At present, the Qt 3D Animation module provides the following blend tree node types:
Additional node types representing other blending operations will be added in the future.
See also
QBlendedClipAnimator
- __init__([parent=None])¶
- Parameters:
parent –
QNode
- class QLerpClipBlend¶
Performs a linear interpolation of two animation clips based on a normalized factor. More_…
Synopsis¶
Properties¶
Methods¶
def
__init__()
def
blendFactor()
def
endClip()
def
startClip()
Slots¶
def
setBlendFactor()
def
setEndClip()
def
setStartClip()
Signals¶
def
endClipChanged()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
QLerpClipBlend
can be useful to create advanced animation effects based on individual animation clips. For instance, given a player character, lerp blending could be used to combine a walking animation clip with an injured animation clip based on a blend factor that increases the more the player gets injured. This would then allow with blend factor == 0 to have a non injured walking player, with blend factor == 1 a fully injured player, with blend factor == 0.5 a partially walking and injured player.See also
QBlendedClipAnimator
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property blendFactorᅟ: float¶
Specifies the blending factor between 0 and 1 to control the blending of two animation clips.
- Access functions:
- property endClipᅟ: QAbstractClipBlendNode¶
Holds the sub-tree that should be used as the start clip for this lerp blend node. That is, the clip returned by this blend node when the
blendFactor
is set to a value of 1.- Access functions:
- property startClipᅟ: QAbstractClipBlendNode¶
Holds the sub-tree that should be used as the start clip for this lerp blend node. That is, the clip returned by this blend node when the
blendFactor
is set to a value of 0.- Access functions:
- __init__([parent=None])¶
- Parameters:
parent –
QNode
- blendFactor()¶
- Return type:
float
See also
Getter of property
blendFactorᅟ
.- blendFactorChanged(blendFactor)¶
- Parameters:
blendFactor – float
Notification signal of property
blendFactorᅟ
.- endClip()¶
- Return type:
See also
Getter of property
endClipᅟ
.- endClipChanged(endClip)¶
- Parameters:
endClip –
QAbstractClipBlendNode
Notification signal of property
endClipᅟ
.- setBlendFactor(blendFactor)¶
- Parameters:
blendFactor – float
See also
Setter of property
blendFactorᅟ
.- setEndClip(endClip)¶
- Parameters:
endClip –
QAbstractClipBlendNode
See also
Setter of property
endClipᅟ
.- setStartClip(startClip)¶
- Parameters:
startClip –
QAbstractClipBlendNode
See also
Setter of property
startClipᅟ
.- startClip()¶
- Return type:
See also
Getter of property
startClipᅟ
.- startClipChanged(startClip)¶
- Parameters:
startClip –
QAbstractClipBlendNode
Notification signal of property
startClipᅟ
.
- class QClipBlendValue¶
Class used for including a clip in a blend tree. More_…
Synopsis¶
Properties¶
Methods¶
def
__init__()
def
clip()
Slots¶
def
setClip()
Signals¶
def
clipChanged()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property clipᅟ: QAbstractAnimationClip¶
The animation clip that needs to be included in the blend tree.
- Access functions:
Signal
clipChanged()
- __init__([parent=None])¶
- Parameters:
parent –
QNode
- __init__(clip[, parent=None])
- Parameters:
clip –
QAbstractAnimationClip
parent –
QNode
- clip()¶
- Return type:
See also
Getter of property
clipᅟ
.- clipChanged(clip)¶
- Parameters:
clip –
QAbstractAnimationClip
Notification signal of property
clipᅟ
.- setClip(clip)¶
- Parameters:
clip –
QAbstractAnimationClip
See also
Setter of property
clipᅟ
.
- class QAdditiveClipBlend¶
Performs an additive blend of two animation clips based on an additive factor. More_…
Synopsis¶
Properties¶
Methods¶
def
__init__()
def
additiveClip()
def
additiveFactor()
def
baseClip()
Slots¶
def
setBaseClip()
Signals¶
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
QAdditiveClipBlend
can be useful to create advanced animation effects based on individual animation clips. For example, if you:set the
baseClip
property to a normal walk cycle animation clip andset the
additiveClip
property to a shaking head difference clip,
then adjusting the
additiveFactor
property will control how much of theadditiveClip
gets added on to thebaseClip
. This has he effect that with anadditiveFactor
of zero, this blend node will yield the original walk cycle clip. With anadditiveFactor
of 1, it will yield the walk cycle including a shaking head animation.The blending operation implemented by this class is:
resultClip = baseClip + additiveFactor * additiveClip
There is nothing stopping you from using values for the additiveFacor property outside the 0 to 1 range, but please be aware that the input animation clips may not be authored in such a way for this to make sense.
See also
QBlendedClipAnimator
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property additiveClipᅟ: QAbstractClipBlendNode¶
This property holds the additive clip to be blended with the
baseClip
. The amount of blending is controlled by theadditiveFactor
property.- Access functions:
- property additiveFactorᅟ: float¶
Specifies the blending factor, typically between 0 and 1, to control the blending of two animation clips.
- Access functions:
- property baseClipᅟ: QAbstractClipBlendNode¶
This property holds the base animation clip. When the
additiveFactor
is zero the baseClip will also be the resulting clip of this blend node.- Access functions:
- __init__([parent=None])¶
- Parameters:
parent –
QNode
- additiveClip()¶
- Return type:
See also
Getter of property
additiveClipᅟ
.- additiveClipChanged(additiveClip)¶
- Parameters:
additiveClip –
QAbstractClipBlendNode
Notification signal of property
additiveClipᅟ
.- additiveFactor()¶
- Return type:
float
See also
Getter of property
additiveFactorᅟ
.- additiveFactorChanged(additiveFactor)¶
- Parameters:
additiveFactor – float
Notification signal of property
additiveFactorᅟ
.- baseClip()¶
- Return type:
See also
Getter of property
baseClipᅟ
.- baseClipChanged(baseClip)¶
- Parameters:
baseClip –
QAbstractClipBlendNode
Notification signal of property
baseClipᅟ
.- setAdditiveClip(additiveClip)¶
- Parameters:
additiveClip –
QAbstractClipBlendNode
See also
Setter of property
additiveClipᅟ
.- setAdditiveFactor(additiveFactor)¶
- Parameters:
additiveFactor – float
See also
Setter of property
additiveFactorᅟ
.- setBaseClip(baseClip)¶
- Parameters:
baseClip –
QAbstractClipBlendNode
See also
Setter of property
baseClipᅟ
.
- class QAbstractClipAnimator¶
QAbstractClipAnimator
is the base class for types providing animation playback capabilities. More_…Inherited by:
QClipAnimator
,QBlendedClipAnimator
Synopsis¶
Properties¶
Methods¶
def
__init__()
def
channelMapper()
def
clock()
def
isRunning()
def
loopCount()
def
normalizedTime()
Slots¶
def
setClock()
def
setLoopCount()
def
setRunning()
def
start()
def
stop()
Signals¶
def
clockChanged()
def
runningChanged()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
Subclasses of
QAbstractClipAnimator
can be aggregated by a QEntity to provide animation capabilities. The animator components provide an interface for controlling the animation (e.g. start, stop). Each animator type requires some form of animation data such as aQAbstractAnimationClip
as well as aQChannelMapper
which describes how the channels in the animation clip should be mapped onto the properties of the objects you wish to animate.The following subclasses are available:
- class Loops¶
Holds the number of times the animation should play.
Constant
Description
Qt3DAnimation.QAbstractClipAnimator.Infinite
This will repeat the loop continuously until it is explicitly stopped.
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property channelMapperᅟ: QChannelMapper¶
This property holds the ChannelMapper that controls how the channels in the animation clip map onto the properties of the target objects.
- Access functions:
The clock controls the speed with which an animation is played.
- Access functions:
Signal
clockChanged()
- property loopsᅟ: int¶
Holds the number of times the animation should play.
The value is 1 by default: the animation will be played once and then stop.
If set to
Infinite
, the animation will continuously repeat until it is explicitly stopped.- Access functions:
- property normalizedTimeᅟ: float¶
This property holds the clips normalized time.
- Access functions:
- property runningᅟ: bool¶
This property holds a boolean indicating whether the animation is currently running.
- Access functions:
- __init__([parent=None])¶
- Parameters:
parent –
QNode
- channelMapper()¶
- Return type:
See also
Getter of property
channelMapperᅟ
.- channelMapperChanged(channelMapper)¶
- Parameters:
channelMapper –
QChannelMapper
Notification signal of property
channelMapperᅟ
.- clock()¶
- Return type:
See also
Getter of property
clockᅟ
.Notification signal of property
clockᅟ
.- isRunning()¶
- Return type:
bool
Returns a boolean indicating whether the animation is currently running.
Getter of property
runningᅟ
.- loopCount()¶
- Return type:
int
Returns the number of times the animation should play.
The value is 1 by default: the animation will play through once and then stop.
If set to
Infinite
, the animation will continuously repeat until it is explicitly stopped.See also
Getter of property
loopsᅟ
.- loopCountChanged(loops)¶
- Parameters:
loops – int
Notification signal of property
loopsᅟ
.- normalizedTime()¶
- Return type:
float
See also
Getter of property
normalizedTimeᅟ
.- normalizedTimeChanged(index)¶
- Parameters:
index – float
Notification signal of property
normalizedTimeᅟ
.- runningChanged(running)¶
- Parameters:
running – bool
Notification signal of property
runningᅟ
.- setChannelMapper(channelMapper)¶
- Parameters:
channelMapper –
QChannelMapper
See also
Setter of property
channelMapperᅟ
.Setter of property
clockᅟ
.- setLoopCount(loops)¶
- Parameters:
loops – int
See also
Setter of property
loopsᅟ
.- setNormalizedTime(timeFraction)¶
- Parameters:
timeFraction – float
See also
Setter of property
normalizedTimeᅟ
.- setRunning(running)¶
- Parameters:
running – bool
See also
Setter of property
runningᅟ
.- start()¶
Starts the animation.
- stop()¶
Stops the animation.
- class QClipAnimator¶
QClipAnimator
is a component providing simple animation playback capabilities. More_…Synopsis¶
Properties¶
Methods¶
def
__init__()
def
clip()
Slots¶
def
setClip()
Signals¶
def
clipChanged()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
An instance of
QClipAnimator
can be aggregated by a QEntity to add the ability to play back animation clips and to apply the calculated animation values to properties of QObjects.The animation key frame data is provided via the clip property. This can be created programmatically with
QAnimationClip
or loaded from file withQAnimationClipLoader
.In order to apply the values played back from the channels of data in the animation clip, the clip animator needs to have a
QChannelMapper
object assigned to the channelMapper property.The properties for controlling the animator are provided by the
QAbstractClipAnimator
base class.Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property clipᅟ: QAbstractAnimationClip¶
This property holds the animation clip which contains the key frame data to be played back. The key frame data can be specified in either a
QAnimationClip
orQAnimationClipLoader
.- Access functions:
Signal
clipChanged()
- __init__([parent=None])¶
- Parameters:
parent –
QNode
- clip()¶
- Return type:
See also
Getter of property
clipᅟ
.- clipChanged(clip)¶
- Parameters:
clip –
QAbstractAnimationClip
Notification signal of property
clipᅟ
.- setClip(clip)¶
- Parameters:
clip –
QAbstractAnimationClip
See also
Setter of property
clipᅟ
.
- class QBlendedClipAnimator¶
QBlendedClipAnimator
is a component providing animation playback capabilities of a tree of blend nodes. More_…Synopsis¶
Properties¶
Methods¶
def
__init__()
def
blendTree()
Slots¶
def
setBlendTree()
Signals¶
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
An instance of
QBlendedClipAnimator
can be aggregated by a QEntity to add the ability to play back animation clips and to apply the calculated animation values to properties of QObjects.Whereas a
QClipAnimator
gets its animation data from a single animation clip,QBlendedClipAnimator
can blend together multiple clips. The animation data is obtained by evaluating a so called blend tree. A blend tree is a hierarchical tree structure where the leaf nodes are value nodes that encapsulate an animation clip (QAbstractAnimationClip
); and the internal nodes represent blending operations that operate on the nodes pointed to by their operand properties.To associate a blend tree with a
QBlendedClipAnimator
, set the animator’sblendTree
property to point at the root node of your blend tree:auto blendTreeRoot = new QAdditiveClipBlend(); ... auto animator = new QBlendedClipAnimator(); animator->setBlendTree(blendTreeRoot);
A blend tree can be constructed from the following node types:
Note
The blend node tree should only be edited when the animator is not running.
Additional node types will be added over time.
As an example consider the following blend tree:
Clip0---- | Lerp Node---- | | Clip1---- Additive Node | Clip2----
This can be created and used as follows:
// Create leaf nodes of blend tree auto clip0 = new QClipBlendValue( new QAnimationClipLoader(QUrl::fromLocalFile("walk.json"))); auto clip1 = new QClipBlendValue( new QAnimationClipLoader(QUrl::fromLocalFile("run.json"))); auto clip2 = new QClipBlendValue( new QAnimationClipLoader(QUrl::fromLocalFile("wave-arm.json"))); // Create blend tree inner nodes auto lerpNode = new QLerpClipBlend(); lerpNode->setStartClip(clip0); lerpNode->setEndClip(clip1); lerpNode->setBlendFactor(0.5f); // Half-walk, half-run auto additiveNode = new QAdditiveClipBlend(); additiveNode->setBaseClip(lerpNode); // Comes from lerp sub-tree additiveNode->setAdditiveClip(clip2); additiveNode->setAdditiveFactor(1.0f); // Wave arm fully // Run the animator auto animator = new QBlendedClipAnimator(); animator->setBlendTree(additiveNode); animator->setChannelMapper(...); animator->setRunning(true);
By authoring a set of animation clips and blending between them dynamically at runtime with a blend tree, we open up a huge set of possible resulting animations. As some simple examples of the above blend tree, where alpha is the additive factor and beta is the lerp blend factor we can get a 2D continuum of possible animations:
(alpha = 0, beta = 1) Running, No arm waving --- (alpha = 1, beta = 1) Running, Arm waving | | | | | | (alpha = 0, beta = 0) Walking, No arm waving --- (alpha = 0, beta = 1) Running, No arm waving
More complex blend trees offer even more flexibility for combining your animation clips. Note that the values used to control the blend tree (alpha and beta above) are simple properties on the blend nodes. This means, that these properties themselves can also be controlled by the animation framework.
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property blendTreeᅟ: QAbstractClipBlendNode¶
This property holds the root of the animation blend tree that will be evaluated before being interpolated by the animator.
- Access functions:
- __init__([parent=None])¶
- Parameters:
parent –
QNode
- blendTree()¶
- Return type:
See also
Getter of property
blendTreeᅟ
.- blendTreeChanged(blendTree)¶
- Parameters:
blendTree –
QAbstractClipBlendNode
Notification signal of property
blendTreeᅟ
.- setBlendTree(blendTree)¶
- Parameters:
blendTree –
QAbstractClipBlendNode
See also
Setter of property
blendTreeᅟ
.
- class QAbstractChannelMapping¶
-
Inherited by:
QSkeletonMapping
,QChannelMapping
,QCallbackMapping
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
- class QSkeletonMapping¶
-
Synopsis¶
Properties¶
Methods¶
def
__init__()
def
skeleton()
Slots¶
def
setSkeleton()
Signals¶
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property skeletonᅟ: QAbstractSkeleton¶
- Access functions:
- __init__([parent=None])¶
- Parameters:
parent –
QNode
- setSkeleton(skeleton)¶
- Parameters:
skeleton –
QAbstractSkeleton
Setter of property
skeletonᅟ
.- skeleton()¶
- Return type:
QAbstractSkeleton
Getter of property
skeletonᅟ
.- skeletonChanged(skeleton)¶
- Parameters:
skeleton –
QAbstractSkeleton
Notification signal of property
skeletonᅟ
.
- class QChannelMapping¶
Allows to map the channels within the clip onto properties of objects in the application. More_…
Synopsis¶
Properties¶
Methods¶
def
__init__()
def
channelName()
def
property()
def
target()
Slots¶
def
setChannelName()
def
setProperty()
def
setTarget()
Signals¶
def
targetChanged()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property channelNameᅟ: str¶
- Access functions:
- property propertyᅟ: str¶
- Access functions:
- Access functions:
Signal
targetChanged()
- __init__([parent=None])¶
- Parameters:
parent –
QNode
- channelName()¶
- Return type:
str
See also
Getter of property
channelNameᅟ
.- channelNameChanged(channelName)¶
- Parameters:
channelName – str
Notification signal of property
channelNameᅟ
.- property()¶
- Return type:
str
See also
Getter of property
propertyᅟ
.- propertyChanged(property)¶
- Parameters:
property – str
Notification signal of property
propertyᅟ
.- setChannelName(channelName)¶
- Parameters:
channelName – str
See also
Setter of property
channelNameᅟ
.- setProperty(property)¶
- Parameters:
property – str
See also
Setter of property
propertyᅟ
.Setter of property
targetᅟ
.- target()¶
- Return type:
QNode
See also
Getter of property
targetᅟ
.- targetChanged(target)¶
- Parameters:
target –
QNode
Notification signal of property
targetᅟ
.
- class QCallbackMapping¶
Allows to map the channels within the clip onto an invocation of a callback object. More_…
Synopsis¶
Properties¶
Methods¶
def
__init__()
def
callback()
def
channelName()
def
setCallback()
Slots¶
def
setChannelName()
Signals¶
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property channelNameᅟ: str¶
- Access functions:
- __init__([parent=None])¶
- Parameters:
parent –
QNode
- callback()¶
- Return type:
- channelName()¶
- Return type:
str
See also
Getter of property
channelNameᅟ
.- channelNameChanged(channelName)¶
- Parameters:
channelName – str
Notification signal of property
channelNameᅟ
.- setCallback(type, callback[, flags=Qt3DAnimation.QAnimationCallback.OnOwningThread])¶
- Parameters:
type – int
callback –
QAnimationCallback
flags – Combination of
Flag
Associates a
callback
object with this channel mapping.Such mappings do not have to have a target object and property name. When the
callback
object is set, every change in the animated value will lead to invoking the callback’svalueChanged
function either on the gui/main thread, or directly on one of the thread pool’s worker thread. This is controlled byflags
.type
specifies the type (for example, QMetaType::QVector3D, QMetaType::QColor, or QMetaType::Float) of the animated value. When animating node properties this does not need to be provided separately, however it becomes important to supply this when there is only a callback.Note
A mapping can be associated both with a node property and a callback. It is important however that
type
matches the type of the property in this case. Note also that for properties of type QVariant (for example, QParameter::value), thetype
is the type of the value stored in the QVariant.Note
The
callback
pointer is expected to stay valid while any associated animators are running.- setChannelName(channelName)¶
- Parameters:
channelName – str
See also
Setter of property
channelNameᅟ
.
- class QAbstractAnimationClip¶
QAbstractAnimationClip
is the base class for types providing key frame animation data. More_…Inherited by:
QAnimationClipLoader
,QAnimationClip
Synopsis¶
Properties¶
Methods¶
def
duration()
Signals¶
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
To utilise the key frame animation framework in the Qt 3D Animation module the animator component in use needs to be provided with the key frame animation data. The animation data is provided by one of the concrete subclasses of
QAbstractAnimationClip
:QAnimationClip
should be used when you want to create the animation data programmatically within your application. The actual data is set with aQAnimationClipData
value type.If you are loading baked animation data from a file, e.g. as created by an artist, then use the
QAnimationClipLoader
class and set itssource
property.Once the animation clip has been populated with data using the above methods, the read-only duration property will be updated by the Qt 3D Animation backend.
The typical usage of animation clips is:
auto animator = new QClipAnimator(); auto clip = new QAnimationClipLoader(); clip->setSource(QUrl::fromLocalFile("bounce.json")); animator->setClip(clip); animator->setChannelMapper(...); animator->setRunning(true);
Animation clips are also used as the leaf node values in animation blend trees:
// Create leaf nodes of blend tree auto slideClipValue = new QClipBlendValue( new QAnimationClipLoader(QUrl::fromLocalFile("slide.json"))); auto bounceClipValue = new QClipBlendValue( new QAnimationClipLoader(QUrl::fromLocalFile("bounce.json"))); // Create blend tree inner node auto additiveNode = new QAdditiveClipBlend(); additiveNode->setBaseClip(slideClipValue); additiveNode->setAdditiveClip(bounceClipValue); additiveNode->setAdditiveFactor(0.5f); // Run the animator auto animator = new QBlendedClipAnimator(); animator->setBlendTree(additiveNode); animator->setChannelMapper(...); animator->setRunning(true);
See also
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property durationᅟ: float¶
Holds the duration of the animation clip in seconds. Gets updated once the animation data is provided to Qt 3D using one of the concrete subclasses.
- Access functions:
Signal
durationChanged()
- duration()¶
- Return type:
float
Getter of property
durationᅟ
.- durationChanged(duration)¶
- Parameters:
duration – float
Notification signal of property
durationᅟ
.
- class QAnimationClipLoader¶
Enables loading key frame animation data from a file. More_…
Synopsis¶
Properties¶
Methods¶
def
__init__()
def
source()
def
status()
Slots¶
def
setSource()
Signals¶
def
sourceChanged()
def
statusChanged()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
- class Status¶
This enum identifies the status of animation clip.
Constant
Description
Qt3DAnimation.QAnimationClipLoader.NotReady
The clip has not been loaded yet
Qt3DAnimation.QAnimationClipLoader.Ready
The clip was successfully loaded
Qt3DAnimation.QAnimationClipLoader.Error
An error occurred while loading the clip
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.Holds the source URL from which to load the animation clip. Currently glTF2 and the native Qt 3D json animation file formats are supported.
In the case where a file contains multiple animations, it is possible to select which animation should be loaded by way of query parameters on the source url. The accepted query parameters are animationIndex and animationName. If both are specified, animationName is ignored.
If a file contains only a single animation, there is no need to specify the animationIndex or animationName. We simply use the one available animation.
- Access functions:
Signal
sourceChanged()
- property statusᅟ: Qt3DAnimation.QAnimationClipLoader.Status¶
This property contains the status of the animation clip.
- Access functions:
Signal
statusChanged()
- __init__([parent=None])¶
- Parameters:
parent –
QNode
- __init__(source[, parent=None])
- Parameters:
source –
QUrl
parent –
QNode
Setter of property
sourceᅟ
.- source()¶
- Return type:
See also
Getter of property
sourceᅟ
.Notification signal of property
sourceᅟ
.Returns the status of the animation clip.
Getter of property
statusᅟ
.Notification signal of property
statusᅟ
.
- class QAnimationClip¶
Specifies key frame animation data. More_…
Synopsis¶
Properties¶
Methods¶
def
__init__()
def
clipData()
Slots¶
def
setClipData()
Signals¶
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property clipDataᅟ: QAnimationClipData¶
- Access functions:
- __init__([parent=None])¶
- Parameters:
parent –
QNode
- clipData()¶
- Return type:
Returns the data describing the animation clip.
See also
Getter of property
clipDataᅟ
.- clipDataChanged(clipData)¶
- Parameters:
clipData –
QAnimationClipData
Notification signal of property
clipDataᅟ
.- setClipData(clipData)¶
- Parameters:
clipData –
QAnimationClipData
Set the parameters of the clip according to the
clipData
provided.See also
Setter of property
clipDataᅟ
.
- class QAbstractAnimation¶
An abstract base class for Qt3D animations. More_…
Inherited by:
QVertexBlendAnimation
,QMorphingAnimation
,QKeyframeAnimation
Synopsis¶
Properties¶
Methods¶
def
animationName()
def
animationType()
def
duration()
def
position()
def
setDuration()
Slots¶
def
setPosition()
Signals¶
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
QAbstractAnimation
is an abstract base class for all animations.QAbstractAnimation
can not be directly instantiated, but rather through its subclasses.QAbstractAnimation
specifies common properties for all Qt3D animations, such as animation name and type, current position and animation duration, while leaving the actual animating for the subclasses.- class AnimationType¶
This enumeration specifies the type of the animation
Constant
Description
Qt3DAnimation.QAbstractAnimation.KeyframeAnimation
Simple keyframe animation implementation for QTransform
Qt3DAnimation.QAbstractAnimation.MorphingAnimation
Blend-shape morphing animation
Qt3DAnimation.QAbstractAnimation.VertexBlendAnimation
Vertex-blend animation
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property animationNameᅟ: str¶
Holds the name of the animation.
- Access functions:
- property animationTypeᅟ: Qt3DAnimation.QAbstractAnimation.AnimationType¶
Holds the type of the animation.
- Access functions:
- property durationᅟ: float¶
Holds the duration of the animation.
- Access functions:
Signal
durationChanged()
- property positionᅟ: float¶
Holds the current position of the animation.
- Access functions:
- animationName()¶
- Return type:
str
See also
setAnimationName()
Getter of property
animationNameᅟ
.- animationNameChanged(name)¶
- Parameters:
name – str
Notification signal of property
animationNameᅟ
.- animationType()¶
- Return type:
Getter of property
animationTypeᅟ
.- duration()¶
- Return type:
float
See also
setDuration()
Getter of property
durationᅟ
.- durationChanged(duration)¶
- Parameters:
duration – float
Notification signal of property
durationᅟ
.- position()¶
- Return type:
float
See also
setPosition()
Getter of property
positionᅟ
.- positionChanged(position)¶
- Parameters:
position – float
Notification signal of property
positionᅟ
.- setAnimationName(name)¶
- Parameters:
name – str
See also
animationName()
Setter of property
animationNameᅟ
.- setDuration(duration)¶
- Parameters:
duration – float
Sets the
duration
of the animation.See also
- setPosition(position)¶
- Parameters:
position – float
See also
position()
Setter of property
positionᅟ
.
- class QVertexBlendAnimation¶
A class implementing vertex-blend morphing animation. More_…
Synopsis¶
Properties¶
Methods¶
def
__init__()
def
addMorphTarget()
def
interpolator()
def
target()
def
targetName()
Slots¶
def
setTarget()
def
setTargetName()
Signals¶
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
A
QVertexBlendAnimation
class implements vertex-blend morphing animation to a targetQGeometryRenderer
. TheQVertexBlendAnimation
sets the correctQAttributes
from themorph targets
to the targetgeometry
and calculates interpolator for the current position. Unlike withQMorphingAnimation
, where the blending is controller with blend weights, the blending occurs between sequential morph targets. The actual blending between the attributes must be implemented in the material. Qt3DAnimation::QMorphPhongMaterial implements material with morphing support for phong lighting model. The blending happens between 2 attributes - ‘base’ and ‘target’. The names for the base and target attributes are taken from the morph target names, where the base attribute retains the name it already has and the target attribute name gets ‘Target’ appended to the name. The interpolator can be set as aQParameter
to the used material. All morph targets in the animation should contain the attributes with same names as those in the base geometry.Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property interpolatorᅟ: float¶
Holds the interpolator between base and target attributes.
- Access functions:
- property targetᅟ: QGeometryRenderer¶
Holds the target QGeometryRenderer the morphing animation is applied to.
- Access functions:
Signal
targetChanged()
- property targetNameᅟ: str¶
Holds the name of the target geometry. This is a convenience property making it easier to match the target geometry to the morphing animation. The name is usually same as the name of the parent entity of the target QGeometryRenderer, but does not have to be.
- Access functions:
- property targetPositionsᅟ: list of float¶
Holds the position values of the morph target. Each position in the list specifies the position of the corresponding morph target with the same index. The values must be in an ascending order. Values can be positive or negative and do not have any predefined unit.
- Access functions:
Construct a new
QVertexBlendAnimation
withparent
.- addMorphTarget(target)¶
- Parameters:
target –
QMorphTarget
Add new morph
target
at the end of the animation.- interpolator()¶
- Return type:
float
Getter of property
interpolatorᅟ
.- interpolatorChanged(interpolator)¶
- Parameters:
interpolator – float
Notification signal of property
interpolatorᅟ
.- morphTargetList()¶
- Return type:
.list of Qt3DAnimation.QMorphTarget
Return morph target list.
- removeMorphTarget(target)¶
- Parameters:
target –
QMorphTarget
Remove morph
target
from the animation.- setMorphTargets(targets)¶
- Parameters:
targets – .list of Qt3DAnimation.QMorphTarget
Set morph
targets
to animation. Old targets are cleared.Setter of property
targetᅟ
.- setTargetName(name)¶
- Parameters:
name – str
See also
Setter of property
targetNameᅟ
.- setTargetPositions(targetPositions)¶
- Parameters:
targetPositions – .list of float
See also
Setter of property
targetPositionsᅟ
.- target()¶
- Return type:
QGeometryRenderer
See also
Getter of property
targetᅟ
.- targetChanged(target)¶
- Parameters:
target –
QGeometryRenderer
Notification signal of property
targetᅟ
.- targetName()¶
- Return type:
str
See also
Getter of property
targetNameᅟ
.- targetNameChanged(name)¶
- Parameters:
name – str
Notification signal of property
targetNameᅟ
.- targetPositions()¶
- Return type:
.list of float
See also
Getter of property
targetPositionsᅟ
.- targetPositionsChanged(targetPositions)¶
- Parameters:
targetPositions – .list of float
Notification signal of property
targetPositionsᅟ
.
- class QMorphingAnimation¶
A class implementing blend-shape morphing animation. More_…
Synopsis¶
Properties¶
Methods¶
def
__init__()
def
addMorphTarget()
def
easing()
def
getWeights()
def
interpolator()
def
method()
def
setWeights()
def
target()
def
targetName()
Slots¶
def
setEasing()
def
setMethod()
def
setTarget()
def
setTargetName()
Signals¶
def
easingChanged()
def
methodChanged()
def
targetChanged()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
A
QMorphingAnimation
class implements blend-shape morphing animation to a targetQGeometryRenderer
. TheQMorphingAnimation
sets the correctQAttributes
from themorph targets
to the targetgeometry
and calculates interpolator for the current position. The actual blending between the attributes must be implemented in the material. Qt3DAnimation::QMorphPhongMaterial implements material with morphing support for phong lighting model. The blending happens between 2 attributes - ‘base’ and ‘target’. The names for the base and target attributes are taken from the morph target names, where the base attribute retains the name it already has and the target attribute name gets ‘Target’ appended to the name. The interpolator can be set as aQParameter
to the used material. All morph targets in the animation should contain the attributes with same names as those in the base geometry.- class Method¶
This enumeration specifies the morphing method.
Constant
Description
Qt3DAnimation.QMorphingAnimation.Normalized
The blending should use the normalized formula; V’ = Vbase * (1.0 - sum(Wi)) + sum[Vi * Wi]
Qt3DAnimation.QMorphingAnimation.Relative
The blending should use the relative formula; V’ = Vbase + sum[Vi * Wi]
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property easingᅟ: QEasingCurve¶
Holds the easing curve of the interpolator between morph targets.
- Access functions:
Signal
easingChanged()
- property interpolatorᅟ: float¶
Holds the interpolator between base and target attributes.
- Access functions:
- property methodᅟ: Qt3DAnimation.QMorphingAnimation.Method¶
Holds the morphing method. The default is Relative.
- Access functions:
Signal
methodChanged()
- property targetᅟ: QGeometryRenderer¶
Holds the target QGeometryRenderer the morphing animation is applied to.
- Access functions:
Signal
targetChanged()
- property targetNameᅟ: str¶
Holds the name of the target geometry. This is a convenience property making it easier to match the target geometry to the morphing animation. The name is usually same as the name of the parent entity of the target QGeometryRenderer, but does not have to be.
- Access functions:
- property targetPositionsᅟ: list of float¶
Holds the position values of the morph target. Each position in the list specifies the position of the corresponding morph target with the same index. The values must be in an ascending order. Values can be positive or negative and do not have any predefined unit.
- Access functions:
Construct a new
QMorphingAnimation
withparent
.- addMorphTarget(target)¶
- Parameters:
target –
QMorphTarget
Add new morph
target
at the end of the animation.- easing()¶
- Return type:
See also
Getter of property
easingᅟ
.- easingChanged(easing)¶
- Parameters:
easing –
QEasingCurve
Notification signal of property
easingᅟ
.- getWeights(positionIndex)¶
- Parameters:
positionIndex – int
- Return type:
.list of float
Return morph weights at
positionIndex
.- interpolator()¶
- Return type:
float
Getter of property
interpolatorᅟ
.- interpolatorChanged(interpolator)¶
- Parameters:
interpolator – float
Notification signal of property
interpolatorᅟ
.- method()¶
- Return type:
See also
Getter of property
methodᅟ
.Notification signal of property
methodᅟ
.- morphTargetList()¶
- Return type:
.list of Qt3DAnimation.QMorphTarget
Return morph target list.
- removeMorphTarget(target)¶
- Parameters:
target –
QMorphTarget
Remove morph
target
from the animation.- setEasing(easing)¶
- Parameters:
easing –
QEasingCurve
See also
Setter of property
easingᅟ
.Setter of property
methodᅟ
.- setMorphTargets(targets)¶
- Parameters:
targets – .list of Qt3DAnimation.QMorphTarget
Set morph
targets
to animation. Old targets are cleared.Setter of property
targetᅟ
.- setTargetName(name)¶
- Parameters:
name – str
See also
Setter of property
targetNameᅟ
.- setTargetPositions(targetPositions)¶
- Parameters:
targetPositions – .list of float
See also
Setter of property
targetPositionsᅟ
.- setWeights(positionIndex, weights)¶
- Parameters:
positionIndex – int
weights – .list of float
Sets morph
weights
atpositionIndex
.- target()¶
- Return type:
QGeometryRenderer
See also
Getter of property
targetᅟ
.- targetChanged(target)¶
- Parameters:
target –
QGeometryRenderer
Notification signal of property
targetᅟ
.- targetName()¶
- Return type:
str
See also
Getter of property
targetNameᅟ
.- targetNameChanged(name)¶
- Parameters:
name – str
Notification signal of property
targetNameᅟ
.- targetPositions()¶
- Return type:
.list of float
See also
Getter of property
targetPositionsᅟ
.- targetPositionsChanged(targetPositions)¶
- Parameters:
targetPositions – .list of float
Notification signal of property
targetPositionsᅟ
.
- class QKeyframeAnimation¶
A class implementing simple keyframe animation to a QTransform. More_…
Synopsis¶
Properties¶
Methods¶
def
__init__()
def
addKeyframe()
def
easing()
def
endMode()
def
framePositions()
def
keyframeList()
def
removeKeyframe()
def
setKeyframes()
def
startMode()
def
target()
def
targetName()
Slots¶
def
setEasing()
def
setEndMode()
def
setStartMode()
def
setTarget()
def
setTargetName()
Signals¶
def
easingChanged()
def
endModeChanged()
def
targetChanged()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
A
QKeyframeAnimation
class implements simple keyframe animation that can be used to animate QTransform. The keyframes consists of multiple timed QTransforms, which are interpolated and applied to the target QTransform. QEasingCurve is used between keyframes to control the interpolator.RepeatMode
can be set for when the position set to theQKeyframeAnimation
is below or above the values defined in the keyframe positions.- class RepeatMode¶
This enumeration specifies how position values outside keyframe values are handled.
Constant
Description
Qt3DAnimation.QKeyframeAnimation.None
The animation is not applied to the target transform.
Qt3DAnimation.QKeyframeAnimation.Constant
The edge keyframe value is used.
Qt3DAnimation.QKeyframeAnimation.Repeat
The animation is repeated.
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property easingᅟ: QEasingCurve¶
Holds the easing curve of the interpolator between keyframes.
- Access functions:
Signal
easingChanged()
- property endModeᅟ: Qt3DAnimation.QKeyframeAnimation.RepeatMode¶
Holds the repeat mode for the position values greater than the last frame position.
- Access functions:
- property framePositionsᅟ: list of float¶
Holds the positions of the keyframes. Each position in the list specifies the position of the corresponding keyframe with the same index. The values must be in an ascending order. Values can be positive or negative and do not have any predefined unit.
- Access functions:
- property startModeᅟ: Qt3DAnimation.QKeyframeAnimation.RepeatMode¶
Holds the repeat mode for the position values less than the first frame position.
- Access functions:
- property targetᅟ: QTransform¶
Holds the target QTransform the animation is applied to.
- Access functions:
Signal
targetChanged()
- property targetNameᅟ: str¶
Holds the name of the target transform. This is a convenience property making it easier to match the target transform to the keyframe animation. The name is usually same as the name of the parent entity of the target transform, but does not have to be.
- Access functions:
Constructs an
QKeyframeAnimation
withparent
.- addKeyframe(keyframe)¶
- Parameters:
keyframe –
QTransform
Adds new
keyframe
at the end of the animation. The QTransform can be added to the animation multiple times.- easing()¶
- Return type:
See also
Getter of property
easingᅟ
.- easingChanged(easing)¶
- Parameters:
easing –
QEasingCurve
Notification signal of property
easingᅟ
.- endMode()¶
- Return type:
See also
Getter of property
endModeᅟ
.- endModeChanged(endMode)¶
- Parameters:
endMode –
RepeatMode
Notification signal of property
endModeᅟ
.- framePositions()¶
- Return type:
.list of float
See also
Getter of property
framePositionsᅟ
.- framePositionsChanged(positions)¶
- Parameters:
positions – .list of float
Notification signal of property
framePositionsᅟ
.- keyframeList()¶
- Return type:
.list of Qt3DCore.QTransform
Returns the list of keyframes.
- removeKeyframe(keyframe)¶
- Parameters:
keyframe –
QTransform
Removes a
keyframe
from the animation. If the same QTransform is set as keyframe multiple times, all occurrences are removed.- setEasing(easing)¶
- Parameters:
easing –
QEasingCurve
See also
Setter of property
easingᅟ
.- setEndMode(mode)¶
- Parameters:
mode –
RepeatMode
See also
Setter of property
endModeᅟ
.- setFramePositions(positions)¶
- Parameters:
positions – .list of float
See also
Setter of property
framePositionsᅟ
.- setKeyframes(keyframes)¶
- Parameters:
keyframes – .list of Qt3DCore.QTransform
Sets the
keyframes
of the animation. Old keyframes are cleared.- setStartMode(mode)¶
- Parameters:
mode –
RepeatMode
See also
Setter of property
startModeᅟ
.Setter of property
targetᅟ
.- setTargetName(name)¶
- Parameters:
name – str
See also
Setter of property
targetNameᅟ
.- startMode()¶
- Return type:
See also
Getter of property
startModeᅟ
.- startModeChanged(startMode)¶
- Parameters:
startMode –
RepeatMode
Notification signal of property
startModeᅟ
.- target()¶
- Return type:
QTransform
See also
Getter of property
targetᅟ
.- targetChanged(target)¶
- Parameters:
target –
QTransform
Notification signal of property
targetᅟ
.- targetName()¶
- Return type:
str
See also
Getter of property
targetNameᅟ
.- targetNameChanged(name)¶
- Parameters:
name – str
Notification signal of property
targetNameᅟ
.