void WriterPlugin::beginSequenceRender( const OFX::BeginSequenceRenderArguments& args ) { boost::filesystem::path dir( getAbsoluteDirectory() ); if( !exists( dir ) ) { BOOST_THROW_EXCEPTION( exception::NoDirectory( dir.string() ) ); } }
void WriterPlugin::beginSequenceRender( const OFX::BeginSequenceRenderArguments& args ) { bfs::path dir( getAbsoluteDirectory() ); if( !bfs::exists( dir ) ) { bfs::create_directories( dir ); } }
std::string WriterPlugin::getAbsoluteFirstFilename() const { if( _isSequence ) { bfs::path dir( getAbsoluteDirectory() ); bfs::path filename (_filePattern.getFirstFilename() ); return (dir / filename).string(); } else { bfs::path filepath( _paramFilepath->getValue( ) ); return bfs::absolute( filepath ).string( ); } }
std::string WriterPlugin::getAbsoluteFilenameAt( const OfxTime time ) const { if( _isSequence ) { bfs::path dir( getAbsoluteDirectory() ); bfs::path filename( _filePattern.getFilenameAt( boost::numeric_cast<sequenceParser::Time>(time) ) ); return (dir / filename).string(); } else { bfs::path filepath( _paramFilepath->getValue( ) ); return bfs::absolute( filepath ).string( ); } }
inline std::string getAbsoluteFilename() const { return ( getAbsoluteDirectory() / _filename ).string(); }