Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_keyframe_commands.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2020 Emmet O 'Neill <emmetoneill.pdx@gmail.com>
3 * SPDX-FileCopyrightText: 2020 Eoin O 'Neill <eoinoneill1991@gmail.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7
10#include "kis_signals_blocker.h"
11
13 : KUndo2Command(parentCmd),
14 m_channel(channel),
15 m_time(time),
16 m_keyframe(keyframe)
17{
19}
20
25
34
35
37 : KUndo2Command(parentCmd),
38 m_channel(channel),
39 m_time(time)
40{
41 m_cached = channel->keyframeAt(time);
42}
43
48
53
55 : KUndo2Command(parentCmd),
56 keyframe(keyframe),
57 cachedValue(keyframe->value(), value),
58 cachedInterpolationMode(keyframe->interpolationMode(), interpolationMode),
59 cachedTangentsMode(keyframe->tangentsMode(), tangentMode),
60 cachedTangentLeft(keyframe->leftTangent(), tangentLeft),
61 cachedTangentRight(keyframe->rightTangent(), tangentRight)
62{}
63
82
float value(const T *src, size_t ch)
virtual QTime time() const
KisInsertKeyframeCommand(KisKeyframeChannel *channel, int time, KisKeyframeSP keyframe, KUndo2Command *parentCmd=nullptr)
KisKeyframeChannel * m_channel
KisKeyframeChannel stores and manages KisKeyframes. Maps units of time to virtual keyframe values....
virtual void insertKeyframe(int time, KisKeyframeSP keyframe, KUndo2Command *parentUndoCmd=nullptr)
Insert an existing keyframe into the channel at the specified time.
virtual void removeKeyframe(int time, KUndo2Command *parentUndoCmd=nullptr)
Remove a keyframe from the channel at the specified time.
KisKeyframeSP keyframeAt(int time) const
Get a keyframe at specified time. Used primarily when the value of a given keyframe is needed.
KisRemoveKeyframeCommand(KisKeyframeChannel *channel, int time, KUndo2Command *parentCmd=nullptr)
KisKeyframeChannel * m_channel
UndoStore< KisScalarKeyframe::TangentsMode > cachedTangentsMode
UndoStore< KisScalarKeyframe::InterpolationMode > cachedInterpolationMode
KisScalarKeyframeUpdateCommand(KisScalarKeyframe *keyframe, qreal value, KisScalarKeyframe::InterpolationMode interpolationMode, KisScalarKeyframe::TangentsMode tangentMode, QPointF tangentLeft, QPointF tangentRight, KUndo2Command *parentCmd)
The KisScalarKeyframe class is a concrete subclass of KisKeyframe that wraps a scalar value and inter...
InterpolationMode
Controls the type of interpolation between this KisScalarKeyframe and the next.
InterpolationMode m_interpolationMode
void sigChanged(const KisScalarKeyframe *scalarKey)
TangentsMode
Controls the behavior of the left and right tangents on a given keyframe for different curve shapes.
QWeakPointer< ScalarKeyframeLimits > m_channelLimits
#define KIS_ASSERT(cond)
Definition kis_assert.h:33