当前位置: 首页>>代码示例>>C++>>正文


C++ ImageEffectDescriptor::defineDouble2DParam方法代码示例

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


在下文中一共展示了ImageEffectDescriptor::defineDouble2DParam方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 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

示例2: 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." );

}
开发者ID:tuttleSandbox,项目名称:TuttleOFX,代码行数:62,代码来源:TextPluginFactory.cpp

示例3: describe2DDoubleParam

/** @brief describe a double param */
void describe2DDoubleParam(OFX::ImageEffectDescriptor &desc, const std::string &name, DoubleTypeEnum doubleType,
                           double min, double max, PageParamDescriptor *page)
{
  Double2DParamDescriptor *param = desc.defineDouble2DParam(name);
  param->setLabels(name, name, name);
  param->setScriptName(name);
  param->setHint("A 2D double parameter");
  param->setDefault(0, 0);
  param->setRange(min, min, max, max);
  param->setDisplayRange(min, min, max, max);
  param->setDoubleType(doubleType);
  page->addChild(*param);
}
开发者ID:chajaeik,项目名称:openfx,代码行数:14,代码来源:propTester.cpp

示例4:

/**
 * @brief Function called to describe the plugin controls and features.
 * @param[in, out]   desc       Effect descriptor
 * @param[in]        context    Application context
 */
void Move2DPluginFactory::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::Double2DParamDescriptor* translation = desc.defineDouble2DParam( kParamTranslation );
	translation->setLabel( "Translation" );
	translation->setDefault( 0, 0 );

}
开发者ID:Achammem,项目名称:TuttleOFX,代码行数:26,代码来源:Move2DPluginFactory.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 ResizePluginFactory::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* method = desc.defineChoiceParam(kParamMode);
    method->setLabel("Mode");
    method->appendOption(kParamModeFormat);
    method->appendOption(kParamModeSize);
    method->appendOption(kParamModeScale);
    method->setDefault(eParamModeFormat);

    OFX::ChoiceParamDescriptor* format = desc.defineChoiceParam(kParamFormat);
    format->setLabel("Format");
    format->appendOption(kParamFormatPCVideo, kParamFormatPCVideoLabel);
    format->appendOption(kParamFormatNTSC, kParamFormatNTSCLabel);
    format->appendOption(kParamFormatPAL, kParamFormatPALLabel);
    format->appendOption(kParamFormatHD, kParamFormatHDLabel);
    format->appendOption(kParamFormatNTSC169, kParamFormatNTSC169Label);
    format->appendOption(kParamFormatPAL169, kParamFormatPAL169Label);
    format->appendOption(kParamFormat1kSuper35, kParamFormat1kSuper35Label);
    format->appendOption(kParamFormat1kCinemascope, kParamFormat1kCinemascopeLabel);
    format->appendOption(kParamFormat2kSuper35, kParamFormat2kSuper35Label);
    format->appendOption(kParamFormat2kCinemascope, kParamFormat2kCinemascopeLabel);
    format->appendOption(kParamFormat4kSuper35, kParamFormat4kSuper35Label);
    format->appendOption(kParamFormat4kCinemascope, kParamFormat4kCinemascopeLabel);
    format->appendOption(kParamFormatSquare256, kParamFormatSquare256Label);
    format->appendOption(kParamFormatSquare512, kParamFormatSquare512Label);
    format->appendOption(kParamFormatSquare1k, kParamFormatSquare1kLabel);
    format->appendOption(kParamFormatSquare2k, kParamFormatSquare2kLabel);
    format->setDefault(eParamFormat2kCinemascope);

    OFX::Double2DParamDescriptor* scale = desc.defineDouble2DParam(kParamScale);
    scale->setLabel("Scale");
    scale->setDefault(1.0, 1.0);
    scale->setRange(0.01, 0.01, std::numeric_limits<double>::max(), std::numeric_limits<double>::max());
    scale->setDisplayRange(0.1, 0.1, 2.5, 2.5);
    scale->setHint("Scale the input image [0, 0, width*scale, height*scale].");

    OFX::BooleanParamDescriptor* keepRatio = desc.defineBooleanParam(kParamSizeKeepRatio);
    keepRatio->setLabel("Keep ratio");
    keepRatio->setDefault(false);
    keepRatio->setHint("Keep 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::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 keep the input image ratio.");

    OFX::IntParamDescriptor* height = desc.defineIntParam(kParamSizeHeight);
    height->setLabel("Height");
    height->setDefault(200);
    height->setRange(1, std::numeric_limits<int>::max());
    height->setDisplayRange(0, 3000);
    height->setHint("Set the height in pixels and keep the input image ratio.");

