TuttleOFX
1
|
00001 #ifndef _TUTTLE_PLUGIN_SEEXPR_PLUGIN_HPP_ 00002 #define _TUTTLE_PLUGIN_SEEXPR_PLUGIN_HPP_ 00003 00004 #include "SeExprDefinitions.hpp" 00005 00006 #include <tuttle/plugin/context/GeneratorPlugin.hpp> 00007 #include <tuttle/plugin/ImageEffectGilPlugin.hpp> 00008 00009 namespace tuttle { 00010 namespace plugin { 00011 namespace seExpr { 00012 00013 template<typename Scalar> 00014 struct SeExprProcessParams 00015 { 00016 typedef boost::gil::point2<Scalar> Point; 00017 EParamChooseInput _inputType; 00018 std::string _code; 00019 Point _paramTextureOffset; 00020 }; 00021 00022 /** 00023 * @brief SeExpr plugin 00024 */ 00025 class SeExprPlugin : public GeneratorPlugin 00026 { 00027 public: 00028 typedef float Scalar; 00029 public: 00030 SeExprPlugin( OfxImageEffectHandle handle ); 00031 00032 public: 00033 SeExprProcessParams<Scalar> getProcessParams( const OfxPointD& renderScale = OFX::kNoRenderScale ) const; 00034 00035 void changedParam( const OFX::InstanceChangedArgs &args, const std::string ¶mName ); 00036 00037 void getClipPreferences( OFX::ClipPreferencesSetter& clipPreferences ); 00038 void render( const OFX::RenderArguments &args ); 00039 00040 public: 00041 OFX::ChoiceParam* _paramInput; 00042 OFX::StringParam* _paramCode; 00043 OFX::StringParam* _paramFile; 00044 OFX::Double2DParam* _paramTextureOffset; 00045 private: 00046 OFX::InstanceChangedArgs _instanceChangedArgs; 00047 }; 00048 00049 } 00050 } 00051 } 00052 00053 #endif