本文整理汇总了C++中ofx::BooleanParamDescriptor::setAnimates方法的典型用法代码示例。如果您正苦于以下问题:C++ BooleanParamDescriptor::setAnimates方法的具体用法?C++ BooleanParamDescriptor::setAnimates怎么用?C++ BooleanParamDescriptor::setAnimates使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ofx::BooleanParamDescriptor
的用法示例。
在下文中一共展示了BooleanParamDescriptor::setAnimates方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: describeInContext
/**
* @brief Function called to describe the plugin controls and features.
* @param[in, out] desc Effect descriptor
* @param[in] context Application context
*/
void TextPluginFactory::describeInContext( OFX::ImageEffectDescriptor& desc,
OFX::EContext context )
{
OFX::ClipDescriptor* srcClip = desc.defineClip( kOfxImageEffectSimpleSourceClipName );
srcClip->addSupportedComponent( OFX::ePixelComponentRGBA );
srcClip->addSupportedComponent( OFX::ePixelComponentRGB );
srcClip->addSupportedComponent( OFX::ePixelComponentAlpha );
srcClip->setSupportsTiles( kSupportTiles );
// Create the mandated output clip
OFX::ClipDescriptor* dstClip = desc.defineClip( kOfxImageEffectOutputClipName );
dstClip->addSupportedComponent( OFX::ePixelComponentRGBA );
dstClip->addSupportedComponent( OFX::ePixelComponentRGB );
dstClip->addSupportedComponent( OFX::ePixelComponentAlpha );
dstClip->setSupportsTiles( kSupportTiles );
OFX::StringParamDescriptor* text = desc.defineStringParam( kText );
text->setLabel( "Text" );
text->setStringType( OFX::eStringTypeMultiLine );
OFX::StringParamDescriptor* font = desc.defineStringParam( kFont );
font->setLabel( "Font file" );
font->setStringType( OFX::eStringTypeFilePath );
font->setDefault( "/usr/share/fonts/truetype/msttcorefonts/arial.ttf" );
OFX::IntParamDescriptor* size = desc.defineIntParam( kSize );
size->setLabel( "Size" );
size->setDefault( 18 );
size->setRange( 0, std::numeric_limits<int>::max() );
size->setDisplayRange( 0, 60 );
OFX::DoubleParamDescriptor* ratio = desc.defineDoubleParam( kRatio );
ratio->setLabel( "Ratio" );
ratio->setRange( 0.0, std::numeric_limits<double>::max() );
ratio->setDisplayRange( 0.0, 2.0 );
ratio->setDefault( 1.0 );
OFX::RGBAParamDescriptor* color = desc.defineRGBAParam( kColor );
color->setLabel( "Color" );
color->setDefault( 1.0, 1.0, 1.0, 1.0 );
OFX::Double2DParamDescriptor* position = desc.defineDouble2DParam( kPosition );
position->setLabel( "Position" );
position->setDefault( 0.0, 0.0 );
OFX::DoubleParamDescriptor* letterSpacing = desc.defineDoubleParam( kLetterSpacing );
letterSpacing->setLabel( "Letter spacing" );
letterSpacing->setDisplayRange( -10.0, 10.0 );
letterSpacing->setDefault( 0.0 );
OFX::BooleanParamDescriptor* verticalFlip = desc.defineBooleanParam( kVerticalFlip );
verticalFlip->setLabel( "Vertical flip" );
verticalFlip->setDefault( false );
verticalFlip->setAnimates( false );
verticalFlip->setHint( "Some hosts use inverted images, so you can correct this problem using this flag." );
}
示例2: ofxsPremultDescribeParams
void
CImgFilterPluginHelperBase::describeInContextEnd(OFX::ImageEffectDescriptor &desc,
OFX::ContextEnum /*context*/,
OFX::PageParamDescriptor* page)
{
ofxsPremultDescribeParams(desc, page);
ofxsMaskMixDescribeParams(desc, page);
{
OFX::BooleanParamDescriptor* param = desc.defineBooleanParam(kParamPremultChanged);
param->setDefault(false);
param->setIsSecret(true);
param->setAnimates(false);
param->setEvaluateOnChange(false);
if (page) {
page->addChild(*param);
}
}
}
示例3: describeInContext
/**
* @brief Function called to describe the plugin controls and features.
* @param[in, out] desc Effect descriptor
* @param[in] context Application context
*/
void TextPluginFactory::describeInContext( OFX::ImageEffectDescriptor& desc,
OFX::EContext context )
{
OFX::ClipDescriptor* srcClip = desc.defineClip( kOfxImageEffectSimpleSourceClipName );
srcClip->addSupportedComponent( OFX::ePixelComponentRGBA );
srcClip->addSupportedComponent( OFX::ePixelComponentRGB );
srcClip->addSupportedComponent( OFX::ePixelComponentAlpha );
srcClip->setSupportsTiles( kSupportTiles );
srcClip->setOptional(true);
// Create the mandated output clip
OFX::ClipDescriptor* dstClip = desc.defineClip( kOfxImageEffectOutputClipName );
dstClip->addSupportedComponent( OFX::ePixelComponentRGBA );
dstClip->addSupportedComponent( OFX::ePixelComponentRGB );
dstClip->addSupportedComponent( OFX::ePixelComponentAlpha );
dstClip->setSupportsTiles( kSupportTiles );
OFX::StringParamDescriptor* text = desc.defineStringParam( kParamText );
text->setLabel( "Text" );
text->setStringType( OFX::eStringTypeMultiLine );
OFX::BooleanParamDescriptor* isExpression = desc.defineBooleanParam( kParamIsExpression );
isExpression->setLabel( "Expression" );
isExpression->setHint( "If you check this parameter the text must be a python code.\n"
"The final result must be in a variable with the name of the parameter.\n"
"Example:\n"
"from math import *\n"
//+ kParamText +
"text = 'At frame '+str(time)+', value is ' + str( sin(time) )\n" );
isExpression->setDefault( false );
OFX::StringParamDescriptor* font = desc.defineStringParam( kParamFont );
font->setLabel( "Font file" );
font->setStringType( OFX::eStringTypeFilePath );
font->setDefault( "/usr/share/fonts/truetype/msttcorefonts/arial.ttf" );
OFX::IntParamDescriptor* size = desc.defineIntParam( kParamSize );
size->setLabel( "Size" );
size->setDefault( 18 );
size->setRange( 0, std::numeric_limits<int>::max() );
size->setDisplayRange( 0, 60 );
OFX::DoubleParamDescriptor* ratio = desc.defineDoubleParam( kParamRatio );
ratio->setLabel( "Ratio" );
ratio->setRange( 0.0, std::numeric_limits<double>::max() );
ratio->setDisplayRange( 0.0, 2.0 );
ratio->setDefault( 1.0 );
OFX::RGBAParamDescriptor* color = desc.defineRGBAParam( kParamColor );
color->setLabel( "Color" );
color->setDefault( 1.0, 1.0, 1.0, 1.0 );
OFX::Double2DParamDescriptor* position = desc.defineDouble2DParam( kParamPosition );
position->setLabel( "Position" );
position->setDefault( 0.0, 0.0 );
OFX::DoubleParamDescriptor* letterSpacing = desc.defineDoubleParam( kParamLetterSpacing );
letterSpacing->setLabel( "Letter spacing" );
letterSpacing->setDisplayRange( -10.0, 10.0 );
letterSpacing->setDefault( 0.0 );
OFX::ChoiceParamDescriptor* vAlign = desc.defineChoiceParam( kParamVAlign );
vAlign->setLabel( "Vertically align" );
vAlign->appendOption( kParamVAlignTop );
vAlign->appendOption( kParamVAlignCenter );
vAlign->appendOption( kParamVAlignBottom );
vAlign->setDefault( eParamVAlignCenter );
OFX::ChoiceParamDescriptor* hAlign = desc.defineChoiceParam( kParamHAlign );
hAlign->setLabel( "Horizontally align" );
hAlign->appendOption( kParamHAlignLeft );
hAlign->appendOption( kParamHAlignCenter );
hAlign->appendOption( kParamHAlignRight );
hAlign->setDefault( eParamHAlignCenter );
OFX::BooleanParamDescriptor* verticalFlip = desc.defineBooleanParam( kParamVerticalFlip );
verticalFlip->setLabel( "Vertical flip" );
verticalFlip->setDefault( false );
verticalFlip->setAnimates( false );
verticalFlip->setHint( "Some hosts use inverted images, so you can correct this problem using this flag." );
}