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


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

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


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

示例1: describeInContext

void CrossFadeExamplePluginFactory::describeInContext(OFX::ImageEffectDescriptor &desc, ContextEnum /*context*/)
{
  // we are a transition, so define the sourceFrom input clip
  ClipDescriptor *fromClip = desc.defineClip(kOfxImageEffectTransitionSourceFromClipName);
  fromClip->addSupportedComponent(ePixelComponentRGBA);
  fromClip->addSupportedComponent(ePixelComponentAlpha);
  fromClip->setTemporalClipAccess(false);
  fromClip->setSupportsTiles(true);

  // we are a transition, so define the sourceTo input clip
  ClipDescriptor *toClip = desc.defineClip(kOfxImageEffectTransitionSourceToClipName);
  toClip->addSupportedComponent(ePixelComponentRGBA);
  toClip->addSupportedComponent(ePixelComponentAlpha);
  toClip->setTemporalClipAccess(false);
  toClip->setSupportsTiles(true);

  // create the mandated output clip
  ClipDescriptor *dstClip = desc.defineClip(kOfxImageEffectOutputClipName);
  dstClip->addSupportedComponent(ePixelComponentRGBA);
  dstClip->addSupportedComponent(ePixelComponentAlpha);
  dstClip->setSupportsTiles(true);

  // Define the mandated "Transition" param, note that we don't do anything with this other than.
  // describe it. It is not a true param but how the host indicates to the plug-in how far through
  // the transition it is. It appears on no plug-in side UI, it is purely the hosts to manage.
  DoubleParamDescriptor *param = desc.defineDoubleParam("Transition");
  (void)param;
}
开发者ID:chajaeik,项目名称:openfx,代码行数:28,代码来源:crossFade.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 TimeShiftPluginFactory::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 );

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

	switch( context )
	{
		case OFX::eContextRetimer:
		{
			OFX::DoubleParamDescriptor* retimerParam = desc.defineDoubleParam( kOfxImageEffectRetimerParamName );
			retimerParam->setLabel( "Source Time" );
			retimerParam->setDefault( 0.0 );
			break;
		}
		default:
		{
			OFX::DoubleParamDescriptor* offset = desc.defineDoubleParam( kParamOffset );
			offset->setLabel( "Offset" );
			offset->setDefault( 0.0 );
			offset->setDisplayRange( -10, 10 );
			break;
		}
	}
}
开发者ID:Finaler,项目名称:TuttleOFX,代码行数:38,代码来源:TimeShiftPluginFactory.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 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

示例4: describeInContext

/**
 * @brief Function called to describe the plugin controls and features.
 * @param[in, out]   desc       Effect descriptor
 * @param[in]        context    Application context
 */
void CheckerboardPluginFactory::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* boxes = desc.defineInt2DParam( kCheckerboardBoxes );
	boxes->setDefault( 10, 10 );
	boxes->setLabel( "boxes number" );
	boxes->setHint( "Number of boxes of the checkerboard." );

	OFX::RGBAParamDescriptor* color1 = desc.defineRGBAParam( kCheckerboardColor1 );
	color1->setDefault( 0, 0, 0, 1 );
	color1->setLabel( "color1" );

	OFX::RGBAParamDescriptor* color2 = desc.defineRGBAParam( kCheckerboardColor2 );
	color2->setDefault( 1, 1, 1, 1 );
	color2->setLabel( "color2" );
}
开发者ID:morphimac,项目名称:TuttleOFX,代码行数:35,代码来源:CheckerboardPluginFactory.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 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

示例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 );

	// 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

示例7: describeInContext

/**
 * @brief Function called to describe the plugin controls and features.
 * @param[in, out]   desc       Effect descriptor
 * @param[in]        context    Application context
 */
void OpenImageIOWriterPluginFactory::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* components = desc.defineChoiceParam( kParamOutputComponents );
	components->setLabel( "Components" );
	components->appendOption( kParamOutputComponentsRGBA );
	components->appendOption( kParamOutputComponentsRGB );
	components->setCacheInvalidation( OFX::eCacheInvalidateValueAll );
	components->setDefault( 0 );

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

	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->setCacheInvalidation( OFX::eCacheInvalidateValueAll );
	renderAlways->setDefault( false );

	OFX::IntParamDescriptor* forceNewRender = desc.defineIntParam( kParamWriterForceNewRender );
	forceNewRender->setLabel( "Force new render" );
	forceNewRender->setIsSecret( true );
	forceNewRender->setIsPersistant( false );
	forceNewRender->setAnimates( false );
	forceNewRender->setCacheInvalidation( OFX::eCacheInvalidateValueAll );
	forceNewRender->setEvaluateOnChange( true );
	forceNewRender->setDefault( 0 );
}
开发者ID:morphimac,项目名称:TuttleOFX,代码行数:61,代码来源:OpenImageIOWriterPluginFactory.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 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

示例9: describeInContext

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

}
开发者ID:Finaler,项目名称:TuttleOFX,代码行数:22,代码来源:ViewerPluginFactory.cpp

