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


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

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


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

示例1: describe

void SwitchPluginFactory::describe(OFX::ImageEffectDescriptor &desc)
{
    // basic labels
    desc.setLabels(kPluginName, kPluginName, kPluginName);
    desc.setPluginGrouping(kPluginGrouping);
    desc.setPluginDescription(kPluginDescription);

    // add the supported contexts
    desc.addSupportedContext(eContextGeneral);
    desc.addSupportedContext(eContextFilter);

    // add supported pixel depths
    desc.addSupportedBitDepth(eBitDepthUByte);
    desc.addSupportedBitDepth(eBitDepthUShort);
    desc.addSupportedBitDepth(eBitDepthFloat);

    // set a few flags
    desc.setSingleInstance(false);
    desc.setHostFrameThreading(false);
    desc.setSupportsMultiResolution(true);
    desc.setSupportsTiles(true);
    desc.setTemporalClipAccess(false);
    desc.setRenderTwiceAlways(false);
    desc.setSupportsMultipleClipPARs(false);
#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,代码行数:30,代码来源:Switch.cpp

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


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