- if ((e.attribute("type") == "keyframe" || e.attribute("type") == "simplekeyframe") && e.attribute("keyframes").isEmpty()) {
- // Effect has a keyframe type parameter, we need to set the values
- e.setAttribute("keyframes", QString::number(cropStart().frames(m_fps)) + ':' + e.attribute("default"));
+ if (e.attribute("type") == "keyframe" || e.attribute("type") == "simplekeyframe") {
+ if (e.attribute("keyframes").isEmpty()) {
+ // Effect has a keyframe type parameter, we need to set the values
+ e.setAttribute("keyframes", QString::number(cropStart().frames(m_fps)) + ':' + e.attribute("default"));
+ }
+ else if (offset != 0) {
+ // adjust keyframes to this clip
+ QString adjusted = adjustKeyframes(e.attribute("keyframes"), offset - cropStart().frames(m_fps));
+ e.setAttribute("keyframes", adjusted);
+ }