TuttleOFX  1
CTLPlugin.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_PLUGIN_CTL_PLUGIN_HPP_
00002 #define _TUTTLE_PLUGIN_CTL_PLUGIN_HPP_
00003 
00004 #include "CTLDefinitions.hpp"
00005 
00006 #include <tuttle/plugin/ImageEffectGilPlugin.hpp>
00007 
00008 namespace tuttle {
00009 namespace plugin {
00010 namespace ctl {
00011 
00012 template<typename Scalar>
00013 struct CTLProcessParams
00014 {
00015         EParamChooseInput _inputType;
00016         std::vector<std::string> _paths;
00017         std::string _module;
00018         std::string _code;
00019 };
00020 
00021 /**
00022  * @brief CTL plugin
00023  */
00024 class CTLPlugin : public ImageEffectGilPlugin
00025 {
00026 public:
00027         typedef float Scalar;
00028 public:
00029     CTLPlugin( OfxImageEffectHandle handle );
00030 
00031 public:
00032         CTLProcessParams<Scalar> getProcessParams( const OfxPointD& renderScale = OFX::kNoRenderScale ) const;
00033 
00034     void changedParam( const OFX::InstanceChangedArgs &args, const std::string &paramName );
00035 
00036         bool getRegionOfDefinition( const OFX::RegionOfDefinitionArguments& args, OfxRectD& rod );
00037         bool isIdentity( const OFX::RenderArguments& args, OFX::Clip*& identityClip, double& identityTime );
00038 
00039     void render( const OFX::RenderArguments &args );
00040         
00041 public:
00042         OFX::ChoiceParam*        _paramInput;
00043         OFX::StringParam*        _paramCode;
00044         OFX::StringParam*        _paramFile;
00045         OFX::PushButtonParam*    _paramUpdateRender;
00046 private:
00047         OFX::InstanceChangedArgs _instanceChangedArgs;
00048 };
00049 
00050 }
00051 }
00052 }
00053 
00054 #endif