示例10: 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

示例11: describeInContext

void SwitchPluginFactory::describeInContext(OFX::ImageEffectDescriptor &desc, OFX::ContextEnum context)
{
    // Source clip only in the filter context
    // create the mandated source clip
    for (int i = 0; i < kSwitchPluginSourceClipCount; ++i) {
        std::stringstream s;
        s << i;
        ClipDescriptor *srcClip = desc.defineClip(s.str());
        srcClip->addSupportedComponent(ePixelComponentRGB);
        srcClip->addSupportedComponent(ePixelComponentRGBA);
        srcClip->addSupportedComponent(ePixelComponentAlpha);
        srcClip->setTemporalClipAccess(false);
        srcClip->setSupportsTiles(true);
        srcClip->setIsMask(false);
        if (i >= 2) {
            srcClip->setOptional(true);
        }
    }

    // create the mandated output clip
    ClipDescriptor *dstClip = desc.defineClip(kOfxImageEffectOutputClipName);
    dstClip->addSupportedComponent(ePixelComponentRGB);
    dstClip->addSupportedComponent(ePixelComponentRGBA);
    dstClip->addSupportedComponent(ePixelComponentAlpha);
    dstClip->setSupportsTiles(true);

    // make some pages and to things in
    PageParamDescriptor *page = desc.definePageParam("Controls");

    IntParamDescriptor *which = desc.defineIntParam(kSwitchPluginParamWhich);
    which->setLabels(kSwitchPluginParamWhichLabel, kSwitchPluginParamWhichLabel, kSwitchPluginParamWhichLabel);
    which->setHint(kSwitchPluginParamWhichHint);
    which->setDefault(0);
    which->setRange(0, kSwitchPluginSourceClipCount);
    which->setDisplayRange(0, 1);
    which->setAnimates(true);
    
    page->addChild(*which);

#ifdef OFX_EXTENSIONS_NUKE
    // Enable transform by the host.
    // It is only possible for transforms which can be represented as a 3x3 matrix.
    desc.setCanTransform(true);
#endif
}
开发者ID:sumitneup,项目名称:openfx-misc,代码行数:45,代码来源:Switch.cpp

示例12: describeInContext

void InvertExamplePluginFactory::describeInContext(OFX::ImageEffectDescriptor &desc, OFX::ContextEnum /*context*/)
{
  // Source clip only in the filter context
  // create the mandated source clip
  ClipDescriptor *srcClip = desc.defineClip(kOfxImageEffectSimpleSourceClipName);
  srcClip->addSupportedComponent(ePixelComponentRGBA);
  srcClip->addSupportedComponent(ePixelComponentAlpha);
  srcClip->setTemporalClipAccess(false);
  srcClip->setSupportsTiles(true);
  srcClip->setIsMask(false);

  // create the mandated output clip
  ClipDescriptor *dstClip = desc.defineClip(kOfxImageEffectOutputClipName);
  dstClip->addSupportedComponent(ePixelComponentRGBA);
  dstClip->addSupportedComponent(ePixelComponentAlpha);
  dstClip->setSupportsTiles(true);

}
开发者ID:CharlieShi,项目名称:openfx,代码行数:18,代码来源:invert.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 OpenImageIOReaderPluginFactory::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);
}
开发者ID:aoblet,项目名称:TuttleOFX,代码行数:15,代码来源:OpenImageIOReaderPluginFactory.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 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

示例15: describeInContext

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

	if( OFX::getImageEffectHostDescription()->supportsParametricParameter )
	{
//		TUTTLE_COUT_INFOS;
		OFX::ParametricParamDescriptor* curves = desc.defineParametricParam( kParamColorSelection );
//		TUTTLE_COUT_VAR( curves );
//		TUTTLE_COUT_INFOS;
		curves->setRange( 0.0, 1.0 );
		curves->setDimension( nbCurves );
		curves->setIdentity();
		curves->setDimensionLabel( kParamColorSelectionRed, 0 );
		curves->setDimensionLabel( kParamColorSelectionGreen, 1 );
		curves->setDimensionLabel( kParamColorSelectionBlue, 2 );
		curves->setDimensionLabel( kParamColorSelectionHue, 3 );
		curves->setDimensionLabel( kParamColorSelectionSaturation, 4 );
		curves->setDimensionLabel( kParamColorSelectionLightness, 5 );
		curves->setHint( "Color selection" );
		curves->setUIColour( 0, {1,0,0} );
		curves->setUIColour( 1, {0,1,0} );
		curves->setUIColour( 2, {0,0,1} );
		curves->setUIColour( 3, {1,1,1} );
		curves->setUIColour( 4, {1,1,1} );
		curves->setUIColour( 5, {1,1,1} );
		curves->setInteractDescriptor( new OFX::DefaultParamInteractWrap<HistogramKeyerParamOverlayDescriptor>() );
	}

//	TUTTLE_COUT_INFOS;
}
开发者ID:morphimac,项目名称:TuttleOFX,代码行数:47,代码来源:HistogramKeyerPluginFactory.cpp


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