14 m_defaultValue(defaultValue)
24 qreal chanValue =
m_channel->currentValue();
25 if (!qIsNaN(chanValue)){
26 return (chanValue * 255 / 100);
37 const float currentValue =
m_channel->valueAt(currentTime);
41 m_channel->addScalarKeyframe(currentTime, currentValue);
46 const int translatedOldValue = key->value() * 255 / 100;
48 if (translatedOldValue ==
value) {
52 key->setValue(qreal(
value) * 100 / 255);
54 valueToAssign = qreal(
m_channel->currentValue()) * 255 / 100;
56 valueToAssign =
value;
105 if (
m_channel->isCurrentTimeAffectedBy(time)) {
float value(const T *src, size_t ch)
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
KisScalarKeyframeChannel * channel() const
void slotKeyChanged(const KisKeyframeChannel *, int time)
void transferKeyframeData(const KisAnimatedOpacityProperty &rhs)
QScopedPointer< KisScalarKeyframeChannel > m_channel
KoProperties *const m_props
KisAnimatedOpacityProperty(KisDefaultBoundsBaseSP bounds, KoProperties *const props, quint8 defaultValue, QObject *parent=nullptr)
void changed(quint8 value)
void slotKeyRemoval(const KisKeyframeChannel *, int)
void makeAnimated(KisNode *parentNode)
void set(const quint8 value)
KisDefaultBoundsBaseSP m_bounds
void updateDefaultBounds(KisDefaultBoundsBaseSP bounds)
virtual int currentTime() const =0
KisKeyframeChannel stores and manages KisKeyframes. Maps units of time to virtual keyframe values....
static const KoID Opacity
The KisScalarKeyframeChannel is a concrete KisKeyframeChannel subclass that stores and manages KisSca...
The KisScalarKeyframe class is a concrete subclass of KisKeyframe that wraps a scalar value and inter...
int intProperty(const QString &name, int defaultValue=0) const
void setProperty(const QString &name, const QVariant &value)
bool property(const QString &name, QVariant &value) const
#define KIS_ASSERT_RECOVER(cond)