/** * @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." ); }
/** * @brief Function called to describe the plugin controls and features. * @param[in, out] desc Effect descriptor * @param[in] context Application context */ void AVReaderPluginFactory::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); // Groups OFX::GroupParamDescriptor* formatGroup = desc.defineGroupParam(kParamFormatGroup); OFX::GroupParamDescriptor* videoGroup = desc.defineGroupParam(kParamVideoGroup); OFX::GroupParamDescriptor* metaGroup = desc.defineGroupParam(kParamMetaGroup); formatGroup->setLabel("Format"); videoGroup->setLabel("Video"); metaGroup->setLabel("Metadata"); formatGroup->setAsTab(); videoGroup->setAsTab(); metaGroup->setAsTab(); /// FORMAT PARAMETERS avtranscoder::FormatContext formatContext(AV_OPT_FLAG_DECODING_PARAM); avtranscoder::OptionArray formatOptions = formatContext.getOptions(); common::addOptionsToGroup(desc, formatGroup, formatOptions, common::kPrefixFormat); OFX::GroupParamDescriptor* formatDetailedGroup = desc.defineGroupParam(kParamFormatDetailedGroup); formatDetailedGroup->setLabel("Detailed"); formatDetailedGroup->setAsTab(); formatDetailedGroup->setParent(formatGroup); avtranscoder::OptionArrayMap formatDetailedGroupOptions = avtranscoder::getAvailableOptionsPerOutputFormat(); common::addOptionsToGroup(desc, formatDetailedGroup, formatDetailedGroupOptions, common::kPrefixFormat); /// VIDEO PARAMETERS AVCodecContext* videoContext = avcodec_alloc_context3(NULL); avtranscoder::OptionArray videoOptions; avtranscoder::loadOptions(videoOptions, videoContext, AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM); common::addOptionsToGroup(desc, videoGroup, videoOptions, common::kPrefixVideo); av_free(videoContext); OFX::BooleanParamDescriptor* useCustomSAR = desc.defineBooleanParam(kParamUseCustomSAR); useCustomSAR->setLabel("Override SAR"); useCustomSAR->setDefault(false); useCustomSAR->setHint("Override the file SAR (Storage Aspect Ratio) with a custom SAR value."); useCustomSAR->setParent(videoGroup); OFX::DoubleParamDescriptor* customSAR = desc.defineDoubleParam(kParamCustomSAR); customSAR->setLabel("Custom SAR"); customSAR->setDefault(1.0); customSAR->setDisplayRange(0., 3.); customSAR->setRange(0., 10.); customSAR->setHint("Choose a custom value to override the file SAR (Storage Aspect Ratio). Maximum value: 10."); customSAR->setParent(videoGroup); OFX::IntParamDescriptor* streamIndex = desc.defineIntParam(kParamVideoStreamIndex); streamIndex->setLabel(kParamVideoStreamIndexLabel); streamIndex->setDefault(0); streamIndex->setDisplayRange(0., 16.); streamIndex->setRange(0., 100.); streamIndex->setHint("Choose a custom value to decode the video stream you want. Maximum value: 100."); streamIndex->setParent(videoGroup); OFX::GroupParamDescriptor* videoDetailedGroup = desc.defineGroupParam(kParamVideoDetailedGroup); videoDetailedGroup->setLabel("Detailed"); videoDetailedGroup->setAsTab(); videoDetailedGroup->setParent(videoGroup); avtranscoder::OptionArrayMap videoDetailedGroupOptions = avtranscoder::getAvailableOptionsPerVideoCodec(); common::addOptionsToGroup(desc, videoDetailedGroup, videoDetailedGroupOptions, common::kPrefixVideo); /// METADATA PARAMETERS AVCodecContext* metaDataContext = avcodec_alloc_context3(NULL); avtranscoder::OptionArray metaDataOptions; avtranscoder::loadOptions(metaDataOptions, metaDataContext, AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_METADATA); common::addOptionsToGroup(desc, metaGroup, metaDataOptions, common::kPrefixMetaData); av_free(metaDataContext); OFX::StringParamDescriptor* metaDataWrapper = desc.defineStringParam(kParamMetaDataWrapper); metaDataWrapper->setLabel(kParamMetaDataWrapperLabel); metaDataWrapper->setEnabled(false); metaDataWrapper->setStringType(OFX::eStringTypeMultiLine); metaDataWrapper->setParent(metaGroup); OFX::StringParamDescriptor* metaDataVideo = desc.defineStringParam(kParamMetaDataVideo); metaDataVideo->setLabel(kParamMetaDataVideoLabel); metaDataVideo->setEnabled(false); metaDataVideo->setStringType(OFX::eStringTypeMultiLine); metaDataVideo->setParent(metaGroup); OFX::StringParamDescriptor* metaDataAudio = desc.defineStringParam(kParamMetaDataAudio); metaDataAudio->setLabel(kParamMetaDataAudioLabel); metaDataAudio->setEnabled(false); metaDataAudio->setStringType(OFX::eStringTypeMultiLine); metaDataAudio->setParent(metaGroup); OFX::StringParamDescriptor* metaDataData = desc.defineStringParam(kParamMetaDataData); metaDataData->setLabel(kParamMetaDataDataLabel); metaDataData->setEnabled(false); metaDataData->setStringType(OFX::eStringTypeMultiLine); metaDataData->setParent(metaGroup); OFX::StringParamDescriptor* metaDataSubtitle = desc.defineStringParam(kParamMetaDataSubtitle); metaDataSubtitle->setLabel(kParamMetaDataSubtitleLabel); metaDataSubtitle->setEnabled(false); metaDataSubtitle->setStringType(OFX::eStringTypeMultiLine); metaDataSubtitle->setParent(metaGroup); OFX::StringParamDescriptor* metaDataAttachement = desc.defineStringParam(kParamMetaDataAttachement); metaDataAttachement->setLabel(kParamMetaDataAttachementLabel); metaDataAttachement->setEnabled(false); metaDataAttachement->setStringType(OFX::eStringTypeMultiLine); metaDataAttachement->setParent(metaGroup); OFX::StringParamDescriptor* metaDataUnknown = desc.defineStringParam(kParamMetaDataUnknown); metaDataUnknown->setLabel(kParamMetaDataUnknownLabel); metaDataUnknown->setEnabled(false); metaDataUnknown->setStringType(OFX::eStringTypeMultiLine); metaDataUnknown->setParent(metaGroup); /// VERBOSE OFX::BooleanParamDescriptor* useVerbose = desc.defineBooleanParam(kParamVerbose); useVerbose->setLabel("Set to verbose"); useVerbose->setDefault(false); useVerbose->setHint("Set plugin to verbose to get debug informations."); }
/** * @brief Function called to describe the plugin controls and features. * @param[in, out] desc Effect descriptor * @param[in] context Application context */ void CropPluginFactory::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); OFX::ChoiceParamDescriptor* mode = desc.defineChoiceParam(kParamMode); mode->setLabel("Mode"); mode->appendOption(kParamModeCrop); mode->appendOption(kParamModeFillColor); // mode->appendOption( kParamModeResize ); // good idea or not? mode->setDefault(eParamModeCrop); OFX::RGBAParamDescriptor* fillColor = desc.defineRGBAParam(kParamFillColor); fillColor->setLabel("Color"); fillColor->setHint("Color to fill bands"); fillColor->setDefault(0.0, 0.0, 0.0, 1.0); OFX::ChoiceParamDescriptor* axis = desc.defineChoiceParam(kParamAxis); axis->setLabel("Axis"); axis->appendOption(kParamAxisXY); axis->appendOption(kParamAxisX); axis->appendOption(kParamAxisY); axis->setDefault(eParamAxisY); axis->setEvaluateOnChange(false); OFX::ChoiceParamDescriptor* symmetric = desc.defineChoiceParam(kParamSymmetric); symmetric->setLabel("Symmetric"); symmetric->appendOption(kParamSymmetricNone); symmetric->appendOption(kParamSymmetricXY); symmetric->appendOption(kParamSymmetricX); symmetric->appendOption(kParamSymmetricY); symmetric->setHint("Is the crop region symmetric around image center?"); symmetric->setDefault(true); symmetric->setEvaluateOnChange(false); OFX::BooleanParamDescriptor* fixedRatio = desc.defineBooleanParam(kParamFixedRatio); fixedRatio->setLabel("Fixed ratio"); fixedRatio->setHint("Constrain the cropped region to this ratio."); fixedRatio->setDefault(true); fixedRatio->setEvaluateOnChange(false); OFX::ChoiceParamDescriptor* preset = desc.defineChoiceParam(kParamPreset); preset->setLabel("Preset"); preset->appendOption(kParamPreset_custom); preset->appendOption(kParamPreset_1_33); preset->appendOption(kParamPreset_1_77); preset->appendOption(kParamPreset_1_85); preset->appendOption(kParamPreset_2_35); preset->appendOption(kParamPreset_2_40); preset->setDefault(0); preset->setEvaluateOnChange(false); OFX::DoubleParamDescriptor* ratio = desc.defineDoubleParam(kParamRatio); ratio->setLabel("Ratio"); ratio->setRange(0, std::numeric_limits<double>::max()); ratio->setDisplayRange(0, 3); ratio->setDefault(2.0); ratio->setHint("Ratio X/Y of the cropped region."); OFX::BooleanParamDescriptor* overlay = desc.defineBooleanParam(kParamOverlay); overlay->setLabel("Overlay"); overlay->setHint("Display overlay rectangle"); overlay->setDefault(false); overlay->setEvaluateOnChange(false); OFX::GroupParamDescriptor* cropRegion = desc.defineGroupParam(kParamGroupCropRegion); OFX::IntParamDescriptor* xMin = desc.defineIntParam(kParamXMin); xMin->setLabel("X min"); // xMin->setRange( 0, std::numeric_limits<int>::max() ); xMin->setDisplayRange(0, 3000); xMin->setDefault(0); xMin->setParent(*cropRegion); OFX::IntParamDescriptor* yMin = desc.defineIntParam(kParamYMin); yMin->setLabel("Y min"); // yMin->setRange( 0, std::numeric_limits<int>::max() ); yMin->setDisplayRange(0, 3000); yMin->setDefault(0); yMin->setParent(*cropRegion); OFX::IntParamDescriptor* xMax = desc.defineIntParam(kParamXMax); xMax->setLabel("X max"); // xMax->setRange( 0, std::numeric_limits<int>::max() ); xMax->setDisplayRange(0, 3000); xMax->setDefault(0); xMax->setParent(*cropRegion); OFX::IntParamDescriptor* yMax = desc.defineIntParam(kParamYMax); yMax->setLabel("Y max"); // yMax->setRange( 0, std::numeric_limits<int>::max() ); yMax->setDisplayRange(0, 3000); yMax->setDefault(0); yMax->setParent(*cropRegion); }
/** * @brief Function called to describe the plugin controls and features. * @param[in, out] desc Effect descriptor * @param[in] context Application context */ void TurboJpegWriterPluginFactory::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 ); // Controls describeWriterParamsInContext( desc, context ); OFX::ChoiceParamDescriptor* channel = static_cast<OFX::ChoiceParamDescriptor*>( desc.getParamDescriptor( kTuttlePluginChannel ) ); channel->resetOptions(); channel->appendOption( kTuttlePluginChannelRGB ); channel->setDefault( 0 ); channel->setEnabled( false ); OFX::ChoiceParamDescriptor* bitDepth = static_cast<OFX::ChoiceParamDescriptor*>( desc.getParamDescriptor( kTuttlePluginBitDepth ) ); bitDepth->resetOptions(); bitDepth->appendOption( kTuttlePluginBitDepth8 ); bitDepth->setDefault( eTuttlePluginBitDepth8 ); bitDepth->setEnabled( false ); OFX::BooleanParamDescriptor* premult = static_cast<OFX::BooleanParamDescriptor*>( desc.getParamDescriptor( kParamPremultiplied ) ); premult->setDefault( true ); OFX::IntParamDescriptor* quality = desc.defineIntParam( kParamQuality ); quality->setLabel( "Quality" ); quality->setRange( 0, 100 ); quality->setDisplayRange( 0, 100 ); quality->setDefault( 80 ); OFX::ChoiceParamDescriptor* subsampling = desc.defineChoiceParam( kParamSubsampling ); subsampling->setLabel( kParamSubsamplingLabel ); subsampling->setHint( kParamSubsamplingHint ); subsampling->appendOption( kTurboJpegSubsampling444 ); subsampling->appendOption( kTurboJpegSubsampling422 ); subsampling->appendOption( kTurboJpegSubsampling420 ); subsampling->appendOption( kTurboJpegSubsamplingGray ); subsampling->appendOption( kTurboJpegSubsampling440 ); subsampling->setDefault( eTurboJpegSubsampling420 ); 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 ); }
/** * @brief Function called to describe the plugin controls and features. * @param[in, out] desc Effect descriptor * @param[in] context Application context */ void ResizePluginFactory::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* method = desc.defineChoiceParam(kParamMode); method->setLabel("Mode"); method->appendOption(kParamModeFormat); method->appendOption(kParamModeSize); method->appendOption(kParamModeScale); method->setDefault(eParamModeFormat); OFX::ChoiceParamDescriptor* format = desc.defineChoiceParam(kParamFormat); format->setLabel("Format"); format->appendOption(kParamFormatPCVideo, kParamFormatPCVideoLabel); format->appendOption(kParamFormatNTSC, kParamFormatNTSCLabel); format->appendOption(kParamFormatPAL, kParamFormatPALLabel); format->appendOption(kParamFormatHD, kParamFormatHDLabel); format->appendOption(kParamFormatNTSC169, kParamFormatNTSC169Label); format->appendOption(kParamFormatPAL169, kParamFormatPAL169Label); format->appendOption(kParamFormat1kSuper35, kParamFormat1kSuper35Label); format->appendOption(kParamFormat1kCinemascope, kParamFormat1kCinemascopeLabel); format->appendOption(kParamFormat2kSuper35, kParamFormat2kSuper35Label); format->appendOption(kParamFormat2kCinemascope, kParamFormat2kCinemascopeLabel); format->appendOption(kParamFormat4kSuper35, kParamFormat4kSuper35Label); format->appendOption(kParamFormat4kCinemascope, kParamFormat4kCinemascopeLabel); format->appendOption(kParamFormatSquare256, kParamFormatSquare256Label); format->appendOption(kParamFormatSquare512, kParamFormatSquare512Label); format->appendOption(kParamFormatSquare1k, kParamFormatSquare1kLabel); format->appendOption(kParamFormatSquare2k, kParamFormatSquare2kLabel); format->setDefault(eParamFormat2kCinemascope); OFX::Double2DParamDescriptor* scale = desc.defineDouble2DParam(kParamScale); scale->setLabel("Scale"); scale->setDefault(1.0, 1.0); scale->setRange(0.01, 0.01, std::numeric_limits<double>::max(), std::numeric_limits<double>::max()); scale->setDisplayRange(0.1, 0.1, 2.5, 2.5); scale->setHint("Scale the input image [0, 0, width*scale, height*scale]."); OFX::BooleanParamDescriptor* keepRatio = desc.defineBooleanParam(kParamSizeKeepRatio); keepRatio->setLabel("Keep ratio"); keepRatio->setDefault(false); keepRatio->setHint("Keep input image ratio."); OFX::Int2DParamDescriptor* size = desc.defineInt2DParam(kParamSize); size->setLabel("Size"); size->setDefault(200, 200); size->setRange(1, 1, std::numeric_limits<int>::max(), std::numeric_limits<int>::max()); size->setHint("Set the output size (width, height)."); OFX::ChoiceParamDescriptor* direction = desc.defineChoiceParam(kParamSizeOrientation); direction->setLabel("Orientation"); direction->appendOption(kParamSizeOrientationX); direction->appendOption(kParamSizeOrientationY); direction->setDefault(eParamSizeOrientationX); OFX::IntParamDescriptor* width = desc.defineIntParam(kParamSizeWidth); width->setLabel("Width"); width->setDefault(200); width->setRange(1, std::numeric_limits<int>::max()); width->setDisplayRange(0, 3000); width->setHint("Set the width in pixels and keep the input image ratio."); OFX::IntParamDescriptor* height = desc.defineIntParam(kParamSizeHeight); height->setLabel("Height"); height->setDefault(200); height->setRange(1, std::numeric_limits<int>::max()); height->setDisplayRange(0, 3000); height->setHint("Set the height in pixels and keep the input image ratio."); #if(TUTTLE_EXPERIMENTAL) OFX::BooleanParamDescriptor* center = desc.defineBooleanParam(kParamCenter); center->setLabel("Center resizing"); center->setDefault(false); center->setHint("Resize around the center point."); OFX::Double2DParamDescriptor* centerPoint = desc.defineDouble2DParam(kParamCenterPoint); centerPoint->setDefault(100, 100); centerPoint->setLabel("Center point at"); centerPoint->setHint("Position of the center point."); #endif // sampler parameters // describeSamplerParamsInContext(desc, context); }
/** * @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 ); srcClip->setOptional(true); // 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( kParamText ); text->setLabel( "Text" ); text->setStringType( OFX::eStringTypeMultiLine ); OFX::BooleanParamDescriptor* isExpression = desc.defineBooleanParam( kParamIsExpression ); isExpression->setLabel( "Expression" ); isExpression->setHint( "If you check this parameter the text must be a python code.\n" "The final result must be in a variable with the name of the parameter.\n" "Example:\n" "from math import *\n" //+ kParamText + "text = 'At frame '+str(time)+', value is ' + str( sin(time) )\n" ); isExpression->setDefault( false ); OFX::StringParamDescriptor* font = desc.defineStringParam( kParamFont ); font->setLabel( "Font file" ); font->setStringType( OFX::eStringTypeFilePath ); font->setDefault( "/usr/share/fonts/truetype/msttcorefonts/arial.ttf" ); OFX::IntParamDescriptor* size = desc.defineIntParam( kParamSize ); size->setLabel( "Size" ); size->setDefault( 18 ); size->setRange( 0, std::numeric_limits<int>::max() ); size->setDisplayRange( 0, 60 ); OFX::DoubleParamDescriptor* ratio = desc.defineDoubleParam( kParamRatio ); 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( kParamColor ); color->setLabel( "Color" ); color->setDefault( 1.0, 1.0, 1.0, 1.0 ); OFX::Double2DParamDescriptor* position = desc.defineDouble2DParam( kParamPosition ); position->setLabel( "Position" ); position->setDefault( 0.0, 0.0 ); OFX::DoubleParamDescriptor* letterSpacing = desc.defineDoubleParam( kParamLetterSpacing ); letterSpacing->setLabel( "Letter spacing" ); letterSpacing->setDisplayRange( -10.0, 10.0 ); letterSpacing->setDefault( 0.0 ); OFX::ChoiceParamDescriptor* vAlign = desc.defineChoiceParam( kParamVAlign ); vAlign->setLabel( "Vertically align" ); vAlign->appendOption( kParamVAlignTop ); vAlign->appendOption( kParamVAlignCenter ); vAlign->appendOption( kParamVAlignBottom ); vAlign->setDefault( eParamVAlignCenter ); OFX::ChoiceParamDescriptor* hAlign = desc.defineChoiceParam( kParamHAlign ); hAlign->setLabel( "Horizontally align" ); hAlign->appendOption( kParamHAlignLeft ); hAlign->appendOption( kParamHAlignCenter ); hAlign->appendOption( kParamHAlignRight ); hAlign->setDefault( eParamHAlignCenter ); OFX::BooleanParamDescriptor* verticalFlip = desc.defineBooleanParam( kParamVerticalFlip ); 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." ); }
void LensCalibrationPluginFactory::describeInContext(OFX::ImageEffectDescriptor& desc, OFX::ContextEnum context) { //Input Clip OFX::ClipDescriptor *srcClip = desc.defineClip(kOfxImageEffectSimpleSourceClipName); srcClip->addSupportedComponent(OFX::ePixelComponentRGBA); srcClip->setTemporalClipAccess(false); srcClip->setSupportsTiles(false); srcClip->setIsMask(false); srcClip->setOptional(false); //Output clip OFX::ClipDescriptor *dstClip = desc.defineClip(kOfxImageEffectOutputClipName); dstClip->addSupportedComponent(OFX::ePixelComponentRGBA); dstClip->setSupportsTiles(false); //Calibration Group { OFX::GroupParamDescriptor *groupCalibration = desc.defineGroupParam(kParamGroupCalibration); groupCalibration->setLabel("Calibration"); groupCalibration->setAsTab(); { OFX::Int2DParamDescriptor *param = desc.defineInt2DParam(kParamImageSize); param->setLabel("Image Size"); param->setHint("Input image size used to calibrate the optics. Obviously, all images should have the same size."); param->setDefault(0, 0); param->setDisplayRange(0, 0, 10000, 10000); param->setAnimates(false); param->setParent(*groupCalibration); param->setEnabled(false); // should not be edited by the user } { OFX::BooleanParamDescriptor *param = desc.defineBooleanParam(kParamInputImageIsGray); param->setLabel("Input image is gray"); param->setHint("Input image is gray"); param->setParent(*groupCalibration); } { OFX::ChoiceParamDescriptor *param = desc.defineChoiceParam(kParamPatternType); param->setLabel("Pattern Type"); param->setHint("Type of pattern to detect"); param->appendOptions(kStringParamPatternType); param->setDefault(eParamPatternTypeChessboard); param->setAnimates(false); param->setParent(*groupCalibration); } { OFX::Int2DParamDescriptor *param = desc.defineInt2DParam(kParamPatternSize); param->setLabel("Pattern Size"); param->setHint("Number of inner corners per one of board dimension Width Height"); param->setDefault(10, 7); param->setRange(2, 2, kOfxFlagInfiniteMax, kOfxFlagInfiniteMax); param->setDisplayRange(2, 2, 15, 15); param->setAnimates(false); param->setParent(*groupCalibration); } { OFX::DoubleParamDescriptor *param = desc.defineDoubleParam(kParamSquareSize); param->setLabel("Square Size"); param->setHint("Define the size of the grid's square cells (mm)"); param->setDisplayRange(0, 100); param->setDefault(1); param->setAnimates(false); param->setParent(*groupCalibration); param->setLayoutHint(OFX::eLayoutHintDivider); } { OFX::IntParamDescriptor *param = desc.defineIntParam(kParamNbRadialCoef); param->setLabel("Nb Radial Coef"); param->setHint("Number of radial coefficient."); param->setRange(0, 6); param->setDisplayRange(0, 6); param->setDefault(3); param->setAnimates(false); param->setParent(*groupCalibration); } { OFX::IntParamDescriptor *param = desc.defineIntParam(kParamMaxFrames); param->setLabel("Max Frames"); param->setHint("Maximal number of frames to extract from the video file."); param->setRange(0, kOfxFlagInfiniteMax); param->setDisplayRange(0, 1000); param->setDefault(0); param->setAnimates(false); param->setParent(*groupCalibration); } { OFX::IntParamDescriptor *param = desc.defineIntParam(kParamMaxCalibFrames); param->setLabel("Max Calibration Frames"); param->setHint("Maximal number of frames to use to calibrate from the selected frames."); param->setRange(0, kOfxFlagInfiniteMax); param->setDisplayRange(0, 1000); param->setDefault(100); param->setAnimates(false); param->setParent(*groupCalibration); } { OFX::IntParamDescriptor *param = desc.defineIntParam(kParamCalibGridSize); param->setLabel("Max Calibration Grid Size"); param->setHint("Define the number of cells per edge."); param->setRange(0, kOfxFlagInfiniteMax); param->setDisplayRange(0, 100); param->setDefault(10); param->setAnimates(false); param->setParent(*groupCalibration); } { OFX::IntParamDescriptor *param = desc.defineIntParam(kParamMinInputFrames); param->setLabel("Min Input Frames"); param->setHint("Minimal number of frames to limit the calibration refinement loop."); param->setRange(0, kOfxFlagInfiniteMax); param->setDisplayRange(0, 1000); param->setDefault(10); param->setAnimates(false); param->setParent(*groupCalibration); } { OFX::DoubleParamDescriptor *param = desc.defineDoubleParam(kParamMaxTotalAvgErr); param->setLabel("Max Total Average Error"); param->setHint("Maximal limit of the total average error"); param->setRange(0, 1); param->setDisplayRange(0, 1); param->setDefault(0.1); param->setAnimates(false); param->setParent(*groupCalibration); } { OFX::PushButtonParamDescriptor *param = desc.definePushButtonParam(kParamCalibrate); param->setLabel("Calibrate"); param->setHint("calibrate"); param->setParent(*groupCalibration); } } //Output Group { OFX::GroupParamDescriptor *groupOutput = desc.defineGroupParam(kParamGroupOutput); groupOutput->setLabel("Output"); groupOutput->setAsTab(); { OFX::BooleanParamDescriptor *param = desc.defineBooleanParam(kParamOutputIsCalibrated); param->setLabel("Is calibrated"); param->setHint("Is calibrated"); param->setParent(*groupOutput); } { OFX::DoubleParamDescriptor *param = desc.defineDoubleParam(kParamOutputAvgReprojErr); param->setLabel("Average Reprojection Error"); param->setDisplayRange(0, 10); param->setEvaluateOnChange(false); param->setEnabled(false); param->setAnimates(true); param->setParent(*groupOutput); param->setLayoutHint(OFX::eLayoutHintDivider); } { OFX::GroupParamDescriptor *groupCamera = desc.defineGroupParam(kParamOutputCameraGroup); groupCamera->setLabel("Intrinsics Camera Parameters"); groupCamera->setParent(*groupOutput); groupCamera->setOpen(true); { OFX::DoubleParamDescriptor *param = desc.defineDoubleParam(kParamOutputFocalLenght); param->setLabel("Focal Length"); param->setDisplayRange(1, 100); param->setAnimates(true); param->setEvaluateOnChange(false); param->setEnabled(false); param->setAnimates(false); param->setParent(*groupCamera); } { OFX::Double2DParamDescriptor *param = desc.defineDouble2DParam(kParamOutputPrincipalPointOffset); param->setLabel("Principal Point"); param->setAnimates(true); param->setEvaluateOnChange(false); param->setEnabled(false); param->setAnimates(false); param->setParent(*groupCamera); } } { OFX::GroupParamDescriptor *groupLensDistortion = desc.defineGroupParam(kParamOutputLensDistortionGroup); groupLensDistortion->setLabel("Lens Distortion Coefficients"); groupLensDistortion->setParent(*groupOutput); groupLensDistortion->setOpen(true); { OFX::DoubleParamDescriptor *param = desc.defineDoubleParam(kParamOutputRadialCoef1); param->setLabel("Radial Coef1"); param->setDisplayRange(0, 10); param->setAnimates(true); param->setEvaluateOnChange(false); param->setEnabled(false); param->setAnimates(false); param->setParent(*groupLensDistortion); } { OFX::DoubleParamDescriptor *param = desc.defineDoubleParam(kParamOutputRadialCoef2); param->setLabel("Radial Coef2"); param->setDisplayRange(0, 10); param->setAnimates(true); param->setEvaluateOnChange(false); param->setEnabled(false); param->setAnimates(false); param->setParent(*groupLensDistortion); } { OFX::DoubleParamDescriptor *param = desc.defineDoubleParam(kParamOutputRadialCoef3); param->setLabel("Radial Coef3"); param->setDisplayRange(0, 10); param->setAnimates(true); param->setEvaluateOnChange(false); param->setEnabled(false); param->setAnimates(false); param->setParent(*groupLensDistortion); } { OFX::DoubleParamDescriptor *param = desc.defineDoubleParam(kParamOutputTangentialCoef1); param->setLabel("Tangential Coef1"); param->setDisplayRange(0, 10); param->setAnimates(true); param->setEvaluateOnChange(false); param->setEnabled(false); param->setAnimates(false); param->setParent(*groupLensDistortion); } { OFX::DoubleParamDescriptor *param = desc.defineDoubleParam(kParamOutputTangentialCoef2); param->setLabel("Tangential Coef2"); param->setDisplayRange(0, 10); param->setAnimates(true); param->setEvaluateOnChange(false); param->setEnabled(false); param->setAnimates(false); param->setParent(*groupLensDistortion); param->setLayoutHint(OFX::eLayoutHintDivider); } } { OFX::PushButtonParamDescriptor *param = desc.definePushButtonParam(kParamOutputClear); param->setLabel("Clear"); param->setHint("clear"); param->setEnabled(false); param->setParent(*groupOutput); } } //Debug Group { OFX::GroupParamDescriptor *groupDebug = desc.defineGroupParam(kParamGroupDebug); groupDebug->setLabel("Debug"); groupDebug->setAsTab(); { OFX::BooleanParamDescriptor *param = desc.defineBooleanParam(kParamDebugEnable); param->setLabel("Enable Debug"); param->setHint("Would you want to export undistorted images?"); param->setParent(*groupDebug); } { OFX::StringParamDescriptor *param = desc.defineStringParam(kParamDebugRejectedImgFolder); param->setLabel("Rejected Frames"); param->setHint("Folder to export delete images during the calibration refinement loop."); param->setStringType(OFX::eStringTypeDirectoryPath); param->setFilePathExists(true); param->setParent(*groupDebug); } { OFX::StringParamDescriptor *param = desc.defineStringParam(kParamDebugSelectedImgFolder); param->setLabel("Selected Frames"); param->setHint("Folder to export debug images."); param->setStringType(OFX::eStringTypeDirectoryPath); param->setFilePathExists(true); param->setParent(*groupDebug); } } }
/** * @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 ); //global display OFX::BooleanParamDescriptor* boolGLOBAL = desc.defineBooleanParam(kGlobalDisplay); boolGLOBAL->setHint("Display global overlay on screen."); boolGLOBAL->setDefault(true); // if parametric parameters are supported if( OFX::getImageEffectHostDescription()->supportsParametricParameter ) { OFX::ParametricParamDescriptor* curvesRGB = desc.defineParametricParam( kParamRGBColorSelection ); OFX::ParametricParamDescriptor* curvesHSL = desc.defineParametricParam( kParamHSLColorSelection ); //Group Param (RGB & HSL) OFX::GroupParamDescriptor *groupRGB = desc.defineGroupParam(kGroupRGB); groupRGB->setLabel(kGroupRGBLabel); OFX::GroupParamDescriptor *groupHSL = desc.defineGroupParam(kGroupHSL); groupHSL->setLabel(kGroupHSLLabel); //define the graphic aspect curvesRGB->setRange( 0.0, 1.0 ); //set range on RGB curve curvesHSL->setRange( 0.0, 1.0 ); //set range on HSL curve curvesRGB->setDimension(nbCurvesRGB); //3 curves on RGB curvesHSL->setDimension(nbCurvesHSL); //3 curves on HSL //Add curves RGB curvesRGB->setDimensionLabel( kParamColorSelectionRed, 0 ); // 0 on RGB is red curvesRGB->setDimensionLabel( kParamColorSelectionGreen, 1 ); // 1 on RGB is green curvesRGB->setDimensionLabel( kParamColorSelectionBlue, 2 ); // 2 on RGB is blue //Add curves HSL curvesHSL->setDimensionLabel( kParamColorSelectionHue, 0 ); // 0 on HSL is hue curvesHSL->setDimensionLabel( kParamColorSelectionSaturation, 1 ); // 1 on HSL is saturation curvesHSL->setDimensionLabel( kParamColorSelectionLightness, 2 ); // 2 on HSK is lightness //define curves color RGB curvesRGB->setHint( "Color selection" ); static const OfxRGBColourD red = {1,0,0}; //set red color to red curve static const OfxRGBColourD green = {0,1,0}; //set green color to green curve static const OfxRGBColourD blue = {0,0,1}; //set blue color to blue curve curvesRGB->setUIColour( 0, red ); curvesRGB->setUIColour( 1, green ); curvesRGB->setUIColour( 2, blue ); //define curves color HSL curvesHSL->setHint( "Color selection" ); curvesHSL->setUIColour( 0, red ); //set red color on hue curve curvesHSL->setUIColour( 1, green ); //set green color on saturation curve curvesHSL->setUIColour( 2, blue ); //set lightness color on saturation curve curvesRGB->setInteractDescriptor( new OFX::DefaultParamInteractWrap<RGBParamOverlayDescriptor>() ); //attach parametric curve to RGBOverlay curvesHSL->setInteractDescriptor( new OFX::DefaultParamInteractWrap<HSLParamOverlayDescriptor>() ); //attach parametric curve to HSLOverlay //add curves to their groups curvesRGB->setParent(groupRGB); //add RGB curves to RGB group curvesHSL->setParent(groupHSL); //add HSL curves to HSL group //Set each curves to initial value curvesRGB->setIdentity(); curvesHSL->setIdentity(); //add 2 control points (0,1) and (1,1) for each channel for(unsigned int i=0; i< nbCurvesRGB; ++i) { //curvesRGB->addControlPoint( i, 0.0, 0.0, 1.0, false ); curvesRGB->addControlPoint( i, 0.0, 1.0, 1.0, false ); } for(unsigned int i=0; i< nbCurvesHSL; ++i) { //curvesHSL->addControlPoint( i, 0.0, 0.0, 1.0, false ); curvesHSL->addControlPoint( i, 0.0, 1.0, 1.0, false ); } //Channels checkboxes (RGB) OFX::BooleanParamDescriptor* boolR = desc.defineBooleanParam(kBoolRed); boolR->setDefault(false); //red channel is not selected by default boolR->setHint("Activate Red channel"); boolR->setLayoutHint( OFX::eLayoutHintNoNewLine ); //line is not finished boolR->setParent(groupRGB); //red multiplier OFX::DoubleParamDescriptor* redMultiplier = desc.defineDoubleParam(kMultiplierRed); redMultiplier->setLabel(kMultiplierLabel); redMultiplier->setHint("Determinate curve from selection precision."); redMultiplier->setRange(1, 1000); redMultiplier->setDisplayRange(0,5); redMultiplier->setDefault(1); redMultiplier->setParent(groupRGB); OFX::BooleanParamDescriptor* boolG = desc.defineBooleanParam(kBoolGreen); boolG->setDefault(false); //green channel is not selected by default boolG->setHint("Activate Green channel"); boolG->setLayoutHint( OFX::eLayoutHintNoNewLine ); //line is not finished boolG->setParent(groupRGB); //green multiplier OFX::DoubleParamDescriptor* greenMultiplier = desc.defineDoubleParam(kMultiplierGreen); greenMultiplier->setLabel(kMultiplierLabel); greenMultiplier->setHint("Determinate curve from selection precision."); greenMultiplier->setRange(1, 1000); greenMultiplier->setDisplayRange(0,5); greenMultiplier->setDefault(1); greenMultiplier->setParent(groupRGB); OFX::BooleanParamDescriptor* boolB = desc.defineBooleanParam(kBoolBlue); boolB->setHint("Activate Blue channel"); boolB->setLayoutHint( OFX::eLayoutHintNoNewLine ); //line is not finished boolB->setDefault(false); //blue channel is not selected by default boolB->setParent(groupRGB); //blue multiplier OFX::DoubleParamDescriptor* blueMultiplier = desc.defineDoubleParam(kMultiplierBlue); blueMultiplier->setLabel(kMultiplierLabel); blueMultiplier->setHint("Determinate curve from selection precision."); blueMultiplier->setRange(1, 1000); blueMultiplier->setDisplayRange(0,5); blueMultiplier->setDefault(1); blueMultiplier->setParent(groupRGB); //Channels check box (HSL) OFX::BooleanParamDescriptor* boolH = desc.defineBooleanParam(kBoolHue); boolH->setDefault(false); boolH->setHint("Activate Hue channel"); boolH->setLayoutHint( OFX::eLayoutHintNoNewLine ); //line is not finished boolH->setParent(groupHSL); //Hue multiplier OFX::DoubleParamDescriptor* hueMultiplier = desc.defineDoubleParam(kMultiplierHue); hueMultiplier->setLabel(kMultiplierLabel); hueMultiplier->setHint("Determinate curve from selection precision."); hueMultiplier->setRange(1, 1000); hueMultiplier->setDisplayRange(0,5); hueMultiplier->setDefault(1); hueMultiplier->setParent(groupHSL); OFX::BooleanParamDescriptor* boolS = desc.defineBooleanParam(kBoolSaturation); boolS->setDefault(false); boolS->setHint("Activate Saturation channel"); boolS->setLayoutHint( OFX::eLayoutHintNoNewLine ); //line is not finished boolS->setParent(groupHSL); //Saturation multiplier OFX::DoubleParamDescriptor* saturationMultiplier = desc.defineDoubleParam(kMultiplierSaturation); saturationMultiplier->setLabel(kMultiplierLabel); saturationMultiplier->setHint("Determinate curve from selection precision."); saturationMultiplier->setRange(1, 1000); saturationMultiplier->setDisplayRange(0,5); saturationMultiplier->setDefault(1); saturationMultiplier->setParent(groupHSL); OFX::BooleanParamDescriptor* boolL = desc.defineBooleanParam(kBoolLightness); boolL->setHint("Activate Lightness channel"); boolL->setLayoutHint( OFX::eLayoutHintNoNewLine ); //line is not finished boolL->setDefault(false); boolL->setParent(groupHSL); //Lightness multiplier OFX::DoubleParamDescriptor* lightnessMultiplier = desc.defineDoubleParam(kMultiplierLightness); lightnessMultiplier->setLabel(kMultiplierLabel); lightnessMultiplier->setHint("Determinate curve from selection precision."); lightnessMultiplier->setRange(1, 1000); lightnessMultiplier->setDisplayRange(0,5); lightnessMultiplier->setDefault(1); lightnessMultiplier->setParent(groupHSL); //Clean Button (RGB) OFX::PushButtonParamDescriptor* resetButtonRGB = desc.definePushButtonParam(kButtonResetRGB); resetButtonRGB->setLabel(kButtonResetRGBLabel); resetButtonRGB->setLayoutHint( OFX::eLayoutHintNoNewLine ); //line is not finished resetButtonRGB->setHint("Reset the selected RGB curves. \n Warning : the curves may not be refreshed click on overlay to refresh."); resetButtonRGB->setParent(groupRGB); //Selection To Curves Button (RGB) OFX::PushButtonParamDescriptor* selectionToCurveButtonRGB = desc.definePushButtonParam(kButtonSelectionToCurveRGB); selectionToCurveButtonRGB->setLabel(kButtonSelectionToCurveRGBLabel); selectionToCurveButtonRGB->setHint("Load selected RGB curves with selection data. \n Warning : the curves may not be refreshed click on overlay to refresh."); selectionToCurveButtonRGB->setParent(groupRGB); //Append selection to curves button (RGB) OFX::PushButtonParamDescriptor* appendSelectionToCurveRGB = desc.definePushButtonParam(kButtonAppendSelectionToCurveRGB); appendSelectionToCurveRGB->setLabel(kButtonAppendSelectionToCurveRGBLabel); //add label appendSelectionToCurveRGB->setHint("Append current selection to selected RGB channels");//help appendSelectionToCurveRGB->setParent(groupRGB); //add to RGB group //Clean Button (HSL) OFX::PushButtonParamDescriptor* resetButtonHSL = desc.definePushButtonParam(kButtonResetHSL); resetButtonHSL->setLabel(kButtonResetHSLLabel); resetButtonHSL->setLayoutHint( OFX::eLayoutHintNoNewLine ); //line is not finished resetButtonHSL->setHint("Reset the selected HSL curves \n Warning : the curves may not be refreshed click on overlay to refresh."); resetButtonHSL->setParent(groupHSL); //Selection To Curves Button (HSL) OFX::PushButtonParamDescriptor* selectionToCurveButtonHSL = desc.definePushButtonParam(kButtonSelectionToCurveHSL); selectionToCurveButtonHSL->setLabel(kButtonSelectionToCurveHSLLabel); selectionToCurveButtonHSL->setHint("Load selected HSL curves with selection data. \n Warning : the curves may not be refreshed click on overlay to refresh."); selectionToCurveButtonHSL->setParent(groupHSL); //Append selection to curves button (HSL) OFX::PushButtonParamDescriptor* appendSelectionToCurveHSL = desc.definePushButtonParam(kButtonAppendSelectionToCurveHSL); appendSelectionToCurveHSL->setLabel(kButtonAppendSelectionToCurveHSLLabel); //add label appendSelectionToCurveHSL->setHint("Append current selection to selected HSL channels");//help appendSelectionToCurveHSL->setParent(groupHSL); //add to HSL group //Close RGB group (group states by default on screen) groupRGB->setOpen(false); groupHSL->setOpen(true); } //Selection group { OFX::GroupParamDescriptor *groupSelection = desc.defineGroupParam(kGroupSelection); groupSelection->setLabel(kGroupSelectionLabel); groupSelection->setOpen(false); groupSelection->setAsTab(); //display selection OFX::BooleanParamDescriptor* boolDisplaySelection = desc.defineBooleanParam(kBoolSelection); boolDisplaySelection->setDefault(true); boolDisplaySelection->setEvaluateOnChange(false);// don't need to recompute on change boolDisplaySelection->setHint("Display the selected zone on screen."); boolDisplaySelection->setParent(groupSelection); //clear selection OFX::PushButtonParamDescriptor* resetSelectionButton = desc.definePushButtonParam(kButtonResetSelection); resetSelectionButton->setLabel(kButtonResetSelectionLabel); resetSelectionButton->setHint("Reset user's selection."); resetSelectionButton->setParent(groupSelection); //selection mode OFX::ChoiceParamDescriptor* selectionMode = desc.defineChoiceParam(kSelectionModeListParamLabel); selectionMode->setLabel(kSelectionModeListParamLabel); selectionMode->setHint( "Selection mode \n - unique : reset past selection before selection \n - additive : add pixels to current selection \n -subtractive : remote pixel from current selection"); selectionMode->appendOption(kSelectionModeListParamOpt2); selectionMode->appendOption(kSelectionModeListParamOpt1); selectionMode->appendOption(kSelectionModeListParamOpt3); selectionMode->setParent(groupSelection); //Precision of selection to curve OFX::IntParamDescriptor* precisionSelectionToCurve = desc.defineIntParam(kprecisionCurveFromSelection); precisionSelectionToCurve->setLabel(kprecisionCurveFromSelectionLabel); precisionSelectionToCurve->setHint("Determinate curve from selection precision."); precisionSelectionToCurve->setRange(1, 1000); precisionSelectionToCurve->setDisplayRange(1, 300.0 ); precisionSelectionToCurve->setDefault(curveFromSelection); precisionSelectionToCurve->setEvaluateOnChange(false); // don't need to recompute on change precisionSelectionToCurve->setParent(groupSelection); } //Histogram overlay group { OFX::GroupParamDescriptor *groupHistogramOverlay = desc.defineGroupParam(kGroupHistogramOverlay); groupHistogramOverlay->setLabel(kGroupHistogramOverlayLabel); groupHistogramOverlay->setOpen(true); groupHistogramOverlay->setAsTab(); //Histogram display settings OFX::ChoiceParamDescriptor* gammaType = desc.defineChoiceParam(kHistoDisplayListParamLabel); gammaType->setLabel(kHistoDisplayListParamLabel); gammaType->setEvaluateOnChange(false); // don't need to recompute on change gammaType->setHint("Histogram display \n -global : normalize all of channels \n -by channel : keep proportions between channels"); gammaType->appendOption(kHistoDisplayListParamOpt2); gammaType->appendOption(kHistoDisplayListParamOpt1); gammaType->setParent(groupHistogramOverlay); //Clean all Button OFX::PushButtonParamDescriptor* resetButtonAll = desc.definePushButtonParam(kButtonResetAll); resetButtonAll->setLabel(kButtonResetAllLabel); resetButtonAll->setHint("Reset all curves. \n Waring : the curves may not be refreshed click on overlay to refresh."); resetButtonAll->setParent(groupHistogramOverlay); } ///Advanced group { OFX::GroupParamDescriptor *groupAdvanced = desc.defineGroupParam(kGroupAdvanced); groupAdvanced->setLabel(kGroupAdvancedLabel); groupAdvanced->setOpen(false); groupAdvanced->setAsTab(); //nbOfstep (advanced group) OFX::IntParamDescriptor* nbStepRange = desc.defineIntParam(knbStepRange); nbStepRange->setLabel(knbStepRangeLabel); nbStepRange->setHint("Determinate histogram overlay precision."); nbStepRange->setRange(1, 1000); nbStepRange->setDisplayRange(1, 600.0 ); nbStepRange->setDefault(255); nbStepRange->setEvaluateOnChange(false); // don't need to recompute on change nbStepRange->setParent(groupAdvanced); //selection multiplier (advanced group) OFX::DoubleParamDescriptor* selectionMultiplier = desc.defineDoubleParam(kselectionMultiplier); selectionMultiplier->setLabel(kselectionMultiplierLabel); selectionMultiplier->setHint("With high values, small selection are more visible."); selectionMultiplier->setRange(0.001,1000.0); selectionMultiplier->setDisplayRange(0.0, 100.0 ); selectionMultiplier->setDefault(2.0); selectionMultiplier->setEvaluateOnChange(false); // don't need to recompute on change selectionMultiplier->setParent(groupAdvanced); //Refresh histograms overlay Button OFX::PushButtonParamDescriptor* refreshOverlayButton = desc.definePushButtonParam(kButtonRefreshOverlay); refreshOverlayButton->setLabel(kButtonRefreshOverlayLabel); refreshOverlayButton->setHint("Refresh histogram overlay."); refreshOverlayButton->setParent(groupAdvanced); //clamp values to 0 and 1 OFX::BooleanParamDescriptor* clampCurveValues = desc.defineBooleanParam(kBoolClampValues); clampCurveValues->setHint("Clamp curve value : values superior to 1 or inferior to 0 will be clamp in process."); clampCurveValues->setDefault(true); clampCurveValues->setParent(groupAdvanced); } //Output settings OFX::ChoiceParamDescriptor* outputType = desc.defineChoiceParam(kOutputListParamLabel); outputType->setLabel(kOutputListParamLabel); outputType->setHint( "Output type \n Alpha channel or Black and White"); outputType->appendOption(kOutputListParamOpt1); outputType->appendOption(kOutputListParamOpt2); outputType->setLayoutHint( OFX::eLayoutHintNoNewLine ); //line is not finished //Reverse mask OFX::BooleanParamDescriptor* boolReverseMask = desc.defineBooleanParam(kBoolReverseMask); boolReverseMask->setDefault(false); boolReverseMask->setHint("Revert alpha mask"); }
void describeGeneratorParamsInContext( OFX::ImageEffectDescriptor& desc, OFX::EContext context ) { /* to activate this // Create the mandated optional input clip OFX::ClipDescriptor* srcClip = desc.defineClip( kOfxImageEffectSimpleSourceClipName ); srcClip->addSupportedComponent( OFX::ePixelComponentRGBA ); srcClip->addSupportedComponent( OFX::ePixelComponentRGB ); srcClip->addSupportedComponent( OFX::ePixelComponentAlpha ); srcClip->setSupportsTiles( kSupportTiles ); srcClip->setOptional(true); */ // 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* explicitConversion = desc.defineChoiceParam( kParamGeneratorExplicitConversion ); explicitConversion->setLabel( "Explicit conversion" ); explicitConversion->appendOption( kTuttlePluginBitDepthAuto ); explicitConversion->appendOption( kTuttlePluginBitDepth8 ); explicitConversion->appendOption( kTuttlePluginBitDepth16 ); explicitConversion->appendOption( kTuttlePluginBitDepth32f ); explicitConversion->setCacheInvalidation( OFX::eCacheInvalidateValueAll ); explicitConversion->setAnimates( false ); desc.addClipPreferencesSlaveParam( *explicitConversion ); if( OFX::getImageEffectHostDescription()->supportsMultipleClipDepths ) { explicitConversion->setDefault( 0 ); } else { explicitConversion->setIsSecret( true ); explicitConversion->setDefault( static_cast<int>( OFX::getImageEffectHostDescription()->getPixelDepth() ) ); } OFX::ChoiceParamDescriptor* method = desc.defineChoiceParam( kParamMode ); method->setLabel ( "Mode" ); method->appendOption( kParamModeFormat ); method->appendOption( kParamModeSize ); method->setDefault ( eParamModeFormat ); OFX::ChoiceParamDescriptor* format = desc.defineChoiceParam( kParamFormat ); format->setLabel( "Format" ); format->appendOption( kParamFormatPCVideo ); format->appendOption( kParamFormatNTSC ); format->appendOption( kParamFormatPAL ); format->appendOption( kParamFormatHD ); format->appendOption( kParamFormatNTSC169 ); format->appendOption( kParamFormatPAL169 ); format->appendOption( kParamFormat1kSuper35 ); format->appendOption( kParamFormat1kCinemascope ); format->appendOption( kParamFormat2kSuper35 ); format->appendOption( kParamFormat2kCinemascope ); format->appendOption( kParamFormat4kSuper35 ); format->appendOption( kParamFormat4kCinemascope ); format->appendOption( kParamFormatSquare256 ); format->appendOption( kParamFormatSquare512 ); format->appendOption( kParamFormatSquare1k ); format->appendOption( kParamFormatSquare2k ); format->setDefault( eParamFormat2kCinemascope ); OFX::BooleanParamDescriptor* specificRatio = desc.defineBooleanParam( kParamSizeSpecificRatio ); specificRatio->setLabel( "Specific ratio" ); specificRatio->setDefault( false ); specificRatio->setHint( "Specific input image ratio." ); OFX::Int2DParamDescriptor* size = desc.defineInt2DParam( kParamSize ); size->setLabel( "Size" ); size->setDefault( 200, 200 ); size->setRange( 1, 1, std::numeric_limits<int>::max(), std::numeric_limits<int>::max() ); size->setHint( "Set the output size (width, height)." ); OFX::ChoiceParamDescriptor* direction = desc.defineChoiceParam( kParamSizeOrientation ); direction->setLabel( "Orientation" ); direction->appendOption( kParamSizeOrientationX ); direction->appendOption( kParamSizeOrientationY ); direction->setDefault( eParamSizeOrientationX ); OFX::DoubleParamDescriptor* ratioValue = desc.defineDoubleParam( kParamSizeRatioValue ); ratioValue->setLabel( "Ratio Value" ); ratioValue->setDefault( 1.0 ); ratioValue->setRange( 1, std::numeric_limits<int>::max() ); ratioValue->setDisplayRange( 0, 50 ); ratioValue->setHint( "Set the ratio." ); OFX::IntParamDescriptor* width = desc.defineIntParam( kParamSizeWidth ); width->setLabel( "Width" ); width->setDefault( 200 ); width->setRange( 1, std::numeric_limits<int>::max() ); width->setDisplayRange( 0, 3000 ); width->setHint( "Set the width in pixels and specify the ratio." ); OFX::IntParamDescriptor* height = desc.defineIntParam( kParamSizeHeight ); height->setLabel( "Height" ); height->setDefault( 200 ); height->setRange( 1, std::numeric_limits<int>::max() ); height->setDisplayRange( 0, 3000 ); height->setHint( "Set the height in pixels and specify the ratio." ); }
/** * @brief Function called to describe the plugin controls and features. * @param[in, out] desc Effect descriptor * @param[in] context Application context */ void PrintPluginFactory::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* mode = desc.defineChoiceParam( kParamMode ); mode->setLabel( "Mode" ); mode->appendOption( kParamModeImage ); mode->appendOption( kParamModeRegion ); mode->appendOption( kParamModePixel ); OFX::Int2DParamDescriptor* pixel = desc.defineInt2DParam( kParamPixel ); pixel->setLabel( "Pixel" ); pixel->setDisplayRange( 0, 0, 2000, 2000 ); OFX::Int2DParamDescriptor* regionMin = desc.defineInt2DParam( kParamRegionMin ); regionMin->setLabel( "Region min" ); regionMin->setDisplayRange( 0, 0, 2000, 2000 ); OFX::Int2DParamDescriptor* regionMax = desc.defineInt2DParam( kParamRegionMax ); regionMax->setLabel( "Region max" ); regionMax->setDefault( 1,1 ); regionMax->setDisplayRange( 0, 0, 2000, 2000 ); OFX::IntParamDescriptor* outputColumns = desc.defineIntParam( kParamColumns ); outputColumns->setDefault(80); outputColumns->setDisplayRange(1,500); OFX::ChoiceParamDescriptor* colorType = desc.defineChoiceParam( kParamColor ); colorType->appendOption( kParamColorMono ); colorType->appendOption( kParamColorGray ); colorType->appendOption( kParamColor8 ); colorType->appendOption( kParamColor16 ); colorType->appendOption( kParamColorFullGray ); colorType->appendOption( kParamColorFull8 ); colorType->appendOption( kParamColorFull16 ); colorType->setLabel( "Color type for the output." ); OFX::ChoiceParamDescriptor* output = desc.defineChoiceParam( kParamOutput ); output->setLabel( "Output" ); output->appendOption( kParamOutputAscii ); output->appendOption( kParamOutputNumeric ); OFX::BooleanParamDescriptor* flip = desc.defineBooleanParam( kParamFlip ); flip->setLabel( "Flip" ); OFX::BooleanParamDescriptor* openGlWindow = desc.defineBooleanParam( kParamOutputOpenGL ); openGlWindow->setLabel( "Show in OpenGL Window." ); }
/** * @brief Function called to describe the plugin controls and features. * @param[in, out] desc Effect descriptor * @param[in] context Application context */ void HistogramPluginFactory::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 ); //global display OFX::BooleanParamDescriptor* boolGLOBAL = desc.defineBooleanParam(kGlobalDisplay); boolGLOBAL->setHint("Display global overlay on screen."); boolGLOBAL->setDefault(true); // RGB / HSL { //Group Param (RGB & HSL) OFX::GroupParamDescriptor *groupRGB = desc.defineGroupParam(kGroupRGB); groupRGB->setLabel(kGroupRGBLabel); OFX::GroupParamDescriptor *groupHSL = desc.defineGroupParam(kGroupHSL); groupHSL->setLabel(kGroupHSLLabel); //Channels checkboxes (RGB) OFX::BooleanParamDescriptor* boolR = desc.defineBooleanParam(kBoolRed); boolR->setDefault(true); //red channel is not selected by default boolR->setHint("Activate Red channel"); boolR->setLayoutHint( OFX::eLayoutHintNoNewLine ); //line is not finished boolR->setParent(groupRGB); //red multiplier OFX::DoubleParamDescriptor* redMultiplier = desc.defineDoubleParam(kMultiplierRed); redMultiplier->setLabel(kMultiplierLabel); redMultiplier->setHint("Determinate curve from selection precision."); redMultiplier->setRange(1, 1000); redMultiplier->setDisplayRange(0,5); redMultiplier->setDefault(1); redMultiplier->setParent(groupRGB); OFX::BooleanParamDescriptor* boolG = desc.defineBooleanParam(kBoolGreen); boolG->setDefault(true); //green channel is not selected by default boolG->setHint("Activate Green channel"); boolG->setLayoutHint( OFX::eLayoutHintNoNewLine ); //line is not finished boolG->setParent(groupRGB); //green multiplier OFX::DoubleParamDescriptor* greenMultiplier = desc.defineDoubleParam(kMultiplierGreen); greenMultiplier->setLabel(kMultiplierLabel); greenMultiplier->setHint("Determinate curve from selection precision."); greenMultiplier->setRange(1, 1000); greenMultiplier->setDisplayRange(0,5); greenMultiplier->setDefault(1); greenMultiplier->setParent(groupRGB); OFX::BooleanParamDescriptor* boolB = desc.defineBooleanParam(kBoolBlue); boolB->setHint("Activate Blue channel"); boolB->setLayoutHint( OFX::eLayoutHintNoNewLine ); //line is not finished boolB->setDefault(true); //blue channel is not selected by default boolB->setParent(groupRGB); //blue multiplier OFX::DoubleParamDescriptor* blueMultiplier = desc.defineDoubleParam(kMultiplierBlue); blueMultiplier->setLabel(kMultiplierLabel); blueMultiplier->setHint("Determinate curve from selection precision."); blueMultiplier->setRange(1, 1000); blueMultiplier->setDisplayRange(0,5); blueMultiplier->setDefault(1); blueMultiplier->setParent(groupRGB); //Channels check box (HSL) OFX::BooleanParamDescriptor* boolH = desc.defineBooleanParam(kBoolHue); boolH->setDefault(true); boolH->setHint("Activate Hue channel"); boolH->setLayoutHint( OFX::eLayoutHintNoNewLine ); //line is not finished boolH->setParent(groupHSL); //Hue multiplier OFX::DoubleParamDescriptor* hueMultiplier = desc.defineDoubleParam(kMultiplierHue); hueMultiplier->setLabel(kMultiplierLabel); hueMultiplier->setHint("Determinate curve from selection precision."); hueMultiplier->setRange(1, 1000); hueMultiplier->setDisplayRange(0,5); hueMultiplier->setDefault(1); hueMultiplier->setParent(groupHSL); OFX::BooleanParamDescriptor* boolS = desc.defineBooleanParam(kBoolSaturation); boolS->setDefault(true); boolS->setHint("Activate Saturation channel"); boolS->setLayoutHint( OFX::eLayoutHintNoNewLine ); //line is not finished boolS->setParent(groupHSL); //Saturation multiplier OFX::DoubleParamDescriptor* saturationMultiplier = desc.defineDoubleParam(kMultiplierSaturation); saturationMultiplier->setLabel(kMultiplierLabel); saturationMultiplier->setHint("Determinate curve from selection precision."); saturationMultiplier->setRange(1, 1000); saturationMultiplier->setDisplayRange(0,5); saturationMultiplier->setDefault(1); saturationMultiplier->setParent(groupHSL); OFX::BooleanParamDescriptor* boolL = desc.defineBooleanParam(kBoolLightness); boolL->setHint("Activate Lightness channel"); boolL->setLayoutHint( OFX::eLayoutHintNoNewLine ); //line is not finished boolL->setDefault(true); boolL->setParent(groupHSL); //Lightness multiplier OFX::DoubleParamDescriptor* lightnessMultiplier = desc.defineDoubleParam(kMultiplierLightness); lightnessMultiplier->setLabel(kMultiplierLabel); lightnessMultiplier->setHint("Determinate curve from selection precision."); lightnessMultiplier->setRange(1, 1000); lightnessMultiplier->setDisplayRange(0,5); lightnessMultiplier->setDefault(1); lightnessMultiplier->setParent(groupHSL); //Close RGB group (group states by default on screen) groupRGB->setOpen(true); groupHSL->setOpen(true); } //Histogram overlay group { OFX::GroupParamDescriptor *groupHistogramOverlay = desc.defineGroupParam(kGroupHistogramOverlay); groupHistogramOverlay->setLabel(kGroupHistogramOverlayLabel); groupHistogramOverlay->setOpen(true); // groupHistogramOverlay->setAsTab(); //Histogram display settings OFX::ChoiceParamDescriptor* gammaType = desc.defineChoiceParam(kHistoDisplayListParamLabel); gammaType->setLabel(kHistoDisplayListParamLabel); gammaType->setEvaluateOnChange(false); // don't need to recompute on change gammaType->setHint("Histogram display \n -global : normalize all of channels \n -by channel : keep proportions between channels"); gammaType->appendOption(kHistoDisplayListParamOpt2); gammaType->appendOption(kHistoDisplayListParamOpt1); gammaType->setParent(groupHistogramOverlay); //nbOfstep (advanced group) OFX::IntParamDescriptor* nbStepRange = desc.defineIntParam(knbStepRange); nbStepRange->setLabel(knbStepRangeLabel); nbStepRange->setHint("Determinate histogram overlay precision."); nbStepRange->setRange(1, 1000); nbStepRange->setDisplayRange(1, 600.0 ); nbStepRange->setDefault(255); nbStepRange->setEvaluateOnChange(false); // don't need to recompute on change nbStepRange->setParent(groupHistogramOverlay); //selection multiplier (advanced group) OFX::DoubleParamDescriptor* selectionMultiplier = desc.defineDoubleParam(kselectionMultiplier); selectionMultiplier->setLabel(kselectionMultiplierLabel); selectionMultiplier->setHint("With high values, small selection are more visible."); selectionMultiplier->setRange(0.001,1000.0); selectionMultiplier->setDisplayRange(0.0, 100.0 ); selectionMultiplier->setDefault(2.0); selectionMultiplier->setEvaluateOnChange(false); // don't need to recompute on change selectionMultiplier->setParent(groupHistogramOverlay); //Refresh histograms overlay Button OFX::PushButtonParamDescriptor* refreshOverlayButton = desc.definePushButtonParam(kButtonRefreshOverlay); refreshOverlayButton->setLabel(kButtonRefreshOverlayLabel); refreshOverlayButton->setHint("Refresh histogram overlay."); refreshOverlayButton->setParent(groupHistogramOverlay); } //Selection group { OFX::GroupParamDescriptor *groupSelection = desc.defineGroupParam(kGroupSelection); groupSelection->setLabel(kGroupSelectionLabel); groupSelection->setOpen(false); // groupSelection->setAsTab(); //display selection OFX::BooleanParamDescriptor* boolDisplaySelection = desc.defineBooleanParam(kBoolSelection); boolDisplaySelection->setDefault(true); boolDisplaySelection->setEvaluateOnChange(false);// don't need to recompute on change boolDisplaySelection->setHint("Display the selected zone on screen."); boolDisplaySelection->setParent(groupSelection); //clear selection OFX::PushButtonParamDescriptor* resetSelectionButton = desc.definePushButtonParam(kButtonResetSelection); resetSelectionButton->setLabel(kButtonResetSelectionLabel); resetSelectionButton->setHint("Reset user's selection."); resetSelectionButton->setParent(groupSelection); //selection mode OFX::ChoiceParamDescriptor* selectionMode = desc.defineChoiceParam(kSelectionModeListParamLabel); selectionMode->setLabel(kSelectionModeListParamLabel); selectionMode->setHint( "Selection mode \n - unique : reset past selection before selection \n - additive : add pixels to current selection \n -subtractive : remote pixel from current selection"); selectionMode->appendOption(kSelectionModeListParamOpt2); selectionMode->appendOption(kSelectionModeListParamOpt1); selectionMode->appendOption(kSelectionModeListParamOpt3); selectionMode->setParent(groupSelection); } }
/** @brief The describe in context function, passed a plugin descriptor and a context */ void WriteOIIOPluginFactory::describeInContext(OFX::ImageEffectDescriptor &desc, ContextEnum context) { // make some pages and to things in PageParamDescriptor *page = GenericWriterDescribeInContextBegin(desc, context,isVideoStreamPlugin(), /*supportsRGBA =*/true, /*supportsRGB=*/false, /*supportsAlpha=*/false, "reference", "reference"); OFX::ChoiceParamDescriptor* bitDepth = desc.defineChoiceParam(kParamBitDepthName); bitDepth->setLabels(kParamBitDepthLabel, kParamBitDepthLabel, kParamBitDepthLabel); bitDepth->appendOption(kParamBitDepthAuto, kParamBitDepthAutoLabel); bitDepth->appendOption(kParamBitDepth8, kParamBitDepth8Label); bitDepth->appendOption(kParamBitDepth10, kParamBitDepth10Label); bitDepth->appendOption(kParamBitDepth12, kParamBitDepth12Label); bitDepth->appendOption(kParamBitDepth16, kParamBitDepth16Label); bitDepth->appendOption(kParamBitDepth16f, kParamBitDepth16fLabel); bitDepth->appendOption(kParamBitDepth32, kParamBitDepth32Label); bitDepth->appendOption(kParamBitDepth32f, kParamBitDepth32fLabel); bitDepth->appendOption(kParamBitDepth64, kParamBitDepth64Label); bitDepth->appendOption(kParamBitDepth64f, kParamBitDepth64fLabel); bitDepth->setDefault(eTuttlePluginBitDepthAuto); page->addChild(*bitDepth); OFX::BooleanParamDescriptor* premult = desc.defineBooleanParam(kParamPremultipliedName); premult->setLabels(kParamPremultipliedLabel, kParamPremultipliedLabel, kParamPremultipliedLabel); premult->setDefault(false); page->addChild(*premult); OFX::IntParamDescriptor* quality = desc.defineIntParam(kParamOutputQualityName); quality->setLabels(kParamOutputQualityLabel, kParamOutputQualityLabel, kParamOutputQualityLabel); quality->setRange(0, 100); quality->setDisplayRange(0, 100); quality->setDefault(80); page->addChild(*quality); OFX::ChoiceParamDescriptor* orientation = desc.defineChoiceParam(kParamOutputOrientationName); orientation->setLabels(kParamOutputOrientationLabel, kParamOutputOrientationLabel, kParamOutputOrientationLabel); orientation->appendOption(kParamOutputOrientationNormal); orientation->appendOption(kParamOutputOrientationFlop); orientation->appendOption(kParamOutputOrientationR180); orientation->appendOption(kParamOutputOrientationFlip); orientation->appendOption(kParamOutputOrientationTransposed); orientation->appendOption(kParamOutputOrientationR90Clockwise); orientation->appendOption(kParamOutputOrientationTransverse); orientation->appendOption(kParamOutputOrientationR90CounterClockwise); orientation->setDefault(0); page->addChild(*orientation); OFX::ChoiceParamDescriptor* compression = desc.defineChoiceParam(kParamOutputCompressionName); compression->setLabels(kParamOutputCompressionLabel, kParamOutputCompressionLabel, kParamOutputCompressionLabel); compression->setHint(kParamOutputCompressionHint); compression->appendOption(kParamOutputCompressionAuto, kParamOutputCompressionAutoLabel); compression->appendOption(kParamOutputCompressionNone, kParamOutputCompressionNoneLabel); compression->appendOption(kParamOutputCompressionZip, kParamOutputCompressionZipLabel); compression->appendOption(kParamOutputCompressionZips, kParamOutputCompressionZipsLabel); compression->appendOption(kParamOutputCompressionRle, kParamOutputCompressionRleLabel); compression->appendOption(kParamOutputCompressionPiz, kParamOutputCompressionPizLabel); compression->appendOption(kParamOutputCompressionPxr24, kParamOutputCompressionPxr24Label); compression->appendOption(kParamOutputCompressionB44, kParamOutputCompressionB44Label); compression->appendOption(kParamOutputCompressionB44a, kParamOutputCompressionB44aLabel); compression->appendOption(kParamOutputCompressionLZW, kParamOutputCompressionLZWLabel); compression->appendOption(kParamOutputCompressionCCITTRLE, kParamOutputCompressionCCITTRLELabel); compression->appendOption(kParamOutputCompressionPACKBITS, kParamOutputCompressionPACKBITSLabel); compression->setDefault(eParamCompressionAuto); page->addChild(*compression); GenericWriterDescribeInContextEnd(desc, context, page); }