10#include <QReadWriteLock>
12#include <QApplication>
67QScopedPointer<AutoKeyFrameStateHolder>
s_holder;
92 if (!channel)
return undo;
97 if (activeKeyframe == targetKeyframe)
return undo;
101 const QRect originalDirtyRect = device->
exactBounds();
104 device->
setDirty(originalDirtyRect);
124 newKeyframe->setColorLabel(oldKeyframe->colorLabel());
126 channel->
copyKeyframe(activeKeyframe, targetKeyframe, undo);
135 s_holder->testingSetActiveMode(mode);
141#include "KisAnimAutoKey.moc"
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
void testingSetActiveMode(Mode mode)
AutoKeyFrameStateHolder()
void slotAutoKeyFrameSettingChanged()
virtual int currentLevelOfDetail() const =0
virtual int currentTime() const =0
static KisImageConfigNotifier * instance()
bool autoKeyEnabled(bool requestDefault=false) const
bool autoKeyModeDuplicate(bool requestDefault=false) const
KisKeyframeSP keyframeAt(int time) const
Get a keyframe at specified time. Used primarily when the value of a given keyframe is needed.
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.
void addKeyframe(int time, KUndo2Command *parentUndoCmd=nullptr)
Add a new keyframe to the channel at the specified time.
int activeKeyframeTime(int time) const
Get the time of the active keyframe. Useful for snapping any time to that of the most recent keyframe...
KisRasterKeyframeChannel * keyframeChannel() const
void setDirty(const QRect &rc)
QRect exactBounds() const
KisDefaultBoundsBaseSP defaultBounds() const
The KisRasterKeyframeChannel is a concrete KisKeyframeChannel subclass that stores and manages KisRas...
KUndo2Command * endAndTake()
#define KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(cond, val)
#define KIS_SAFE_ASSERT_RECOVER_NOOP(cond)
QScopedPointer< AutoKeyFrameStateHolder > s_holder
void testingSetActiveMode(Mode mode)
KUndo2Command * tryAutoCreateDuplicatedFrame(KisPaintDeviceSP device, AutoCreateKeyframeFlags flags)
create a new duplicated keyframe if auto-keyframe mode is on