#if(TUTTLE_EXPERIMENTAL)
    OFX::BooleanParamDescriptor* center = desc.defineBooleanParam(kParamCenter);
    center->setLabel("Center resizing");
    center->setDefault(false);
    center->setHint("Resize around the center point.");

    OFX::Double2DParamDescriptor* centerPoint = desc.defineDouble2DParam(kParamCenterPoint);
    centerPoint->setDefault(100, 100);
    centerPoint->setLabel("Center point at");
    centerPoint->setHint("Position of the center point.");
#endif

    // sampler parameters //
    describeSamplerParamsInContext(desc, context);
}
开发者ID:aoblet,项目名称:TuttleOFX,代码行数:100,代码来源:ResizePluginFactory.cpp

示例6: 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." );

}
开发者ID:morphimac,项目名称:TuttleOFX,代码行数:87,代码来源:TextPluginFactory.cpp

示例7: describeInContext


//.........这里部分代码省略.........
      param->setHint("Is calibrated");
      param->setParent(*groupOutput);
    }
    
    {
      OFX::DoubleParamDescriptor *param = desc.defineDoubleParam(kParamOutputAvgReprojErr);
      param->setLabel("Average Reprojection Error");
      param->setDisplayRange(0, 10);
      param->setEvaluateOnChange(false);
      param->setEnabled(false);
      param->setAnimates(true);
      param->setParent(*groupOutput);
      param->setLayoutHint(OFX::eLayoutHintDivider);
    }
    
    {
      OFX::GroupParamDescriptor *groupCamera = desc.defineGroupParam(kParamOutputCameraGroup);
      groupCamera->setLabel("Intrinsics Camera Parameters");
      groupCamera->setParent(*groupOutput);
      groupCamera->setOpen(true);

      {
        OFX::DoubleParamDescriptor *param = desc.defineDoubleParam(kParamOutputFocalLenght);
        param->setLabel("Focal Length");
        param->setDisplayRange(1, 100);
        param->setAnimates(true);
        param->setEvaluateOnChange(false);
        param->setEnabled(false);
        param->setAnimates(false);
        param->setParent(*groupCamera);
      }

      {
        OFX::Double2DParamDescriptor *param = desc.defineDouble2DParam(kParamOutputPrincipalPointOffset);
        param->setLabel("Principal Point");
        param->setAnimates(true);
        param->setEvaluateOnChange(false);
        param->setEnabled(false);
        param->setAnimates(false);
        param->setParent(*groupCamera);
      }
    }
    
    {    
      OFX::GroupParamDescriptor *groupLensDistortion = desc.defineGroupParam(kParamOutputLensDistortionGroup);
      groupLensDistortion->setLabel("Lens Distortion Coefficients");
      groupLensDistortion->setParent(*groupOutput);
      groupLensDistortion->setOpen(true);
        
      {
        OFX::DoubleParamDescriptor *param = desc.defineDoubleParam(kParamOutputRadialCoef1);
        param->setLabel("Radial Coef1");
        param->setDisplayRange(0, 10);
        param->setAnimates(true);
        param->setEvaluateOnChange(false);
        param->setEnabled(false);
        param->setAnimates(false);
        param->setParent(*groupLensDistortion);
      }

      {
        OFX::DoubleParamDescriptor *param = desc.defineDoubleParam(kParamOutputRadialCoef2);
        param->setLabel("Radial Coef2");
        param->setDisplayRange(0, 10);
        param->setAnimates(true);
        param->setEvaluateOnChange(false);
开发者ID:poparteu,项目名称:ofxMVG,代码行数:67,代码来源:LensCalibrationPluginFactory.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 SobelPluginFactory::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->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
                                      : "---");
//.........这里部分代码省略.........
开发者ID:aoblet,项目名称:TuttleOFX,代码行数:101,代码来源:SobelPluginFactory.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 PinningPluginFactory::describeInContext( OFX::ImageEffectDescriptor& desc,
                                              OFX::EContext context )
{
	OFX::ClipDescriptor* srcClip = desc.defineClip( kOfxImageEffectSimpleSourceClipName );
	srcClip->addSupportedComponent( OFX::ePixelComponentRGBA );
	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::ePixelComponentAlpha );
	dstClip->setSupportsTiles( kSupportTiles );

	//////////////////// Options ////////////////////
	OFX::ChoiceParamDescriptor* method = desc.defineChoiceParam( kParamMethod );
	method->setLabel( "Method" );
	method->appendOption( kParamMethodAffine );
	method->appendOption( kParamMethodPerspective );
	method->appendOption( kParamMethodBilinear );
	method->setDefault( 1 );
	method->setHint( "Interpolation method" );

	OFX::ChoiceParamDescriptor* interpolation = desc.defineChoiceParam( kParamInterpolation );
	interpolation->setLabel( "Interpolation" );
	interpolation->appendOption( kParamInterpolationNearest );
	interpolation->appendOption( kParamInterpolationBilinear );
	interpolation->setDefault( 1 );
	interpolation->setHint( "Interpolation method" );

        OFX::PushButtonParamDescriptor* setToCornersIn = desc.definePushButtonParam( kParamSetToCornersIn);
        setToCornersIn->setLabel( "Set In" );
        setToCornersIn->setHint("Set to corners in points");

        OFX::PushButtonParamDescriptor* setToCornersOut = desc.definePushButtonParam( kParamSetToCornersOut);
        setToCornersOut->setLabel( "Set Out" );
        setToCornersOut->setHint("Set to corners out points");

	OFX::BooleanParamDescriptor* overlay = desc.defineBooleanParam( kParamOverlay );
	overlay->setLabel( "Overlay" );
	overlay->setDefault( true );

        OFX::BooleanParamDescriptor* inverse = desc.defineBooleanParam( kParamInverse );
        inverse->setLabel( "Inverse" );
        inverse->setDefault( false );
/*
        //TODO-vince///////////
        //////////////////// Transform Centre Point ////////////////////
        OFX::GroupParamDescriptor* groupCentre = desc.defineGroupParam( kParamGroupCentre );
        groupCentre->setLabel( "Centre point" );
        groupCentre->setOpen(false);

        OFX::ChoiceParamDescriptor* manipulatorMode = desc.defineChoiceParam( kParamManipulatorMode );
        manipulatorMode->appendOption( kParamManipulatorModeTranslate );
        manipulatorMode->appendOption( kParamManipulatorModeRotate );
        manipulatorMode->appendOption( kParamManipulatorModeScale );

        OFX::Double2DParamDescriptor* pCentre = desc.defineDouble2DParam( kParamPointCentre);
        pCentre->setLabel( "Centre point" );
        pCentre->setHint( "Transform Centre point" );
        pCentre->setDefault( 0.0, 0.0 );
        pCentre->setParent( groupCentre );

        OFX::BooleanParamDescriptor* overlayCentre = desc.defineBooleanParam( kParamOverlayCentre );
        overlayCentre->setLabel( "Overlay" );
        overlayCentre->setDefault( true );
        overlayCentre->setParent( groupCentre );

        OFX::RGBParamDescriptor* ouverlayCentreColor = desc.defineRGBParam( kParamOverlayCentreColor );
        ouverlayCentreColor->setLabel( "Color" );
        ouverlayCentreColor->setHint( "Centre point overlay color" );
        ouverlayCentreColor->setDefault( 0.0, 1.0, 0.0 );
        ouverlayCentreColor->setParent( groupCentre );
*/
	//////////////////// IN Points ////////////////////
	OFX::GroupParamDescriptor* groupIn = desc.defineGroupParam( kParamGroupIn );
	groupIn->setLabel( "Input points" );
        groupIn->setOpen(false);

	OFX::Double2DParamDescriptor* pIn0 = desc.defineDouble2DParam( kParamPointIn + "0" );
	pIn0->setLabel( "In 0" );
	pIn0->setHint( "Input point 0" );
        pIn0->setDefault( -0.5, -0.5 );
        pIn0->setParent( groupIn );

	OFX::Double2DParamDescriptor* pIn1 = desc.defineDouble2DParam( kParamPointIn + "1" );
	pIn1->setLabel( "In 1" );
	pIn1->setHint( "Input point 1" );
	pIn1->setDefault( 0.5, -0.5 );
	pIn1->setParent( groupIn );

	OFX::Double2DParamDescriptor* pIn2 = desc.defineDouble2DParam( kParamPointIn + "2" );
	pIn2->setLabel( "In 2" );
	pIn2->setHint( "Input point 2" );
	pIn2->setDefault( -0.5, 0.5 );
//.........这里部分代码省略.........
开发者ID:morphimac,项目名称:TuttleOFX,代码行数:101,代码来源:PinningPluginFactory.cpp

示例10: describeInContext

void GenericTestExamplePluginFactory::describeInContext(OFX::ImageEffectDescriptor &desc, OFX::ContextEnum /*context*/)
{
  ClipDescriptor *srcClip = desc.defineClip(kOfxImageEffectSimpleSourceClipName);
  srcClip->addSupportedComponent(ePixelComponentRGBA);
  srcClip->addSupportedComponent(ePixelComponentAlpha);
  srcClip->setTemporalClipAccess(false);
  srcClip->setSupportsTiles(true);
  srcClip->setIsMask(false);

  ClipDescriptor *dstClip = desc.defineClip(kOfxImageEffectOutputClipName);
  dstClip->addSupportedComponent(ePixelComponentRGBA);
  dstClip->addSupportedComponent(ePixelComponentAlpha);
  dstClip->setSupportsTiles(true);

  DoubleParamDescriptor *param1 = desc.defineDoubleParam("MinMaxTest");
  param1->setLabels("Min/Max Test", "Min/Max Test", "Min/Max Test");
  param1->setScriptName("minMaxTest");
  param1->setHint("A double parameter to illustrate visual min/max.");
  param1->setDefault(50.0);
  param1->setRange(-1000, 1000);
  param1->setDisplayRange(-1000, 1000);
  param1->setDoubleType(eDoubleTypePlain);

  ChoiceParamDescriptor* param2 = desc.defineChoiceParam("enableTest");
  param2->setLabels("Enabler", "Enabler", "Enabler");
  param2->appendOption("Enable parameter", "Enable parameter");
  param2->appendOption("Disable parameter", "Disable parameter");

  DoubleParamDescriptor *param3 = desc.defineDoubleParam("enableDbl");
  param3->setLabels("Enabled by Enabler", "Enabled by Enabler", "Enabled by Enabler");


  BooleanParamDescriptor* bparam = desc.defineBooleanParam("Insignificant");
  bparam->setLabels("Insignificant", "Insignificant", "Insignificant");
  bparam->setHint("Shouldn't cause a re-render.");
  bparam->setEvaluateOnChange(false);

  BooleanParamDescriptor* bparam2 = desc.defineBooleanParam("secretTest");
  bparam2->setLabels("SECRET!", "SECRET!", "SECRET!");
  bparam2->setIsSecret(true);
  bparam2->setHint("Shouldn't be shown in the user interface.");

  BooleanParamDescriptor* bparam3 = desc.defineBooleanParam("nonPersistent");
  bparam3->setLabels("Non-persistent", "Non-persistent", "Non-persistent");
  bparam3->setHint("Shouldn't be saved in the plugin description.");
  bparam3->setIsPersistent(false);
    
  DoubleParamDescriptor *param5 = desc.defineDoubleParam("animateDbl");
  param5->setLabels("No Animation", "No Animation", "No Animation");
  param5->setAnimates(false);

  DoubleParamDescriptor *param6 = desc.defineDoubleParam("angleTest");
  param6->setLabels("Angle?", "Angle?", "Angle?");
  param6->setRange(-180.0, 180.0);
  param6->setHint("An angle parameter.");
  param6->setDoubleType(eDoubleTypeAngle);

  PushButtonParamDescriptor* pb = desc.definePushButtonParam("pbButton");
  pb->setLabels("Push Me", "Push Me", "Push Me");

  PushButtonParamDescriptor* pb2 = desc.definePushButtonParam("analyseButton");
  pb2->setLabels("Analyse", "Analyse", "Analyse");

  DoubleParamDescriptor *param7 = desc.defineDoubleParam("analysisParam");
  param7->setLabels("Analysis Slave", "Analysis Slave", "Analysis Slave");

  Double2DParamDescriptor* widgetPos = desc.defineDouble2DParam("widgetPos");
  widgetPos->setLabels("Widget Position", "Widget Position", "Widget Position");
  widgetPos->setDoubleType(OFX::eDoubleTypeXYAbsolute);
  widgetPos->setDefaultCoordinateSystem(eCoordinatesNormalised);
  widgetPos->setDimensionLabels("X Position", "Y Position");
  widgetPos->setDefault(0.5, 0.5);
}
开发者ID:olear,项目名称:openfx,代码行数:73,代码来源:Tester.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 ImageStatisticsPluginFactory::describeInContext( OFX::ImageEffectDescriptor& desc,
                                                      OFX::EContext               context )
{
	OFX::ClipDescriptor* srcClip = desc.defineClip( kOfxImageEffectSimpleSourceClipName );

	srcClip->addSupportedComponent( OFX::ePixelComponentRGBA );
	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::ePixelComponentAlpha );
	dstClip->setSupportsTiles( kSupportTiles );

	OFX::ChoiceParamDescriptor* coordSystem = desc.defineChoiceParam( kParamCoordinateSystem );
	coordSystem->setLabel( "Coordinate system" );
	coordSystem->appendOption( kParamCoordinateSystemNormalized );
	coordSystem->appendOption( kParamCoordinateSystemCanonical );
	coordSystem->setDefault( 0 );

	OFX::Double2DParamDescriptor* rectCenter = desc.defineDouble2DParam( kParamRectCenter );
	rectCenter->setLabel( "Center" );
	rectCenter->setDoubleType( OFX::eDoubleTypePlain );
	//	rectCenter->setDoubleType( OFX::eDoubleTypeNormalisedXYAbsolute );
	rectCenter->setDefault( 0.5, 0.5 );

	OFX::Double2DParamDescriptor* rectSize = desc.defineDouble2DParam( kParamRectSize );
	rectSize->setLabel( "Size" );
	rectSize->setDoubleType( OFX::eDoubleTypePlain );
	//	rectSize->setDoubleType( OFX::eDoubleTypeNormalisedXYAbsolute );
	rectSize->setDefault( 0.5, 0.5 );

	OFX::ChoiceParamDescriptor* chooseOutput = desc.defineChoiceParam( kParamChooseOutput );
	chooseOutput->setLabel( "Choose output" );
	chooseOutput->appendOption( kParamChooseOutputSource );
	chooseOutput->appendOption( kParamChooseOutputAverage );
	chooseOutput->appendOption( kParamChooseOutputChannelMin );
	chooseOutput->appendOption( kParamChooseOutputChannelMax );
	chooseOutput->appendOption( kParamChooseOutputLuminosityMin );
	chooseOutput->appendOption( kParamChooseOutputLuminosityMax );
	chooseOutput->setDefault( 0 );

	OFX::GroupParamDescriptor* outputGroup = desc.defineGroupParam( kParamOutputGroup );
	outputGroup->setLabel( "Output" );

	// -----------------------------------------------------------------------------

	OFX::GroupParamDescriptor* rgbaGroup = desc.defineGroupParam( kParamOutputGroupRGBA );
	rgbaGroup->setLabel( "RGBA" );
	rgbaGroup->setParent( outputGroup );

	OFX::RGBAParamDescriptor* outputAverage = desc.defineRGBAParam( kParamOutputAverage );
	outputAverage->setLabel( "Average" );
	outputAverage->setParent( rgbaGroup );
	outputAverage->setEvaluateOnChange( false );

	OFX::RGBAParamDescriptor* outputChannelMin = desc.defineRGBAParam( kParamOutputChannelMin );
	outputChannelMin->setLabel( "Channels' min" );
	outputChannelMin->setHint( "Minimum value per channel" );
	outputChannelMin->setParent( rgbaGroup );
	outputChannelMin->setEvaluateOnChange( false );

	OFX::RGBAParamDescriptor* outputChannelMax = desc.defineRGBAParam( kParamOutputChannelMax );
	outputChannelMax->setLabel( "Channels' max" );
	outputChannelMax->setParent( rgbaGroup );
	outputChannelMax->setEvaluateOnChange( false );

	OFX::RGBAParamDescriptor* outputLuminosityMin = desc.defineRGBAParam( kParamOutputLuminosityMin );
	outputLuminosityMin->setLabel( "Luminosity min" );
	outputLuminosityMin->setParent( rgbaGroup );
	outputLuminosityMin->setEvaluateOnChange( false );

	OFX::RGBAParamDescriptor* outputLuminosityMax = desc.defineRGBAParam( kParamOutputLuminosityMax );
	outputLuminosityMax->setLabel( "Luminosity max" );
	outputLuminosityMax->setParent( rgbaGroup );
	outputLuminosityMax->setEvaluateOnChange( false );

	OFX::RGBAParamDescriptor* outputKurtosis = desc.defineRGBAParam( kParamOutputKurtosis );
	outputKurtosis->setLabel( "Kurtosis" );
	outputKurtosis->setParent( rgbaGroup );
	outputKurtosis->setEvaluateOnChange( false );

	OFX::RGBAParamDescriptor* outputSkewness = desc.defineRGBAParam( kParamOutputSkewness );
	outputSkewness->setLabel( "Skewness" );
	outputSkewness->setParent( rgbaGroup );
	outputSkewness->setEvaluateOnChange( false );

	// -----------------------------------------------------------------------------

	OFX::GroupParamDescriptor* hslGroup = desc.defineGroupParam( kParamOutputGroupHSL );
	hslGroup->setLabel( "HSL" );
	hslGroup->setParent( outputGroup );

	OFX::Double3DParamDescriptor* outputAverageHSL = desc.defineDouble3DParam( kParamOutputAverageHSL );
//.........这里部分代码省略.........
开发者ID:Finaler,项目名称:TuttleOFX,代码行数:101,代码来源:ImageStatisticsPluginFactory.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 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." );

//.........这里部分代码省略.........
开发者ID:tuttleSandbox,项目名称:TuttleOFX,代码行数:101,代码来源:LensDistortPluginFactory.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 PinningPluginFactory::describeInContext( OFX::ImageEffectDescriptor& desc,
                                                  OFX::EContext context )
{

	OFX::ClipDescriptor* srcClip = desc.defineClip( kOfxImageEffectSimpleSourceClipName ); // clip de source nomme source
	//OFX::ClipDescriptor* toto = desc.defineClip( "toto" );
	srcClip->addSupportedComponent( OFX::ePixelComponentRGBA );	//proprietes de la source
	srcClip->addSupportedComponent( OFX::ePixelComponentAlpha );
	srcClip->setSupportsTiles( kSupportTiles );

	// Create the mandated output clip
	OFX::ClipDescriptor* dstClip = desc.defineClip( kOfxImageEffectOutputClipName ); 	//sortie, laisser comme ca et pi c'est tout
	dstClip->addSupportedComponent( OFX::ePixelComponentRGBA );
	dstClip->addSupportedComponent( OFX::ePixelComponentAlpha );
	dstClip->setSupportsTiles( kSupportTiles );

	OFX::GroupParamDescriptor* grpSrc = desc.defineGroupParam( kParamGroupSource );	//groupe source
	grpSrc->setLabel( "Points de départ" );
	grpSrc->setHint( "Selectionnez 4 points de départ" );

	OFX::Double2DParamDescriptor* src0 = desc.defineDouble2DParam( kParamPointSource + "0" );	//kpa... nom utilisé par le plug
	src0->setLabel( "src0" );	//nom que voit l'utilisateur	
	src0->setDefault( 0, 0 );
	src0->setParent(grpSrc);
	OFX::Double2DParamDescriptor* src1 = desc.defineDouble2DParam( kParamPointSource + "1" );
	src1->setLabel( "src1" );
	src1->setDefault( 0, 1 );
	src1->setParent(grpSrc);
	OFX::Double2DParamDescriptor* src2 = desc.defineDouble2DParam( kParamPointSource + "2" );
	src2->setLabel( "src2" );
	src2->setDefault( 1, 1 );
	src2->setParent(grpSrc);
	OFX::Double2DParamDescriptor* src3 = desc.defineDouble2DParam( kParamPointSource + "3" );
	src3->setLabel( "src3" );
	src3->setDefault( 1, 0 );
	src3->setParent(grpSrc);
	
	OFX::GroupParamDescriptor* grpDst = desc.defineGroupParam( kParamGroupDestination );	//groupe destination
	grpDst->setLabel( "Points d'arrivée" );
	grpDst->setHint( "Selectionnez 4 points d'arrivée" );

	OFX::Double2DParamDescriptor* dest0 = desc.defineDouble2DParam( kParamPointDestination + "0" );	//kpa... nom utilisé par le plug
	dest0->setLabel( "dst0" );	//nom que voit l'utilisateur	
	dest0->setDefault( 0, 0 );
	dest0->setParent(grpDst);
	OFX::Double2DParamDescriptor* dest1 = desc.defineDouble2DParam( kParamPointDestination + "1" );
	dest1->setLabel( "dst1" );
	dest1->setDefault( 0, 1 );
	dest1->setParent(grpDst);
	OFX::Double2DParamDescriptor* dest2 = desc.defineDouble2DParam( kParamPointDestination + "2" );
	dest2->setLabel( "dst2" );
	dest2->setDefault( 1, 1 );
	dest2->setParent(grpDst);
	OFX::Double2DParamDescriptor* dest3 = desc.defineDouble2DParam( kParamPointDestination + "3" );
	dest3->setLabel( "dst3" );
	dest3->setDefault( 1, 0 );
	dest3->setParent(grpDst);
	
	OFX::PushButtonParamDescriptor* helpButton = desc.definePushButtonParam( kParamHelpButton );	//cree un bouton help
	//helpButton->setHint( "bla bla" );
	helpButton->setLabel( "Help" );

	OFX::GroupParamDescriptor* displayOptions = desc.defineGroupParam( kParamDisplayOptions );
	displayOptions->setLabel( "Options d'affichage" );
	displayOptions->setHint( "Options d'affichage (Ne change rien sur l'image)" );

	OFX::BooleanParamDescriptor* displayGrid = desc.defineBooleanParam( kParamGridOverlay );
	displayGrid->setLabel( "Afficher la grille" );
	displayGrid->setParent( *displayOptions );
	displayGrid->setDefault( false );
	displayGrid->setEvaluateOnChange( false );
	displayGrid->setHint( "Afficher la grille" );

	OFX::Double2DParamDescriptor* gridCenter = desc.defineDouble2DParam( kParamGridCenter );
	gridCenter->setLabel( "Centre de la grille" );
	gridCenter->setDoubleType( OFX::eDoubleTypePlain );
	gridCenter->setParent( *displayOptions );
	gridCenter->setDefault( 0.0, 0.0 );
	gridCenter->setDisplayRange( -1.0, -1.0, 1.0, 1.0 );
	gridCenter->setEvaluateOnChange( false );
	gridCenter->setHint( "Allows you to shift the center of the  display grid." );

	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." );


	OFX::Double2DParamDescriptor* gridScale = desc.defineDouble2DParam( kParamGridScale );
	gridScale->setLabel( "Echelle de la grille" );
	gridScale->setDoubleType( OFX::eDoubleTypePlain );
	gridScale->setParent( *displayOptions );
	gridScale->setDefault( 1.0, 1.0 );
//.........这里部分代码省略.........
开发者ID:morphimac,项目名称:TuttleOFX,代码行数:101,代码来源:PinningPluginFactory.cpp


注:本文中的ofx::ImageEffectDescriptor::defineDouble2DParam方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。