QMorphTarget#
A class providing morph targets to blend-shape animation. More…
Synopsis#
Functions#
def
addAttribute
(attribute)def
attributeList
()def
attributeNames
()def
removeAttribute
(attribute)def
setAttributes
(attributes)
Signals#
def
attributeNamesChanged
(attributeNames)
Static functions#
def
fromGeometry
(geometry, attributes)
Detailed Description#
A QMorphTarget
class is a convenience class, which provides a list of QAttributes
, which the QMorphingAnimation
uses to animate geometry. A QMorphTarget
can also be created based on existing QGeometry
.
- class PySide6.Qt3DAnimation.Qt3DAnimation.QMorphTarget([parent=None])#
- Parameters
parent –
PySide6.QtCore.QObject
Constructs a QMorphTarget
with given parent
.
- PySide6.Qt3DAnimation.Qt3DAnimation.QMorphTarget.addAttribute(attribute)#
- Parameters
attribute –
PySide6.Qt3DCore.Qt3DCore.QAttribute
Adds an attribute
the morph target. An attribute with the same name must not have been added previously to the morph target.
- PySide6.Qt3DAnimation.Qt3DAnimation.QMorphTarget.attributeList()#
- Return type
Returns a list of attributes contained in the morph target.
- PySide6.Qt3DAnimation.Qt3DAnimation.QMorphTarget.attributeNames()#
- Return type
list of strings
Holds a list of attribute names contained in the morph target.
- PySide6.Qt3DAnimation.Qt3DAnimation.QMorphTarget.attributeNamesChanged(attributeNames)#
- Parameters
attributeNames – list of strings
- static PySide6.Qt3DAnimation.Qt3DAnimation.QMorphTarget.fromGeometry(geometry, attributes)#
- Parameters
geometry –
PySide6.Qt3DCore.Qt3DCore.QGeometry
attributes – list of strings
- Return type
Returns a morph target based on the attributes
in the given geometry
.
- PySide6.Qt3DAnimation.Qt3DAnimation.QMorphTarget.removeAttribute(attribute)#
- Parameters
attribute –
PySide6.Qt3DCore.Qt3DCore.QAttribute
Removes an attribute
from the morph target.
- PySide6.Qt3DAnimation.Qt3DAnimation.QMorphTarget.setAttributes(attributes)#
- Parameters
attributes –
Sets attributes
to the morph target. Old attributes are cleared.