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

Method describeInContext

PLogLin/PLogLin.cpp:825–962  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

823}
824
825void
826PLogLinPluginFactory::describeInContext(ImageEffectDescriptor &desc,
827 ContextEnum context)
828{
829 //std::cout << "describeInContext!\n";
830 // Source clip only in the filter context
831 // create the mandated source clip
832 ClipDescriptor *srcClip = desc.defineClip(kOfxImageEffectSimpleSourceClipName);
833
834 srcClip->addSupportedComponent(ePixelComponentRGBA);
835 srcClip->addSupportedComponent(ePixelComponentRGB);
836#ifdef OFX_EXTENSIONS_NATRON
837 //srcClip->addSupportedComponent(ePixelComponentXY);
838#endif
839 //srcClip->addSupportedComponent(ePixelComponentAlpha);
840 srcClip->setTemporalClipAccess(false);
841 srcClip->setSupportsTiles(kSupportsTiles);
842 srcClip->setIsMask(false);
843
844 // create the mandated output clip
845 ClipDescriptor *dstClip = desc.defineClip(kOfxImageEffectOutputClipName);
846 dstClip->addSupportedComponent(ePixelComponentRGBA);
847 dstClip->addSupportedComponent(ePixelComponentRGB);
848#ifdef OFX_EXTENSIONS_NATRON
849 //dstClip->addSupportedComponent(ePixelComponentXY);
850#endif
851 //dstClip->addSupportedComponent(ePixelComponentAlpha);
852 dstClip->setSupportsTiles(kSupportsTiles);
853
854 ClipDescriptor *maskClip = (context == eContextPaint) ? desc.defineClip("Brush") : desc.defineClip("Mask");
855 maskClip->addSupportedComponent(ePixelComponentAlpha);
856 maskClip->setTemporalClipAccess(false);
857 if (context != eContextPaint) {
858 maskClip->setOptional(true);
859 }
860 maskClip->setSupportsTiles(kSupportsTiles);
861 maskClip->setIsMask(true);
862
863 // make some pages and to things in
864 PageParamDescriptor *page = desc.definePageParam("Controls");
865
866 {
867 BooleanParamDescriptor* param = desc.defineBooleanParam(kParamProcessR);
868 param->setLabel(kParamProcessRLabel);
869 param->setHint(kParamProcessRHint);
870 param->setDefault(true);
871 param->setLayoutHint(eLayoutHintNoNewLine, 1);
872 if (page) {
873 page->addChild(*param);
874 }
875 }
876 {
877 BooleanParamDescriptor* param = desc.defineBooleanParam(kParamProcessG);
878 param->setLabel(kParamProcessGLabel);
879 param->setHint(kParamProcessGHint);
880 param->setDefault(true);
881 param->setLayoutHint(eLayoutHintNoNewLine, 1);
882 if (page) {

Callers

nothing calls this directly

Calls 2

setLabelMethod · 0.80
setHintMethod · 0.80

Tested by

no test coverage detected