TuttleOFX
1
|
00001 #include "EXRWriterPlugin.hpp" 00002 #include "EXRWriterProcess.hpp" 00003 #include "EXRWriterDefinitions.hpp" 00004 00005 #include <boost/gil/gil_all.hpp> 00006 00007 namespace tuttle { 00008 namespace plugin { 00009 namespace exr { 00010 namespace writer { 00011 00012 using namespace boost::gil; 00013 00014 EXRWriterPlugin::EXRWriterPlugin( OfxImageEffectHandle handle ) 00015 : WriterPlugin( handle ) 00016 { 00017 _componentsType = fetchChoiceParam( kTuttlePluginChannel ); 00018 _storageType = fetchChoiceParam( kParamStorageType ); 00019 } 00020 00021 EXRWriterProcessParams EXRWriterPlugin::getProcessParams( const OfxTime time ) 00022 { 00023 EXRWriterProcessParams params; 00024 00025 params._bitDepth = ( ETuttlePluginBitDepth ) this->_paramBitDepth->getValue(); 00026 params._componentsType = ( ETuttlePluginComponents ) _componentsType->getValue(); 00027 params._storageType = ( EParamStorage ) _storageType->getValue(); 00028 params._filepath = getAbsoluteFilenameAt( time ); 00029 00030 return params; 00031 } 00032 00033 /** 00034 * @brief The overridden render function 00035 * @param[in] args Rendering parameters 00036 */ 00037 void EXRWriterPlugin::render( const OFX::RenderArguments& args ) 00038 { 00039 WriterPlugin::render( args ); 00040 00041 doGilRender<EXRWriterProcess>( *this, args ); 00042 } 00043 00044 } 00045 } 00046 } 00047 }