• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ ofx::ChoiceParamDescriptor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ofx::ChoiceParamDescriptor的典型用法代码示例。如果您正苦于以下问题:C++ ChoiceParamDescriptor类的具体用法?C++ ChoiceParamDescriptor怎么用?C++ ChoiceParamDescriptor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了ChoiceParamDescriptor类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 );
}
开发者ID:Achammem,项目名称:TuttleOFX,代码行数:33,代码来源:LocalMaximaPluginFactory.cpp


示例2: describeInContext

/**
 * @brief Function called to describe the plugin controls and features.
 * @param[in, out]   desc       Effect descriptor
 * @param[in]        context    Application context
 */
void SeExprPluginFactory::describeInContext(OFX::ImageEffectDescriptor& desc, OFX::EContext context)
{
    describeGeneratorParamsInContext(desc, context);

    OFX::ChoiceParamDescriptor* chooseInput = desc.defineChoiceParam(kParamChooseInput);
    chooseInput->appendOption(kParamChooseInputCode);
    chooseInput->appendOption(kParamChooseInputFile);
    chooseInput->setDefault(eParamChooseInputCode);

    OFX::StringParamDescriptor* code = desc.defineStringParam(kParamSeExprCode);
    code->setLabel("SeExpr code");
    code->setHint("Write your SeExpr code.");
    code->setStringType(OFX::eStringTypeMultiLine);
    code->setDefault("cfbm([10*u,10*v,.5])");

    OFX::StringParamDescriptor* file = desc.defineStringParam(kTuttlePluginFilename);
    file->setLabel(kTuttlePluginFilenameLabel);
    file->setHint("SeExpr source code file.");
    file->setStringType(OFX::eStringTypeFilePath);

    OFX::Double2DParamDescriptor* textureOffset = desc.defineDouble2DParam(kParamTextureOffset);
    textureOffset->setLabel("Texture Offset (u, v)");
    textureOffset->setHint("Set the u,v offset texture parameters.");
    textureOffset->setDisplayRange(-100, -100, 100, 100);
    textureOffset->setDefault(0.0, 0.0);
}
开发者ID:aoblet,项目名称:TuttleOFX,代码行数:31,代码来源:SeExprPluginFactory.cpp


示例3: describeInContext

/**
 * @brief Function called to describe the plugin controls and features.
 * @param[in, out]   desc       Effect descriptor
 * @param[in]        context    Application context
 */
void ColorBarsPluginFactory::describeInContext( OFX::ImageEffectDescriptor& desc,
                                                  OFX::EContext context )
{
	describeGeneratorParamsInContext( desc, context );
	
	OFX::ChoiceParamDescriptor* levels = desc.defineChoiceParam( kColorBarsLevels );
	levels->setLabel( "Levels" );
	levels->appendOption( kColorBarsLevels100 );
	levels->appendOption( kColorBarsLevels75 );
	levels->setDefault( eColorBarsLevels75 );
	
}
开发者ID:Achammem,项目名称:TuttleOFX,代码行数:17,代码来源:ColorBarsPluginFactory.cpp


示例4: describeInContext

/**
 * @brief Function called to describe the plugin controls and features.
 * @param[in, out]   desc       Effect descriptor
 * @param[in]        context    Application context
 */
void RampPluginFactory::describeInContext( OFX::ImageEffectDescriptor& desc,
                                                  OFX::EContext context )
{
    describeGeneratorParamsInContext( desc, context );

    OFX::ChoiceParamDescriptor* direction = desc.defineChoiceParam( kRampDirection );
    direction->appendOption( "horizontal", "Horizontal" );
    direction->appendOption( "vertical", "Vertical" );
    direction->setLabel( "Ramp Direction" );
    direction->setHint( "Select the ramp direction." );

    OFX::BooleanParamDescriptor* color = desc.defineBooleanParam( kRampColor );
    color->setDefault( false );
    color->setLabel( "Color Ramp" );
    color->setHint( "Enable the R/G/B/Gray ramp." );
}
开发者ID:DIT-Tools,项目名称:TuttleOFX,代码行数:21,代码来源:RampPluginFactory.cpp


示例5: describeInContext

/**
 * @brief Function called to describe the plugin controls and features.
 * @param[in, out]   desc       Effect descriptor
 * @param[in]        context    Application context
 */
