diff --git a/src/core/Animators/graphanimator.cpp b/src/core/Animators/graphanimator.cpp index 00d597e04..c54dc0449 100644 --- a/src/core/Animators/graphanimator.cpp +++ b/src/core/Animators/graphanimator.cpp @@ -570,7 +570,7 @@ void GraphAnimator::graph_saveSVG(SvgExporter& exp, } const int prevRelFrame = prevKey->getRelFrame(); const qreal t = (prevRelFrame - relRange.fMin)/div; - keyTimes << QString::number(t); + keyTimes << QString::number(t).replace("-", ""); values << valueGetter(prevRelFrame); } const auto xSeg = getGraphXSegment(prevKey, nextKey); @@ -595,7 +595,7 @@ void GraphAnimator::graph_saveSVG(SvgExporter& exp, arg(xKeySplines.c2()).arg(yC2); const qreal relFrame = subSeg.first.p1(); const qreal t = (relFrame - relRange.fMin)/div; - keyTimes << QString::number(t); + keyTimes << QString::number(t).replace("-", ""); values << valueGetter(relFrame); } if(nextKeyRelFrame >= visRange.fMax) break; @@ -608,6 +608,11 @@ void GraphAnimator::graph_saveSVG(SvgExporter& exp, values << valueGetter(visRange.fMax); } + // https://github.com/friction2d/friction/issues/165 + if (parent.tagName() == "path" && !parent.hasAttribute("d")) { + parent.setAttribute("d", "M0 0"); + } + anim.setAttribute("calcMode", "spline"); anim.setAttribute("values", values.join(';')); anim.setAttribute("keyTimes", keyTimes.join(';'));