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


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

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


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

示例1: describeInContext

/** @brief The describe in context function, passed a plugin descriptor and a context */
void PropTesterPluginFactory::describeInContext(OFX::ImageEffectDescriptor &desc, ContextEnum context) 
{
  // Source clip only in the filter context
  if(context == eContextGeneral) {
    // create the mandated source clip
    ClipDescriptor *srcClip = desc.defineClip("Extra");
    srcClip->addSupportedComponent(ePixelComponentRGBA);
    srcClip->setTemporalClipAccess(false);
    srcClip->setOptional(false);
    srcClip->setSupportsTiles(true);
    srcClip->setIsMask(false);
  }

  // Source clip only in the filter context
  if(context == eContextFilter || context == eContextGeneral) {
    // create the mandated source clip
    ClipDescriptor *srcClip = desc.defineClip(kOfxImageEffectSimpleSourceClipName);
    srcClip->addSupportedComponent(ePixelComponentRGBA);
    srcClip->setTemporalClipAccess(false);
    //srcClip->setOptional(false);
    srcClip->setSupportsTiles(true);
    srcClip->setIsMask(false);
  }

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


  // make some pages and to things in 
  PageParamDescriptor *page1 = desc.definePageParam("page1");
  PageParamDescriptor *page2 = desc.definePageParam("page2");
  PageParamDescriptor *page3 = desc.definePageParam("page3");

  // make an int param
  IntParamDescriptor *iParam = desc.defineIntParam("Int");
  iParam->setLabels("Int", "Int", "Int");
  iParam->setScriptName("int");
  iParam->setHint("An integer parameter");
  iParam->setDefault(0);
  iParam->setRange(-100, 100);
  iParam->setDisplayRange(-100, 100);

  page1->addChild(*iParam);

  // make a 2D int param
  Int2DParamDescriptor *i2DParam = desc.defineInt2DParam("Int2D");
  i2DParam->setLabels("Int2D", "Int2D", "Int2D");
  i2DParam->setScriptName("int2D");
  i2DParam->setHint("A 2D integer parameter");
  i2DParam->setDefault(0, 0);
  i2DParam->setRange(-100, -100, 100, 100);
  i2DParam->setDisplayRange(-100, -100, 100, 100);

  page1->addChild(*i2DParam);

  // make a 3D int param
  Int3DParamDescriptor *i3DParam = desc.defineInt3DParam("Int3D");
  i3DParam->setLabels("Int3D", "Int3D", "Int2D");
  i3DParam->setScriptName("int3D");
  i3DParam->setHint("A 3D integer parameter");
  i3DParam->setDefault(0, 0, 0);
  i3DParam->setRange(-100, -100, -100, 100, 100, 100);
  i3DParam->setDisplayRange(-100, -100, -100, 100, 100, 100);

  page1->addChild(*i3DParam);

  page1->addChild(PageParamDescriptor::gSkipColumn);

  // boolean
  BooleanParamDescriptor *boolean = desc.defineBooleanParam("bool");
  boolean->setLabels("bool", "bool", "bool");
  boolean->setDefault(false);

  page1->addChild(*boolean);

  // choice 
  ChoiceParamDescriptor *choice = desc.defineChoiceParam("choice");
  choice->setLabels("choice", "choice", "choice");
  choice->appendOption("This", "This");
  choice->appendOption("That", "That");
  choice->appendOption("The Other", "The Other");
  choice->resetOptions();
  choice->appendOption("Tom", "Tom");
  choice->appendOption("Dick", "Dick");
  choice->appendOption("Harry", "Harry");
  choice->setDefault(0);

  page1->addChild(*choice);

  page1->addChild(PageParamDescriptor::gSkipColumn);

  // push button
  PushButtonParamDescriptor *push = desc.definePushButtonParam("push");
  push->setLabels("push me", "push me", "push me Big Nose");
//.........这里部分代码省略.........
开发者ID:chajaeik,项目名称:openfx,代码行数:101,代码来源:propTester.cpp


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