Commit f6145549 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

TrackHandler: Save tracks effects

parent 7fe1fcac
......@@ -60,6 +60,7 @@ class EffectUser : public QObject
virtual qint64 length() const = 0;
virtual Type effectType() const = 0;
void loadEffects( const QDomElement &project );
void saveFilters( QXmlStreamWriter &project ) const;
protected:
EffectUser();
......@@ -70,8 +71,6 @@ class EffectUser : public QObject
//Filters:
quint32 *applyFilters( const Workflow::Frame *frame,
qint64 currentFrame, double time );
void saveFilters( QXmlStreamWriter &project ) const;
//Mixers methods:
EffectHelper *getMixer( qint64 currentFrame );
......
......@@ -159,12 +159,13 @@ TrackHandler::save( QXmlStreamWriter& project ) const
{
for ( unsigned int i = 0; i < m_trackCount; ++i)
{
if ( m_tracks[i]->getLength() > 0 )
if ( m_tracks[i]->getLength() > 0 || m_tracks[i]->count( Effect::Filter ) > 0 )
{
project.writeStartElement( "track" );
project.writeAttribute( "type", QString::number( (int)m_trackType ) );
project.writeAttribute( "id", QString::number( i ) );
m_tracks[i]->save( project );
m_tracks[i]->saveFilters( project );
project.writeEndElement();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment