TuttleOFX
1
|
Wraps up an effect descriptor, used in the describe actions. More...
#include <ofxsImageEffect.h>
Public Member Functions | |
ImageEffectDescriptor (OfxImageEffectHandle handle) | |
ctor | |
~ImageEffectDescriptor () | |
dtor | |
const PropertySet & | getPropertySet () const |
PropertySet & | getPropertySet () |
OfxImageEffectHandle | getImageEffectHandle () |
void | setLabels (const std::string &label, const std::string &shortLabel, const std::string &longLabel) |
, set the label properties in a plugin | |
void | setLabel (const std::string &label) |
void | setDescription (const std::string &description) |
void | setPluginGrouping (const std::string &group) |
Set the plugin grouping, defaults to "". | |
void | addSupportedContext (EContext v) |
Add a context to those supported, defaults to none, must be called at least once. | |
void | addSupportedBitDepth (EBitDepth v) |
Add a pixel depth to those supported, defaults to none, must be called at least once. | |
void | addSupportedExtension (const std::string &extension) |
Add a file extension to those supported, defaults to none. | |
void | addSupportedExtensions (const std::vector< std::string > &extensions) |
void | setSingleInstance (bool v) |
Is the plugin single instance only ? defaults to false. | |
void | setHostFrameThreading (bool v) |
Does the plugin expect the host to perform per frame SMP threading defaults to true. | |
void | setSupportsMultiResolution (bool v) |
Does the plugin support multi resolution images, defaults to true. | |
void | setSupportsTiles (bool v) |
Does the plugin support image tiling, defaults to true. | |
void | setTemporalClipAccess (bool v) |
Does the plugin perform temporal clip access, defaults to false. | |
void | setRenderTwiceAlways (bool v) |
Does the plugin want to have render called twice per frame in all circumanstances for fielded images ? defaults to true. | |
void | setSupportsMultipleClipDepths (bool v) |
Does the plugin support inputs and output clips of differing depths, defaults to false. | |
void | setSupportsMultipleClipPARs (bool v) |
Does the plugin support inputs and output clips of pixel aspect ratios, defaults to false. | |
void | setRenderThreadSafety (ERenderSafety v) |
How thread safe is the plugin, defaults to eRenderInstanceSafe. | |
void | addClipPreferencesSlaveParam (ParamDescriptor &p) |
If the slave param changes the clip preferences need to be re-evaluated. | |
ClipDescriptor * | defineClip (const std::string &name) |
Create a clip, only callable from describe in context. | |
const std::map< std::string, std::string > & | getClipComponentPropNames () const |
Access to the string maps needed for runtime properties. Because the char array must persist after the call, we need these to be stored in the descriptor, which is only deleted on unload. | |
const std::map< std::string, std::string > & | getClipDepthPropNames () const |
const std::map< std::string, std::string > & | getClipPARPropNames () const |
const std::map< std::string, std::string > & | getClipROIPropNames () const |
const std::map< std::string, std::string > & | getClipFrameRangePropNames () const |
virtual void | setOverlayInteractDescriptor (EffectInteractWrap *desc) |
override this to create an interact for the effect | |
Protected Member Functions | |
mDeclareProtectedAssignAndCC (ImageEffectDescriptor) | |
ImageEffectDescriptor (void) | |
Protected Attributes | |
OfxImageEffectHandle | _effectHandle |
The effect handle. | |
PropertySet | _effectProps |
properties for this clip | |
std::map< std::string, ClipDescriptor * > | _definedClips |
Set of all previously defined parameters, defined on demand. | |
std::map< std::string, std::string > | _clipComponentsPropNames |
Set of strings for clip preferences action (stored in here so the array persists and can be used in a property name) | |
std::map< std::string, std::string > | _clipDepthPropNames |
std::map< std::string, std::string > | _clipPARPropNames |
std::map< std::string, std::string > | _clipROIPropNames |
std::map< std::string, std::string > | _clipFrameRangePropNames |
std::auto_ptr< EffectInteractWrap > | _overlayDescriptor |
Wraps up an effect descriptor, used in the describe actions.
Definition at line 377 of file ofxsImageEffect.h.
OFX::ImageEffectDescriptor::ImageEffectDescriptor | ( | void | ) | [inline, protected] |
Definition at line 381 of file ofxsImageEffect.h.
OFX::ImageEffectDescriptor::ImageEffectDescriptor | ( | OfxImageEffectHandle | handle | ) |
ctor
effect descriptor ctor
Definition at line 497 of file ofxsImageEffect.cpp.
References _effectProps, OFX::Private::gEffectSuite, OfxImageEffectSuiteV1::getParamSet, OfxImageEffectSuiteV1::getPropertySet, OFX::PropertySet::propSetHandle(), OFX::ParamSetDescriptor::setOfxParamSetHandle(), OFX::throwSuiteStatusException(), and OFX::Validation::validatePluginDescriptorProperties().
OFX::ImageEffectDescriptor::~ImageEffectDescriptor | ( | ) |
void OFX::ImageEffectDescriptor::addClipPreferencesSlaveParam | ( | ParamDescriptor & | p | ) |
If the slave param changes the clip preferences need to be re-evaluated.
Definition at line 710 of file ofxsImageEffect.cpp.
References _effectProps, OFX::ParamDescriptor::getName(), kOfxImageEffectPropClipPreferencesSlaveParam, OFX::PropertySet::propGetDimension(), and OFX::PropertySet::propSetString().
Referenced by tuttle::plugin::describeGeneratorParamsInContext(), tuttle::plugin::describeReaderParamsInContext(), and tuttle::plugin::describeWriterParamsInContext().
void OFX::ImageEffectDescriptor::addSupportedBitDepth | ( | EBitDepth | v | ) |
Add a pixel depth to those supported, defaults to none, must be called at least once.
Add a pixel depth to those supported.
Definition at line 595 of file ofxsImageEffect.cpp.
References _effectProps, OFX::eBitDepthCustom, OFX::eBitDepthFloat, OFX::eBitDepthNone, OFX::eBitDepthUByte, OFX::eBitDepthUShort, kOfxBitDepthByte, kOfxBitDepthFloat, kOfxBitDepthNone, kOfxBitDepthShort, kOfxImageEffectPropSupportedPixelDepths, OFX::PropertySet::propGetDimension(), and OFX::PropertySet::propSetString().
void OFX::ImageEffectDescriptor::addSupportedContext | ( | EContext | v | ) |
Add a context to those supported, defaults to none, must be called at least once.
Add a context to those supported.
Definition at line 552 of file ofxsImageEffect.cpp.
References _effectProps, OFX::eContextFilter, OFX::eContextGeneral, OFX::eContextGenerator, OFX::eContextNone, OFX::eContextPaint, OFX::eContextReader, OFX::eContextRetimer, OFX::eContextTransition, OFX::eContextWriter, kOfxImageEffectContextFilter, kOfxImageEffectContextGeneral, kOfxImageEffectContextGenerator, kOfxImageEffectContextPaint, kOfxImageEffectContextReader, kOfxImageEffectContextRetimer, kOfxImageEffectContextTransition, kOfxImageEffectContextWriter, kOfxImageEffectPropSupportedContexts, OFX::PropertySet::propGetDimension(), and OFX::PropertySet::propSetString().
void OFX::ImageEffectDescriptor::addSupportedExtension | ( | const std::string & | extension | ) |
Add a file extension to those supported, defaults to none.
Add a file extension to those supported.
Definition at line 620 of file ofxsImageEffect.cpp.
References _effectProps, OFX::Private::gHostDescription, kTuttleOfxImageEffectPropSupportedExtensions, OFX::PropertySet::propGetDimension(), and OFX::PropertySet::propSetString().
void OFX::ImageEffectDescriptor::addSupportedExtensions | ( | const std::vector< std::string > & | extensions | ) |
Definition at line 630 of file ofxsImageEffect.cpp.
References _effectProps, OFX::Private::gHostDescription, kTuttleOfxImageEffectPropSupportedExtensions, OFX::PropertySet::propGetDimension(), and OFX::PropertySet::propSetString().
ClipDescriptor * OFX::ImageEffectDescriptor::defineClip | ( | const std::string & | name | ) |
Create a clip, only callable from describe in context.
The returned clip must not be deleted by the client code. This is all managed by the ImageEffectDescriptor itself.
Definition at line 718 of file ofxsImageEffect.cpp.
References _clipComponentsPropNames, _clipDepthPropNames, _clipFrameRangePropNames, _clipPARPropNames, _clipROIPropNames, _definedClips, _effectHandle, OfxImageEffectSuiteV1::clipDefine, OFX::Private::gEffectSuite, and kOfxStatOK.
Referenced by tuttle::plugin::describeGeneratorParamsInContext().
const std::map<std::string, std::string>& OFX::ImageEffectDescriptor::getClipComponentPropNames | ( | ) | const [inline] |
Access to the string maps needed for runtime properties. Because the char array must persist after the call, we need these to be stored in the descriptor, which is only deleted on unload.
Definition at line 473 of file ofxsImageEffect.h.
References _clipComponentsPropNames.
Referenced by OFX::Private::clipPreferencesAction().
const std::map<std::string, std::string>& OFX::ImageEffectDescriptor::getClipDepthPropNames | ( | ) | const [inline] |
Definition at line 474 of file ofxsImageEffect.h.
References _clipDepthPropNames.
Referenced by OFX::Private::clipPreferencesAction().
const std::map<std::string, std::string>& OFX::ImageEffectDescriptor::getClipFrameRangePropNames | ( | ) | const [inline] |
Definition at line 477 of file ofxsImageEffect.h.
References _clipFrameRangePropNames.
const std::map<std::string, std::string>& OFX::ImageEffectDescriptor::getClipPARPropNames | ( | ) | const [inline] |
Definition at line 475 of file ofxsImageEffect.h.
References _clipPARPropNames.
Referenced by OFX::Private::clipPreferencesAction().
const std::map<std::string, std::string>& OFX::ImageEffectDescriptor::getClipROIPropNames | ( | ) | const [inline] |
Definition at line 476 of file ofxsImageEffect.h.
References _clipROIPropNames.
OfxImageEffectHandle OFX::ImageEffectDescriptor::getImageEffectHandle | ( | ) | [inline] |
Definition at line 413 of file ofxsImageEffect.h.
References _effectHandle.
const PropertySet& OFX::ImageEffectDescriptor::getPropertySet | ( | ) | const [inline] |
Definition at line 409 of file ofxsImageEffect.h.
References _effectProps.
PropertySet& OFX::ImageEffectDescriptor::getPropertySet | ( | ) | [inline] |
Definition at line 411 of file ofxsImageEffect.h.
References _effectProps.
OFX::ImageEffectDescriptor::mDeclareProtectedAssignAndCC | ( | ImageEffectDescriptor | ) | [protected] |
void OFX::ImageEffectDescriptor::setDescription | ( | const std::string & | description | ) |
Definition at line 539 of file ofxsImageEffect.cpp.
References _effectProps, kOfxPropPluginDescription, and OFX::PropertySet::propSetString().
void OFX::ImageEffectDescriptor::setHostFrameThreading | ( | bool | v | ) |
Does the plugin expect the host to perform per frame SMP threading defaults to true.
Does the plugin expect the host to perform per frame SMP threading.
Definition at line 651 of file ofxsImageEffect.cpp.
References _effectProps, kOfxImageEffectPluginPropHostFrameThreading, and OFX::PropertySet::propSetInt().
void OFX::ImageEffectDescriptor::setLabel | ( | const std::string & | label | ) | [inline] |
Definition at line 417 of file ofxsImageEffect.h.
References setLabels().
void OFX::ImageEffectDescriptor::setLabels | ( | const std::string & | label, |
const std::string & | shortLabel, | ||
const std::string & | longLabel | ||
) |
, set the label properties in a plugin
Definition at line 532 of file ofxsImageEffect.cpp.
References _effectProps, kOfxPropLabel, kOfxPropLongLabel, kOfxPropShortLabel, and OFX::PropertySet::propSetString().
Referenced by setLabel().
void OFX::ImageEffectDescriptor::setOverlayInteractDescriptor | ( | EffectInteractWrap * | desc | ) | [virtual] |
override this to create an interact for the effect
Definition at line 587 of file ofxsImageEffect.cpp.
References _effectProps, _overlayDescriptor, OFX::EffectInteractWrap::getMainEntry(), OFX::Private::gHostDescription, kOfxImageEffectPluginPropOverlayInteractV1, and OFX::PropertySet::propSetPointer().
void OFX::ImageEffectDescriptor::setPluginGrouping | ( | const std::string & | group | ) |
Set the plugin grouping, defaults to "".
Set the plugin grouping.
Definition at line 546 of file ofxsImageEffect.cpp.
References _effectProps, kOfxImageEffectPluginPropGrouping, and OFX::PropertySet::propSetString().
void OFX::ImageEffectDescriptor::setRenderThreadSafety | ( | ERenderSafety | v | ) |
How thread safe is the plugin, defaults to eRenderInstanceSafe.
What kind of thread safety does the plugin have.
Definition at line 693 of file ofxsImageEffect.cpp.
References _effectProps, OFX::eRenderFullySafe, OFX::eRenderInstanceSafe, OFX::eRenderUnsafe, kOfxImageEffectPluginRenderThreadSafety, kOfxImageEffectRenderFullySafe, kOfxImageEffectRenderInstanceSafe, kOfxImageEffectRenderUnsafe, and OFX::PropertySet::propSetString().
void OFX::ImageEffectDescriptor::setRenderTwiceAlways | ( | bool | v | ) |
Does the plugin want to have render called twice per frame in all circumanstances for fielded images ? defaults to true.
Does the plugin want to have render called twice per frame in all circumanstances for fielded images ?
Definition at line 675 of file ofxsImageEffect.cpp.
References _effectProps, kOfxImageEffectPluginPropFieldRenderTwiceAlways, and OFX::PropertySet::propSetInt().
void OFX::ImageEffectDescriptor::setSingleInstance | ( | bool | v | ) |
Is the plugin single instance only ? defaults to false.
Is the plugin single instance only ?
Definition at line 645 of file ofxsImageEffect.cpp.
References _effectProps, kOfxImageEffectPluginPropSingleInstance, and OFX::PropertySet::propSetInt().
void OFX::ImageEffectDescriptor::setSupportsMultipleClipDepths | ( | bool | v | ) |
Does the plugin support inputs and output clips of differing depths, defaults to false.
Does the plugin support inputs and output clips of differing depths.
Definition at line 681 of file ofxsImageEffect.cpp.
References _effectProps, kOfxImageEffectPropSupportsMultipleClipDepths, and OFX::PropertySet::propSetInt().
void OFX::ImageEffectDescriptor::setSupportsMultipleClipPARs | ( | bool | v | ) |
Does the plugin support inputs and output clips of pixel aspect ratios, defaults to false.
Does the plugin support inputs and output clips of pixel aspect ratios.
Definition at line 687 of file ofxsImageEffect.cpp.
References _effectProps, kOfxImageEffectPropSupportsMultipleClipPARs, and OFX::PropertySet::propSetInt().
void OFX::ImageEffectDescriptor::setSupportsMultiResolution | ( | bool | v | ) |
Does the plugin support multi resolution images, defaults to true.
Does the plugin support multi resolution images.
Definition at line 657 of file ofxsImageEffect.cpp.
References _effectProps, kOfxImageEffectPropSupportsMultiResolution, and OFX::PropertySet::propSetInt().
void OFX::ImageEffectDescriptor::setSupportsTiles | ( | bool | v | ) |
Does the plugin support image tiling, defaults to true.
Does the plugin support image tiling.
Definition at line 663 of file ofxsImageEffect.cpp.
References _effectProps, kOfxImageEffectPropSupportsTiles, and OFX::PropertySet::propSetInt().
void OFX::ImageEffectDescriptor::setTemporalClipAccess | ( | bool | v | ) |
Does the plugin perform temporal clip access, defaults to false.
Does the plugin perform temporal clip access.
Definition at line 669 of file ofxsImageEffect.cpp.
References _effectProps, kOfxImageEffectPropTemporalClipAccess, and OFX::PropertySet::propSetInt().
std::map<std::string, std::string> OFX::ImageEffectDescriptor::_clipComponentsPropNames [protected] |
Set of strings for clip preferences action (stored in here so the array persists and can be used in a property name)
Definition at line 394 of file ofxsImageEffect.h.
Referenced by defineClip(), and getClipComponentPropNames().
std::map<std::string, std::string> OFX::ImageEffectDescriptor::_clipDepthPropNames [protected] |
Definition at line 395 of file ofxsImageEffect.h.
Referenced by defineClip(), and getClipDepthPropNames().
std::map<std::string, std::string> OFX::ImageEffectDescriptor::_clipFrameRangePropNames [protected] |
Definition at line 398 of file ofxsImageEffect.h.
Referenced by defineClip(), and getClipFrameRangePropNames().
std::map<std::string, std::string> OFX::ImageEffectDescriptor::_clipPARPropNames [protected] |
Definition at line 396 of file ofxsImageEffect.h.
Referenced by defineClip(), and getClipPARPropNames().
std::map<std::string, std::string> OFX::ImageEffectDescriptor::_clipROIPropNames [protected] |
Definition at line 397 of file ofxsImageEffect.h.
Referenced by defineClip(), and getClipROIPropNames().
std::map<std::string, ClipDescriptor*> OFX::ImageEffectDescriptor::_definedClips [protected] |
Set of all previously defined parameters, defined on demand.
Definition at line 391 of file ofxsImageEffect.h.
Referenced by defineClip(), and ~ImageEffectDescriptor().
The effect handle.
Definition at line 385 of file ofxsImageEffect.h.
Referenced by defineClip(), and getImageEffectHandle().
PropertySet OFX::ImageEffectDescriptor::_effectProps [protected] |
properties for this clip
Definition at line 388 of file ofxsImageEffect.h.
Referenced by addClipPreferencesSlaveParam(), addSupportedBitDepth(), addSupportedContext(), addSupportedExtension(), addSupportedExtensions(), getPropertySet(), ImageEffectDescriptor(), setDescription(), setHostFrameThreading(), setLabels(), setOverlayInteractDescriptor(), setPluginGrouping(), setRenderThreadSafety(), setRenderTwiceAlways(), setSingleInstance(), setSupportsMultipleClipDepths(), setSupportsMultipleClipPARs(), setSupportsMultiResolution(), setSupportsTiles(), and setTemporalClipAccess().
std::auto_ptr<EffectInteractWrap> OFX::ImageEffectDescriptor::_overlayDescriptor [protected] |
Definition at line 400 of file ofxsImageEffect.h.
Referenced by setOverlayInteractDescriptor().