本文整理汇总了C++中ofx::BooleanParamDescriptor::setIsSecret方法的典型用法代码示例。如果您正苦于以下问题:C++ BooleanParamDescriptor::setIsSecret方法的具体用法?C++ BooleanParamDescriptor::setIsSecret怎么用?C++ BooleanParamDescriptor::setIsSecret使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ofx::BooleanParamDescriptor
的用法示例。
在下文中一共展示了BooleanParamDescriptor::setIsSecret方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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);
}
}
}
示例2: 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" );
}
示例3: describeInContext
/**
* @brief Function called to describe the plugin controls and features.
* @param[in, out] desc Effect descriptor
* @param[in] context Application context
*/
void PushPixelPluginFactory::describeInContext( OFX::ImageEffectDescriptor& desc,
OFX::EContext context )
{
// Create the mandated output clip
OFX::ClipDescriptor* dstClip = desc.defineClip( kOfxImageEffectOutputClipName );
dstClip->addSupportedComponent( OFX::ePixelComponentRGBA );
dstClip->addSupportedComponent( OFX::ePixelComponentAlpha );
dstClip->setSupportsTiles( kSupportTiles );
OFX::ClipDescriptor* srcClip = desc.defineClip( kOfxImageEffectSimpleSourceClipName );
srcClip->addSupportedComponent( OFX::ePixelComponentRGBA );
srcClip->addSupportedComponent( OFX::ePixelComponentAlpha );
// no tiles on src clip, because it depends on the mask content so we can't
// define the maximal bounding box needed...
srcClip->setSupportsTiles( false );
OFX::ClipDescriptor* maskClip = desc.defineClip( kClipMask );
maskClip->addSupportedComponent( OFX::ePixelComponentRGBA );
maskClip->addSupportedComponent( OFX::ePixelComponentAlpha );
maskClip->setIsMask( true );
maskClip->setOptional( true );
maskClip->setSupportsTiles( true );
OFX::ChoiceParamDescriptor* output = desc.defineChoiceParam( kParamOutput );
output->setLabel( "Output" );
output->appendOption( kParamOutputMotionVectors );
output->appendOption( kParamOutputPushPixel );
output->setDefault( 1 );
OFX::DoubleParamDescriptor* size = desc.defineDoubleParam( kParamSize );
size->setLabel( "Size" );
size->setHint( "Size of the gradient window." );
size->setRange( 0.0, std::numeric_limits<double>::max() );
size->setDisplayRange( 1.0, 10.0 );
size->setDefault( 2.0 );
OFX::BooleanParamDescriptor* normalizedKernel = desc.defineBooleanParam( kParamNormalizedKernel );
normalizedKernel->setLabel( "Normalized kernel" );
normalizedKernel->setHint( "Use a normalized kernel to compute the gradient." );
normalizedKernel->setDefault( true );
//#ifndef TUTTLE_PRODUCTION
normalizedKernel->setIsSecret( true );
//#endif
OFX::DoubleParamDescriptor* intensity = desc.defineDoubleParam( kParamIntensity );
intensity->setLabel( "Intensity" );
intensity->setHint( "Scale motion vectors." );
intensity->setDisplayRange( 0.0, 2.0 );
intensity->setDefault( 0.75 );
OFX::DoubleParamDescriptor* angle = desc.defineDoubleParam( kParamAngle );
angle->setLabel( "Angle" );
angle->setHint( "Rotation on the gradient." );
angle->setDisplayRange(-180, 180);
angle->setDoubleType( OFX::eDoubleTypeAngle );
angle->setDefault( 0.0 );
OFX::ChoiceParamDescriptor* interpolation = desc.defineChoiceParam( kParamInterpolation );
interpolation->setLabel( "Interpolation" );
interpolation->setHint( "Interpolation method." );
interpolation->appendOption( kParamInterpolationNearest );
interpolation->appendOption( kParamInterpolationBilinear );
interpolation->setDefault( 1 );
OFX::ChoiceParamDescriptor* border = desc.defineChoiceParam( kParamBorder );
border->setLabel( "Gradient border" );
border->setHint( "Border method for gradient computation." );
border->appendOption( kParamBorderMirror );
border->appendOption( kParamBorderConstant );
border->appendOption( kParamBorderBlack );
border->appendOption( kParamBorderPadded );
}
示例4:
OFX::PageParamDescriptor*
CImgFilterPluginHelperBase::describeInContextBegin(bool sourceIsOptional,
OFX::ImageEffectDescriptor &desc,
OFX::ContextEnum context,
bool supportsRGBA,
bool supportsRGB,
bool supportsXY,
bool supportsAlpha,
bool supportsTiles,
bool processRGB,
bool processAlpha,
bool processIsSecret)
{
#ifdef OFX_EXTENSIONS_NATRON
desc.setChannelSelector(OFX::ePixelComponentNone); // we have our own channel selector
#endif
OFX::ClipDescriptor *srcClip = desc.defineClip(kOfxImageEffectSimpleSourceClipName);
if (supportsRGBA) {
srcClip->addSupportedComponent(OFX::ePixelComponentRGBA);
}
if (supportsRGB) {
srcClip->addSupportedComponent(OFX::ePixelComponentRGB);
}
if (supportsXY) {
srcClip->addSupportedComponent(OFX::ePixelComponentXY);
}
if (supportsAlpha) {
srcClip->addSupportedComponent(OFX::ePixelComponentAlpha);
}
srcClip->setTemporalClipAccess(false);
srcClip->setSupportsTiles(supportsTiles);
srcClip->setIsMask(false);
if (context == OFX::eContextGeneral && sourceIsOptional) {
srcClip->setOptional(sourceIsOptional);
}
OFX::ClipDescriptor *dstClip = desc.defineClip(kOfxImageEffectOutputClipName);
if (supportsRGBA) {
dstClip->addSupportedComponent(OFX::ePixelComponentRGBA);
}
if (supportsRGB) {
dstClip->addSupportedComponent(OFX::ePixelComponentRGB);
}
if (supportsXY) {
dstClip->addSupportedComponent(OFX::ePixelComponentXY);
}
if (supportsAlpha) {
dstClip->addSupportedComponent(OFX::ePixelComponentAlpha);
}
dstClip->setSupportsTiles(supportsTiles);
OFX::ClipDescriptor *maskClip = (context == OFX::eContextPaint) ? desc.defineClip("Brush") : desc.defineClip("Mask");
maskClip->addSupportedComponent(OFX::ePixelComponentAlpha);
maskClip->setTemporalClipAccess(false);
if (context != OFX::eContextPaint) {
maskClip->setOptional(true);
}
maskClip->setSupportsTiles(supportsTiles);
maskClip->setIsMask(true);
// create the params
OFX::PageParamDescriptor *page = desc.definePageParam("Controls");
{
OFX::BooleanParamDescriptor* param = desc.defineBooleanParam(kNatronOfxParamProcessR);
param->setLabel(kNatronOfxParamProcessRLabel);
param->setHint(kNatronOfxParamProcessRHint);
param->setDefault(processRGB);
param->setIsSecret(processIsSecret);
param->setLayoutHint(OFX::eLayoutHintNoNewLine);
if (page) {
page->addChild(*param);
}
}
{
OFX::BooleanParamDescriptor* param = desc.defineBooleanParam(kNatronOfxParamProcessG);
param->setLabel(kNatronOfxParamProcessGLabel);
param->setHint(kNatronOfxParamProcessGHint);
param->setDefault(processRGB);
param->setIsSecret(processIsSecret);
param->setLayoutHint(OFX::eLayoutHintNoNewLine);
if (page) {
page->addChild(*param);
}
}
{
OFX::BooleanParamDescriptor* param = desc.defineBooleanParam(kNatronOfxParamProcessB);
param->setLabel(kNatronOfxParamProcessBLabel);
param->setHint(kNatronOfxParamProcessBHint);
param->setDefault(processRGB);
param->setIsSecret(processIsSecret);
param->setLayoutHint(OFX::eLayoutHintNoNewLine);
if (page) {
page->addChild(*param);
}
}
{
OFX::BooleanParamDescriptor* param = desc.defineBooleanParam(kNatronOfxParamProcessA);
//.........这里部分代码省略.........
示例5: describeInContext
/**
* @brief Function called to describe the plugin controls and features.
* @param[in, out] desc Effect descriptor
* @param[in] context Application context
*/
void LensDistortPluginFactory::describeInContext( OFX::ImageEffectDescriptor& desc, OFX::EContext context )
{
// Create the mandated output clip
OFX::ClipDescriptor* dstClip = desc.defineClip( kOfxImageEffectOutputClipName );
dstClip->addSupportedComponent( OFX::ePixelComponentRGBA );
dstClip->addSupportedComponent( OFX::ePixelComponentAlpha );
dstClip->setSupportsTiles( true );
// create the mandated source clip
OFX::ClipDescriptor* srcClip = desc.defineClip( kOfxImageEffectSimpleSourceClipName );
srcClip->addSupportedComponent( OFX::ePixelComponentRGBA );
srcClip->addSupportedComponent( OFX::ePixelComponentAlpha );
srcClip->setSupportsTiles( true );
// declare an optional clip reference for RoD
OFX::ClipDescriptor* srcRefClip = desc.defineClip( kClipOptionalSourceRef );
srcRefClip->addSupportedComponent( OFX::ePixelComponentRGBA );
srcRefClip->addSupportedComponent( OFX::ePixelComponentAlpha );
srcRefClip->setSupportsTiles( true );
srcRefClip->setOptional( true );
srcRefClip->setLabel( "ref" );
OFX::BooleanParamDescriptor* reverse = desc.defineBooleanParam( kParamReverse );
reverse->setLabel( "Reverse" );
reverse->setDefault( false );
reverse->setHint( "Invert the effect.\n"
"Distort becomes undistort, and vice versa." );
// Controls
OFX::BooleanParamDescriptor* displaySource = desc.defineBooleanParam( kParamDisplaySource );
displaySource->setLabel( "displaySource" );
displaySource->setDefault( false );
displaySource->setHint( "Display the image source (usefull to parameter the distortion with lines overlays on the source image)." );
OFX::ChoiceParamDescriptor* lensType = desc.defineChoiceParam( kParamLensType );
lensType->setLabel( "Lens type" );
lensType->appendOption( kParamLensTypeStandard );
#ifndef TUTTLE_PRODUCTION
lensType->appendOption( kParamLensTypeFishEye ); // not implemented yet...
lensType->appendOption( kParamLensTypeAdvanced ); // not implemented yet...
lensType->setIsSecret( true );
#endif
lensType->setDefault( 0 );
OFX::DoubleParamDescriptor* coef1 = desc.defineDoubleParam( kParamCoef1 );
coef1->setScriptName( "Main" );
coef1->setDefault( 0.1 );
coef1->setDisplayRange( -1.0, 1.0 );
coef1->setHint( "Main distortion coeffecient\n"
">0 : Barrel distortion\n"
"<0 : Pincushion distortion\n"
);
OFX::DoubleParamDescriptor* coef2 = desc.defineDoubleParam( kParamCoef2 );
coef2->setLabel( "Secondary" );
coef2->setDefault( 0.0 );
coef2->setDisplayRange( -1.0, 1.0 );
coef2->setHint( "Secondary distortion coeffecient (usefull for fisheyes only)\n"
">0 : Barrel distortion\n"
"<0 : Pincushion distortion\n"
);
#ifdef TUTTLE_PRODUCTION
coef2->setIsSecret( true );
#endif
OFX::DoubleParamDescriptor* squeeze = desc.defineDoubleParam( kParamSqueeze );
squeeze->setLabel( "Squeeze" );
#ifdef TUTTLE_PRODUCTION
squeeze->setIsSecret( true );
#endif
// squeeze->setDoubleType( eDoubleTypeNormalisedX );
squeeze->setDefault( 1.0 );
squeeze->setRange( 0.00001, 1.0 );
squeeze->setDisplayRange( 0.01, 1.0 );
squeeze->setHint( "Squeeze distortion coeffecient (usefull for bad quality lens...)" );
OFX::Double2DParamDescriptor* asymmetric = desc.defineDouble2DParam( kParamAsymmetric );
asymmetric->setLabel( "Asymmetric" );
#ifdef TUTTLE_PRODUCTION
asymmetric->setIsSecret( true );
#endif
// asymmetric->setDoubleType( eDoubleTypeNormalisedXY );
asymmetric->setDefault( 0.0, 0.0 );
asymmetric->setRange( 0.0, 0.0, 1.0, 1.0 );
asymmetric->setDisplayRange( 0.0, 0.0, 1.0, 1.0 );
asymmetric->setHint( "asymmetric distortion coeffecient (usefull for bad quality lens...)" );
OFX::Double2DParamDescriptor* center = desc.defineDouble2DParam( kParamCenter );
center->setLabel( "Center" );
center->setDoubleType( OFX::eDoubleTypePlain );
center->setDefault( 0.0, 0.0 );
center->setDisplayRange( -1.0, -1.0, 1.0, 1.0 );
center->setHint( "Center parameter allows you to shift the center of distortion." );
//.........这里部分代码省略.........