|
Krita Source Code Documentation
|
The KisRasterKeyframeChannel is a concrete KisKeyframeChannel subclass that stores and manages KisRasterKeyframes. More...
#include <kis_raster_keyframe_channel.h>
Inheritance diagram for KisRasterKeyframeChannel:Classes | |
| struct | Private |
Public Member Functions | |
| bool | areClones (int timeA, int timeB) |
| void | cloneKeyframe (int source, int destination, KUndo2Command *parentUndoCmd=nullptr) |
| QSet< int > | clonesOf (int time) |
| QRect | frameExtents (KisKeyframeSP keyframe) |
| QString | frameFilename (int frameId) const |
| void | importFrame (int time, KisPaintDeviceSP sourceDevice, KUndo2Command *parentCommand) |
| virtual void | insertKeyframe (int time, KisKeyframeSP keyframe, KUndo2Command *parentUndoCmd=nullptr) override |
| Insert an existing keyframe into the channel at the specified time. | |
| KisRasterKeyframeChannel (const KisRasterKeyframeChannel &rhs, const KisPaintDeviceWSP newPaintDevice) | |
| KisRasterKeyframeChannel (const KoID &id, const KisPaintDeviceWSP paintDevice, const KisDefaultBoundsBaseSP bounds) | |
| void | loadXML (const QDomElement &channelNode) override |
| void | makeUnique (int time, KUndo2Command *parentUndoCmd=nullptr) |
| bool | onionSkinsEnabled () const |
| KisPaintDeviceWSP | paintDevice () |
| virtual void | removeKeyframe (int time, KUndo2Command *parentUndoCmd=nullptr) override |
| Remove a keyframe from the channel at the specified time. | |
| void | setFilenameSuffix (const QString &suffix) |
| void | setOnionSkinsEnabled (bool value) |
| QSet< int > | timesForFrameID (int frameID) const |
| QDomElement | toXML (QDomDocument doc, const QString &layerFilename) override |
| void | writeToDevice (int time, KisPaintDeviceSP targetDevice) |
| ~KisRasterKeyframeChannel () override | |
Public Member Functions inherited from KisKeyframeChannel | |
| KisKeyframeSP | activeKeyframeAt (int time) const |
| template<class KeyframeType > | |
| QSharedPointer< KeyframeType > | activeKeyframeAt (int time) const |
| int | activeKeyframeTime () const |
| int | activeKeyframeTime (int time) const |
| Get the time of the active keyframe. Useful for snapping any time to that of the most recent keyframe. | |
| void | addKeyframe (int time, KUndo2Command *parentUndoCmd=nullptr) |
| Add a new keyframe to the channel at the specified time. | |
| virtual KisTimeSpan | affectedFrames (int time) const |
| Get the set of frames affected by any changes to the value or content of the active keyframe at the given time. | |
| QSet< int > | allKeyframeTimes () const |
| Get a set of all integer times that map to a keyframe. | |
| int | channelHash () const |
| Calculates a pseudo-unique hash based on the relevant internal state of the channel. | |
| void | copyKeyframe (int sourceTime, int targetTime, KUndo2Command *parentUndoCmd=nullptr) |
| int | firstKeyframeTime () const |
| QString | id () const |
| virtual KisTimeSpan | identicalFrames (int time) const |
| Get a span of times for which the channel gives identical results compared to frame at a given time. NOTE: This set may be different than the set of affected frames due to interpolation. | |
| KisKeyframeSP | keyframeAt (int time) const |
| Get a keyframe at specified time. Used primarily when the value of a given keyframe is needed. | |
| template<class KeyframeType > | |
| QSharedPointer< KeyframeType > | keyframeAt (int time) const |
| int | keyframeCount () const |
| KisKeyframeChannel (const KisKeyframeChannel &rhs) | |
| KisKeyframeChannel (const KoID &id, KisDefaultBoundsBaseSP bounds) | |
| int | lastKeyframeTime () const |
| int | lookupKeyframeTime (KisKeyframeSP toLookup) |
| Search for the time for a given keyframe. (Reverse map lookup, so use sparingly.) | |
| void | moveKeyframe (int sourceTime, int targetTime, KUndo2Command *parentUndoCmd=nullptr) |
| QString | name () const |
| int | nextKeyframeTime (const int time) const |
| KisNodeWSP | node () const |
| int | previousKeyframeTime (const int time) const |
| void | setDefaultBounds (KisDefaultBoundsBaseSP bounds) |
| void | setNode (KisNodeWSP node) |
| void | swapKeyframes (int timeA, int timeB, KUndo2Command *parentUndoCmd=nullptr) |
| ~KisKeyframeChannel () override | |
Static Public Member Functions | |
| static QSet< int > | clonesOf (const KisNode *node, int time) |
Static Public Member Functions inherited from KisKeyframeChannel | |
| static KoID | channelIdToKoId (const QString &id) |
| static void | copyKeyframe (const KisKeyframeChannel *sourceChannel, int sourceTime, KisKeyframeChannel *targetChannel, int targetTime, KUndo2Command *parentUndoCmd=nullptr) |
| Copy a keyframe across channel(s) at the specified times. | |
| static void | moveKeyframe (KisKeyframeChannel *sourceChannel, int sourceTime, KisKeyframeChannel *targetChannel, int targetTime, KUndo2Command *parentUndoCmd=nullptr) |
| Move a keyframe across channel(s) at the specified times. | |
| static void | swapKeyframes (KisKeyframeChannel *channelA, int timeA, KisKeyframeChannel *channelB, int timeB, KUndo2Command *parentUndoCmd=nullptr) |
| Swap two keyframes across channel(s) at the specified times. | |
Private Member Functions | |
| QRect | affectedRect (int time) const override |
| QString | chooseFrameFilename (int frameId, const QString &layerFilename) |
| KisKeyframeSP | createKeyframe () override |
| Virtual keyframe creation function. Derived classes implement this function based on the needs of their specific KisKeyframe subclasses. | |
| QPair< int, KisKeyframeSP > | loadKeyframe (const QDomElement &keyframeNode) override |
| void | saveKeyframe (KisKeyframeSP keyframe, QDomElement keyframeElement, const QString &layerFilename) override |
| void | setFrameFilename (int frameId, const QString &filename) |
Private Attributes | |
| QScopedPointer< Private > | m_d |
Additional Inherited Members | |
Signals inherited from KisKeyframeChannel | |
| void | sigAddedKeyframe (const KisKeyframeChannel *channel, int time) |
| This signal is emitted just AFTER a keyframe was added to the channel. | |
| void | sigAnyKeyframeChange () |
| void | sigKeyframeAboutToBeRemoved (const KisKeyframeChannel *channel, int time) |
| This signal is emitted just BEFORE a keyframe is removed from the channel. | |
| void | sigKeyframeChanged (const KisKeyframeChannel *channel, int time) |
| This signal is emitted just AFTER a non-raster keyframe was changed its value. | |
| void | sigKeyframeHasBeenRemoved (const KisKeyframeChannel *channel, int time) |
| This signal is emitted just AFTER a keyframe is removed from the channel. | |
Static Public Attributes inherited from KisKeyframeChannel | |
| static const KoID | Opacity = KoID("opacity", ki18n("Opacity")) |
| static const KoID | PositionX = KoID("transform_pos_x", ki18n("Position (X)")) |
| static const KoID | PositionY = KoID("transform_pos_y", ki18n("Position (Y)")) |
| static const KoID | Raster = KoID("content", ki18n("Content")) |
| static const KoID | RotationX = KoID("transform_rotation_x", ki18n("Rotation (X)")) |
| static const KoID | RotationY = KoID("transform_rotation_y", ki18n("Rotation (Y)")) |
| static const KoID | RotationZ = KoID("transform_rotation_z", ki18n("Rotation (Z)")) |
| static const KoID | ScaleX = KoID("transform_scale_x", ki18n("Scale (X)")) |
| static const KoID | ScaleY = KoID("transform_scale_y", ki18n("Scale (Y)")) |
| static const KoID | ShearX = KoID("transform_shear_x", ki18n("Shear (X)")) |
| static const KoID | ShearY = KoID("transform_shear_y", ki18n("Shear (Y)")) |
| static const KoID | TransformArguments |
Protected Types inherited from KisKeyframeChannel | |
| typedef QMap< int, KisKeyframeSP > | TimeKeyframeMap |
Protected Member Functions inherited from KisKeyframeChannel | |
| const TimeKeyframeMap & | constKeys () const |
| int | currentTime () const |
| TimeKeyframeMap & | keys () |
| virtual void | removeKeyframeImpl (int time, KUndo2Command *parentUndoCmd) |
| Q_DECL_DEPRECATED void | workaroundBrokenFrameTimeBug (int *time) |
| Between Krita 4.1 and 4.4 Krita had a bug which resulted in creating frames with negative time stamp. The bug has been fixed, but there might be some files still in the wild. | |
The KisRasterKeyframeChannel is a concrete KisKeyframeChannel subclass that stores and manages KisRasterKeyframes.
Like a traditional animation dopesheet, this class maps individual units of times (in frames) to "virtual" KisRasterKeyframes, which wrap and manage the "physical" raster images on this channel's associated KisPaintDevice.
Often, a raster channel will be represented by an individual track with Krita's KisAnimationTimelineDocker.
Definition at line 66 of file kis_raster_keyframe_channel.h.
| KisRasterKeyframeChannel::KisRasterKeyframeChannel | ( | const KoID & | id, |
| const KisPaintDeviceWSP | paintDevice, | ||
| const KisDefaultBoundsBaseSP | bounds ) |
Definition at line 123 of file kis_raster_keyframe_channel.cpp.
| KisRasterKeyframeChannel::KisRasterKeyframeChannel | ( | const KisRasterKeyframeChannel & | rhs, |
| const KisPaintDeviceWSP | newPaintDevice ) |
Definition at line 129 of file kis_raster_keyframe_channel.cpp.
References KisKeyframeChannel::constKeys(), KisKeyframeChannel::keyframeAt(), KisKeyframeChannel::keys(), KIS_ASSERT_RECOVER_NOOP, m_d, and toQShared().
|
override |
Definition at line 153 of file kis_raster_keyframe_channel.cpp.
|
overrideprivatevirtual |
The rect that is affected by a frame at the given time
Implements KisKeyframeChannel.
Definition at line 335 of file kis_raster_keyframe_channel.cpp.
References affectedRect(), and KisKeyframeChannel::previousKeyframeTime().
| bool KisRasterKeyframeChannel::areClones | ( | int | timeA, |
| int | timeB ) |
Definition at line 273 of file kis_raster_keyframe_channel.cpp.
References KisKeyframeChannel::keyframeAt().
|
private |
Definition at line 195 of file kis_raster_keyframe_channel.cpp.
References m_d, and setFrameFilename().
| void KisRasterKeyframeChannel::cloneKeyframe | ( | int | source, |
| int | destination, | ||
| KUndo2Command * | parentUndoCmd = nullptr ) |
Definition at line 266 of file kis_raster_keyframe_channel.cpp.
References insertKeyframe(), KisKeyframeChannel::keyframeAt(), and source().
|
static |
Definition at line 308 of file kis_raster_keyframe_channel.cpp.
References KisKeyframeChannel::activeKeyframeTime(), clonesOf(), KisBaseNode::keyframeChannels, and KisKeyframeChannel::node().
| QSet< int > KisRasterKeyframeChannel::clonesOf | ( | int | time | ) |
Definition at line 284 of file kis_raster_keyframe_channel.cpp.
References m_d.
|
overrideprivatevirtual |
Virtual keyframe creation function. Derived classes implement this function based on the needs of their specific KisKeyframe subclasses.
Implements KisKeyframeChannel.
Definition at line 411 of file kis_raster_keyframe_channel.cpp.
References m_d, and toQShared().
| QRect KisRasterKeyframeChannel::frameExtents | ( | KisKeyframeSP | keyframe | ) |
Get the rectangular area that the content of this frame occupies.
Definition at line 174 of file kis_raster_keyframe_channel.cpp.
References KisRasterKeyframe::frameID(), and m_d.
| QString KisRasterKeyframeChannel::frameFilename | ( | int | frameId | ) | const |
Definition at line 179 of file kis_raster_keyframe_channel.cpp.
References m_d.
| void KisRasterKeyframeChannel::importFrame | ( | int | time, |
| KisPaintDeviceSP | sourceDevice, | ||
| KUndo2Command * | parentCommand ) |
Copy the content of the sourceDevice into a new keyframe at given time.
| time | Position of new keyframe. |
| sourceDevice | Source for content. |
| parentCommand | Parent undo command used for stacking. |
Definition at line 167 of file kis_raster_keyframe_channel.cpp.
References KisKeyframeChannel::addKeyframe(), and m_d.
|
overridevirtual |
Insert an existing keyframe into the channel at the specified time.
Reimplemented from KisKeyframeChannel.
Definition at line 240 of file kis_raster_keyframe_channel.cpp.
References KisKeyframeChannel::insertKeyframe(), and m_d.
|
overrideprivatevirtual |
Implements KisKeyframeChannel.
Definition at line 369 of file kis_raster_keyframe_channel.cpp.
References KisKeyframeChannel::constKeys(), KisKeyframeChannel::firstKeyframeTime(), frameFilename(), instance, KisKeyframeChannel::keyframeCount(), KIS_SAFE_ASSERT_RECOVER_NOOP, KisDomUtils::loadValue(), m_d, removeKeyframe(), setFrameFilename(), toQShared(), and KisKeyframeChannel::workaroundBrokenFrameTimeBug().
|
overridevirtual |
Reimplemented from KisKeyframeChannel.
Definition at line 218 of file kis_raster_keyframe_channel.cpp.
References KisKeyframeChannel::loadXML(), and m_d.
| void KisRasterKeyframeChannel::makeUnique | ( | int | time, |
| KUndo2Command * | parentUndoCmd = nullptr ) |
Definition at line 326 of file kis_raster_keyframe_channel.cpp.
References clonesOf(), and insertKeyframe().
| bool KisRasterKeyframeChannel::onionSkinsEnabled | ( | ) | const |
Definition at line 230 of file kis_raster_keyframe_channel.cpp.
References m_d.
| KisPaintDeviceWSP KisRasterKeyframeChannel::paintDevice | ( | ) |
Definition at line 235 of file kis_raster_keyframe_channel.cpp.
References m_d.
|
overridevirtual |
Remove a keyframe from the channel at the specified time.
Reimplemented from KisKeyframeChannel.
Definition at line 250 of file kis_raster_keyframe_channel.cpp.
References KisKeyframeChannel::addKeyframe(), m_d, KisKeyframeChannel::removeKeyframeImpl(), and KisKeyframeChannel::sigKeyframeAboutToBeRemoved().
|
overrideprivatevirtual |
Implements KisKeyframeChannel.
Definition at line 352 of file kis_raster_keyframe_channel.cpp.
References chooseFrameFilename(), frameFilename(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_d, and KisDomUtils::saveValue().
| void KisRasterKeyframeChannel::setFilenameSuffix | ( | const QString & | suffix | ) |
When choosing filenames for frames, this will be appended to the node filename.
Definition at line 184 of file kis_raster_keyframe_channel.cpp.
References m_d.
|
private |
Definition at line 189 of file kis_raster_keyframe_channel.cpp.
References m_d.
| void KisRasterKeyframeChannel::setOnionSkinsEnabled | ( | bool | value | ) |
Definition at line 225 of file kis_raster_keyframe_channel.cpp.
| QSet< int > KisRasterKeyframeChannel::timesForFrameID | ( | int | frameID | ) | const |
Definition at line 298 of file kis_raster_keyframe_channel.cpp.
References m_d.
|
overridevirtual |
Reimplemented from KisKeyframeChannel.
Definition at line 211 of file kis_raster_keyframe_channel.cpp.
References m_d, and KisKeyframeChannel::toXML().
| void KisRasterKeyframeChannel::writeToDevice | ( | int | time, |
| KisPaintDeviceSP | targetDevice ) |
Copy the active frame at given time to target device.
| keyframe | Keyframe to copy from. |
| targetDevice | Device to copy the frame to. |
Definition at line 157 of file kis_raster_keyframe_channel.cpp.
|
private |
Definition at line 126 of file kis_raster_keyframe_channel.h.