本文整理汇总了C++中ofx::BooleanParamDescriptor::setScriptName方法的典型用法代码示例。如果您正苦于以下问题:C++ BooleanParamDescriptor::setScriptName方法的具体用法?C++ BooleanParamDescriptor::setScriptName怎么用?C++ BooleanParamDescriptor::setScriptName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ofx::BooleanParamDescriptor
的用法示例。
在下文中一共展示了BooleanParamDescriptor::setScriptName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 CropPluginFactory::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::BooleanParamDescriptor* bop = desc.defineBooleanParam( kParamFillMode );
bop->setLabels( kParamFillModeLabel, kParamFillModeLabel, kParamFillModeLabel );
bop->setScriptName( "BandsOperations" );
bop->setHint( "Fill bands with black color or repeat last pixel and reset Rod." );
bop->setDefault( true );
OFX::ChoiceParamDescriptor* format = desc.defineChoiceParam( kParamPresets );
format->setLabels( kParamPresetsLabel, kParamPresetsLabel, kParamPresetsLabel );
format->setScriptName( "formats" );
format->appendOption( "1.33 (4/3) bands" );
format->appendOption( "1.77 (16/9e) bands" );
format->appendOption( "1.85 bands" );
format->appendOption( "2.35 (Cinemascope) bands" );
format->appendOption( "2.40 bands" );
format->setDefault( 0 );
OFX::BooleanParamDescriptor* shape = desc.defineBooleanParam( kParamDisplayRect );
shape->setLabels( kParamDisplayRectLabel, kParamDisplayRectLabel, kParamDisplayRectLabel );
shape->setDefault( false );
OFX::BooleanParamDescriptor* anamorphic = desc.defineBooleanParam( kParamAnamorphic );
anamorphic->setLabels( kParamAnamorphicLabel, kParamAnamorphicLabel, "Anamorphic (stretch)" );
anamorphic->setDefault( false );
anamorphic->setIsSecret( true );
OFX::GroupParamDescriptor* bandsGroup = desc.defineGroupParam( "Bands sizes" );
OFX::IntParamDescriptor* upBand = desc.defineIntParam( kParamUp );
upBand->setLabels( kParamUpLabel, kParamUpLabel, kParamUpLabel );
upBand->setParent( *bandsGroup );
OFX::IntParamDescriptor* downBand = desc.defineIntParam( kParamDown );
downBand->setLabels( kParamDownLabel, kParamDownLabel, kParamDownLabel );
downBand->setParent( *bandsGroup );
OFX::IntParamDescriptor* leftBand = desc.defineIntParam( kParamLeft );
leftBand->setLabels( kParamLeftLabel, kParamLeftLabel, kParamLeftLabel );
leftBand->setParent( *bandsGroup );
OFX::IntParamDescriptor* rightBand = desc.defineIntParam( kParamRight );
rightBand->setLabels( kParamRightLabel, kParamRightLabel, kParamRightLabel );
rightBand->setParent( *bandsGroup );
OFX::PushButtonParamDescriptor* helpButton = desc.definePushButtonParam( kCropHelpButton );
helpButton->setScriptName( "&Help" );
}