void TurboJpegReaderPluginFactory::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::ePixelComponentRGB );
	dstClip->addSupportedComponent( OFX::ePixelComponentAlpha );
	dstClip->setSupportsTiles( kSupportTiles );
	
	describeReaderParamsInContext( desc, context );
	
	OFX::ChoiceParamDescriptor* optimization = desc.defineChoiceParam( kParamOptimization );
	optimization->setLabel( kParamOptimizationLabel );
	optimization->setHint( kParamOptimizationHint );
	optimization->appendOption( kTurboJpegOptimizationNone );
	optimization->appendOption( kTurboJpegOptimizationMMX );
	optimization->appendOption( kTurboJpegOptimizationSSE );
	optimization->appendOption( kTurboJpegOptimizationSSE2 );
	optimization->appendOption( kTurboJpegOptimizationSSE3 );
	optimization->setDefault( eTurboJpegOptimizationSSE3 );
	
	OFX::BooleanParamDescriptor* fastupsampling = desc.defineBooleanParam( kParamFastUpsampling );
	fastupsampling->setLabel( kParamFastUpsamplingLabel );
	fastupsampling->setHint( kParamFastUpsamplingHint );
	fastupsampling->setDefault( false );
}
开发者ID:Finaler,项目名称:TuttleOFX,代码行数:32,代码来源:TurboJpegReaderPluginFactory.cpp


示例6: catch

void
GenericOCIO::describeInContextOutput(OFX::ImageEffectDescriptor &desc, OFX::ContextEnum /*context*/, OFX::PageParamDescriptor *page, const char* outputSpaceNameDefault, const char* outputSpaceLabel)
{
#ifdef OFX_IO_USING_OCIO
    gHostIsNatron = (OFX::getImageEffectHostDescription()->isNatron);

    char* file = std::getenv("OCIO");
    OCIO::ConstConfigRcPtr config;
    if (file != NULL) {
        //Add choices
        try {
            config = OCIO::Config::CreateFromFile(file);
            gWasOCIOEnvVarFound = true;
        } catch (OCIO::Exception &e) {
        }
    }
    std::string outputSpaceName;
    if (config) {
        outputSpaceName = canonicalizeColorSpace(config, colorSpaceName(config, outputSpaceNameDefault));
    }

    ///////////Output Color-space
    {
        OFX::StringParamDescriptor* param = desc.defineStringParam(kOCIOParamOutputSpace);
        param->setLabel(outputSpaceLabel);
        param->setHint(kOCIOParamOutputSpaceHint);
        param->setAnimates(true);
        if (config) {
            param->setDefault(outputSpaceName);
        } else {
            param->setEnabled(false);
        }
        page->addChild(*param);
    }
#ifdef OFX_OCIO_CHOICE
    {
        OFX::ChoiceParamDescriptor* param = desc.defineChoiceParam(kOCIOParamOutputSpaceChoice);
        param->setLabel(outputSpaceLabel);
        param->setHint(kOCIOParamOutputSpaceHint);
        param->setCascading(OFX::getImageEffectHostDescription()->supportsCascadingChoices);
        if (config) {
            buildChoiceMenu(config, param, OFX::getImageEffectHostDescription()->supportsCascadingChoices, outputSpaceName);
        } else {
            param->setEnabled(false);
            //param->setIsSecret(true); // done in the plugin constructor
        }
        param->setAnimates(true);
        param->setEvaluateOnChange(false); // evaluate only when the StringParam is changed
        param->setIsPersistant(false); // don't save/serialize
        page->addChild(*param);
    }
#endif
#endif
}
开发者ID:theomission,项目名称:openfx-io,代码行数:54,代码来源:GenericOCIO.cpp


示例7: describeInContext

/**
 * @brief Function called to describe the plugin controls and features.
 * @param[in, out]   desc       Effect descriptor
 * @param[in]        context    Application context
 */
void DiffPluginFactory::describeInContext( OFX::ImageEffectDescriptor& desc,
                                           OFX::EContext               context )
{
	OFX::ClipDescriptor* srcClipA = desc.defineClip( kDiffSourceA );

	assert( srcClipA );
	srcClipA->addSupportedComponent( OFX::ePixelComponentRGBA );
	srcClipA->addSupportedComponent( OFX::ePixelComponentAlpha );
	srcClipA->setSupportsTiles( kSupportTiles );
	srcClipA->setOptional( false );

	OFX::ClipDescriptor* srcClipB = desc.defineClip( kDiffSourceB );
	assert( srcClipB );
	srcClipB->addSupportedComponent( OFX::ePixelComponentRGBA );
	srcClipB->addSupportedComponent( OFX::ePixelComponentAlpha );
	srcClipB->setSupportsTiles( kSupportTiles );
	srcClipB->setOptional( false );

	// Create the mandated output clip
	OFX::ClipDescriptor* dstClip = desc.defineClip( kOfxImageEffectOutputClipName );
	assert( dstClip );
	dstClip->addSupportedComponent( OFX::ePixelComponentRGBA );
	dstClip->addSupportedComponent( OFX::ePixelComponentAlpha );
	dstClip->setSupportsTiles( kSupportTiles );

	OFX::ChoiceParamDescriptor* diffFunction = desc.defineChoiceParam( kMeasureFunction );
	assert( diffFunction );
	diffFunction->setLabel( "Quality mesure function" );
	diffFunction->appendOption( "PSNR (Peak Signal to Noise Ratio)" );
//	diffFunction->appendOption( "MSE (Mean Square Error)" );
//	diffFunction->appendOption( "SSIM (Structural SIMilarity)" );
	diffFunction->setDefault( 0 );

	OFX::RGBAParamDescriptor* outputQualityMesure = desc.defineRGBAParam( kOutputQualityMesure );
	assert( outputQualityMesure );
	outputQualityMesure->setLabel( "Quality" );
	outputQualityMesure->setEvaluateOnChange( false );

//	OFX::PushButtonParamDescriptor* helpButton = desc.definePushButtonParam( kHelpButton );
//	assert( helpButton );
//	helpButton->setLabel( "Help" );
}
开发者ID:antdricot,项目名称:TuttleOFX,代码行数:47,代码来源:DiffPluginFactory.cpp


