MCPcopy Create free account
hub / github.com/NatronGitHub/openfx-misc / describeInContext

Method describeInContext

Templates/SimpleFilter.cpp:595–672  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

593}
594
595void
596SimpleFilterPluginFactory::describeInContext(ImageEffectDescriptor &desc,
597 ContextEnum context)
598{
599 //std::cout << "describeInContext!\n";
600 // Source clip only in the filter context
601 // create the mandated source clip
602 ClipDescriptor *srcClip = desc.defineClip(kOfxImageEffectSimpleSourceClipName);
603
604 srcClip->addSupportedComponent(ePixelComponentRGBA);
605 srcClip->addSupportedComponent(ePixelComponentRGB);
606#ifdef OFX_EXTENSIONS_NATRON
607 srcClip->addSupportedComponent(ePixelComponentXY);
608#endif
609 srcClip->addSupportedComponent(ePixelComponentAlpha);
610 srcClip->setTemporalClipAccess(false);
611 srcClip->setSupportsTiles(kSupportsTiles);
612 srcClip->setIsMask(false);
613
614 // create the mandated output clip
615 ClipDescriptor *dstClip = desc.defineClip(kOfxImageEffectOutputClipName);
616 dstClip->addSupportedComponent(ePixelComponentRGBA);
617 dstClip->addSupportedComponent(ePixelComponentRGB);
618#ifdef OFX_EXTENSIONS_NATRON
619 dstClip->addSupportedComponent(ePixelComponentXY);
620#endif
621 dstClip->addSupportedComponent(ePixelComponentAlpha);
622 dstClip->setSupportsTiles(kSupportsTiles);
623
624 // make some pages and to things in
625 PageParamDescriptor *page = desc.definePageParam("Controls");
626
627 {
628 BooleanParamDescriptor* param = desc.defineBooleanParam(kParamProcessR);
629 param->setLabel(kParamProcessRLabel);
630 param->setHint(kParamProcessRHint);
631 param->setDefault(true);
632 param->setLayoutHint(eLayoutHintNoNewLine, 1);
633 if (page) {
634 page->addChild(*param);
635 }
636 }
637 {
638 BooleanParamDescriptor* param = desc.defineBooleanParam(kParamProcessG);
639 param->setLabel(kParamProcessGLabel);
640 param->setHint(kParamProcessGHint);
641 param->setDefault(true);
642 param->setLayoutHint(eLayoutHintNoNewLine, 1);
643 if (page) {
644 page->addChild(*param);
645 }
646 }
647 {
648 BooleanParamDescriptor* param = desc.defineBooleanParam(kParamProcessB);
649 param->setLabel(kParamProcessBLabel);
650 param->setHint(kParamProcessBHint);
651 param->setDefault(true);
652 param->setLayoutHint(eLayoutHintNoNewLine, 1);

Callers

nothing calls this directly

Calls 2

setLabelMethod · 0.80
setHintMethod · 0.80

Tested by

no test coverage detected