本文整理汇总了C++中ofx::ChoiceParamDescriptor::setIsSecret方法的典型用法代码示例。如果您正苦于以下问题:C++ ChoiceParamDescriptor::setIsSecret方法的具体用法?C++ ChoiceParamDescriptor::setIsSecret怎么用?C++ ChoiceParamDescriptor::setIsSecret使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ofx::ChoiceParamDescriptor
的用法示例。
在下文中一共展示了ChoiceParamDescriptor::setIsSecret方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 LocalMaximaPluginFactory::describeInContext( OFX::ImageEffectDescriptor& desc,
OFX::EContext context )
{
OFX::ClipDescriptor* srcClip = desc.defineClip( kOfxImageEffectSimpleSourceClipName );
srcClip->addSupportedComponent( OFX::ePixelComponentRGBA );
srcClip->addSupportedComponent( OFX::ePixelComponentRGB );
srcClip->setSupportsTiles( kSupportTiles );
OFX::ClipDescriptor* dstClip = desc.defineClip( kOfxImageEffectOutputClipName );
dstClip->addSupportedComponent( OFX::ePixelComponentRGBA );
dstClip->addSupportedComponent( OFX::ePixelComponentRGB );
dstClip->addSupportedComponent( OFX::ePixelComponentAlpha );
dstClip->setSupportsTiles( kSupportTiles );
OFX::ChoiceParamDescriptor* border = desc.defineChoiceParam( kParamBorder );
border->setLabel( "Border" );
// border->setHint( "Border method." );
border->appendOption( kParamBorderBlack );
// border->appendOption( kParamBorderPadded );
border->setDefault( 0 );
OFX::ChoiceParamDescriptor* outputComponent = desc.defineChoiceParam( kParamOutputComponent );
outputComponent->setLabel( "Output component" );
outputComponent->appendOption( OFX::getImageEffectHostDescription()->supportsPixelComponent(OFX::ePixelComponentRGBA) ? kParamOutputComponentRGBA : "---" );
outputComponent->appendOption( OFX::getImageEffectHostDescription()->supportsPixelComponent(OFX::ePixelComponentRGB) ? kParamOutputComponentRGB : "---" );
outputComponent->appendOption( OFX::getImageEffectHostDescription()->supportsPixelComponent(OFX::ePixelComponentAlpha) ? kParamOutputComponentAlpha : "---" );
outputComponent->setIsSecret( OFX::getImageEffectHostDescription()->_supportedComponents.size() == 1 );
}
示例2: describeReaderParamsInContext
void describeReaderParamsInContext( OFX::ImageEffectDescriptor& desc,
OFX::EContext context )
{
OFX::StringParamDescriptor* filename = desc.defineStringParam( kTuttlePluginFilename );
filename->setLabel( kTuttlePluginFilenameLabel );
filename->setStringType( OFX::eStringTypeFilePath );
filename->setCacheInvalidation( OFX::eCacheInvalidateValueAll );
desc.addClipPreferencesSlaveParam( *filename );
OFX::ChoiceParamDescriptor* component = desc.defineChoiceParam( kTuttlePluginChannel );
component->appendOption( kTuttlePluginChannelAuto );
component->appendOption( kTuttlePluginChannelGray );
component->appendOption( kTuttlePluginChannelRGB );
component->appendOption( kTuttlePluginChannelRGBA );
component->setLabel( kTuttlePluginChannelLabel );
component->setDefault( eParamReaderChannelAuto );
OFX::ChoiceParamDescriptor* explicitConversion = desc.defineChoiceParam( kTuttlePluginBitDepth );
explicitConversion->setLabel( kTuttlePluginBitDepthLabel );
explicitConversion->appendOption( kTuttlePluginBitDepthAuto );
explicitConversion->appendOption( kTuttlePluginBitDepth8 );
explicitConversion->appendOption( kTuttlePluginBitDepth16 );
explicitConversion->appendOption( kTuttlePluginBitDepth32f );
explicitConversion->setCacheInvalidation( OFX::eCacheInvalidateValueAll );
explicitConversion->setAnimates( false );
desc.addClipPreferencesSlaveParam( *explicitConversion );
if( OFX::getImageEffectHostDescription()->supportsMultipleClipDepths )
{
explicitConversion->setDefault( 0 );
}
else
{
explicitConversion->setIsSecret( true );
explicitConversion->setDefault( static_cast<int>( OFX::getImageEffectHostDescription()->getPixelDepth() ) );
}
}
示例3: describeInContext
//.........这里部分代码省略.........
{
OFX::ClipDescriptor* srcClip = desc.defineClip(kOfxImageEffectSimpleSourceClipName);
srcClip->addSupportedComponent(OFX::ePixelComponentRGBA);
srcClip->addSupportedComponent(OFX::ePixelComponentRGB);
srcClip->addSupportedComponent(OFX::ePixelComponentAlpha);
srcClip->setSupportsTiles(kSupportTiles);
OFX::ClipDescriptor* dstClip = desc.defineClip(kOfxImageEffectOutputClipName);
dstClip->addSupportedComponent(OFX::ePixelComponentRGBA);
dstClip->addSupportedComponent(OFX::ePixelComponentRGB);
dstClip->setSupportsTiles(kSupportTiles);
OFX::Double2DParamDescriptor* size = desc.defineDouble2DParam(kParamSize);
size->setLabel("Size");
size->setDefault(1.0, 1.0);
size->setRange(0.0, 0.0, std::numeric_limits<double>::max(), std::numeric_limits<double>::max());
size->setDisplayRange(0, 0, 10, 10);
size->setDoubleType(OFX::eDoubleTypeScale);
OFX::GroupParamDescriptor* advanced = desc.defineGroupParam(kParamGroupAdvanced);
advanced->setLabel("Advanced");
OFX::BooleanParamDescriptor* unidimensional = desc.defineBooleanParam(kParamUnidimensional);
unidimensional->setLabel("Unidimensional");
unidimensional->setHint("Instead of using a square convolution matrix, use 1D kernels.");
unidimensional->setDefault(false);
unidimensional->setParent(advanced);
OFX::BooleanParamDescriptor* reverseKernel = desc.defineBooleanParam(kParamReverseKernel);
reverseKernel->setLabel("Reverse");
reverseKernel->setHint("Reverse the kernel (convolution or correlation).");
reverseKernel->setDefault(false);
reverseKernel->setParent(advanced);
OFX::BooleanParamDescriptor* normalizedKernel = desc.defineBooleanParam(kParamNormalizedKernel);
normalizedKernel->setLabel("Normalized kernel");
normalizedKernel->setHint("Use a normalized kernel to compute the gradient.");
normalizedKernel->setDefault(true);
normalizedKernel->setParent(advanced);
OFX::DoubleParamDescriptor* kernelEpsilon = desc.defineDoubleParam(kParamKernelEpsilon);
kernelEpsilon->setLabel("Kernel espilon value");
kernelEpsilon->setHint("Threshold at which we no longer consider the values of the function.");
kernelEpsilon->setDefault(0.01);
kernelEpsilon->setRange(std::numeric_limits<double>::epsilon(), 1);
kernelEpsilon->setDisplayRange(0, 0.01);
kernelEpsilon->setParent(advanced);
OFX::ChoiceParamDescriptor* pass = desc.defineChoiceParam(kParamPass);
pass->setLabel("Pass");
pass->setHint("The sobel filter is computed using a 2D separable filter. So it consists in 2 passes.\n"
"By default we compute the 2 passes, but with this option you can separate each pass.");
pass->appendOption(kParamPassFull);
pass->appendOption(kParamPass1);
pass->appendOption(kParamPass2);
pass->setDefault(0);
pass->setParent(advanced);
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);
OFX::BooleanParamDescriptor* computeNorm = desc.defineBooleanParam(kParamComputeGradientNorm);
computeNorm->setLabel("Compute norm");
computeNorm->setHint("To disable the norm computation, if you don't need it.");
computeNorm->setDefault(true);
OFX::BooleanParamDescriptor* normManhattan = desc.defineBooleanParam(kParamGradientNormManhattan);
normManhattan->setLabel("Use the manhattan norm");
normManhattan->setHint("Use manhattan norm instead of standard one.");
normManhattan->setDefault(false);
OFX::BooleanParamDescriptor* computeGradientDirection = desc.defineBooleanParam(kParamComputeGradientDirection);
computeGradientDirection->setLabel("Gradient direction");
computeGradientDirection->setHint("To disable the gradient direction computation, if you don't need it.");
computeGradientDirection->setDefault(false);
OFX::BooleanParamDescriptor* gradientDirectionAbs = desc.defineBooleanParam(kParamGradientDirectionAbs);
gradientDirectionAbs->setLabel("Angle between 0 and PI");
gradientDirectionAbs->setHint("Limit gradient direction between 0 and PI.");
gradientDirectionAbs->setDefault(true);
OFX::PushButtonParamDescriptor* infosButton = desc.definePushButtonParam(kParamInfos);
infosButton->setLabel("Infos");
OFX::ChoiceParamDescriptor* outputComponent = desc.defineChoiceParam(kParamOutputComponent);
outputComponent->setLabel("Output component");
outputComponent->appendOption(OFX::getImageEffectHostDescription()->supportsPixelComponent(OFX::ePixelComponentRGB)
? kParamOutputComponentRGB
: "---");
outputComponent->appendOption(OFX::getImageEffectHostDescription()->supportsPixelComponent(OFX::ePixelComponentRGBA)
? kParamOutputComponentRGBA
: "---");
outputComponent->setDefault(0);
outputComponent->setIsSecret(OFX::getImageEffectHostDescription()->_supportedComponents.size() == 1);
}
示例4: 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." );
//.........这里部分代码省略.........
示例5: describeGeneratorParamsInContext
void describeGeneratorParamsInContext( OFX::ImageEffectDescriptor& desc,
OFX::EContext context )
{
/* to activate this
// Create the mandated optional input clip
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::ChoiceParamDescriptor* explicitConversion = desc.defineChoiceParam( kParamGeneratorExplicitConversion );
explicitConversion->setLabel( "Explicit conversion" );
explicitConversion->appendOption( kTuttlePluginBitDepthAuto );
explicitConversion->appendOption( kTuttlePluginBitDepth8 );
explicitConversion->appendOption( kTuttlePluginBitDepth16 );
explicitConversion->appendOption( kTuttlePluginBitDepth32f );
explicitConversion->setCacheInvalidation( OFX::eCacheInvalidateValueAll );
explicitConversion->setAnimates( false );
desc.addClipPreferencesSlaveParam( *explicitConversion );
if( OFX::getImageEffectHostDescription()->supportsMultipleClipDepths )
{
explicitConversion->setDefault( 0 );
}
else
{
explicitConversion->setIsSecret( true );
explicitConversion->setDefault( static_cast<int>( OFX::getImageEffectHostDescription()->getPixelDepth() ) );
}
OFX::ChoiceParamDescriptor* method = desc.defineChoiceParam( kParamMode );
method->setLabel ( "Mode" );
method->appendOption( kParamModeFormat );
method->appendOption( kParamModeSize );
method->setDefault ( eParamModeFormat );
OFX::ChoiceParamDescriptor* format = desc.defineChoiceParam( kParamFormat );
format->setLabel( "Format" );
format->appendOption( kParamFormatPCVideo );
format->appendOption( kParamFormatNTSC );
format->appendOption( kParamFormatPAL );
format->appendOption( kParamFormatHD );
format->appendOption( kParamFormatNTSC169 );
format->appendOption( kParamFormatPAL169 );
format->appendOption( kParamFormat1kSuper35 );
format->appendOption( kParamFormat1kCinemascope );
format->appendOption( kParamFormat2kSuper35 );
format->appendOption( kParamFormat2kCinemascope );
format->appendOption( kParamFormat4kSuper35 );
format->appendOption( kParamFormat4kCinemascope );
format->appendOption( kParamFormatSquare256 );
format->appendOption( kParamFormatSquare512 );
format->appendOption( kParamFormatSquare1k );
format->appendOption( kParamFormatSquare2k );
format->setDefault( eParamFormat2kCinemascope );
OFX::BooleanParamDescriptor* specificRatio = desc.defineBooleanParam( kParamSizeSpecificRatio );
specificRatio->setLabel( "Specific ratio" );
specificRatio->setDefault( false );
specificRatio->setHint( "Specific input image ratio." );
OFX::Int2DParamDescriptor* size = desc.defineInt2DParam( kParamSize );
size->setLabel( "Size" );
size->setDefault( 200, 200 );
size->setRange( 1, 1, std::numeric_limits<int>::max(), std::numeric_limits<int>::max() );
size->setHint( "Set the output size (width, height)." );
OFX::ChoiceParamDescriptor* direction = desc.defineChoiceParam( kParamSizeOrientation );
direction->setLabel( "Orientation" );
direction->appendOption( kParamSizeOrientationX );
direction->appendOption( kParamSizeOrientationY );
direction->setDefault( eParamSizeOrientationX );
OFX::DoubleParamDescriptor* ratioValue = desc.defineDoubleParam( kParamSizeRatioValue );
ratioValue->setLabel( "Ratio Value" );
ratioValue->setDefault( 1.0 );
ratioValue->setRange( 1, std::numeric_limits<int>::max() );
ratioValue->setDisplayRange( 0, 50 );
ratioValue->setHint( "Set the ratio." );
OFX::IntParamDescriptor* width = desc.defineIntParam( kParamSizeWidth );
width->setLabel( "Width" );
width->setDefault( 200 );
width->setRange( 1, std::numeric_limits<int>::max() );
width->setDisplayRange( 0, 3000 );
width->setHint( "Set the width in pixels and specify the ratio." );
OFX::IntParamDescriptor* height = desc.defineIntParam( kParamSizeHeight );
height->setLabel( "Height" );
height->setDefault( 200 );
//.........这里部分代码省略.........