示例8: describeInContext

/**
 * @brief Function called to describe the plugin controls and features.
 * @param[in, out]   desc       Effect descriptor
 * @param[in]        context    Application context
 */
void ThinningPluginFactory::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::ChoiceParamDescriptor* border = desc.defineChoiceParam( kParamBorder );
	border->setLabel( "Gradient border" );
	border->setHint( "Border method for gradient computation." );
	border->appendOption( kParamBorderBlack );
	border->appendOption( kParamBorderPadded );
//	border->appendOption( kParamBorderMirror );
//	border->appendOption( kParamBorderConstant );
	border->setDefault( 1 );
}
开发者ID:Achammem,项目名称:TuttleOFX,代码行数:30,代码来源:ThinningPluginFactory.cpp


示例9: describeInContext

/**
 * @brief Function called to describe the plugin controls and features.
 * @param[in, out]   desc       Effect descriptor
 * @param[in]        context    Application context
 */
void ColorWheelPluginFactory::describeInContext( OFX::ImageEffectDescriptor& desc,
                                                  OFX::EContext context )
{
	describeGeneratorParamsInContext( desc, context );

    OFX::ChoiceParamDescriptor* mode = desc.defineChoiceParam( kColorWheelMode );
    mode->setLabel( "Type" );
    mode->setHint( "Select mode for the color wheel." );
    mode->appendOption( kColorWheelModeWhite );
    mode->appendOption( kColorWheelModeBlack );
    mode->appendOption( kColorWheelModeRainbow );
    mode->setDefault( 0 );
}
开发者ID:Achammem,项目名称:TuttleOFX,代码行数:18,代码来源:ColorWheelPluginFactory.cpp


示例10: describe

void ParamMathPluginFactory::describe(OFX::ImageEffectDescriptor& desc)
{
    desc.setLabels("TuttleMathParam", "MathParam", "Math Param");
    desc.setPluginGrouping("tuttle/param");

    OFX::ChoiceParamDescriptor* op = desc.defineChoiceParam("operation");
    op->appendOption("Multiply");
    op->appendOption("Divide");
    op->appendOption("Addition");
    op->appendOption("Subtraction");
    op->appendOption("Modulo");
    op->setDefault(0);

    OFX::Descriptor<ParamType>* a = desc.define<ParamType>("a");
    OFX::Descriptor<ParamType>* b = desc.define<ParamType>("b");
    OFX::Descriptor<ParamType>* output = desc.define<ParamType>("Output");
}
开发者ID:aoblet,项目名称:TuttleOFX,代码行数:17,代码来源:ParamMath.cpp


示例11: describeInContext

/**
 * @brief Function called to describe the plugin controls and features.
 * @param[in, out]   desc       Effect descriptor
 * @param[in]        context    Application context
 */
void ConvolutionPluginFactory::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::Int2DParamDescriptor* size = desc.defineInt2DParam( kParamSize );
	size->setLabel( "Size" );
	size->setDefault( 3, 3 );
	//	size->setIncrement( 2, 2 );
	size->setRange( 3, 3, kParamSizeMax, kParamSizeMax );

	OFX::ChoiceParamDescriptor* border = desc.defineChoiceParam( kParamBorder );
	border->setLabel( "Border" );
	border->appendOption( kParamBorderMirror );
	border->appendOption( kParamBorderConstant );
	border->appendOption( kParamBorderBlack );
	border->appendOption( kParamBorderPadded );
	
	for( unsigned int y = 0; y < kParamSizeMax; ++y )
	{
		for( unsigned int x = 0; x < kParamSizeMax; ++x )
		{
			const std::string name( getCoefName( y, x ) );
			OFX::DoubleParamDescriptor* coef = desc.defineDoubleParam( name );
			coef->setLabel( name );
			coef->setDisplayRange( -10.0, 10.0 );
			coef->setDefault( 0.0 );
		}
	}
}
开发者ID:Achammem,项目名称:TuttleOFX,代码行数:46,代码来源:ConvolutionPluginFactory.cpp


