16 qRegisterMetaType<KisTimeSpan>(
"KisTimeSpan");
21 dbg.nospace() <<
"KisTimeSpan(" << r.start() <<
", " << r.end() <<
")";
31 [&range, time] (
const KisNode *node) {
33 range &= calculateNodeIdenticalFrames(node, time);
45 [&range, time] (
const KisNode *node) {
47 range |= calculateNodeIdenticalFrames(node, time);
58 const QMap<QString, KisKeyframeChannel*> channels =
73 if (!node->
visible())
return range;
75 const QMap<QString, KisKeyframeChannel*> channels =
81 if (channels.isEmpty() ||
99 QDomDocument doc = parent->ownerDocument();
100 QDomElement e = doc.createElement(tag);
101 parent->appendChild(e);
103 e.setAttribute(
"type",
"timerange");
122 int start =
toInt(e.attribute(
"from",
"-1"));
123 int end =
toInt(e.attribute(
"to",
"-1"));
127 }
else if (end == -1) {
KisKeyframeChannel stores and manages KisKeyframes. Maps units of time to virtual keyframe values....
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....
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 g...
static KisTimeSpan calculateNodeIdenticalFrames(const KisNode *node, int time)
static KisTimeSpan calculateNodeAffectedFrames(const KisNode *node, int time)
static KisTimeSpan infinite(int start)
static KisTimeSpan calculateIdenticalFramesRecursive(const KisNode *node, int time)
static KisTimeSpan calculateAffectedFramesRecursive(const KisNode *node, int time)
static KisTimeSpan fromTimeToTime(int start, int end)
QDebug operator<<(QDebug dbg, const KisTimeSpan &r)
KIS_DECLARE_STATIC_INITIALIZER
bool checkType(const QDomElement &e, const QString &expectedType)
void saveValue(QDomElement *parent, const QString &tag, const QSize &size)
bool findOnlyElement(const QDomElement &parent, const QString &tag, QDomElement *el, QStringList *errorMessages)
int toInt(const QString &str, bool *ok=nullptr)
bool loadValue(const QDomElement &e, float *v)
QString toString(const QString &value)
void recursiveApplyNodes(NodePointer node, Functor func)
QMap< QString, KisKeyframeChannel * > keyframeChannels
virtual bool visible(bool recursive=false) const