PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation¶
- class QMorphingAnimation¶
- A class implementing blend-shape morphing animation. - Details- A - QMorphingAnimationclass implements blend-shape morphing animation to a target- QGeometryRenderer. The- QMorphingAnimationsets the correct- QAttributesfrom the- morph targetsto the target- geometryand 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 a- QParameterto the used material. All morph targets in the animation should contain the attributes with same names as those in the base geometry.- 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 - 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_propertyis 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 - QMorphingAnimationwith- parent.- addMorphTarget(target)¶
- Parameters:
- target – - QMorphTarget
 
 - Add new morph - targetat the end of the animation.- easing()¶
- Return type:
 - See also - setEasing()
 - 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:
- Method
 - See also - setMethod()
 - Getter of property - methodᅟ.- methodChanged(method)¶
- Parameters:
- method – - Method
 
 - Notification signal of property - methodᅟ.- morphTargetList()¶
- Return type:
- .list of Qt3DAnimation.QMorphTarget 
 
 - Return morph target list. - removeMorphTarget(target)¶
- Parameters:
- target – - QMorphTarget
 
 - Remove morph - targetfrom the animation.- setEasing(easing)¶
- Parameters:
- easing – - QEasingCurve
 - See also - easing()
 - Setter of property - easingᅟ.- setMethod(method)¶
- Parameters:
- method – - Method
 - See also - method()
 - Setter of property - methodᅟ.- setMorphTargets(targets)¶
- Parameters:
- targets – .list of Qt3DAnimation.QMorphTarget 
 
 - Set morph - targetsto animation. Old targets are cleared.- setTarget(target)¶
- Parameters:
- target – - QGeometryRenderer
 - See also - target()
 - Setter of property - targetᅟ.- setTargetName(name)¶
- Parameters:
- name – str 
 - See also - targetName()
 - Setter of property - targetNameᅟ.- setTargetPositions(targetPositions)¶
- Parameters:
- targetPositions – .list of float 
 - See also - targetPositions()
 - Setter of property - targetPositionsᅟ.- setWeights(positionIndex, weights)¶
- Parameters:
- positionIndex – int 
- weights – .list of float 
 
 
 - Sets morph - weightsat- positionIndex.- target()¶
- Return type:
- QGeometryRenderer
 - See also - setTarget()
 - Getter of property - targetᅟ.- targetChanged(target)¶
- Parameters:
- target – - QGeometryRenderer
 
 - Notification signal of property - targetᅟ.- targetName()¶
- Return type:
- str 
 - See also - setTargetName()
 - Getter of property - targetNameᅟ.- targetNameChanged(name)¶
- Parameters:
- name – str 
 
 - Notification signal of property - targetNameᅟ.- targetPositions()¶
- Return type:
- .list of float 
 - See also - setTargetPositions()
 - Getter of property - targetPositionsᅟ.- targetPositionsChanged(targetPositions)¶
- Parameters:
- targetPositions – .list of float 
 
 - Notification signal of property - targetPositionsᅟ.