示例12: describeInContext

/**
 * @brief Function called to describe the plugin controls and features.
 * @param[in, out]   desc       Effect descriptor
 * @param[in]        context    Application context
 */
void DPXWriterPluginFactory::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 );

	OFX::ClipDescriptor* dstClip = desc.defineClip( kOfxImageEffectOutputClipName );
	dstClip->addSupportedComponent( OFX::ePixelComponentRGBA );
	dstClip->addSupportedComponent( OFX::ePixelComponentRGB );
	dstClip->addSupportedComponent( OFX::ePixelComponentAlpha );
	dstClip->setSupportsTiles( kSupportTiles );

	// Controls
	OFX::StringParamDescriptor* filename = desc.defineStringParam( kParamWriterFilename );
	filename->setLabel( "Filename" );
	filename->setStringType( OFX::eStringTypeFilePath );
	filename->setCacheInvalidation( OFX::eCacheInvalidateValueAll );
	desc.addClipPreferencesSlaveParam( *filename );

	OFX::ChoiceParamDescriptor* componentsType = desc.defineChoiceParam( kParamComponentsType );
	componentsType->setLabel( "Components type" );
	componentsType->appendOption( "rgb" );
	componentsType->appendOption( "rgba" );
	componentsType->appendOption( "abgr" );
	componentsType->setCacheInvalidation( OFX::eCacheInvalidateValueAll );
	componentsType->setDefault( 1 );

	OFX::ChoiceParamDescriptor* bitDepth = desc.defineChoiceParam( kParamWriterBitDepth );
	bitDepth->setLabel( "Bit depth" );
	bitDepth->appendOption( kTuttlePluginBitDepth8 );
	bitDepth->appendOption( kTuttlePluginBitDepth10 );
	bitDepth->appendOption( kTuttlePluginBitDepth12 );
	bitDepth->appendOption( kTuttlePluginBitDepth16 );
	bitDepth->setCacheInvalidation( OFX::eCacheInvalidateValueAll );
	bitDepth->setDefault( 3 );

	OFX::BooleanParamDescriptor* compressed = desc.defineBooleanParam( kParamCompressed );
	compressed->setLabel( "Remove unused bits (bit streaming)" );
	compressed->setCacheInvalidation( OFX::eCacheInvalidateValueAll );
	compressed->setDefault( false );

	describeWriterParamsInContext( desc, context );
}
开发者ID:morphimac,项目名称:TuttleOFX,代码行数:51,代码来源:DPXWriterPluginFactory.cpp


示例13: describeInContext

/**
 * @brief Function called to describe the plugin controls and features.
 * @param[in, out]   desc       Effect descriptor
 * @param[in]        context    Application context
 */
