int pos = effectParams.paramValue("out").toInt() - effectParams.paramValue("in").toInt();
clip->setFadeOut(pos);
}
-
}
}
m_document->setModified(true);
else newPos.cropStart = item->info().cropStart + (cutTime - info.startPos) * speed;
newPos.track = info.track;
ClipItem *dup = item->clone(newPos);
+ // remove unwanted effects (fade in) from 2nd part of cutted clip
+ int ix = dup->hasEffect(QString(), "fadein");
+ if (ix != -1) {
+ QDomElement oldeffect = item->effectAt(ix);
+ dup->deleteEffect(oldeffect.attribute("kdenlive_ix"));
+ }
+ ix = dup->hasEffect(QString(), "fade_from_black");
+ if (ix != -1) {
+ QDomElement oldeffect = item->effectAt(ix);
+ dup->deleteEffect(oldeffect.attribute("kdenlive_ix"));
+ }
item->resizeEnd(cutPos, false);
scene()->addItem(dup);
if (item->checkKeyFrames()) slotRefreshEffects(item);
int ct = 0;
Mlt::Filter *filter = clipService.filter(ct);
while (filter) {
- if (filter->is_valid() && strcmp(filter->get("kdenlive_id"), "")) {
+ // Only duplicate Kdenlive filters, and skip the fade in effects
+ if (filter->is_valid() && strcmp(filter->get("kdenlive_id"), "") && strcmp(filter->get("kdenlive_id"), "fadein") && strcmp(filter->get("kdenlive_id"), "fade_from_black")) {
// looks like there is no easy way to duplicate a filter,
// so we will create a new one and duplicate its properties
Mlt::Filter *dup = new Mlt::Filter(*m_mltProfile, filter->get("mlt_service"));