void EXRReaderPluginFactory::describeInContext( OFX::ImageEffectDescriptor& desc,
						OFX::EContext               context )
{
	OFX::ClipDescriptor* dstClip = desc.defineClip( kOfxImageEffectOutputClipName );
	dstClip->addSupportedComponent( OFX::ePixelComponentRGBA );
	dstClip->addSupportedComponent( OFX::ePixelComponentRGB );
	dstClip->addSupportedComponent( OFX::ePixelComponentAlpha );
	dstClip->setSupportsTiles( kSupportTiles );

	describeReaderParamsInContext( desc, context );

	OFX::ChoiceParamDescriptor* outRedIs = desc.defineChoiceParam( kParamOutputRedIs );
	outRedIs->appendOption( "0" );
	outRedIs->appendOption( "1" );
	outRedIs->appendOption( "2" );
	outRedIs->appendOption( "3" );
	outRedIs->setLabel( "Red is" );
	outRedIs->setDefault( 0 );
	outRedIs->setHint(
		"Read-only information to get index of red component in the file.");

	OFX::ChoiceParamDescriptor* outGreenIs = desc.defineChoiceParam( kParamOutputGreenIs );
	outGreenIs->appendOption( "0" );
	outGreenIs->appendOption( "1" );
	outGreenIs->appendOption( "2" );
	outGreenIs->appendOption( "3" );
	outGreenIs->setLabel( "Green is" );
	outGreenIs->setDefault( 0 );
	outGreenIs->setHint(
		"Read-only information to get index of green component in the file.");

	OFX::ChoiceParamDescriptor* outBlueIs = desc.defineChoiceParam( kParamOutputBlueIs );
	outBlueIs->appendOption( "0" );
	outBlueIs->appendOption( "1" );
	outBlueIs->appendOption( "2" );
	outBlueIs->appendOption( "3" );
	outBlueIs->setLabel( "Blue is" );
	outBlueIs->setDefault( 0 );
	outBlueIs->setHint(
		"Read-only information to get index of blue component in the file.");

	OFX::ChoiceParamDescriptor* outAlphaIs = desc.defineChoiceParam( kParamOutputAlphaIs );
	outAlphaIs->appendOption( "0" );
	outAlphaIs->appendOption( "1" );
	outAlphaIs->appendOption( "2" );
	outAlphaIs->appendOption( "3" );
	outAlphaIs->setLabel( "Alpha is" );
	outAlphaIs->setDefault( 0 );
	outAlphaIs->setHint(
		"Read-only information to get index of alpha component in the file.");

	OFX::ChoiceParamDescriptor* outputData = desc.defineChoiceParam( kParamOutputData );
	outputData->appendOption( "display" );
	outputData->appendOption( "data" );
	outputData->setLabel( "Output Data" );
	outputData->setDefault( 0 );

	OFX::ChoiceParamDescriptor* fileBitDepth = desc.defineChoiceParam( kParamFileBitDepth );
	fileBitDepth->setLabel( "File Bit Depth" );
	fileBitDepth->appendOption( kTuttlePluginBitDepth16f );
	fileBitDepth->appendOption( kTuttlePluginBitDepth32 );
	fileBitDepth->appendOption( kTuttlePluginBitDepth32f );
	fileBitDepth->appendOption( kTuttlePluginBitDepthNone );
	fileBitDepth->setDefault( eTuttlePluginFileBitDepthNone );
	fileBitDepth->setHint(
		"Read-only information about the image bit depth stored in the file.\n"
		"Data type is per channel in EXR. So we read the type of the first channel.");

	OFX::ChoiceParamDescriptor* compression = desc.defineChoiceParam( kParamCompression );
	compression->setLabel( "Compression" );
	compression->appendOption( kParamCompressionNone, kParamCompressionHintNone );
	compression->appendOption( kParamCompressionRLE, kParamCompressionHintRLE );
	compression->appendOption( kParamCompressionZIPS, kParamCompressionHintZIPS );
	compression->appendOption( kParamCompressionZIP, kParamCompressionHintZIP );
	compression->appendOption( kParamCompressionPIZ, kParamCompressionHintPIZ );
	compression->appendOption( kParamCompressionPXR24, kParamCompressionHintPXR24 );
	compression->appendOption( kParamCompressionB44, kParamCompressionHintB44 );
	compression->appendOption( kParamCompressionB44A, kParamCompressionHintB44A );
	compression->setDefault( eParamCompression_None );
	compression->setHint(
		"Read-only information about the image compression stored in the file.");
}
开发者ID:EfestoLab,项目名称:TuttleOFX,代码行数:87,代码来源:EXRReaderPluginFactory.cpp


示例14: describeInContext

/**
 * @brief Function called to describe the plugin controls and features.
 * @param[in, out]   desc       Effect descriptor
 * @param[in]        context    Application context
 */
void NormalizePluginFactory::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::ChoiceParamDescriptor* mode = desc.defineChoiceParam( kParamMode );
	mode->setLabel( "Input" );
	mode->appendOption( kParamModeAnalyse );
	mode->appendOption( kParamModeCustom );

	OFX::ChoiceParamDescriptor* analyse = desc.defineChoiceParam( kParamAnalyseMode );
	analyse->setLabel( "Analyse" );
	analyse->appendOption( kParamAnalysePerChannel );
	analyse->appendOption( kParamAnalyseLuminosity );
	analyse->appendOption( kParamAnalyseR );
	analyse->appendOption( kParamAnalyseG );
	analyse->appendOption( kParamAnalyseB );
	analyse->appendOption( kParamAnalyseA );

	OFX::PushButtonParamDescriptor* analyseNow = desc.definePushButtonParam( kParamAnalyseNow );
	analyseNow->setLabel( "Analyse" );

	OFX::GroupParamDescriptor* srcGroup = desc.defineGroupParam( kParamSrcGroup );
	srcGroup->setLabel( "Source" );

	OFX::RGBAParamDescriptor* srcMinColor = desc.defineRGBAParam( kParamSrcCustomColorMin );
	srcMinColor->setLabel( "Min" );
	srcMinColor->setDefault( 0.0, 0.0, 0.0, 0.0 );
	srcMinColor->setParent( srcGroup );

	OFX::RGBAParamDescriptor* srcMaxColor = desc.defineRGBAParam( kParamSrcCustomColorMax );
	srcMaxColor->setLabel( "Max" );
	srcMaxColor->setDefault( 1.0, 1.0, 1.0, 1.0 );
	srcMaxColor->setParent( srcGroup );

	OFX::GroupParamDescriptor* dstGroup = desc.defineGroupParam( kParamDstGroup );
	dstGroup->setLabel( "Destination" );

	OFX::RGBAParamDescriptor* dstMinColor = desc.defineRGBAParam( kParamDstCustomColorMin );
	dstMinColor->setLabel( "Min" );
	dstMinColor->setDefault( 0.0, 0.0, 0.0, 0.0 );
	dstMinColor->setParent( dstGroup );

	OFX::RGBAParamDescriptor* dstMaxColor = desc.defineRGBAParam( kParamDstCustomColorMax );
	dstMaxColor->setLabel( "Max" );
	dstMaxColor->setDefault( 1.0, 1.0, 1.0, 1.0 );
	dstMaxColor->setParent( dstGroup );

	OFX::GroupParamDescriptor* processGroup = desc.defineGroupParam( kParamProcessGroup );
	processGroup->setLabel( "Process" );

	OFX::BooleanParamDescriptor* processR = desc.defineBooleanParam( kParamProcessR );
	processR->setLabel( "R" );
	processR->setDefault( true );
	processR->setParent( processGroup );

	OFX::BooleanParamDescriptor* processG = desc.defineBooleanParam( kParamProcessG );
	processG->setLabel( "G" );
	processG->setDefault( true );
	processG->setParent( processGroup );

	OFX::BooleanParamDescriptor* processB = desc.defineBooleanParam( kParamProcessB );
	processB->setLabel( "B" );
	processB->setDefault( true );
	processB->setParent( processGroup );

	OFX::BooleanParamDescriptor* processA = desc.defineBooleanParam( kParamProcessA );
	processA->setLabel( "A" );
	processA->setDefault( true );
	processA->setParent( processGroup );
}
开发者ID:Achammem,项目名称:TuttleOFX,代码行数:87,代码来源:NormalizePluginFactory.cpp


示例15: describeInContext

/**
 * @brief Function called to describe the plugin controls and features.
 * @param[in, out]   desc       Effect descriptor
 * @param[in]        context    Application context
 */
void TurboJpegWriterPluginFactory::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 );
	
	// Controls
	describeWriterParamsInContext( desc, context );
	
	OFX::ChoiceParamDescriptor* channel = static_cast<OFX::ChoiceParamDescriptor*>( desc.getParamDescriptor( kTuttlePluginChannel ) );
	channel->resetOptions();
	channel->appendOption( kTuttlePluginChannelRGB );
	channel->setDefault( 0 );
	channel->setEnabled( false );
	
	OFX::ChoiceParamDescriptor* bitDepth = static_cast<OFX::ChoiceParamDescriptor*>( desc.getParamDescriptor( kTuttlePluginBitDepth ) );
	bitDepth->resetOptions();
	bitDepth->appendOption( kTuttlePluginBitDepth8 );
	bitDepth->setDefault( eTuttlePluginBitDepth8 );
	bitDepth->setEnabled( false );
	
	OFX::BooleanParamDescriptor* premult = static_cast<OFX::BooleanParamDescriptor*>( desc.getParamDescriptor( kParamPremultiplied ) );
	premult->setDefault( true );
	
	OFX::IntParamDescriptor* quality = desc.defineIntParam( kParamQuality );
	quality->setLabel( "Quality" );
	quality->setRange( 0, 100 );
	quality->setDisplayRange( 0, 100 );
	quality->setDefault( 80 );

	
	OFX::ChoiceParamDescriptor* subsampling = desc.defineChoiceParam( kParamSubsampling );
	subsampling->setLabel( kParamSubsamplingLabel );
	subsampling->setHint( kParamSubsamplingHint );
	subsampling->appendOption( kTurboJpegSubsampling444 );
	subsampling->appendOption( kTurboJpegSubsampling422 );
	subsampling->appendOption( kTurboJpegSubsampling420 );
	subsampling->appendOption( kTurboJpegSubsamplingGray );
	subsampling->appendOption( kTurboJpegSubsampling440 );
	subsampling->setDefault( eTurboJpegSubsampling420 );
	
	OFX::ChoiceParamDescriptor* optimization = desc.defineChoiceParam( kParamOptimization );
	optimization->setLabel( kParamOptimizationLabel );
	optimization->setHint( kParamOptimizationHint );
	optimization->appendOption( kTurboJpegOptimizationNone );
	optimization->appendOption( kTurboJpegOptimizationMMX );
	optimization->appendOption( kTurboJpegOptimizationSSE );
	optimization->appendOption( kTurboJpegOptimizationSSE2 );
	optimization->appendOption( kTurboJpegOptimizationSSE3 );
	optimization->setDefault( eTurboJpegOptimizationSSE3 );
}
开发者ID:Achammem,项目名称:TuttleOFX,代码行数:66,代码来源:TurboJpegWriterPluginFactory.cpp


示例16: describeWriterParamsInContext

void describeWriterParamsInContext( OFX::ImageEffectDescriptor& desc,
				    OFX::EContext               context )
{
	OFX::StringParamDescriptor* filename = desc.defineStringParam( kTuttlePluginFilename );
	filename->setLabel( kTuttlePluginFilenameLabel );
	filename->setStringType( OFX::eStringTypeFilePath );
	filename->setCacheInvalidation( OFX::eCacheInvalidateValueAll );
	// the file doesn't need to exist, the writer will create it!
	filename->setFilePathExists(false);
	desc.addClipPreferencesSlaveParam( *filename );

	OFX::ChoiceParamDescriptor* channel = desc.defineChoiceParam( kTuttlePluginChannel );
	channel->setLabel( kTuttlePluginChannelLabel );
	channel->appendOption( kTuttlePluginChannelAuto );
	channel->appendOption( kTuttlePluginChannelGray );
	channel->appendOption( kTuttlePluginChannelRGB );
	channel->appendOption( kTuttlePluginChannelRGBA );
	channel->setDefault( 0 );

	OFX::ChoiceParamDescriptor* bitDepth = desc.defineChoiceParam( kTuttlePluginBitDepth );
	bitDepth->setLabel( kTuttlePluginBitDepthLabel );
	bitDepth->appendOption( kTuttlePluginBitDepth8 );
	bitDepth->appendOption( kTuttlePluginBitDepth16 );
	bitDepth->setDefault( 0 );
	
	OFX::BooleanParamDescriptor* premult = desc.defineBooleanParam( kParamPremultiplied );
	premult->setLabel( "Premultiplied" );
	premult->setDefault( false );
	
	OFX::ChoiceParamDescriptor* existingFile = desc.defineChoiceParam( kParamWriterExistingFile );
	existingFile->setLabel( "Existing File" );
	existingFile->appendOption( kParamWriterExistingFile_overwrite );
	existingFile->appendOption( kParamWriterExistingFile_error );
	if( OFX::getImageEffectHostDescription()->hostName == "TuttleOfx" )
	{
		// Only Tuttle is able to do that, because we disable the computation
		// using the IsIdentity Action. This is not in the OpenFX standard.
		existingFile->appendOption( kParamWriterExistingFile_skip );
	}
	//existingFile->appendOption( kParamWriterExistingFile_reader ); // TODO: not implemented yet.
	existingFile->setDefault( eParamWriterExistingFile_overwrite );

	OFX::BooleanParamDescriptor* copyToOutput = desc.defineBooleanParam( kParamWriterCopyToOutput );
	copyToOutput->setLabel( "Copy buffer to output" );
	copyToOutput->setHint( "This is only useful if you connect nodes to the output clip of the writer." );
	copyToOutput->setDefault( false );

	OFX::PushButtonParamDescriptor* render = desc.definePushButtonParam( kParamWriterRender );
	render->setLabels( "Render", "Render", "Render step" );
	render->setHint("Force render (writing)");

	OFX::BooleanParamDescriptor* renderAlways = desc.defineBooleanParam( kParamWriterRenderAlways );
	renderAlways->setLabel( "Render always" );
	renderAlways->setHint( "This is only useful as a workaround for GUI applications." );
	renderAlways->setDefault( true ); // because tuttle is not declared as a background renderer

	OFX::IntParamDescriptor* forceNewRender = desc.defineIntParam( kParamWriterForceNewRender );
	forceNewRender->setLabel( "Force new render" );
	forceNewRender->setHint( "This is only useful as a workaround for GUI applications." );
	forceNewRender->setEnabled( false );
	forceNewRender->setIsSecret( true );
	forceNewRender->setIsPersistant( false );
	forceNewRender->setAnimates( false );
	forceNewRender->setCacheInvalidation( OFX::eCacheInvalidateValueAll );
	forceNewRender->setEvaluateOnChange( true );
	forceNewRender->setDefault( 0 );
}
开发者ID:EfestoLab,项目名称:TuttleOFX,代码行数:67,代码来源:WriterPluginFactory.hpp


示例17: describeInContext

void LensCalibrationPluginFactory::describeInContext(OFX::ImageEffectDescriptor& desc, OFX::ContextEnum context)
{
  //Input Clip
  OFX::ClipDescriptor *srcClip = desc.defineClip(kOfxImageEffectSimpleSourceClipName);
  srcClip->addSupportedComponent(OFX::ePixelComponentRGBA);
  srcClip->setTemporalClipAccess(false);
  srcClip->setSupportsTiles(false);
  srcClip->setIsMask(false);
  srcClip->setOptional(false);
  
  //Output clip
  OFX::ClipDescriptor *dstClip = desc.defineClip(kOfxImageEffectOutputClipName);
  dstClip->addSupportedComponent(OFX::ePixelComponentRGBA);
  dstClip->setSupportsTiles(false);
  
  //Calibration Group
  {
    OFX::GroupParamDescriptor *groupCalibration = desc.defineGroupParam(kParamGroupCalibration);
    groupCalibration->setLabel("Calibration");
    groupCalibration->setAsTab();

    {
      OFX::Int2DParamDescriptor *param = desc.defineInt2DParam(kParamImageSize);
      param->setLabel("Image Size");
      param->setHint("Input image size used to calibrate the optics. Obviously, all images should have the same size.");
      param->setDefault(0, 0);
      param->setDisplayRange(0, 0, 10000, 10000);
      param->setAnimates(false);
      param->setParent(*groupCalibration);
      param->setEnabled(false); // should not be edited by the user
    }

    {
      OFX::BooleanParamDescriptor *param = desc.defineBooleanParam(kParamInputImageIsGray);
      param->setLabel("Input image is gray");
      param->setHint("Input image is gray");
      param->setParent(*groupCalibration);
    }
    
    {
      OFX::ChoiceParamDescriptor *param = desc.defineChoiceParam(kParamPatternType);
      param->setLabel("Pattern Type");
      param->setHint("Type of pattern to detect");
      param->appendOptions(kStringParamPatternType);
      param->setDefault(eParamPatternTypeChessboard);
      param->setAnimates(false);
      param->setParent(*groupCalibration);
    }

    {
      OFX::Int2DParamDescriptor *param = desc.defineInt2DParam(kParamPatternSize);
      param->setLabel("Pattern Size");
      param->setHint("Number of inner corners per one of board dimension Width Height");
      param->setDefault(10, 7);
      param->setRange(2, 2, kOfxFlagInfiniteMax, kOfxFlagInfiniteMax);
      param->setDisplayRange(2, 2, 15, 15);
      param->setAnimates(false);
      param->setParent(*groupCalibration);
    }
    
    {
      OFX::DoubleParamDescriptor *param = desc.defineDoubleParam(kParamSquareSize);
      param->setLabel("Square Size");
      param->setHint("Define the size of the grid's square cells (mm)");
      param->setDisplayRange(0, 100);
      param->setDefault(1);
      param->setAnimates(false);
      param->setParent(*groupCalibration);
      param->setLayoutHint(OFX::eLayoutHintDivider);
    }

    {
      OFX::IntParamDescriptor *param = desc.defineIntParam(kParamNbRadialCoef);
      param->setLabel("Nb Radial Coef");
      param->setHint("Number of radial coefficient.");
      param->setRange(0, 6);
      param->setDisplayRange(0, 6);
      param->setDefault(3);
      param->setAnimates(false);
      param->setParent(*groupCalibration);
    }

    {
      OFX::IntParamDescriptor *param = desc.defineIntParam(kParamMaxFrames);
      param->setLabel("Max Frames");
      param->setHint("Maximal number of frames to extract from the video file.");
      param->setRange(0, kOfxFlagInfiniteMax);
      param->setDisplayRange(0, 1000);
      param->setDefault(0);
      param->setAnimates(false);
      param->setParent(*groupCalibration);
    }

    {
      OFX::IntParamDescriptor *param = desc.defineIntParam(kParamMaxCalibFrames);
      param->setLabel("Max Calibration Frames");
      param->setHint("Maximal number of frames to use to calibrate from the selected frames.");
      param->setRange(0, kOfxFlagInfiniteMax);
      param->setDisplayRange(0, 1000);
      param->setDefault(100);
//.........这里部分代码省略.........
开发者ID:poparteu,项目名称:ofxMVG,代码行数:101,代码来源:LensCalibrationPluginFactory.cpp


示例18: describeInContext

/**
 * @brief Function called to describe the plugin controls and features.
 * @param[in, out]   desc       Effect descriptor
 * @param[in]        context    Application context
 */
void DPXWriterPluginFactory::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);

    OFX::ClipDescriptor* dstClip = desc.defineClip(kOfxImageEffectOutputClipName);
    dstClip->addSupportedComponent(OFX::ePixelComponentRGBA);
    dstClip->addSupportedComponent(OFX::ePixelComponentRGB);
    dstClip->addSupportedComponent(OFX::ePixelComponentAlpha);
    dstClip->setSupportsTiles(kSupportTiles);

    // Controls

    describeWriterParamsInContext(desc, context);

    OFX::ChoiceParamDescriptor* bitDepth =
        static_cast<OFX::ChoiceParamDescriptor*>(desc.getParamDescriptor(kTuttlePl 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ofx::Clip类代码示例发布时间:2022-05-31
下一篇:
C++ ofx::BooleanParamDescriptor类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap