diff --git a/Documentation/build.sh b/Documentation/build.sh index 9c05d371..79483efa 100755 --- a/Documentation/build.sh +++ b/Documentation/build.sh @@ -37,7 +37,7 @@ python genPropertiesReference.py \ > /tmp/ofx-doc-build.out 2>&1 egrep -v "$EXPECTED_ERRS" /tmp/ofx-doc-build.out || true -# Build the Doxygen docs +# Build the Doxygen docs into $TOP/Documentation/doxygen_build EXPECTED_ERRS="malformed hyperlink target|Duplicate explicit|Definition list ends|unable to resolve|could not be resolved" cd ../include doxygen ofx.doxy > /tmp/ofx-doc-build.out 2>&1 diff --git a/Documentation/genPropertiesReference.py b/Documentation/genPropertiesReference.py index 01075e10..0404b98f 100755 --- a/Documentation/genPropertiesReference.py +++ b/Documentation/genPropertiesReference.py @@ -4,67 +4,86 @@ badlyNamedProperties = ["kOfxImageEffectFrameVarying", "kOfxImageEffectPluginRenderThreadSafety"] -def getPropertiesFromDir(sourcePath, recursive, props): +def getPropertiesFromFile(path): + """Get all OpenFX property definitions from C header file. - if os.path.isdir(sourcePath): - files=sorted(os.listdir(sourcePath)) - for f in files: - absF = sourcePath + '/' + f - if not recursive and os.path.isdir(absF): + Uses a heuristic to identify property #define lines: + anything starting with '#define' and containing 'Prop' in the name. + """ + props = set() + with open(path) as f: + try: + lines = f.readlines() + except UnicodeDecodeError as e: + logging.error(f'error reading {path}: {e}') + raise e + for l in lines: + # Detect lines that correspond to a property definition, e.g: + # #define kOfxPropLala "OfxPropLala" + splits=l.split() + if len(splits) < 3: continue - else: - getPropertiesFromDir(absF,recursive,props) - elif os.path.isfile(sourcePath): - ext = os.path.splitext(sourcePath)[1] - if ext.lower() in ('.c', '.cxx', '.cpp', '.h', '.hxx', '.hpp'): - with open(sourcePath) as f: - try: - lines = f.readlines() - except UnicodeDecodeError as e: - print('WARNING: error in', sourcePath, ':') - raise e - for l in lines: - # Detect lines that correspond to a property definition, e.g: - # #define kOfxPropLala "OfxPropLala" - splits=l.split(' ') - if len(splits) != 3: - continue - if splits[0] != '#define': - continue - if 'Prop' in splits[1] and splits[1] != 'kOfxPropertySuite': - #if l.startswith('#define kOfx') and 'Prop' in l: - props.append(splits[1]) - else: - raise ValueError('No such file or directory: %s' % sourcePath) + if splits[0] != '#define': + continue + # ignore these + nonProperties = ('kOfxPropertySuite', + # prop values, not props + 'kOfxImageEffectPropColourManagementNone', + 'kOfxImageEffectPropColourManagementBasic', + 'kOfxImageEffectPropColourManagementCore', + 'kOfxImageEffectPropColourManagementFull', + 'kOfxImageEffectPropColourManagementOCIO', + ) + if splits[1] in nonProperties: + continue + # these are props, as well as anything with Prop in the name + badlyNamedProperties = ("kOfxImageEffectFrameVarying", + "kOfxImageEffectPluginRenderThreadSafety") + if 'Prop' in splits[1] \ + or any(s in splits[1] for s in badlyNamedProperties): + props.add(splits[1]) + return props + +def getPropertiesFromDir(dir): + """ + Recursively get all property definitions from source files in a dir. + """ + + extensions = {'.c', '.h', '.cxx', '.hxx', '.cpp', '.hpp'} + + props = set() + for root, _dirs, files in os.walk(dir): + for file in files: + # Get the file extension + file_extension = os.path.splitext(file)[1] + + if file_extension in extensions: + file_path = os.path.join(root, file) + props |= getPropertiesFromFile(file_path) + return list(props) def main(argv): - recursive=False sourcePath='' outputFile='' try: - opts, args = getopt.getopt(argv,"i:o:r",["sourcePath=","outputFile","recursive"]) + opts, args = getopt.getopt(argv,"i:o:r",["sourcePath=","outputFile"]) for opt,value in opts: if opt == "-i": sourcePath = value elif opt == "-o": outputFile = value - elif opt == "-r": - recursive=True except getopt.GetoptError: sys.exit(1) - props=badlyNamedProperties - getPropertiesFromDir(sourcePath, recursive, props) + props = getPropertiesFromDir(sourcePath) - re='/^#define k[\w_]*Ofx[\w_]*Prop/' with open(outputFile, 'w') as f: f.write('.. _propertiesReference:\n') f.write('Properties Reference\n') f.write('=====================\n') - props.sort() - for p in props: + for p in sorted(props): f.write('.. doxygendefine:: ' + p + '\n\n') if __name__ == "__main__": diff --git a/Documentation/sources/Reference/ofxPropertiesReference.rst b/Documentation/sources/Reference/ofxPropertiesReference.rst index 72e97375..3af257cc 100644 --- a/Documentation/sources/Reference/ofxPropertiesReference.rst +++ b/Documentation/sources/Reference/ofxPropertiesReference.rst @@ -25,6 +25,8 @@ Properties Reference .. doxygendefine:: kOfxImageEffectHostPropIsBackground +.. doxygendefine:: kOfxImageEffectHostPropNativeOrigin + .. doxygendefine:: kOfxImageEffectInstancePropEffectDuration .. doxygendefine:: kOfxImageEffectInstancePropSequentialRender @@ -103,8 +105,12 @@ Properties Reference .. doxygendefine:: kOfxImageEffectPropOpenCLEnabled +.. doxygendefine:: kOfxImageEffectPropOpenCLImage + .. doxygendefine:: kOfxImageEffectPropOpenCLRenderSupported +.. doxygendefine:: kOfxImageEffectPropOpenCLSupported + .. doxygendefine:: kOfxImageEffectPropOpenGLEnabled .. doxygendefine:: kOfxImageEffectPropOpenGLRenderSupported @@ -313,6 +319,8 @@ Properties Reference .. doxygendefine:: kOfxParamPropShowTimeMarker +.. doxygendefine:: kOfxParamPropStringFilePathExists + .. doxygendefine:: kOfxParamPropStringMode .. doxygendefine:: kOfxParamPropType diff --git a/Support/Plugins/Tester/Tester.cpp b/Support/Plugins/Tester/Tester.cpp index 9ede6917..8bf3682f 100644 --- a/Support/Plugins/Tester/Tester.cpp +++ b/Support/Plugins/Tester/Tester.cpp @@ -16,6 +16,9 @@ #include "ofxsMultiThread.h" #include "ofxsInteract.h" +#include "ofxPropsBySet.h" +#include "ofxPropsMetadata.h" + #include "../include/ofxsProcessing.H" static const OfxPointD kBoxSize = {5, 5}; diff --git a/Support/include/ofxPropsBySet.h b/Support/include/ofxPropsBySet.h new file mode 100644 index 00000000..d543d253 --- /dev/null +++ b/Support/include/ofxPropsBySet.h @@ -0,0 +1,774 @@ +// Copyright OpenFX and contributors to the OpenFX project. +// SPDX-License-Identifier: BSD-3-Clause +// NOTE: This file is auto-generated by gen-props.py. DO NOT EDIT. + +#pragma once + +#include +#include +#include +#include +#include "ofxImageEffect.h" +#include "ofxGPURender.h" +#include "ofxColour.h" +#include "ofxDrawSuite.h" +#include "ofxParametricParam.h" +#include "ofxKeySyms.h" +// #include "ofxOld.h" + +namespace OpenFX { + +struct Prop { + const char *name; + bool host_write; + bool plugin_write; + bool host_optional; +}; + +// Properties for property sets +static inline const std::map> prop_sets { +{ "ClipDescriptor", { { "OfxPropType", false , true, false }, + { "OfxPropName", false , true, false }, + { "OfxPropLabel", false , true, false }, + { "OfxPropShortLabel", false , true, false }, + { "OfxPropLongLabel", false , true, false }, + { "OfxImageEffectPropSupportedComponents", false , true, false }, + { "OfxImageEffectPropTemporalClipAccess", false , true, false }, + { "OfxImageClipPropOptional", false , true, false }, + { "OfxImageClipPropFieldExtraction", false , true, false }, + { "OfxImageClipPropIsMask", false , true, false }, + { "OfxImageEffectPropSupportsTiles", false , true, false } } }, +{ "ClipInstance", { { "OfxPropType", true , false, false }, + { "OfxPropName", true , false, false }, + { "OfxPropLabel", true , false, false }, + { "OfxPropShortLabel", true , false, false }, + { "OfxPropLongLabel", true , false, false }, + { "OfxImageEffectPropSupportedComponents", true , false, false }, + { "OfxImageEffectPropTemporalClipAccess", true , false, false }, + { "OfxImageClipPropColourspace", true , false, false }, + { "OfxImageClipPropPreferredColourspaces", true , false, false }, + { "OfxImageClipPropOptional", true , false, false }, + { "OfxImageClipPropFieldExtraction", true , false, false }, + { "OfxImageClipPropIsMask", true , false, false }, + { "OfxImageEffectPropSupportsTiles", true , false, false }, + { "OfxImageEffectPropPixelDepth", true , false, false }, + { "OfxImageEffectPropComponents", true , false, false }, + { "OfxImageClipPropUnmappedPixelDepth", true , false, false }, + { "OfxImageClipPropUnmappedComponents", true , false, false }, + { "OfxImageEffectPropPreMultiplication", true , false, false }, + { "OfxImagePropPixelAspectRatio", true , false, false }, + { "OfxImageEffectPropFrameRate", true , false, false }, + { "OfxImageEffectPropFrameRange", true , false, false }, + { "OfxImageClipPropFieldOrder", true , false, false }, + { "OfxImageClipPropConnected", true , false, false }, + { "OfxImageEffectPropUnmappedFrameRange", true , false, false }, + { "OfxImageEffectPropUnmappedFrameRate", true , false, false }, + { "OfxImageClipPropContinuousSamples", true , false, false } } }, +{ "EffectDescriptor", { { "OfxPropType", false , true, false }, + { "OfxPropLabel", false , true, false }, + { "OfxPropShortLabel", false , true, false }, + { "OfxPropLongLabel", false , true, false }, + { "OfxPropVersion", false , true, false }, + { "OfxPropVersionLabel", false , true, false }, + { "OfxPropPluginDescription", false , true, false }, + { "OfxImageEffectPropSupportedContexts", false , true, false }, + { "OfxImageEffectPluginPropGrouping", false , true, false }, + { "OfxImageEffectPluginPropSingleInstance", false , true, false }, + { "OfxImageEffectPluginRenderThreadSafety", false , true, false }, + { "OfxImageEffectPluginPropHostFrameThreading", false , true, false }, + { "OfxImageEffectPluginPropOverlayInteractV1", false , true, false }, + { "OfxImageEffectPropSupportsMultiResolution", false , true, false }, + { "OfxImageEffectPropSupportsTiles", false , true, false }, + { "OfxImageEffectPropTemporalClipAccess", false , true, false }, + { "OfxImageEffectPropSupportedPixelDepths", false , true, false }, + { "OfxImageEffectPluginPropFieldRenderTwiceAlways", false , true, false }, + { "OfxImageEffectPropMultipleClipDepths", false , true, false }, + { "OfxImageEffectPropSupportsMultipleClipPARs", false , true, false }, + { "OfxImageEffectPluginRenderThreadSafety", false , true, false }, + { "OfxImageEffectPropClipPreferencesSlaveParam", false , true, false }, + { "OfxImageEffectPropOpenGLRenderSupported", false , true, false }, + { "OfxPluginPropFilePath", true , false, false }, + { "OfxOpenGLPropPixelDepth", false , true, false }, + { "OfxImageEffectPluginPropOverlayInteractV2", false , true, false }, + { "OfxImageEffectPropColourManagementAvailableConfigs", false , true, false }, + { "OfxImageEffectPropColourManagementStyle", false , true, false } } }, +{ "EffectInstance", { { "OfxPropType", true , false, false }, + { "OfxImageEffectPropContext", true , false, false }, + { "OfxPropInstanceData", true , false, false }, + { "OfxImageEffectPropProjectSize", true , false, false }, + { "OfxImageEffectPropProjectOffset", true , false, false }, + { "OfxImageEffectPropProjectExtent", true , false, false }, + { "OfxImageEffectPropPixelAspectRatio", true , false, false }, + { "OfxImageEffectInstancePropEffectDuration", true , false, false }, + { "OfxImageEffectInstancePropSequentialRender", true , false, false }, + { "OfxImageEffectPropSupportsTiles", true , false, false }, + { "OfxImageEffectPropOpenGLRenderSupported", true , false, false }, + { "OfxImageEffectPropFrameRate", true , false, false }, + { "OfxPropIsInteractive", true , false, false }, + { "OfxImageEffectPropOCIOConfig", true , false, false }, + { "OfxImageEffectPropOCIODisplay", true , false, false }, + { "OfxImageEffectPropOCIOView", true , false, false }, + { "OfxImageEffectPropColourManagementConfig", true , false, false }, + { "OfxImageEffectPropColourManagementStyle", true , false, false }, + { "OfxImageEffectPropDisplayColourspace", true , false, false }, + { "OfxImageEffectPropPluginHandle", true , false, false } } }, +{ "Image", { { "OfxPropType", true , false, false }, + { "OfxImageEffectPropPixelDepth", true , false, false }, + { "OfxImageEffectPropComponents", true , false, false }, + { "OfxImageEffectPropPreMultiplication", true , false, false }, + { "OfxImageEffectPropRenderScale", true , false, false }, + { "OfxImagePropPixelAspectRatio", true , false, false }, + { "OfxImagePropData", true , false, false }, + { "OfxImagePropBounds", true , false, false }, + { "OfxImagePropRegionOfDefinition", true , false, false }, + { "OfxImagePropRowBytes", true , false, false }, + { "OfxImagePropField", true , false, false }, + { "OfxImagePropUniqueIdentifier", true , false, false } } }, +{ "ImageEffectHost", { { "OfxPropAPIVersion", true , false, false }, + { "OfxPropType", true , false, false }, + { "OfxPropName", true , false, false }, + { "OfxPropLabel", true , false, false }, + { "OfxPropVersion", true , false, false }, + { "OfxPropVersionLabel", true , false, false }, + { "OfxImageEffectHostPropIsBackground", true , false, false }, + { "OfxImageEffectPropSupportsOverlays", true , false, false }, + { "OfxImageEffectPropSupportsMultiResolution", true , false, false }, + { "OfxImageEffectPropSupportsTiles", true , false, false }, + { "OfxImageEffectPropTemporalClipAccess", true , false, false }, + { "OfxImageEffectPropSupportedComponents", true , false, false }, + { "OfxImageEffectPropSupportedContexts", true , false, false }, + { "OfxImageEffectPropMultipleClipDepths", true , false, false }, + { "OfxImageEffectPropSupportsMultipleClipPARs", true , false, false }, + { "OfxImageEffectPropSetableFrameRate", true , false, false }, + { "OfxImageEffectPropSetableFielding", true , false, false }, + { "OfxParamHostPropSupportsCustomInteract", true , false, false }, + { "OfxParamHostPropSupportsStringAnimation", true , false, false }, + { "OfxParamHostPropSupportsChoiceAnimation", true , false, false }, + { "OfxParamHostPropSupportsBooleanAnimation", true , false, false }, + { "OfxParamHostPropSupportsCustomAnimation", true , false, false }, + { "OfxParamHostPropSupportsStrChoice", true , false, false }, + { "OfxParamHostPropSupportsStrChoiceAnimation", true , false, false }, + { "OfxParamHostPropMaxParameters", true , false, false }, + { "OfxParamHostPropMaxPages", true , false, false }, + { "OfxParamHostPropPageRowColumnCount", true , false, false }, + { "OfxPropHostOSHandle", true , false, false }, + { "OfxParamHostPropSupportsParametricAnimation", true , false, false }, + { "OfxImageEffectInstancePropSequentialRender", true , false, false }, + { "OfxImageEffectPropOpenGLRenderSupported", true , false, false }, + { "OfxImageEffectPropRenderQualityDraft", true , false, false }, + { "OfxImageEffectHostPropNativeOrigin", true , false, false }, + { "OfxImageEffectPropColourManagementAvailableConfigs", true , false, false }, + { "OfxImageEffectPropColourManagementStyle", true , false, false } } }, +{ "InteractDescriptor", { { "OfxInteractPropHasAlpha", true , false, false }, + { "OfxInteractPropBitDepth", true , false, false } } }, +{ "InteractInstance", { { "OfxPropEffectInstance", true , false, false }, + { "OfxPropInstanceData", true , false, false }, + { "OfxInteractPropPixelScale", true , false, false }, + { "OfxInteractPropBackgroundColour", true , false, false }, + { "OfxInteractPropHasAlpha", true , false, false }, + { "OfxInteractPropBitDepth", true , false, false }, + { "OfxInteractPropSlaveToParam", true , false, false }, + { "OfxInteractPropSuggestedColour", true , false, false } } }, +{ "ParamDouble1D", { { "OfxParamPropShowTimeMarker", false , true, false }, + { "OfxParamPropDoubleType", false , true, false }, + { "OfxPropType", false , true, false }, + { "OfxPropName", false , true, false }, + { "OfxPropLabel", false , true, false }, + { "OfxPropShortLabel", false , true, false }, + { "OfxPropLongLabel", false , true, false }, + { "OfxParamPropType", false , true, false }, + { "OfxParamPropSecret", false , true, false }, + { "OfxParamPropHint", false , true, false }, + { "OfxParamPropScriptName", false , true, false }, + { "OfxParamPropParent", false , true, false }, + { "OfxParamPropEnabled", false , true, false }, + { "OfxParamPropDataPtr", false , true, false }, + { "OfxPropIcon", false , true, false }, + { "OfxParamPropInteractV1", false , true, false }, + { "OfxParamPropInteractSize", false , true, false }, + { "OfxParamPropInteractSizeAspect", false , true, false }, + { "OfxParamPropInteractMinimumSize", false , true, false }, + { "OfxParamPropInteractPreferedSize", false , true, false }, + { "OfxParamPropHasHostOverlayHandle", false , true, false }, + { "kOfxParamPropUseHostOverlayHandle", false , true, false }, + { "OfxParamPropDefault", false , true, false }, + { "OfxParamPropAnimates", false , true, false }, + { "OfxParamPropIsAnimating", true , false, false }, + { "OfxParamPropIsAutoKeying", true , false, false }, + { "OfxParamPropPersistant", false , true, false }, + { "OfxParamPropEvaluateOnChange", false , true, false }, + { "OfxParamPropPluginMayWrite", false , true, false }, + { "OfxParamPropCacheInvalidation", false , true, false }, + { "OfxParamPropCanUndo", false , true, false }, + { "OfxParamPropMin", false , true, false }, + { "OfxParamPropMax", false , true, false }, + { "OfxParamPropDisplayMin", false , true, false }, + { "OfxParamPropDisplayMax", false , true, false }, + { "OfxParamPropIncrement", false , true, false }, + { "OfxParamPropDigits", false , true, false } } }, +{ "ParameterSet", { { "OfxPropParamSetNeedsSyncing", false , true, false }, + { "OfxPluginPropParamPageOrder", false , true, false } } }, +{ "ParamsByte", { { "OfxPropType", false , true, false }, + { "OfxPropName", false , true, false }, + { "OfxPropLabel", false , true, false }, + { "OfxPropShortLabel", false , true, false }, + { "OfxPropLongLabel", false , true, false }, + { "OfxParamPropType", false , true, false }, + { "OfxParamPropSecret", false , true, false }, + { "OfxParamPropHint", false , true, false }, + { "OfxParamPropScriptName", false , true, false }, + { "OfxParamPropParent", false , true, false }, + { "OfxParamPropEnabled", false , true, false }, + { "OfxParamPropDataPtr", false , true, false }, + { "OfxPropIcon", false , true, false }, + { "OfxParamPropInteractV1", false , true, false }, + { "OfxParamPropInteractSize", false , true, false }, + { "OfxParamPropInteractSizeAspect", false , true, false }, + { "OfxParamPropInteractMinimumSize", false , true, false }, + { "OfxParamPropInteractPreferedSize", false , true, false }, + { "OfxParamPropHasHostOverlayHandle", false , true, false }, + { "kOfxParamPropUseHostOverlayHandle", false , true, false }, + { "OfxParamPropDefault", false , true, false }, + { "OfxParamPropAnimates", false , true, false }, + { "OfxParamPropIsAnimating", true , false, false }, + { "OfxParamPropIsAutoKeying", true , false, false }, + { "OfxParamPropPersistant", false , true, false }, + { "OfxParamPropEvaluateOnChange", false , true, false }, + { "OfxParamPropPluginMayWrite", false , true, false }, + { "OfxParamPropCacheInvalidation", false , true, false }, + { "OfxParamPropCanUndo", false , true, false }, + { "OfxParamPropMin", false , true, false }, + { "OfxParamPropMax", false , true, false }, + { "OfxParamPropDisplayMin", false , true, false }, + { "OfxParamPropDisplayMax", false , true, false } } }, +{ "ParamsChoice", { { "OfxParamPropChoiceOption", false , true, false }, + { "OfxParamPropChoiceOrder", false , true, false }, + { "OfxPropType", false , true, false }, + { "OfxPropName", false , true, false }, + { "OfxPropLabel", false , true, false }, + { "OfxPropShortLabel", false , true, false }, + { "OfxPropLongLabel", false , true, false }, + { "OfxParamPropType", false , true, false }, + { "OfxParamPropSecret", false , true, false }, + { "OfxParamPropHint", false , true, false }, + { "OfxParamPropScriptName", false , true, false }, + { "OfxParamPropParent", false , true, false }, + { "OfxParamPropEnabled", false , true, false }, + { "OfxParamPropDataPtr", false , true, false }, + { "OfxPropIcon", false , true, false }, + { "OfxParamPropInteractV1", false , true, false }, + { "OfxParamPropInteractSize", false , true, false }, + { "OfxParamPropInteractSizeAspect", false , true, false }, + { "OfxParamPropInteractMinimumSize", false , true, false }, + { "OfxParamPropInteractPreferedSize", false , true, false }, + { "OfxParamPropHasHostOverlayHandle", false , true, false }, + { "kOfxParamPropUseHostOverlayHandle", false , true, false }, + { "OfxParamPropDefault", false , true, false }, + { "OfxParamPropAnimates", false , true, false }, + { "OfxParamPropIsAnimating", true , false, false }, + { "OfxParamPropIsAutoKeying", true , false, false }, + { "OfxParamPropPersistant", false , true, false }, + { "OfxParamPropEvaluateOnChange", false , true, false }, + { "OfxParamPropPluginMayWrite", false , true, false }, + { "OfxParamPropCacheInvalidation", false , true, false }, + { "OfxParamPropCanUndo", false , true, false } } }, +{ "ParamsCustom", { { "OfxParamPropCustomCallbackV1", false , true, false }, + { "OfxPropType", false , true, false }, + { "OfxPropName", false , true, false }, + { "OfxPropLabel", false , true, false }, + { "OfxPropShortLabel", false , true, false }, + { "OfxPropLongLabel", false , true, false }, + { "OfxParamPropType", false , true, false }, + { "OfxParamPropSecret", false , true, false }, + { "OfxParamPropHint", false , true, false }, + { "OfxParamPropScriptName", false , true, false }, + { "OfxParamPropParent", false , true, false }, + { "OfxParamPropEnabled", false , true, false }, + { "OfxParamPropDataPtr", false , true, false }, + { "OfxPropIcon", false , true, false }, + { "OfxParamPropInteractV1", false , true, false }, + { "OfxParamPropInteractSize", false , true, false }, + { "OfxParamPropInteractSizeAspect", false , true, false }, + { "OfxParamPropInteractMinimumSize", false , true, false }, + { "OfxParamPropInteractPreferedSize", false , true, false }, + { "OfxParamPropHasHostOverlayHandle", false , true, false }, + { "kOfxParamPropUseHostOverlayHandle", false , true, false }, + { "OfxParamPropDefault", false , true, false }, + { "OfxParamPropAnimates", false , true, false }, + { "OfxParamPropIsAnimating", true , false, false }, + { "OfxParamPropIsAutoKeying", true , false, false }, + { "OfxParamPropPersistant", false , true, false }, + { "OfxParamPropEvaluateOnChange", false , true, false }, + { "OfxParamPropPluginMayWrite", false , true, false }, + { "OfxParamPropCacheInvalidation", false , true, false }, + { "OfxParamPropCanUndo", false , true, false } } }, +{ "ParamsDouble2D3D", { { "OfxParamPropDoubleType", false , true, false }, + { "OfxPropType", false , true, false }, + { "OfxPropName", false , true, false }, + { "OfxPropLabel", false , true, false }, + { "OfxPropShortLabel", false , true, false }, + { "OfxPropLongLabel", false , true, false }, + { "OfxParamPropType", false , true, false }, + { "OfxParamPropSecret", false , true, false }, + { "OfxParamPropHint", false , true, false }, + { "OfxParamPropScriptName", false , true, false }, + { "OfxParamPropParent", false , true, false }, + { "OfxParamPropEnabled", false , true, false }, + { "OfxParamPropDataPtr", false , true, false }, + { "OfxPropIcon", false , true, false }, + { "OfxParamPropInteractV1", false , true, false }, + { "OfxParamPropInteractSize", false , true, false }, + { "OfxParamPropInteractSizeAspect", false , true, false }, + { "OfxParamPropInteractMinimumSize", false , true, false }, + { "OfxParamPropInteractPreferedSize", false , true, false }, + { "OfxParamPropHasHostOverlayHandle", false , true, false }, + { "kOfxParamPropUseHostOverlayHandle", false , true, false }, + { "OfxParamPropDefault", false , true, false }, + { "OfxParamPropAnimates", false , true, false }, + { "OfxParamPropIsAnimating", true , false, false }, + { "OfxParamPropIsAutoKeying", true , false, false }, + { "OfxParamPropPersistant", false , true, false }, + { "OfxParamPropEvaluateOnChange", false , true, false }, + { "OfxParamPropPluginMayWrite", false , true, false }, + { "OfxParamPropCacheInvalidation", false , true, false }, + { "OfxParamPropCanUndo", false , true, false }, + { "OfxParamPropMin", false , true, false }, + { "OfxParamPropMax", false , true, false }, + { "OfxParamPropDisplayMin", false , true, false }, + { "OfxParamPropDisplayMax", false , true, false }, + { "OfxParamPropIncrement", false , true, false }, + { "OfxParamPropDigits", false , true, false } } }, +{ "ParamsGroup", { { "OfxParamPropGroupOpen", false , true, false }, + { "OfxPropType", false , true, false }, + { "OfxPropName", false , true, false }, + { "OfxPropLabel", false , true, false }, + { "OfxPropShortLabel", false , true, false }, + { "OfxPropLongLabel", false , true, false }, + { "OfxParamPropType", false , true, false }, + { "OfxParamPropSecret", false , true, false }, + { "OfxParamPropHint", false , true, false }, + { "OfxParamPropScriptName", false , true, false }, + { "OfxParamPropParent", false , true, false }, + { "OfxParamPropEnabled", false , true, false }, + { "OfxParamPropDataPtr", false , true, false }, + { "OfxPropIcon", false , true, false } } }, +{ "ParamsInt2D3D", { { "OfxParamPropDimensionLabel", false , true, false }, + { "OfxPropType", false , true, false }, + { "OfxPropName", false , true, false }, + { "OfxPropLabel", false , true, false }, + { "OfxPropShortLabel", false , true, false }, + { "OfxPropLongLabel", false , true, false }, + { "OfxParamPropType", false , true, false }, + { "OfxParamPropSecret", false , true, false }, + { "OfxParamPropHint", false , true, false }, + { "OfxParamPropScriptName", false , true, false }, + { "OfxParamPropParent", false , true, false }, + { "OfxParamPropEnabled", false , true, false }, + { "OfxParamPropDataPtr", false , true, false }, + { "OfxPropIcon", false , true, false }, + { "OfxParamPropInteractV1", false , true, false }, + { "OfxParamPropInteractSize", false , true, false }, + { "OfxParamPropInteractSizeAspect", false , true, false }, + { "OfxParamPropInteractMinimumSize", false , true, false }, + { "OfxParamPropInteractPreferedSize", false , true, false }, + { "OfxParamPropHasHostOverlayHandle", false , true, false }, + { "kOfxParamPropUseHostOverlayHandle", false , true, false }, + { "OfxParamPropDefault", false , true, false }, + { "OfxParamPropAnimates", false , true, false }, + { "OfxParamPropIsAnimating", true , false, false }, + { "OfxParamPropIsAutoKeying", true , false, false }, + { "OfxParamPropPersistant", false , true, false }, + { "OfxParamPropEvaluateOnChange", false , true, false }, + { "OfxParamPropPluginMayWrite", false , true, false }, + { "OfxParamPropCacheInvalidation", false , true, false }, + { "OfxParamPropCanUndo", false , true, false }, + { "OfxParamPropMin", false , true, false }, + { "OfxParamPropMax", false , true, false }, + { "OfxParamPropDisplayMin", false , true, false }, + { "OfxParamPropDisplayMax", false , true, false } } }, +{ "ParamsNormalizedSpatial", { { "OfxParamPropDefaultCoordinateSystem", false , true, false }, + { "OfxPropType", false , true, false }, + { "OfxPropName", false , true, false }, + { "OfxPropLabel", false , true, false }, + { "OfxPropShortLabel", false , true, false }, + { "OfxPropLongLabel", false , true, false }, + { "OfxParamPropType", false , true, false }, + { "OfxParamPropSecret", false , true, false }, + { "OfxParamPropHint", false , true, false }, + { "OfxParamPropScriptName", false , true, false }, + { "OfxParamPropParent", false , true, false }, + { "OfxParamPropEnabled", false , true, false }, + { "OfxParamPropDataPtr", false , true, false }, + { "OfxPropIcon", false , true, false }, + { "OfxParamPropInteractV1", false , true, false }, + { "OfxParamPropInteractSize", false , true, false }, + { "OfxParamPropInteractSizeAspect", false , true, false }, + { "OfxParamPropInteractMinimumSize", false , true, false }, + { "OfxParamPropInteractPreferedSize", false , true, false }, + { "OfxParamPropHasHostOverlayHandle", false , true, false }, + { "kOfxParamPropUseHostOverlayHandle", false , true, false }, + { "OfxParamPropDefault", false , true, false }, + { "OfxParamPropAnimates", false , true, false }, + { "OfxParamPropIsAnimating", true , false, false }, + { "OfxParamPropIsAutoKeying", true , false, false }, + { "OfxParamPropPersistant", false , true, false }, + { "OfxParamPropEvaluateOnChange", false , true, false }, + { "OfxParamPropPluginMayWrite", false , true, false }, + { "OfxParamPropCacheInvalidation", false , true, false }, + { "OfxParamPropCanUndo", false , true, false }, + { "OfxParamPropMin", false , true, false }, + { "OfxParamPropMax", false , true, false }, + { "OfxParamPropDisplayMin", false , true, false }, + { "OfxParamPropDisplayMax", false , true, false }, + { "OfxParamPropIncrement", false , true, false }, + { "OfxParamPropDigits", false , true, false } } }, +{ "ParamsPage", { { "OfxParamPropPageChild", false , true, false }, + { "OfxPropType", false , true, false }, + { "OfxPropName", false , true, false }, + { "OfxPropLabel", false , true, false }, + { "OfxPropShortLabel", false , true, false }, + { "OfxPropLongLabel", false , true, false }, + { "OfxParamPropType", false , true, false }, + { "OfxParamPropSecret", false , true, false }, + { "OfxParamPropHint", false , true, false }, + { "OfxParamPropScriptName", false , true, false }, + { "OfxParamPropParent", false , true, false }, + { "OfxParamPropEnabled", false , true, false }, + { "OfxParamPropDataPtr", false , true, false }, + { "OfxPropIcon", false , true, false } } }, +{ "ParamsParametric", { { "OfxParamPropAnimates", false , true, false }, + { "OfxParamPropIsAnimating", false , true, false }, + { "OfxParamPropIsAutoKeying", false , true, false }, + { "OfxParamPropPersistant", false , true, false }, + { "OfxParamPropEvaluateOnChange", false , true, false }, + { "OfxParamPropPluginMayWrite", false , true, false }, + { "OfxParamPropCacheInvalidation", false , true, false }, + { "OfxParamPropCanUndo", false , true, false }, + { "OfxParamPropParametricDimension", false , true, false }, + { "OfxParamPropParametricUIColour", false , true, false }, + { "OfxParamPropParametricInteractBackground", false , true, false }, + { "OfxParamPropParametricRange", false , true, false }, + { "OfxPropType", false , true, false }, + { "OfxPropName", false , true, false }, + { "OfxPropLabel", false , true, false }, + { "OfxPropShortLabel", false , true, false }, + { "OfxPropLongLabel", false , true, false }, + { "OfxParamPropType", false , true, false }, + { "OfxParamPropSecret", false , true, false }, + { "OfxParamPropHint", false , true, false }, + { "OfxParamPropScriptName", false , true, false }, + { "OfxParamPropParent", false , true, false }, + { "OfxParamPropEnabled", false , true, false }, + { "OfxParamPropDataPtr", false , true, false }, + { "OfxPropIcon", false , true, false }, + { "OfxParamPropInteractV1", false , true, false }, + { "OfxParamPropInteractSize", false , true, false }, + { "OfxParamPropInteractSizeAspect", false , true, false }, + { "OfxParamPropInteractMinimumSize", false , true, false }, + { "OfxParamPropInteractPreferedSize", false , true, false }, + { "OfxParamPropHasHostOverlayHandle", false , true, false }, + { "kOfxParamPropUseHostOverlayHandle", false , true, false }, + { "OfxParamPropDefault", false , true, false }, + { "OfxParamPropAnimates", false , true, false }, + { "OfxParamPropIsAnimating", true , false, false }, + { "OfxParamPropIsAutoKeying", true , false, false }, + { "OfxParamPropPersistant", false , true, false }, + { "OfxParamPropEvaluateOnChange", false , true, false }, + { "OfxParamPropPluginMayWrite", false , true, false }, + { "OfxParamPropCacheInvalidation", false , true, false }, + { "OfxParamPropCanUndo", false , true, false } } }, +{ "ParamsStrChoice", { { "OfxParamPropChoiceOption", false , true, false }, + { "OfxParamPropChoiceEnum", false , true, false }, + { "OfxPropType", false , true, false }, + { "OfxPropName", false , true, false }, + { "OfxPropLabel", false , true, false }, + { "OfxPropShortLabel", false , true, false }, + { "OfxPropLongLabel", false , true, false }, + { "OfxParamPropType", false , true, false }, + { "OfxParamPropSecret", false , true, false }, + { "OfxParamPropHint", false , true, false }, + { "OfxParamPropScriptName", false , true, false }, + { "OfxParamPropParent", false , true, false }, + { "OfxParamPropEnabled", false , true, false }, + { "OfxParamPropDataPtr", false , true, false }, + { "OfxPropIcon", false , true, false }, + { "OfxParamPropInteractV1", false , true, false }, + { "OfxParamPropInteractSize", false , true, false }, + { "OfxParamPropInteractSizeAspect", false , true, false }, + { "OfxParamPropInteractMinimumSize", false , true, false }, + { "OfxParamPropInteractPreferedSize", false , true, false }, + { "OfxParamPropHasHostOverlayHandle", false , true, false }, + { "kOfxParamPropUseHostOverlayHandle", false , true, false }, + { "OfxParamPropDefault", false , true, false }, + { "OfxParamPropAnimates", false , true, false }, + { "OfxParamPropIsAnimating", true , false, false }, + { "OfxParamPropIsAutoKeying", true , false, false }, + { "OfxParamPropPersistant", false , true, false }, + { "OfxParamPropEvaluateOnChange", false , true, false }, + { "OfxParamPropPluginMayWrite", false , true, false }, + { "OfxParamPropCacheInvalidation", false , true, false }, + { "OfxParamPropCanUndo", false , true, false } } }, +{ "ParamsString", { { "OfxParamPropStringMode", false , true, false }, + { "OfxParamPropStringFilePathExists", false , true, false }, + { "OfxPropType", false , true, false }, + { "OfxPropName", false , true, false }, + { "OfxPropLabel", false , true, false }, + { "OfxPropShortLabel", false , true, false }, + { "OfxPropLongLabel", false , true, false }, + { "OfxParamPropType", false , true, false }, + { "OfxParamPropSecret", false , true, false }, + { "OfxParamPropHint", false , true, false }, + { "OfxParamPropScriptName", false , true, false }, + { "OfxParamPropParent", false , true, false }, + { "OfxParamPropEnabled", false , true, false }, + { "OfxParamPropDataPtr", false , true, false }, + { "OfxPropIcon", false , true, false }, + { "OfxParamPropInteractV1", false , true, false }, + { "OfxParamPropInteractSize", false , true, false }, + { "OfxParamPropInteractSizeAspect", false , true, false }, + { "OfxParamPropInteractMinimumSize", false , true, false }, + { "OfxParamPropInteractPreferedSize", false , true, false }, + { "OfxParamPropHasHostOverlayHandle", false , true, false }, + { "kOfxParamPropUseHostOverlayHandle", false , true, false }, + { "OfxParamPropDefault", false , true, false }, + { "OfxParamPropAnimates", false , true, false }, + { "OfxParamPropIsAnimating", true , false, false }, + { "OfxParamPropIsAutoKeying", true , false, false }, + { "OfxParamPropPersistant", false , true, false }, + { "OfxParamPropEvaluateOnChange", false , true, false }, + { "OfxParamPropPluginMayWrite", false , true, false }, + { "OfxParamPropCacheInvalidation", false , true, false }, + { "OfxParamPropCanUndo", false , true, false }, + { "OfxParamPropMin", false , true, false }, + { "OfxParamPropMax", false , true, false }, + { "OfxParamPropDisplayMin", false , true, false }, + { "OfxParamPropDisplayMax", false , true, false } } }, +}; + +// Actions +static inline const std::array actions { + "CustomParamInterpFunc", + "OfxActionBeginInstanceChanged", + "OfxActionBeginInstanceEdit", + "OfxActionCreateInstance", + "OfxActionDescribe", + "OfxActionDestroyInstance", + "OfxActionEndInstanceChanged", + "OfxActionEndInstanceEdit", + "OfxActionInstanceChanged", + "OfxActionLoad", + "OfxActionPurgeCaches", + "OfxActionSyncPrivateData", + "OfxActionUnload", + "OfxImageEffectActionBeginSequenceRender", + "OfxImageEffectActionDescribeInContext", + "OfxImageEffectActionEndSequenceRender", + "OfxImageEffectActionGetClipPreferences", + "OfxImageEffectActionGetFramesNeeded", + "OfxImageEffectActionGetOutputColourspace", + "OfxImageEffectActionGetRegionOfDefinition", + "OfxImageEffectActionGetRegionsOfInterest", + "OfxImageEffectActionGetTimeDomain", + "OfxImageEffectActionIsIdentity", + "OfxImageEffectActionRender", + "OfxInteractActionDraw", + "OfxInteractActionGainFocus", + "OfxInteractActionKeyDown", + "OfxInteractActionKeyRepeat", + "OfxInteractActionKeyUp", + "OfxInteractActionLoseFocus", + "OfxInteractActionPenDown", + "OfxInteractActionPenMotion", + "OfxInteractActionPenUp", +}; + +// Properties for action args +static inline const std::map, std::vector> action_props { +{ { "CustomParamInterpFunc", "inArgs" }, { "OfxParamPropCustomValue", + "OfxParamPropInterpolationAmount", + "OfxParamPropInterpolationTime" } }, +{ { "CustomParamInterpFunc", "outArgs" }, { "OfxParamPropCustomValue", + "OfxParamPropInterpolationTime" } }, +{ { "OfxActionBeginInstanceChanged", "inArgs" }, { "OfxPropChangeReason" } }, +{ { "OfxActionEndInstanceChanged", "inArgs" }, { "OfxPropChangeReason" } }, +{ { "OfxActionInstanceChanged", "inArgs" }, { "OfxImageEffectPropRenderScale", + "OfxPropChangeReason", + "OfxPropName", + "OfxPropTime", + "OfxPropType" } }, +{ { "OfxImageEffectActionBeginSequenceRender", "inArgs" }, { "OfxImageEffectPropCudaEnabled", + "OfxImageEffectPropCudaRenderSupported", + "OfxImageEffectPropCudaStream", + "OfxImageEffectPropCudaStreamSupported", + "OfxImageEffectPropFrameRange", + "OfxImageEffectPropFrameStep", + "OfxImageEffectPropInteractiveRenderStatus", + "OfxImageEffectPropInteractiveRenderStatus", + "OfxImageEffectPropMetalCommandQueue", + "OfxImageEffectPropMetalEnabled", + "OfxImageEffectPropMetalRenderSupported", + "OfxImageEffectPropOpenCLCommandQueue", + "OfxImageEffectPropOpenCLEnabled", + "OfxImageEffectPropOpenCLImage", + "OfxImageEffectPropOpenCLRenderSupported", + "OfxImageEffectPropOpenCLSupported", + "OfxImageEffectPropOpenGLEnabled", + "OfxImageEffectPropOpenGLTextureIndex", + "OfxImageEffectPropOpenGLTextureTarget", + "OfxImageEffectPropRenderScale", + "OfxImageEffectPropSequentialRenderStatus", + "OfxPropIsInteractive" } }, +{ { "OfxImageEffectActionDescribeInContext", "inArgs" }, { "OfxImageEffectPropContext" } }, +{ { "OfxImageEffectActionEndSequenceRender", "inArgs" }, { "OfxImageEffectPropCudaEnabled", + "OfxImageEffectPropCudaRenderSupported", + "OfxImageEffectPropCudaStream", + "OfxImageEffectPropCudaStreamSupported", + "OfxImageEffectPropFrameRange", + "OfxImageEffectPropFrameStep", + "OfxImageEffectPropInteractiveRenderStatus", + "OfxImageEffectPropInteractiveRenderStatus", + "OfxImageEffectPropMetalCommandQueue", + "OfxImageEffectPropMetalEnabled", + "OfxImageEffectPropMetalRenderSupported", + "OfxImageEffectPropOpenCLCommandQueue", + "OfxImageEffectPropOpenCLEnabled", + "OfxImageEffectPropOpenCLImage", + "OfxImageEffectPropOpenCLRenderSupported", + "OfxImageEffectPropOpenCLSupported", + "OfxImageEffectPropOpenGLEnabled", + "OfxImageEffectPropOpenGLTextureIndex", + "OfxImageEffectPropOpenGLTextureTarget", + "OfxImageEffectPropRenderScale", + "OfxImageEffectPropSequentialRenderStatus", + "OfxPropIsInteractive" } }, +{ { "OfxImageEffectActionGetClipPreferences", "outArgs" }, { "OfxImageClipPropContinuousSamples", + "OfxImageClipPropFieldOrder", + "OfxImageEffectFrameVarying", + "OfxImageEffectPropFrameRate", + "OfxImageEffectPropPreMultiplication" } }, +{ { "OfxImageEffectActionGetFramesNeeded", "inArgs" }, { "OfxPropTime" } }, +{ { "OfxImageEffectActionGetFramesNeeded", "outArgs" }, { "OfxImageEffectPropFrameRange" } }, +{ { "OfxImageEffectActionGetOutputColourspace", "inArgs" }, { "OfxImageClipPropPreferredColourspaces" } }, +{ { "OfxImageEffectActionGetOutputColourspace", "outArgs" }, { "OfxImageClipPropColourspace" } }, +{ { "OfxImageEffectActionGetRegionOfDefinition", "inArgs" }, { "OfxImageEffectPropRenderScale", + "OfxPropTime" } }, +{ { "OfxImageEffectActionGetRegionOfDefinition", "outArgs" }, { "OfxImageEffectPropRegionOfDefinition" } }, +{ { "OfxImageEffectActionGetRegionsOfInterest", "inArgs" }, { "OfxImageEffectPropRegionOfInterest", + "OfxImageEffectPropRenderScale", + "OfxPropTime" } }, +{ { "OfxImageEffectActionGetTimeDomain", "outArgs" }, { "OfxImageEffectPropFrameRange" } }, +{ { "OfxImageEffectActionIsIdentity", "inArgs" }, { "OfxImageEffectPropFieldToRender", + "OfxImageEffectPropRenderScale", + "OfxImageEffectPropRenderWindow", + "OfxPropTime" } }, +{ { "OfxImageEffectActionRender", "inArgs" }, { "OfxImageEffectPropCudaEnabled", + "OfxImageEffectPropCudaRenderSupported", + "OfxImageEffectPropCudaStream", + "OfxImageEffectPropCudaStreamSupported", + "OfxImageEffectPropInteractiveRenderStatus", + "OfxImageEffectPropInteractiveRenderStatus", + "OfxImageEffectPropMetalCommandQueue", + "OfxImageEffectPropMetalEnabled", + "OfxImageEffectPropMetalRenderSupported", + "OfxImageEffectPropOpenCLCommandQueue", + "OfxImageEffectPropOpenCLEnabled", + "OfxImageEffectPropOpenCLImage", + "OfxImageEffectPropOpenCLRenderSupported", + "OfxImageEffectPropOpenCLSupported", + "OfxImageEffectPropOpenGLEnabled", + "OfxImageEffectPropOpenGLTextureIndex", + "OfxImageEffectPropOpenGLTextureTarget", + "OfxImageEffectPropRenderQualityDraft", + "OfxImageEffectPropSequentialRenderStatus", + "OfxPropTime" } }, +{ { "OfxInteractActionDraw", "inArgs" }, { "OfxImageEffectPropRenderScale", + "OfxInteractPropBackgroundColour", + "OfxInteractPropDrawContext", + "OfxInteractPropPixelScale", + "OfxPropEffectInstance", + "OfxPropTime" } }, +{ { "OfxInteractActionGainFocus", "inArgs" }, { "OfxImageEffectPropRenderScale", + "OfxInteractPropBackgroundColour", + "OfxInteractPropPixelScale", + "OfxPropEffectInstance", + "OfxPropTime" } }, +{ { "OfxInteractActionKeyDown", "inArgs" }, { "OfxImageEffectPropRenderScale", + "OfxPropEffectInstance", + "OfxPropTime", + "kOfxPropKeyString", + "kOfxPropKeySym" } }, +{ { "OfxInteractActionKeyRepeat", "inArgs" }, { "OfxImageEffectPropRenderScale", + "OfxPropEffectInstance", + "OfxPropTime", + "kOfxPropKeyString", + "kOfxPropKeySym" } }, +{ { "OfxInteractActionKeyUp", "inArgs" }, { "OfxImageEffectPropRenderScale", + "OfxPropEffectInstance", + "OfxPropTime", + "kOfxPropKeyString", + "kOfxPropKeySym" } }, +{ { "OfxInteractActionLoseFocus", "inArgs" }, { "OfxImageEffectPropRenderScale", + "OfxInteractPropBackgroundColour", + "OfxInteractPropPixelScale", + "OfxPropEffectInstance", + "OfxPropTime" } }, +{ { "OfxInteractActionPenDown", "inArgs" }, { "OfxImageEffectPropRenderScale", + "OfxInteractPropBackgroundColour", + "OfxInteractPropPenPosition", + "OfxInteractPropPenPressure", + "OfxInteractPropPenViewportPosition", + "OfxInteractPropPixelScale", + "OfxPropEffectInstance", + "OfxPropTime" } }, +{ { "OfxInteractActionPenMotion", "inArgs" }, { "OfxImageEffectPropRenderScale", + "OfxInteractPropBackgroundColour", + "OfxInteractPropPenPosition", + "OfxInteractPropPenPressure", + "OfxInteractPropPenViewportPosition", + "OfxInteractPropPixelScale", + "OfxPropEffectInstance", + "OfxPropTime" } }, +{ { "OfxInteractActionPenUp", "inArgs" }, { "OfxImageEffectPropRenderScale", + "OfxInteractPropBackgroundColour", + "OfxInteractPropPenPosition", + "OfxInteractPropPenPressure", + "OfxInteractPropPenViewportPosition", + "OfxInteractPropPixelScale", + "OfxPropEffectInstance", + "OfxPropTime" } }, +}; + +// Static asserts for standard action names +static_assert(std::string_view("OfxActionBeginInstanceChanged") == std::string_view(kOfxActionBeginInstanceChanged)); +static_assert(std::string_view("OfxActionBeginInstanceEdit") == std::string_view(kOfxActionBeginInstanceEdit)); +static_assert(std::string_view("OfxActionCreateInstance") == std::string_view(kOfxActionCreateInstance)); +static_assert(std::string_view("OfxActionDescribe") == std::string_view(kOfxActionDescribe)); +static_assert(std::string_view("OfxActionDestroyInstance") == std::string_view(kOfxActionDestroyInstance)); +static_assert(std::string_view("OfxActionEndInstanceChanged") == std::string_view(kOfxActionEndInstanceChanged)); +static_assert(std::string_view("OfxActionEndInstanceEdit") == std::string_view(kOfxActionEndInstanceEdit)); +static_assert(std::string_view("OfxActionInstanceChanged") == std::string_view(kOfxActionInstanceChanged)); +static_assert(std::string_view("OfxActionLoad") == std::string_view(kOfxActionLoad)); +static_assert(std::string_view("OfxActionPurgeCaches") == std::string_view(kOfxActionPurgeCaches)); +static_assert(std::string_view("OfxActionSyncPrivateData") == std::string_view(kOfxActionSyncPrivateData)); +static_assert(std::string_view("OfxActionUnload") == std::string_view(kOfxActionUnload)); +static_assert(std::string_view("OfxImageEffectActionBeginSequenceRender") == std::string_view(kOfxImageEffectActionBeginSequenceRender)); +static_assert(std::string_view("OfxImageEffectActionDescribeInContext") == std::string_view(kOfxImageEffectActionDescribeInContext)); +static_assert(std::string_view("OfxImageEffectActionEndSequenceRender") == std::string_view(kOfxImageEffectActionEndSequenceRender)); +static_assert(std::string_view("OfxImageEffectActionGetClipPreferences") == std::string_view(kOfxImageEffectActionGetClipPreferences)); +static_assert(std::string_view("OfxImageEffectActionGetFramesNeeded") == std::string_view(kOfxImageEffectActionGetFramesNeeded)); +static_assert(std::string_view("OfxImageEffectActionGetOutputColourspace") == std::string_view(kOfxImageEffectActionGetOutputColourspace)); +static_assert(std::string_view("OfxImageEffectActionGetRegionOfDefinition") == std::string_view(kOfxImageEffectActionGetRegionOfDefinition)); +static_assert(std::string_view("OfxImageEffectActionGetRegionsOfInterest") == std::string_view(kOfxImageEffectActionGetRegionsOfInterest)); +static_assert(std::string_view("OfxImageEffectActionGetTimeDomain") == std::string_view(kOfxImageEffectActionGetTimeDomain)); +static_assert(std::string_view("OfxImageEffectActionIsIdentity") == std::string_view(kOfxImageEffectActionIsIdentity)); +static_assert(std::string_view("OfxImageEffectActionRender") == std::string_view(kOfxImageEffectActionRender)); +static_assert(std::string_view("OfxInteractActionDraw") == std::string_view(kOfxInteractActionDraw)); +static_assert(std::string_view("OfxInteractActionGainFocus") == std::string_view(kOfxInteractActionGainFocus)); +static_assert(std::string_view("OfxInteractActionKeyDown") == std::string_view(kOfxInteractActionKeyDown)); +static_assert(std::string_view("OfxInteractActionKeyRepeat") == std::string_view(kOfxInteractActionKeyRepeat)); +static_assert(std::string_view("OfxInteractActionKeyUp") == std::string_view(kOfxInteractActionKeyUp)); +static_assert(std::string_view("OfxInteractActionLoseFocus") == std::string_view(kOfxInteractActionLoseFocus)); +static_assert(std::string_view("OfxInteractActionPenDown") == std::string_view(kOfxInteractActionPenDown)); +static_assert(std::string_view("OfxInteractActionPenMotion") == std::string_view(kOfxInteractActionPenMotion)); +static_assert(std::string_view("OfxInteractActionPenUp") == std::string_view(kOfxInteractActionPenUp)); +} // namespace OpenFX diff --git a/Support/include/ofxPropsMetadata.h b/Support/include/ofxPropsMetadata.h new file mode 100644 index 00000000..b52d206e --- /dev/null +++ b/Support/include/ofxPropsMetadata.h @@ -0,0 +1,397 @@ +// Copyright OpenFX and contributors to the OpenFX project. +// SPDX-License-Identifier: BSD-3-Clause +// NOTE: This file is auto-generated by gen-props.py. DO NOT EDIT. + +#pragma once + +#include +#include +#include "ofxImageEffect.h" +#include "ofxGPURender.h" +#include "ofxColour.h" +#include "ofxDrawSuite.h" +#include "ofxParametricParam.h" +#include "ofxKeySyms.h" +#include "ofxOld.h" + +namespace OpenFX { +enum class PropType { + Int, + Double, + Enum, + Bool, + String, + Bytes, + Pointer +}; + +struct PropsMetadata { + std::string_view name; + std::vector types; + int dimension; + std::vector values; // for enums +}; + +static inline const std::array props_metadata { { +{ "OfxImageClipPropColourspace", {PropType::String}, 1, {} }, +{ "OfxImageClipPropConnected", {PropType::Bool}, 1, {} }, +{ "OfxImageClipPropContinuousSamples", {PropType::Bool}, 1, {} }, +{ "OfxImageClipPropFieldExtraction", {PropType::Enum}, 1, {"OfxImageFieldNone","OfxImageFieldLower","OfxImageFieldUpper","OfxImageFieldBoth","OfxImageFieldSingle","OfxImageFieldDoubled"} }, +{ "OfxImageClipPropFieldOrder", {PropType::Enum}, 1, {"OfxImageFieldNone","OfxImageFieldLower","OfxImageFieldUpper"} }, +{ "OfxImageClipPropIsMask", {PropType::Bool}, 1, {} }, +{ "OfxImageClipPropOptional", {PropType::Bool}, 1, {} }, +{ "OfxImageClipPropPreferredColourspaces", {PropType::String}, 0, {} }, +{ "OfxImageClipPropUnmappedComponents", {PropType::Enum}, 1, {"OfxImageComponentNone","OfxImageComponentRGBA","OfxImageComponentRGB","OfxImageComponentAlpha"} }, +{ "OfxImageClipPropUnmappedPixelDepth", {PropType::Enum}, 1, {"OfxBitDepthNone","OfxBitDepthByte","OfxBitDepthShort","OfxBitDepthHalf","OfxBitDepthFloat"} }, +{ "OfxImageEffectFrameVarying", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectHostPropIsBackground", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectHostPropNativeOrigin", {PropType::Enum}, 1, {"OfxImageEffectHostPropNativeOriginBottomLeft","OfxImageEffectHostPropNativeOriginTopLeft","OfxImageEffectHostPropNativeOriginCenter"} }, +{ "OfxImageEffectInstancePropEffectDuration", {PropType::Double}, 1, {} }, +{ "OfxImageEffectInstancePropSequentialRender", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPluginPropFieldRenderTwiceAlways", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPluginPropGrouping", {PropType::String}, 1, {} }, +{ "OfxImageEffectPluginPropHostFrameThreading", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPluginPropOverlayInteractV1", {PropType::Pointer}, 1, {} }, +{ "OfxImageEffectPluginPropOverlayInteractV2", {PropType::Pointer}, 1, {} }, +{ "OfxImageEffectPluginPropSingleInstance", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPluginRenderThreadSafety", {PropType::Enum}, 1, {"OfxImageEffectRenderUnsafe","OfxImageEffectRenderInstanceSafe","OfxImageEffectRenderFullySafe"} }, +{ "OfxImageEffectPropClipPreferencesSlaveParam", {PropType::String}, 0, {} }, +{ "OfxImageEffectPropColourManagementAvailableConfigs", {PropType::String}, 0, {} }, +{ "OfxImageEffectPropColourManagementConfig", {PropType::String}, 1, {} }, +{ "OfxImageEffectPropColourManagementStyle", {PropType::Enum}, 1, {"OfxImageEffectPropColourManagementNone","OfxImageEffectPropColourManagementBasic","OfxImageEffectPropColourManagementCore","OfxImageEffectPropColourManagementFull","OfxImageEffectPropColourManagementOCIO"} }, +{ "OfxImageEffectPropComponents", {PropType::Enum}, 1, {"OfxImageComponentNone","OfxImageComponentRGBA","OfxImageComponentRGB","OfxImageComponentAlpha"} }, +{ "OfxImageEffectPropContext", {PropType::Enum}, 1, {"OfxImageEffectContextGenerator","OfxImageEffectContextFilter","OfxImageEffectContextTransition","OfxImageEffectContextPaint","OfxImageEffectContextGeneral","OfxImageEffectContextRetimer"} }, +{ "OfxImageEffectPropCudaEnabled", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPropCudaRenderSupported", {PropType::Enum}, 1, {"false","true","needed"} }, +{ "OfxImageEffectPropCudaStream", {PropType::Pointer}, 1, {} }, +{ "OfxImageEffectPropCudaStreamSupported", {PropType::Enum}, 1, {"false","true","needed"} }, +{ "OfxImageEffectPropDisplayColourspace", {PropType::String}, 1, {} }, +{ "OfxImageEffectPropFieldToRender", {PropType::Enum}, 1, {"OfxImageFieldNone","OfxImageFieldBoth","OfxImageFieldLower","OfxImageFieldUpper"} }, +{ "OfxImageEffectPropFrameRange", {PropType::Double}, 2, {} }, +{ "OfxImageEffectPropFrameRate", {PropType::Double}, 1, {} }, +{ "OfxImageEffectPropFrameStep", {PropType::Double}, 1, {} }, +{ "OfxImageEffectPropInAnalysis", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPropInteractiveRenderStatus", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPropMetalCommandQueue", {PropType::Pointer}, 1, {} }, +{ "OfxImageEffectPropMetalEnabled", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPropMetalRenderSupported", {PropType::Enum}, 1, {"false","true","needed"} }, +{ "OfxImageEffectPropMultipleClipDepths", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPropOCIOConfig", {PropType::String}, 1, {} }, +{ "OfxImageEffectPropOCIODisplay", {PropType::String}, 1, {} }, +{ "OfxImageEffectPropOCIOView", {PropType::String}, 1, {} }, +{ "OfxImageEffectPropOpenCLCommandQueue", {PropType::Pointer}, 1, {} }, +{ "OfxImageEffectPropOpenCLEnabled", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPropOpenCLImage", {PropType::Int}, 1, {} }, +{ "OfxImageEffectPropOpenCLRenderSupported", {PropType::Enum}, 1, {"false","true","needed"} }, +{ "OfxImageEffectPropOpenCLSupported", {PropType::Enum}, 1, {"false","true"} }, +{ "OfxImageEffectPropOpenGLEnabled", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPropOpenGLRenderSupported", {PropType::Enum}, 1, {"false","true","needed"} }, +{ "OfxImageEffectPropOpenGLTextureIndex", {PropType::Int}, 1, {} }, +{ "OfxImageEffectPropOpenGLTextureTarget", {PropType::Int}, 1, {} }, +{ "OfxImageEffectPropPixelAspectRatio", {PropType::Double}, 1, {} }, +{ "OfxImageEffectPropPixelDepth", {PropType::Enum}, 1, {"OfxBitDepthNone","OfxBitDepthByte","OfxBitDepthShort","OfxBitDepthHalf","OfxBitDepthFloat"} }, +{ "OfxImageEffectPropPluginHandle", {PropType::Pointer}, 1, {} }, +{ "OfxImageEffectPropPreMultiplication", {PropType::Enum}, 1, {"OfxImageOpaque","OfxImagePreMultiplied","OfxImageUnPreMultiplied"} }, +{ "OfxImageEffectPropProjectExtent", {PropType::Double}, 2, {} }, +{ "OfxImageEffectPropProjectOffset", {PropType::Double}, 2, {} }, +{ "OfxImageEffectPropProjectSize", {PropType::Double}, 2, {} }, +{ "OfxImageEffectPropRegionOfDefinition", {PropType::Int}, 4, {} }, +{ "OfxImageEffectPropRegionOfInterest", {PropType::Int}, 4, {} }, +{ "OfxImageEffectPropRenderQualityDraft", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPropRenderScale", {PropType::Double}, 2, {} }, +{ "OfxImageEffectPropRenderWindow", {PropType::Int}, 4, {} }, +{ "OfxImageEffectPropSequentialRenderStatus", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPropSetableFielding", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPropSetableFrameRate", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPropSupportedComponents", {PropType::Enum}, 0, {"OfxImageComponentNone","OfxImageComponentRGBA","OfxImageComponentRGB","OfxImageComponentAlpha"} }, +{ "OfxImageEffectPropSupportedContexts", {PropType::Enum}, 0, {"OfxImageEffectContextGenerator","OfxImageEffectContextFilter","OfxImageEffectContextTransition","OfxImageEffectContextPaint","OfxImageEffectContextGeneral","OfxImageEffectContextRetimer"} }, +{ "OfxImageEffectPropSupportedPixelDepths", {PropType::String}, 0, {} }, +{ "OfxImageEffectPropSupportsMultiResolution", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPropSupportsMultipleClipPARs", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPropSupportsOverlays", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPropSupportsTiles", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPropTemporalClipAccess", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPropUnmappedFrameRange", {PropType::Double}, 2, {} }, +{ "OfxImageEffectPropUnmappedFrameRate", {PropType::Double}, 1, {} }, +{ "OfxImagePropBounds", {PropType::Int}, 4, {} }, +{ "OfxImagePropData", {PropType::Pointer}, 1, {} }, +{ "OfxImagePropField", {PropType::Enum}, 1, {"OfxImageFieldNone","OfxImageFieldBoth","OfxImageFieldLower","OfxImageFieldUpper"} }, +{ "OfxImagePropPixelAspectRatio", {PropType::Double}, 1, {} }, +{ "OfxImagePropRegionOfDefinition", {PropType::Int}, 4, {} }, +{ "OfxImagePropRowBytes", {PropType::Int}, 1, {} }, +{ "OfxImagePropUniqueIdentifier", {PropType::String}, 1, {} }, +{ "OfxInteractPropBackgroundColour", {PropType::Double}, 3, {} }, +{ "OfxInteractPropBitDepth", {PropType::Int}, 1, {} }, +{ "OfxInteractPropDrawContext", {PropType::Pointer}, 1, {} }, +{ "OfxInteractPropHasAlpha", {PropType::Bool}, 1, {} }, +{ "OfxInteractPropPenPosition", {PropType::Double}, 2, {} }, +{ "OfxInteractPropPenPressure", {PropType::Double}, 1, {} }, +{ "OfxInteractPropPenViewportPosition", {PropType::Int}, 2, {} }, +{ "OfxInteractPropPixelScale", {PropType::Double}, 2, {} }, +{ "OfxInteractPropSlaveToParam", {PropType::String}, 0, {} }, +{ "OfxInteractPropSuggestedColour", {PropType::Double}, 3, {} }, +{ "OfxInteractPropViewport", {PropType::Int}, 2, {} }, +{ "OfxOpenGLPropPixelDepth", {PropType::Enum}, 0, {"OfxBitDepthNone","OfxBitDepthByte","OfxBitDepthShort","OfxBitDepthHalf","OfxBitDepthFloat"} }, +{ "OfxParamHostPropMaxPages", {PropType::Int}, 1, {} }, +{ "OfxParamHostPropMaxParameters", {PropType::Int}, 1, {} }, +{ "OfxParamHostPropPageRowColumnCount", {PropType::Int}, 2, {} }, +{ "OfxParamHostPropSupportsBooleanAnimation", {PropType::Bool}, 1, {} }, +{ "OfxParamHostPropSupportsChoiceAnimation", {PropType::Bool}, 1, {} }, +{ "OfxParamHostPropSupportsCustomAnimation", {PropType::Bool}, 1, {} }, +{ "OfxParamHostPropSupportsCustomInteract", {PropType::Bool}, 1, {} }, +{ "OfxParamHostPropSupportsParametricAnimation", {PropType::Bool}, 1, {} }, +{ "OfxParamHostPropSupportsStrChoice", {PropType::Bool}, 1, {} }, +{ "OfxParamHostPropSupportsStrChoiceAnimation", {PropType::Bool}, 1, {} }, +{ "OfxParamHostPropSupportsStringAnimation", {PropType::Bool}, 1, {} }, +{ "OfxParamPropAnimates", {PropType::Bool}, 1, {} }, +{ "OfxParamPropCacheInvalidation", {PropType::Enum}, 1, {"OfxParamInvalidateValueChange","OfxParamInvalidateValueChangeToEnd","OfxParamInvalidateAll"} }, +{ "OfxParamPropCanUndo", {PropType::Bool}, 1, {} }, +{ "OfxParamPropChoiceEnum", {PropType::Bool}, 1, {} }, +{ "OfxParamPropChoiceOption", {PropType::String}, 0, {} }, +{ "OfxParamPropChoiceOrder", {PropType::Int}, 0, {} }, +{ "OfxParamPropCustomCallbackV1", {PropType::Pointer}, 1, {} }, +{ "OfxParamPropCustomValue", {PropType::String}, 2, {} }, +{ "OfxParamPropDataPtr", {PropType::Pointer}, 1, {} }, +{ "OfxParamPropDefault", {PropType::Int,PropType::Double,PropType::String,PropType::Bytes}, 0, {} }, +{ "OfxParamPropDefaultCoordinateSystem", {PropType::Enum}, 1, {"OfxParamCoordinatesCanonical","OfxParamCoordinatesNormalised"} }, +{ "OfxParamPropDigits", {PropType::Int}, 1, {} }, +{ "OfxParamPropDimensionLabel", {PropType::String}, 1, {} }, +{ "OfxParamPropDisplayMax", {PropType::Int,PropType::Double}, 0, {} }, +{ "OfxParamPropDisplayMin", {PropType::Int,PropType::Double}, 0, {} }, +{ "OfxParamPropDoubleType", {PropType::Enum}, 1, {"OfxParamDoubleTypePlain","OfxParamDoubleTypeAngle","OfxParamDoubleTypeScale","OfxParamDoubleTypeTime","OfxParamDoubleTypeAbsoluteTime","OfxParamDoubleTypeX","OfxParamDoubleTypeXAbsolute","OfxParamDoubleTypeY","OfxParamDoubleTypeYAbsolute","OfxParamDoubleTypeXY","OfxParamDoubleTypeXYAbsolute"} }, +{ "OfxParamPropEnabled", {PropType::Bool}, 1, {} }, +{ "OfxParamPropEvaluateOnChange", {PropType::Bool}, 1, {} }, +{ "OfxParamPropGroupOpen", {PropType::Bool}, 1, {} }, +{ "OfxParamPropHasHostOverlayHandle", {PropType::Bool}, 1, {} }, +{ "OfxParamPropHint", {PropType::String}, 1, {} }, +{ "OfxParamPropIncrement", {PropType::Double}, 1, {} }, +{ "OfxParamPropInteractMinimumSize", {PropType::Double}, 2, {} }, +{ "OfxParamPropInteractPreferedSize", {PropType::Int}, 2, {} }, +{ "OfxParamPropInteractSize", {PropType::Double}, 2, {} }, +{ "OfxParamPropInteractSizeAspect", {PropType::Double}, 1, {} }, +{ "OfxParamPropInteractV1", {PropType::Pointer}, 1, {} }, +{ "OfxParamPropInterpolationAmount", {PropType::Double}, 1, {} }, +{ "OfxParamPropInterpolationTime", {PropType::Double}, 2, {} }, +{ "OfxParamPropIsAnimating", {PropType::Bool}, 1, {} }, +{ "OfxParamPropIsAutoKeying", {PropType::Bool}, 1, {} }, +{ "OfxParamPropMax", {PropType::Int,PropType::Double}, 0, {} }, +{ "OfxParamPropMin", {PropType::Int,PropType::Double}, 0, {} }, +{ "OfxParamPropPageChild", {PropType::String}, 0, {} }, +{ "OfxParamPropParametricDimension", {PropType::Int}, 1, {} }, +{ "OfxParamPropParametricInteractBackground", {PropType::Pointer}, 1, {} }, +{ "OfxParamPropParametricRange", {PropType::Double}, 2, {} }, +{ "OfxParamPropParametricUIColour", {PropType::Double}, 0, {} }, +{ "OfxParamPropParent", {PropType::String}, 1, {} }, +{ "OfxParamPropPersistant", {PropType::Bool}, 1, {} }, +{ "OfxParamPropPluginMayWrite", {PropType::Bool}, 1, {} }, +{ "OfxParamPropScriptName", {PropType::String}, 1, {} }, +{ "OfxParamPropSecret", {PropType::Bool}, 1, {} }, +{ "OfxParamPropShowTimeMarker", {PropType::Bool}, 1, {} }, +{ "OfxParamPropStringFilePathExists", {PropType::Bool}, 1, {} }, +{ "OfxParamPropStringMode", {PropType::Enum}, 1, {"OfxParamStringIsSingleLine","OfxParamStringIsMultiLine","OfxParamStringIsFilePath","OfxParamStringIsDirectoryPath","OfxParamStringIsLabel","OfxParamStringIsRichTextFormat"} }, +{ "OfxParamPropType", {PropType::String}, 1, {} }, +{ "OfxPluginPropFilePath", {PropType::Enum}, 1, {"false","true","needed"} }, +{ "OfxPluginPropParamPageOrder", {PropType::String}, 0, {} }, +{ "OfxPropAPIVersion", {PropType::Int}, 0, {} }, +{ "OfxPropChangeReason", {PropType::Enum}, 1, {"OfxChangeUserEdited","OfxChangePluginEdited","OfxChangeTime"} }, +{ "OfxPropEffectInstance", {PropType::Pointer}, 1, {} }, +{ "OfxPropHostOSHandle", {PropType::Pointer}, 1, {} }, +{ "OfxPropIcon", {PropType::String}, 2, {} }, +{ "OfxPropInstanceData", {PropType::Pointer}, 1, {} }, +{ "OfxPropIsInteractive", {PropType::Bool}, 1, {} }, +{ "OfxPropLabel", {PropType::String}, 1, {} }, +{ "OfxPropLongLabel", {PropType::String}, 1, {} }, +{ "OfxPropName", {PropType::String}, 1, {} }, +{ "OfxPropParamSetNeedsSyncing", {PropType::Bool}, 1, {} }, +{ "OfxPropPluginDescription", {PropType::String}, 1, {} }, +{ "OfxPropShortLabel", {PropType::String}, 1, {} }, +{ "OfxPropTime", {PropType::Double}, 1, {} }, +{ "OfxPropType", {PropType::String}, 1, {} }, +{ "OfxPropVersion", {PropType::Int}, 0, {} }, +{ "OfxPropVersionLabel", {PropType::String}, 1, {} }, +{ "kOfxParamPropUseHostOverlayHandle", {PropType::Bool}, 1, {} }, +{ "kOfxPropKeyString", {PropType::String}, 1, {} }, +{ "kOfxPropKeySym", {PropType::Int}, 1, {} }, +} }; + +// Static asserts to check #define names vs. strings +static_assert(std::string_view("OfxImageClipPropColourspace") == std::string_view(kOfxImageClipPropColourspace)); +static_assert(std::string_view("OfxImageClipPropConnected") == std::string_view(kOfxImageClipPropConnected)); +static_assert(std::string_view("OfxImageClipPropContinuousSamples") == std::string_view(kOfxImageClipPropContinuousSamples)); +static_assert(std::string_view("OfxImageClipPropFieldExtraction") == std::string_view(kOfxImageClipPropFieldExtraction)); +static_assert(std::string_view("OfxImageClipPropFieldOrder") == std::string_view(kOfxImageClipPropFieldOrder)); +static_assert(std::string_view("OfxImageClipPropIsMask") == std::string_view(kOfxImageClipPropIsMask)); +static_assert(std::string_view("OfxImageClipPropOptional") == std::string_view(kOfxImageClipPropOptional)); +static_assert(std::string_view("OfxImageClipPropPreferredColourspaces") == std::string_view(kOfxImageClipPropPreferredColourspaces)); +static_assert(std::string_view("OfxImageClipPropUnmappedComponents") == std::string_view(kOfxImageClipPropUnmappedComponents)); +static_assert(std::string_view("OfxImageClipPropUnmappedPixelDepth") == std::string_view(kOfxImageClipPropUnmappedPixelDepth)); +static_assert(std::string_view("OfxImageEffectFrameVarying") == std::string_view(kOfxImageEffectFrameVarying)); +static_assert(std::string_view("OfxImageEffectHostPropIsBackground") == std::string_view(kOfxImageEffectHostPropIsBackground)); +static_assert(std::string_view("OfxImageEffectHostPropNativeOrigin") == std::string_view(kOfxImageEffectHostPropNativeOrigin)); +static_assert(std::string_view("OfxImageEffectInstancePropEffectDuration") == std::string_view(kOfxImageEffectInstancePropEffectDuration)); +static_assert(std::string_view("OfxImageEffectInstancePropSequentialRender") == std::string_view(kOfxImageEffectInstancePropSequentialRender)); +static_assert(std::string_view("OfxImageEffectPluginPropFieldRenderTwiceAlways") == std::string_view(kOfxImageEffectPluginPropFieldRenderTwiceAlways)); +static_assert(std::string_view("OfxImageEffectPluginPropGrouping") == std::string_view(kOfxImageEffectPluginPropGrouping)); +static_assert(std::string_view("OfxImageEffectPluginPropHostFrameThreading") == std::string_view(kOfxImageEffectPluginPropHostFrameThreading)); +static_assert(std::string_view("OfxImageEffectPluginPropOverlayInteractV1") == std::string_view(kOfxImageEffectPluginPropOverlayInteractV1)); +static_assert(std::string_view("OfxImageEffectPluginPropOverlayInteractV2") == std::string_view(kOfxImageEffectPluginPropOverlayInteractV2)); +static_assert(std::string_view("OfxImageEffectPluginPropSingleInstance") == std::string_view(kOfxImageEffectPluginPropSingleInstance)); +static_assert(std::string_view("OfxImageEffectPluginRenderThreadSafety") == std::string_view(kOfxImageEffectPluginRenderThreadSafety)); +static_assert(std::string_view("OfxImageEffectPropClipPreferencesSlaveParam") == std::string_view(kOfxImageEffectPropClipPreferencesSlaveParam)); +static_assert(std::string_view("OfxImageEffectPropColourManagementAvailableConfigs") == std::string_view(kOfxImageEffectPropColourManagementAvailableConfigs)); +static_assert(std::string_view("OfxImageEffectPropColourManagementConfig") == std::string_view(kOfxImageEffectPropColourManagementConfig)); +static_assert(std::string_view("OfxImageEffectPropColourManagementStyle") == std::string_view(kOfxImageEffectPropColourManagementStyle)); +static_assert(std::string_view("OfxImageEffectPropComponents") == std::string_view(kOfxImageEffectPropComponents)); +static_assert(std::string_view("OfxImageEffectPropContext") == std::string_view(kOfxImageEffectPropContext)); +static_assert(std::string_view("OfxImageEffectPropCudaEnabled") == std::string_view(kOfxImageEffectPropCudaEnabled)); +static_assert(std::string_view("OfxImageEffectPropCudaRenderSupported") == std::string_view(kOfxImageEffectPropCudaRenderSupported)); +static_assert(std::string_view("OfxImageEffectPropCudaStream") == std::string_view(kOfxImageEffectPropCudaStream)); +static_assert(std::string_view("OfxImageEffectPropCudaStreamSupported") == std::string_view(kOfxImageEffectPropCudaStreamSupported)); +static_assert(std::string_view("OfxImageEffectPropDisplayColourspace") == std::string_view(kOfxImageEffectPropDisplayColourspace)); +static_assert(std::string_view("OfxImageEffectPropFieldToRender") == std::string_view(kOfxImageEffectPropFieldToRender)); +static_assert(std::string_view("OfxImageEffectPropFrameRange") == std::string_view(kOfxImageEffectPropFrameRange)); +static_assert(std::string_view("OfxImageEffectPropFrameRate") == std::string_view(kOfxImageEffectPropFrameRate)); +static_assert(std::string_view("OfxImageEffectPropFrameStep") == std::string_view(kOfxImageEffectPropFrameStep)); +static_assert(std::string_view("OfxImageEffectPropInAnalysis") == std::string_view(kOfxImageEffectPropInAnalysis)); +static_assert(std::string_view("OfxImageEffectPropInteractiveRenderStatus") == std::string_view(kOfxImageEffectPropInteractiveRenderStatus)); +static_assert(std::string_view("OfxImageEffectPropMetalCommandQueue") == std::string_view(kOfxImageEffectPropMetalCommandQueue)); +static_assert(std::string_view("OfxImageEffectPropMetalEnabled") == std::string_view(kOfxImageEffectPropMetalEnabled)); +static_assert(std::string_view("OfxImageEffectPropMetalRenderSupported") == std::string_view(kOfxImageEffectPropMetalRenderSupported)); +static_assert(std::string_view("OfxImageEffectPropMultipleClipDepths") == std::string_view(kOfxImageEffectPropSupportsMultipleClipDepths)); +static_assert(std::string_view("OfxImageEffectPropOCIOConfig") == std::string_view(kOfxImageEffectPropOCIOConfig)); +static_assert(std::string_view("OfxImageEffectPropOCIODisplay") == std::string_view(kOfxImageEffectPropOCIODisplay)); +static_assert(std::string_view("OfxImageEffectPropOCIOView") == std::string_view(kOfxImageEffectPropOCIOView)); +static_assert(std::string_view("OfxImageEffectPropOpenCLCommandQueue") == std::string_view(kOfxImageEffectPropOpenCLCommandQueue)); +static_assert(std::string_view("OfxImageEffectPropOpenCLEnabled") == std::string_view(kOfxImageEffectPropOpenCLEnabled)); +static_assert(std::string_view("OfxImageEffectPropOpenCLImage") == std::string_view(kOfxImageEffectPropOpenCLImage)); +static_assert(std::string_view("OfxImageEffectPropOpenCLRenderSupported") == std::string_view(kOfxImageEffectPropOpenCLRenderSupported)); +static_assert(std::string_view("OfxImageEffectPropOpenCLSupported") == std::string_view(kOfxImageEffectPropOpenCLSupported)); +static_assert(std::string_view("OfxImageEffectPropOpenGLEnabled") == std::string_view(kOfxImageEffectPropOpenGLEnabled)); +static_assert(std::string_view("OfxImageEffectPropOpenGLRenderSupported") == std::string_view(kOfxImageEffectPropOpenGLRenderSupported)); +static_assert(std::string_view("OfxImageEffectPropOpenGLTextureIndex") == std::string_view(kOfxImageEffectPropOpenGLTextureIndex)); +static_assert(std::string_view("OfxImageEffectPropOpenGLTextureTarget") == std::string_view(kOfxImageEffectPropOpenGLTextureTarget)); +static_assert(std::string_view("OfxImageEffectPropPixelAspectRatio") == std::string_view(kOfxImageEffectPropProjectPixelAspectRatio)); +static_assert(std::string_view("OfxImageEffectPropPixelDepth") == std::string_view(kOfxImageEffectPropPixelDepth)); +static_assert(std::string_view("OfxImageEffectPropPluginHandle") == std::string_view(kOfxImageEffectPropPluginHandle)); +static_assert(std::string_view("OfxImageEffectPropPreMultiplication") == std::string_view(kOfxImageEffectPropPreMultiplication)); +static_assert(std::string_view("OfxImageEffectPropProjectExtent") == std::string_view(kOfxImageEffectPropProjectExtent)); +static_assert(std::string_view("OfxImageEffectPropProjectOffset") == std::string_view(kOfxImageEffectPropProjectOffset)); +static_assert(std::string_view("OfxImageEffectPropProjectSize") == std::string_view(kOfxImageEffectPropProjectSize)); +static_assert(std::string_view("OfxImageEffectPropRegionOfDefinition") == std::string_view(kOfxImageEffectPropRegionOfDefinition)); +static_assert(std::string_view("OfxImageEffectPropRegionOfInterest") == std::string_view(kOfxImageEffectPropRegionOfInterest)); +static_assert(std::string_view("OfxImageEffectPropRenderQualityDraft") == std::string_view(kOfxImageEffectPropRenderQualityDraft)); +static_assert(std::string_view("OfxImageEffectPropRenderScale") == std::string_view(kOfxImageEffectPropRenderScale)); +static_assert(std::string_view("OfxImageEffectPropRenderWindow") == std::string_view(kOfxImageEffectPropRenderWindow)); +static_assert(std::string_view("OfxImageEffectPropSequentialRenderStatus") == std::string_view(kOfxImageEffectPropSequentialRenderStatus)); +static_assert(std::string_view("OfxImageEffectPropSetableFielding") == std::string_view(kOfxImageEffectPropSetableFielding)); +static_assert(std::string_view("OfxImageEffectPropSetableFrameRate") == std::string_view(kOfxImageEffectPropSetableFrameRate)); +static_assert(std::string_view("OfxImageEffectPropSupportedComponents") == std::string_view(kOfxImageEffectPropSupportedComponents)); +static_assert(std::string_view("OfxImageEffectPropSupportedContexts") == std::string_view(kOfxImageEffectPropSupportedContexts)); +static_assert(std::string_view("OfxImageEffectPropSupportedPixelDepths") == std::string_view(kOfxImageEffectPropSupportedPixelDepths)); +static_assert(std::string_view("OfxImageEffectPropSupportsMultiResolution") == std::string_view(kOfxImageEffectPropSupportsMultiResolution)); +static_assert(std::string_view("OfxImageEffectPropSupportsMultipleClipPARs") == std::string_view(kOfxImageEffectPropSupportsMultipleClipPARs)); +static_assert(std::string_view("OfxImageEffectPropSupportsOverlays") == std::string_view(kOfxImageEffectPropSupportsOverlays)); +static_assert(std::string_view("OfxImageEffectPropSupportsTiles") == std::string_view(kOfxImageEffectPropSupportsTiles)); +static_assert(std::string_view("OfxImageEffectPropTemporalClipAccess") == std::string_view(kOfxImageEffectPropTemporalClipAccess)); +static_assert(std::string_view("OfxImageEffectPropUnmappedFrameRange") == std::string_view(kOfxImageEffectPropUnmappedFrameRange)); +static_assert(std::string_view("OfxImageEffectPropUnmappedFrameRate") == std::string_view(kOfxImageEffectPropUnmappedFrameRate)); +static_assert(std::string_view("OfxImagePropBounds") == std::string_view(kOfxImagePropBounds)); +static_assert(std::string_view("OfxImagePropData") == std::string_view(kOfxImagePropData)); +static_assert(std::string_view("OfxImagePropField") == std::string_view(kOfxImagePropField)); +static_assert(std::string_view("OfxImagePropPixelAspectRatio") == std::string_view(kOfxImagePropPixelAspectRatio)); +static_assert(std::string_view("OfxImagePropRegionOfDefinition") == std::string_view(kOfxImagePropRegionOfDefinition)); +static_assert(std::string_view("OfxImagePropRowBytes") == std::string_view(kOfxImagePropRowBytes)); +static_assert(std::string_view("OfxImagePropUniqueIdentifier") == std::string_view(kOfxImagePropUniqueIdentifier)); +static_assert(std::string_view("OfxInteractPropBackgroundColour") == std::string_view(kOfxInteractPropBackgroundColour)); +static_assert(std::string_view("OfxInteractPropBitDepth") == std::string_view(kOfxInteractPropBitDepth)); +static_assert(std::string_view("OfxInteractPropDrawContext") == std::string_view(kOfxInteractPropDrawContext)); +static_assert(std::string_view("OfxInteractPropHasAlpha") == std::string_view(kOfxInteractPropHasAlpha)); +static_assert(std::string_view("OfxInteractPropPenPosition") == std::string_view(kOfxInteractPropPenPosition)); +static_assert(std::string_view("OfxInteractPropPenPressure") == std::string_view(kOfxInteractPropPenPressure)); +static_assert(std::string_view("OfxInteractPropPenViewportPosition") == std::string_view(kOfxInteractPropPenViewportPosition)); +static_assert(std::string_view("OfxInteractPropPixelScale") == std::string_view(kOfxInteractPropPixelScale)); +static_assert(std::string_view("OfxInteractPropSlaveToParam") == std::string_view(kOfxInteractPropSlaveToParam)); +static_assert(std::string_view("OfxInteractPropSuggestedColour") == std::string_view(kOfxInteractPropSuggestedColour)); +static_assert(std::string_view("OfxInteractPropViewport") == std::string_view(kOfxInteractPropViewportSize)); +static_assert(std::string_view("OfxOpenGLPropPixelDepth") == std::string_view(kOfxOpenGLPropPixelDepth)); +static_assert(std::string_view("OfxParamHostPropMaxPages") == std::string_view(kOfxParamHostPropMaxPages)); +static_assert(std::string_view("OfxParamHostPropMaxParameters") == std::string_view(kOfxParamHostPropMaxParameters)); +static_assert(std::string_view("OfxParamHostPropPageRowColumnCount") == std::string_view(kOfxParamHostPropPageRowColumnCount)); +static_assert(std::string_view("OfxParamHostPropSupportsBooleanAnimation") == std::string_view(kOfxParamHostPropSupportsBooleanAnimation)); +static_assert(std::string_view("OfxParamHostPropSupportsChoiceAnimation") == std::string_view(kOfxParamHostPropSupportsChoiceAnimation)); +static_assert(std::string_view("OfxParamHostPropSupportsCustomAnimation") == std::string_view(kOfxParamHostPropSupportsCustomAnimation)); +static_assert(std::string_view("OfxParamHostPropSupportsCustomInteract") == std::string_view(kOfxParamHostPropSupportsCustomInteract)); +static_assert(std::string_view("OfxParamHostPropSupportsParametricAnimation") == std::string_view(kOfxParamHostPropSupportsParametricAnimation)); +static_assert(std::string_view("OfxParamHostPropSupportsStrChoice") == std::string_view(kOfxParamHostPropSupportsStrChoice)); +static_assert(std::string_view("OfxParamHostPropSupportsStrChoiceAnimation") == std::string_view(kOfxParamHostPropSupportsStrChoiceAnimation)); +static_assert(std::string_view("OfxParamHostPropSupportsStringAnimation") == std::string_view(kOfxParamHostPropSupportsStringAnimation)); +static_assert(std::string_view("OfxParamPropAnimates") == std::string_view(kOfxParamPropAnimates)); +static_assert(std::string_view("OfxParamPropCacheInvalidation") == std::string_view(kOfxParamPropCacheInvalidation)); +static_assert(std::string_view("OfxParamPropCanUndo") == std::string_view(kOfxParamPropCanUndo)); +static_assert(std::string_view("OfxParamPropChoiceEnum") == std::string_view(kOfxParamPropChoiceEnum)); +static_assert(std::string_view("OfxParamPropChoiceOption") == std::string_view(kOfxParamPropChoiceOption)); +static_assert(std::string_view("OfxParamPropChoiceOrder") == std::string_view(kOfxParamPropChoiceOrder)); +static_assert(std::string_view("OfxParamPropCustomCallbackV1") == std::string_view(kOfxParamPropCustomInterpCallbackV1)); +static_assert(std::string_view("OfxParamPropCustomValue") == std::string_view(kOfxParamPropCustomValue)); +static_assert(std::string_view("OfxParamPropDataPtr") == std::string_view(kOfxParamPropDataPtr)); +static_assert(std::string_view("OfxParamPropDefault") == std::string_view(kOfxParamPropDefault)); +static_assert(std::string_view("OfxParamPropDefaultCoordinateSystem") == std::string_view(kOfxParamPropDefaultCoordinateSystem)); +static_assert(std::string_view("OfxParamPropDigits") == std::string_view(kOfxParamPropDigits)); +static_assert(std::string_view("OfxParamPropDimensionLabel") == std::string_view(kOfxParamPropDimensionLabel)); +static_assert(std::string_view("OfxParamPropDisplayMax") == std::string_view(kOfxParamPropDisplayMax)); +static_assert(std::string_view("OfxParamPropDisplayMin") == std::string_view(kOfxParamPropDisplayMin)); +static_assert(std::string_view("OfxParamPropDoubleType") == std::string_view(kOfxParamPropDoubleType)); +static_assert(std::string_view("OfxParamPropEnabled") == std::string_view(kOfxParamPropEnabled)); +static_assert(std::string_view("OfxParamPropEvaluateOnChange") == std::string_view(kOfxParamPropEvaluateOnChange)); +static_assert(std::string_view("OfxParamPropGroupOpen") == std::string_view(kOfxParamPropGroupOpen)); +static_assert(std::string_view("OfxParamPropHasHostOverlayHandle") == std::string_view(kOfxParamPropHasHostOverlayHandle)); +static_assert(std::string_view("OfxParamPropHint") == std::string_view(kOfxParamPropHint)); +static_assert(std::string_view("OfxParamPropIncrement") == std::string_view(kOfxParamPropIncrement)); +static_assert(std::string_view("OfxParamPropInteractMinimumSize") == std::string_view(kOfxParamPropInteractMinimumSize)); +static_assert(std::string_view("OfxParamPropInteractPreferedSize") == std::string_view(kOfxParamPropInteractPreferedSize)); +static_assert(std::string_view("OfxParamPropInteractSize") == std::string_view(kOfxParamPropInteractSize)); +static_assert(std::string_view("OfxParamPropInteractSizeAspect") == std::string_view(kOfxParamPropInteractSizeAspect)); +static_assert(std::string_view("OfxParamPropInteractV1") == std::string_view(kOfxParamPropInteractV1)); +static_assert(std::string_view("OfxParamPropInterpolationAmount") == std::string_view(kOfxParamPropInterpolationAmount)); +static_assert(std::string_view("OfxParamPropInterpolationTime") == std::string_view(kOfxParamPropInterpolationTime)); +static_assert(std::string_view("OfxParamPropIsAnimating") == std::string_view(kOfxParamPropIsAnimating)); +static_assert(std::string_view("OfxParamPropIsAutoKeying") == std::string_view(kOfxParamPropIsAutoKeying)); +static_assert(std::string_view("OfxParamPropMax") == std::string_view(kOfxParamPropMax)); +static_assert(std::string_view("OfxParamPropMin") == std::string_view(kOfxParamPropMin)); +static_assert(std::string_view("OfxParamPropPageChild") == std::string_view(kOfxParamPropPageChild)); +static_assert(std::string_view("OfxParamPropParametricDimension") == std::string_view(kOfxParamPropParametricDimension)); +static_assert(std::string_view("OfxParamPropParametricInteractBackground") == std::string_view(kOfxParamPropParametricInteractBackground)); +static_assert(std::string_view("OfxParamPropParametricRange") == std::string_view(kOfxParamPropParametricRange)); +static_assert(std::string_view("OfxParamPropParametricUIColour") == std::string_view(kOfxParamPropParametricUIColour)); +static_assert(std::string_view("OfxParamPropParent") == std::string_view(kOfxParamPropParent)); +static_assert(std::string_view("OfxParamPropPersistant") == std::string_view(kOfxParamPropPersistant)); +static_assert(std::string_view("OfxParamPropPluginMayWrite") == std::string_view(kOfxParamPropPluginMayWrite)); +static_assert(std::string_view("OfxParamPropScriptName") == std::string_view(kOfxParamPropScriptName)); +static_assert(std::string_view("OfxParamPropSecret") == std::string_view(kOfxParamPropSecret)); +static_assert(std::string_view("OfxParamPropShowTimeMarker") == std::string_view(kOfxParamPropShowTimeMarker)); +static_assert(std::string_view("OfxParamPropStringFilePathExists") == std::string_view(kOfxParamPropStringFilePathExists)); +static_assert(std::string_view("OfxParamPropStringMode") == std::string_view(kOfxParamPropStringMode)); +static_assert(std::string_view("OfxParamPropType") == std::string_view(kOfxParamPropType)); +static_assert(std::string_view("OfxPluginPropFilePath") == std::string_view(kOfxPluginPropFilePath)); +static_assert(std::string_view("OfxPluginPropParamPageOrder") == std::string_view(kOfxPluginPropParamPageOrder)); +static_assert(std::string_view("OfxPropAPIVersion") == std::string_view(kOfxPropAPIVersion)); +static_assert(std::string_view("OfxPropChangeReason") == std::string_view(kOfxPropChangeReason)); +static_assert(std::string_view("OfxPropEffectInstance") == std::string_view(kOfxPropEffectInstance)); +static_assert(std::string_view("OfxPropHostOSHandle") == std::string_view(kOfxPropHostOSHandle)); +static_assert(std::string_view("OfxPropIcon") == std::string_view(kOfxPropIcon)); +static_assert(std::string_view("OfxPropInstanceData") == std::string_view(kOfxPropInstanceData)); +static_assert(std::string_view("OfxPropIsInteractive") == std::string_view(kOfxPropIsInteractive)); +static_assert(std::string_view("OfxPropLabel") == std::string_view(kOfxPropLabel)); +static_assert(std::string_view("OfxPropLongLabel") == std::string_view(kOfxPropLongLabel)); +static_assert(std::string_view("OfxPropName") == std::string_view(kOfxPropName)); +static_assert(std::string_view("OfxPropParamSetNeedsSyncing") == std::string_view(kOfxPropParamSetNeedsSyncing)); +static_assert(std::string_view("OfxPropPluginDescription") == std::string_view(kOfxPropPluginDescription)); +static_assert(std::string_view("OfxPropShortLabel") == std::string_view(kOfxPropShortLabel)); +static_assert(std::string_view("OfxPropTime") == std::string_view(kOfxPropTime)); +static_assert(std::string_view("OfxPropType") == std::string_view(kOfxPropType)); +static_assert(std::string_view("OfxPropVersion") == std::string_view(kOfxPropVersion)); +static_assert(std::string_view("OfxPropVersionLabel") == std::string_view(kOfxPropVersionLabel)); +static_assert(std::string_view("kOfxParamPropUseHostOverlayHandle") == std::string_view(kOfxParamPropUseHostOverlayHandle)); +static_assert(std::string_view("kOfxPropKeyString") == std::string_view(kOfxPropKeyString)); +static_assert(std::string_view("kOfxPropKeySym") == std::string_view(kOfxPropKeySym)); +} // namespace OpenFX diff --git a/include/ofx-props.yml b/include/ofx-props.yml new file mode 100644 index 00000000..d5aa3afc --- /dev/null +++ b/include/ofx-props.yml @@ -0,0 +1,1340 @@ +######################################################################## +# All OpenFX properties. +######################################################################## + +# List all properties by property-set, and then metadata for each +# property. + +# Notes: +# - In prop sets, _REFs interpolate the corresponding _DEFs. This is +# just to save repetition, mostly for params. +# - In prop sets, the property set itself sets defaults for which +# side is able to write to props in that prop set. Individual props +# can override that with this syntax: - OfxPropName | write=host,... +# (this is generalizable, so "optional" can be done the same way) +# - Action inArgs/outArgs don't (yet) support this override syntax +# because presumably all inArgs are host->plugin and outArgs are +# plugin->host, by definition. + +propertySets: + ImageEffectHost: + write: host + props: + - OfxPropAPIVersion + - OfxPropType + - OfxPropName + - OfxPropLabel + - OfxPropVersion + - OfxPropVersionLabel + - OfxImageEffectHostPropIsBackground + - OfxImageEffectPropSupportsOverlays + - OfxImageEffectPropSupportsMultiResolution + - OfxImageEffectPropSupportsTiles + - OfxImageEffectPropTemporalClipAccess + - OfxImageEffectPropSupportedComponents + - OfxImageEffectPropSupportedContexts + - OfxImageEffectPropMultipleClipDepths + - OfxImageEffectPropSupportsMultipleClipPARs + - OfxImageEffectPropSetableFrameRate + - OfxImageEffectPropSetableFielding + - OfxParamHostPropSupportsCustomInteract + - OfxParamHostPropSupportsStringAnimation + - OfxParamHostPropSupportsChoiceAnimation + - OfxParamHostPropSupportsBooleanAnimation + - OfxParamHostPropSupportsCustomAnimation + - OfxParamHostPropSupportsStrChoice + - OfxParamHostPropSupportsStrChoiceAnimation + - OfxParamHostPropMaxParameters + - OfxParamHostPropMaxPages + - OfxParamHostPropPageRowColumnCount + - OfxPropHostOSHandle + - OfxParamHostPropSupportsParametricAnimation + - OfxImageEffectInstancePropSequentialRender + - OfxImageEffectPropOpenGLRenderSupported + - OfxImageEffectPropRenderQualityDraft + - OfxImageEffectHostPropNativeOrigin + - OfxImageEffectPropColourManagementAvailableConfigs + - OfxImageEffectPropColourManagementStyle + EffectDescriptor: + write: plugin + props: + - OfxPropType + - OfxPropLabel + - OfxPropShortLabel + - OfxPropLongLabel + - OfxPropVersion + - OfxPropVersionLabel + - OfxPropPluginDescription + - OfxImageEffectPropSupportedContexts + - OfxImageEffectPluginPropGrouping + - OfxImageEffectPluginPropSingleInstance + - OfxImageEffectPluginRenderThreadSafety + - OfxImageEffectPluginPropHostFrameThreading + - OfxImageEffectPluginPropOverlayInteractV1 + - OfxImageEffectPropSupportsMultiResolution + - OfxImageEffectPropSupportsTiles + - OfxImageEffectPropTemporalClipAccess + - OfxImageEffectPropSupportedPixelDepths + - OfxImageEffectPluginPropFieldRenderTwiceAlways + - OfxImageEffectPropMultipleClipDepths # should have been SupportsMultipleClipDepths + - OfxImageEffectPropSupportsMultipleClipPARs + - OfxImageEffectPluginRenderThreadSafety + - OfxImageEffectPropClipPreferencesSlaveParam + - OfxImageEffectPropOpenGLRenderSupported + - OfxPluginPropFilePath | write=host + - OfxOpenGLPropPixelDepth + - OfxImageEffectPluginPropOverlayInteractV2 + - OfxImageEffectPropColourManagementAvailableConfigs + - OfxImageEffectPropColourManagementStyle + EffectInstance: + write: host + props: + - OfxPropType + - OfxImageEffectPropContext + - OfxPropInstanceData + - OfxImageEffectPropProjectSize + - OfxImageEffectPropProjectOffset + - OfxImageEffectPropProjectExtent + - OfxImageEffectPropPixelAspectRatio + - OfxImageEffectInstancePropEffectDuration + - OfxImageEffectInstancePropSequentialRender + - OfxImageEffectPropSupportsTiles + - OfxImageEffectPropOpenGLRenderSupported + - OfxImageEffectPropFrameRate + - OfxPropIsInteractive + - OfxImageEffectPropOCIOConfig + - OfxImageEffectPropOCIODisplay + - OfxImageEffectPropOCIOView + - OfxImageEffectPropColourManagementConfig + - OfxImageEffectPropColourManagementStyle + - OfxImageEffectPropDisplayColourspace + - OfxImageEffectPropPluginHandle + ClipDescriptor: + write: plugin + props: + - OfxPropType + - OfxPropName + - OfxPropLabel + - OfxPropShortLabel + - OfxPropLongLabel + - OfxImageEffectPropSupportedComponents + - OfxImageEffectPropTemporalClipAccess + - OfxImageClipPropOptional + - OfxImageClipPropFieldExtraction + - OfxImageClipPropIsMask + - OfxImageEffectPropSupportsTiles + ClipInstance: + write: host + props: + - OfxPropType + - OfxPropName + - OfxPropLabel + - OfxPropShortLabel + - OfxPropLongLabel + - OfxImageEffectPropSupportedComponents + - OfxImageEffectPropTemporalClipAccess + - OfxImageClipPropColourspace + - OfxImageClipPropPreferredColourspaces + - OfxImageClipPropOptional + - OfxImageClipPropFieldExtraction + - OfxImageClipPropIsMask + - OfxImageEffectPropSupportsTiles + - OfxImageEffectPropPixelDepth + - OfxImageEffectPropComponents + - OfxImageClipPropUnmappedPixelDepth + - OfxImageClipPropUnmappedComponents + - OfxImageEffectPropPreMultiplication + - OfxImagePropPixelAspectRatio + - OfxImageEffectPropFrameRate + - OfxImageEffectPropFrameRange + - OfxImageClipPropFieldOrder + - OfxImageClipPropConnected + - OfxImageEffectPropUnmappedFrameRange + - OfxImageEffectPropUnmappedFrameRate + - OfxImageClipPropContinuousSamples + Image: + write: host + props: + - OfxPropType + - OfxImageEffectPropPixelDepth + - OfxImageEffectPropComponents + - OfxImageEffectPropPreMultiplication + - OfxImageEffectPropRenderScale + - OfxImagePropPixelAspectRatio + - OfxImagePropData + - OfxImagePropBounds + - OfxImagePropRegionOfDefinition + - OfxImagePropRowBytes + - OfxImagePropField + - OfxImagePropUniqueIdentifier + ParameterSet: + write: plugin + props: + - OfxPropParamSetNeedsSyncing + - OfxPluginPropParamPageOrder + ParamsCommon_DEF: + - OfxPropType + - OfxPropName + - OfxPropLabel + - OfxPropShortLabel + - OfxPropLongLabel + - OfxParamPropType + - OfxParamPropSecret + - OfxParamPropHint + - OfxParamPropScriptName + - OfxParamPropParent + - OfxParamPropEnabled + - OfxParamPropDataPtr + - OfxPropIcon + ParamsAllButGroupPage_DEF: + - OfxParamPropInteractV1 + - OfxParamPropInteractSize + - OfxParamPropInteractSizeAspect + - OfxParamPropInteractMinimumSize + - OfxParamPropInteractPreferedSize + - OfxParamPropHasHostOverlayHandle + - kOfxParamPropUseHostOverlayHandle + ParamsValue_DEF: + - OfxParamPropDefault + - OfxParamPropAnimates + - OfxParamPropIsAnimating | write=host + - OfxParamPropIsAutoKeying | write=host + - OfxParamPropPersistant + - OfxParamPropEvaluateOnChange + - OfxParamPropPluginMayWrite + - OfxParamPropCacheInvalidation + - OfxParamPropCanUndo + ParamsNumeric_DEF: + - OfxParamPropMin + - OfxParamPropMax + - OfxParamPropDisplayMin + - OfxParamPropDisplayMax + ParamsDouble_DEF: + - OfxParamPropIncrement + - OfxParamPropDigits + ParamsGroup: + write: plugin + props: + - OfxParamPropGroupOpen + - ParamsCommon_REF + ParamDouble1D: + write: plugin + props: + - OfxParamPropShowTimeMarker + - OfxParamPropDoubleType + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + - ParamsNumeric_REF + - ParamsDouble_REF + ParamsDouble2D3D: + write: plugin + props: + - OfxParamPropDoubleType + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + - ParamsNumeric_REF + - ParamsDouble_REF + ParamsNormalizedSpatial: + write: plugin + props: + - OfxParamPropDefaultCoordinateSystem + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + - ParamsNumeric_REF + - ParamsDouble_REF + ParamsInt2D3D: + write: plugin + props: + - OfxParamPropDimensionLabel + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + - ParamsNumeric_REF + ParamsString: + write: plugin + props: + - OfxParamPropStringMode + - OfxParamPropStringFilePathExists + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + - ParamsNumeric_REF + ParamsByte: + write: plugin + props: + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + - ParamsNumeric_REF + ParamsChoice: + write: plugin + props: + - OfxParamPropChoiceOption + - OfxParamPropChoiceOrder + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + ParamsStrChoice: + write: plugin + props: + - OfxParamPropChoiceOption + - OfxParamPropChoiceEnum + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + ParamsCustom: + write: plugin + props: + - OfxParamPropCustomCallbackV1 + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + ParamsPage: + write: plugin + props: + - OfxParamPropPageChild + - ParamsCommon_REF + ParamsParametric: + write: plugin + props: + - OfxParamPropAnimates + - OfxParamPropIsAnimating + - OfxParamPropIsAutoKeying + - OfxParamPropPersistant + - OfxParamPropEvaluateOnChange + - OfxParamPropPluginMayWrite + - OfxParamPropCacheInvalidation + - OfxParamPropCanUndo + - OfxParamPropParametricDimension + - OfxParamPropParametricUIColour + - OfxParamPropParametricInteractBackground + - OfxParamPropParametricRange + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + InteractDescriptor: + write: host + props: + - OfxInteractPropHasAlpha + - OfxInteractPropBitDepth + InteractInstance: + write: host + props: + - OfxPropEffectInstance + - OfxPropInstanceData + - OfxInteractPropPixelScale + - OfxInteractPropBackgroundColour + - OfxInteractPropHasAlpha + - OfxInteractPropBitDepth + - OfxInteractPropSlaveToParam + - OfxInteractPropSuggestedColour + +Actions: + OfxActionLoad: + inArgs: + outArgs: + OfxActionDescribe: + inArgs: + outArgs: + OfxActionUnload: + inArgs: + outArgs: + OfxActionPurgeCaches: + inArgs: + outArgs: + OfxActionSyncPrivateData: + inArgs: + outArgs: + OfxActionCreateInstance: + inArgs: + outArgs: + OfxActionDestroyInstance: + inArgs: + outArgs: + OfxActionInstanceChanged: + inArgs: + - OfxPropType + - OfxPropName + - OfxPropChangeReason + - OfxPropTime + - OfxImageEffectPropRenderScale + outArgs: + OfxActionBeginInstanceChanged: + inArgs: + - OfxPropChangeReason + outArgs: [] + OfxActionEndInstanceChanged: + inArgs: + - OfxPropChangeReason + outArgs: + OfxActionBeginInstanceEdit: + inArgs: + outArgs: + OfxActionEndInstanceEdit: + inArgs: + outArgs: + OfxImageEffectActionGetRegionOfDefinition: + inArgs: + - OfxPropTime + - OfxImageEffectPropRenderScale + outArgs: + - OfxImageEffectPropRegionOfDefinition + OfxImageEffectActionGetRegionsOfInterest: + inArgs: + - OfxPropTime + - OfxImageEffectPropRenderScale + - OfxImageEffectPropRegionOfInterest + outArgs: + # - OfxImageEffectClipPropRoI_ # with clip name + OfxImageEffectActionGetTimeDomain: + inArgs: + outArgs: + - OfxImageEffectPropFrameRange + OfxImageEffectActionGetFramesNeeded: + inArgs: + - OfxPropTime + outArgs: + - OfxImageEffectPropFrameRange + OfxImageEffectActionGetClipPreferences: + inArgs: + outArgs: + - OfxImageEffectPropFrameRate + - OfxImageClipPropFieldOrder + - OfxImageEffectPropPreMultiplication + - OfxImageClipPropContinuousSamples + - OfxImageEffectFrameVarying + # these special props all have the clip name postpended after "_" + # - OfxImageClipPropComponents_ + # - OfxImageClipPropDepth_ + # - OfxImageClipPropPreferredColourspaces_ + # - OfxImageClipPropPAR_ + OfxImageEffectActionIsIdentity: + inArgs: + - OfxPropTime + - OfxImageEffectPropFieldToRender + - OfxImageEffectPropRenderWindow + - OfxImageEffectPropRenderScale + OfxImageEffectActionRender: + inArgs: + - OfxPropTime + - OfxImageEffectPropSequentialRenderStatus + - OfxImageEffectPropInteractiveRenderStatus + - OfxImageEffectPropRenderQualityDraft + - OfxImageEffectPropCudaEnabled + - OfxImageEffectPropCudaRenderSupported + - OfxImageEffectPropCudaStream + - OfxImageEffectPropCudaStreamSupported + - OfxImageEffectPropMetalCommandQueue + - OfxImageEffectPropMetalEnabled + - OfxImageEffectPropMetalRenderSupported + - OfxImageEffectPropOpenCLCommandQueue + - OfxImageEffectPropOpenCLEnabled + - OfxImageEffectPropOpenCLImage + - OfxImageEffectPropOpenCLRenderSupported + - OfxImageEffectPropOpenCLSupported + - OfxImageEffectPropOpenGLEnabled + - OfxImageEffectPropOpenGLTextureIndex + - OfxImageEffectPropOpenGLTextureTarget + - OfxImageEffectPropInteractiveRenderStatus + OfxImageEffectActionBeginSequenceRender: + inArgs: + - OfxImageEffectPropFrameRange + - OfxImageEffectPropFrameStep + - OfxPropIsInteractive + - OfxImageEffectPropRenderScale + - OfxImageEffectPropSequentialRenderStatus + - OfxImageEffectPropInteractiveRenderStatus + - OfxImageEffectPropCudaEnabled + - OfxImageEffectPropCudaRenderSupported + - OfxImageEffectPropCudaStream + - OfxImageEffectPropCudaStreamSupported + - OfxImageEffectPropMetalCommandQueue + - OfxImageEffectPropMetalEnabled + - OfxImageEffectPropMetalRenderSupported + - OfxImageEffectPropOpenCLCommandQueue + - OfxImageEffectPropOpenCLEnabled + - OfxImageEffectPropOpenCLImage + - OfxImageEffectPropOpenCLRenderSupported + - OfxImageEffectPropOpenCLSupported + - OfxImageEffectPropOpenGLEnabled + - OfxImageEffectPropOpenGLTextureIndex + - OfxImageEffectPropOpenGLTextureTarget + - OfxImageEffectPropInteractiveRenderStatus + outArgs: + OfxImageEffectActionEndSequenceRender: + inArgs: + - OfxImageEffectPropFrameRange + - OfxImageEffectPropFrameStep + - OfxPropIsInteractive + - OfxImageEffectPropRenderScale + - OfxImageEffectPropSequentialRenderStatus + - OfxImageEffectPropInteractiveRenderStatus + - OfxImageEffectPropCudaEnabled + - OfxImageEffectPropCudaRenderSupported + - OfxImageEffectPropCudaStream + - OfxImageEffectPropCudaStreamSupported + - OfxImageEffectPropMetalCommandQueue + - OfxImageEffectPropMetalEnabled + - OfxImageEffectPropMetalRenderSupported + - OfxImageEffectPropOpenCLCommandQueue + - OfxImageEffectPropOpenCLEnabled + - OfxImageEffectPropOpenCLImage + - OfxImageEffectPropOpenCLRenderSupported + - OfxImageEffectPropOpenCLSupported + - OfxImageEffectPropOpenGLEnabled + - OfxImageEffectPropOpenGLTextureIndex + - OfxImageEffectPropOpenGLTextureTarget + - OfxImageEffectPropInteractiveRenderStatus + outArgs: + OfxImageEffectActionDescribeInContext: + inArgs: + - OfxImageEffectPropContext + outArgs: + # These are duplicates of regular describe/create/destroy, + # not unique action names. + # OfxActionDescribeInteract: + # inArgs: + # outArgs: + # OfxActionCreateInstanceInteract: + # inArgs: + # outArgs: + # OfxActionDestroyInstanceInteract: + # inArgs: + # outArgs: + OfxInteractActionDraw: + inArgs: + - OfxPropEffectInstance + - OfxInteractPropDrawContext + - OfxInteractPropPixelScale + - OfxInteractPropBackgroundColour + - OfxPropTime + - OfxImageEffectPropRenderScale + outArgs: + OfxInteractActionPenMotion: + inArgs: + - OfxPropEffectInstance + - OfxInteractPropPixelScale + - OfxInteractPropBackgroundColour + - OfxPropTime + - OfxImageEffectPropRenderScale + - OfxInteractPropPenPosition + - OfxInteractPropPenViewportPosition + - OfxInteractPropPenPressure + outArgs: + OfxInteractActionPenDown: + inArgs: + - OfxPropEffectInstance + - OfxInteractPropPixelScale + - OfxInteractPropBackgroundColour + - OfxPropTime + - OfxImageEffectPropRenderScale + - OfxInteractPropPenPosition + - OfxInteractPropPenViewportPosition + - OfxInteractPropPenPressure + outArgs: + OfxInteractActionPenUp: + inArgs: + - OfxPropEffectInstance + - OfxInteractPropPixelScale + - OfxInteractPropBackgroundColour + - OfxPropTime + - OfxImageEffectPropRenderScale + - OfxInteractPropPenPosition + - OfxInteractPropPenViewportPosition + - OfxInteractPropPenPressure + outArgs: + OfxInteractActionKeyDown: + inArgs: + - OfxPropEffectInstance + - kOfxPropKeySym + - kOfxPropKeyString + - OfxPropTime + - OfxImageEffectPropRenderScale + outArgs: + OfxInteractActionKeyUp: + inArgs: + - OfxPropEffectInstance + - kOfxPropKeySym + - kOfxPropKeyString + - OfxPropTime + - OfxImageEffectPropRenderScale + outArgs: + OfxInteractActionKeyRepeat: + inArgs: + - OfxPropEffectInstance + - kOfxPropKeySym + - kOfxPropKeyString + - OfxPropTime + - OfxImageEffectPropRenderScale + outArgs: + OfxInteractActionGainFocus: + inArgs: + - OfxPropEffectInstance + - OfxInteractPropPixelScale + - OfxInteractPropBackgroundColour + - OfxPropTime + - OfxImageEffectPropRenderScale + outArgs: + OfxInteractActionLoseFocus: + inArgs: + - OfxPropEffectInstance + - OfxInteractPropPixelScale + - OfxInteractPropBackgroundColour + - OfxPropTime + - OfxImageEffectPropRenderScale + outArgs: + CustomParamInterpFunc: + inArgs: + - OfxParamPropCustomValue + - OfxParamPropInterpolationTime + - OfxParamPropInterpolationAmount + outArgs: + - OfxParamPropCustomValue + - OfxParamPropInterpolationTime + OfxImageEffectActionGetOutputColourspace: + inArgs: + - OfxImageClipPropPreferredColourspaces + outArgs: + - OfxImageClipPropColourspace + +# Properties by name. +# Notes: +# type=bool means an int property with value 1 or 0 for true or false. +# type=enum means a string property with values from the "values" list +# default: only include here if not "" for strings or 0 for numeric or null for ptr. +# hostOptional: is it optional for a host to support this prop? Only include if true. +# pluginOptional: is it optional for a plugin to support this prop? Only include if true. +# dimension: 0 means "any dimension OK" +properties: + OfxPropType: + type: string + dimension: 1 + OfxPropName: + type: string + dimension: 1 + OfxPropTime: + type: double + dimension: 1 + # Param props + OfxParamPropSecret: + type: bool + dimension: 1 + OfxParamPropHint: + type: string + dimension: 1 + OfxParamPropScriptName: + type: string + dimension: 1 + OfxParamPropParent: + type: string + dimension: 1 + OfxParamPropEnabled: + type: bool + dimension: 1 + optional: true + OfxParamPropDataPtr: + type: pointer + dimension: 1 + OfxParamPropType: + type: string + dimension: 1 + OfxPropLabel: + type: string + dimension: 1 + OfxPropShortLabel: + type: string + dimension: 1 + hostOptional: true + OfxPropLongLabel: + type: string + dimension: 1 + hostOptional: true + OfxPropIcon: + type: string + dimension: 2 + hostOptional: true + # host props + OfxPropAPIVersion: + type: int + dimension: 0 + OfxPropVersion: + type: int + dimension: 0 + OfxPropVersionLabel: + type: string + dimension: 1 + # ImageEffect props: + OfxPropPluginDescription: + type: string + dimension: 1 + OfxImageEffectPropSupportedContexts: + type: enum + dimension: 0 + values: + - OfxImageEffectContextGenerator + - OfxImageEffectContextFilter + - OfxImageEffectContextTransition + - OfxImageEffectContextPaint + - OfxImageEffectContextGeneral + - OfxImageEffectContextRetimer + OfxImageEffectPluginPropGrouping: + type: string + dimension: 1 + OfxImageEffectPluginPropSingleInstance: + type: bool + dimension: 1 + OfxImageEffectPluginRenderThreadSafety: + type: enum + dimension: 1 + values: + - OfxImageEffectRenderUnsafe + - OfxImageEffectRenderInstanceSafe + - OfxImageEffectRenderFullySafe + OfxImageEffectPluginPropHostFrameThreading: + type: bool + dimension: 1 + OfxImageEffectPropSupportsMultiResolution: + type: bool + dimension: 1 + OfxImageEffectPropSupportsTiles: + type: bool + dimension: 1 + OfxImageEffectPropTemporalClipAccess: + type: bool + dimension: 1 + OfxImageEffectPropSupportedPixelDepths: + type: string + dimension: 0 + values: + - OfxBitDepthNone + - OfxBitDepthByte + - OfxBitDepthShort + - OfxBitDepthHalf + - OfxBitDepthFloat + OfxImageEffectPluginPropFieldRenderTwiceAlways: + type: bool + dimension: 1 + OfxImageEffectPropMultipleClipDepths: + cname: kOfxImageEffectPropSupportsMultipleClipDepths + type: bool + dimension: 1 + OfxImageEffectPropSupportsMultipleClipPARs: + type: bool + dimension: 1 + OfxImageEffectPropClipPreferencesSlaveParam: + type: string + dimension: 0 + OfxImageEffectInstancePropSequentialRender: + type: bool + dimension: 1 + OfxPluginPropFilePath: + type: enum + dimension: 1 + values: ['false', 'true', 'needed'] + OfxImageEffectPropOpenGLRenderSupported: + type: enum + dimension: 1 + values: ['false', 'true', 'needed'] + OfxImageEffectPropCudaRenderSupported: + type: enum + dimension: 1 + values: ['false', 'true', 'needed'] + OfxImageEffectPropCudaStreamSupported: + type: enum + dimension: 1 + values: ['false', 'true', 'needed'] + OfxImageEffectPropMetalRenderSupported: + type: enum + dimension: 1 + values: ['false', 'true', 'needed'] + introduced: "1.5" + OfxImageEffectPropOpenCLRenderSupported: + type: enum + dimension: 1 + values: ['false', 'true', 'needed'] + introduced: "1.5" + # Clip props + OfxImageClipPropColourspace: + type: string + dimension: 1 + introduced: "1.5" + OfxImageClipPropConnected: + type: bool + dimension: 1 + OfxImageClipPropContinuousSamples: + type: bool + dimension: 1 + OfxImageClipPropFieldExtraction: + type: enum + dimension: 1 + values: ['OfxImageFieldNone', 'OfxImageFieldLower', 'OfxImageFieldUpper', 'OfxImageFieldBoth', 'OfxImageFieldSingle', 'OfxImageFieldDoubled'] + OfxImageClipPropFieldOrder: + type: enum + dimension: 1 + values: ['OfxImageFieldNone', 'OfxImageFieldLower', 'OfxImageFieldUpper'] + OfxImageClipPropIsMask: + type: bool + dimension: 1 + OfxImageClipPropOptional: + type: bool + dimension: 1 + OfxImageClipPropPreferredColourspaces: + type: string + dimension: 0 + introduced: "1.5" + OfxImageClipPropUnmappedComponents: + type: enum + dimension: 1 + values: + - OfxImageComponentNone + - OfxImageComponentRGBA + - OfxImageComponentRGB + - OfxImageComponentAlpha + OfxImageClipPropUnmappedPixelDepth: + type: enum + dimension: 1 + values: + - OfxBitDepthNone + - OfxBitDepthByte + - OfxBitDepthShort + - OfxBitDepthHalf + - OfxBitDepthFloat + # # Special props, with clip names postpended: + # OfxImageClipPropComponents_: + # type: enum + # dimension: 1 + # values: + # - OfxImageComponentNone + # - OfxImageComponentRGBA + # - OfxImageComponentRGB + # - OfxImageComponentAlpha + # OfxImageClipPropDepth_: + # type: enum + # dimension: 1 + # values: + # - OfxBitDepthNone + # - OfxBitDepthByte + # - OfxBitDepthShort + # - OfxBitDepthHalf + # - OfxBitDepthFloat + # OfxImageClipPropPreferredColourspaces_: + # type: string + # dimension: 1 + # OfxImageClipPropPAR_: + # type: double + # dimension: 1 + # OfxImageClipPropRoI_: + # type: int + # dimension: 4 + + # Image Effect + OfxImageEffectFrameVarying: + type: bool + dimension: 1 + OfxImageEffectHostPropIsBackground: + type: bool + dimension: 1 + OfxImageEffectHostPropNativeOrigin: + type: enum + dimension: 1 + values: + - OfxImageEffectHostPropNativeOriginBottomLeft + - OfxImageEffectHostPropNativeOriginTopLeft + - OfxImageEffectHostPropNativeOriginCenter + OfxImageEffectInstancePropEffectDuration: + type: double + dimension: 1 + OfxImageEffectPluginPropOverlayInteractV1: + type: pointer + dimension: 1 + OfxImageEffectPluginPropOverlayInteractV2: + type: pointer + dimension: 1 + OfxImageEffectPropColourManagementAvailableConfigs: + type: string + dimension: 0 + introduced: "1.5" + OfxImageEffectPropColourManagementStyle: + type: enum + dimension: 1 + values: + - OfxImageEffectPropColourManagementNone + - OfxImageEffectPropColourManagementBasic + - OfxImageEffectPropColourManagementCore + - OfxImageEffectPropColourManagementFull + - OfxImageEffectPropColourManagementOCIO + introduced: "1.5" + OfxImageEffectPropComponents: + type: enum + dimension: 1 + values: + - OfxImageComponentNone + - OfxImageComponentRGBA + - OfxImageComponentRGB + - OfxImageComponentAlpha + OfxImageEffectPropContext: + type: enum + dimension: 1 + values: + - OfxImageEffectContextGenerator + - OfxImageEffectContextFilter + - OfxImageEffectContextTransition + - OfxImageEffectContextPaint + - OfxImageEffectContextGeneral + - OfxImageEffectContextRetimer + OfxImageEffectPropCudaEnabled: + type: bool + dimension: 1 + OfxImageEffectPropCudaStream: + type: pointer + dimension: 1 + OfxImageEffectPropDisplayColourspace: + type: string + dimension: 1 + introduced: "1.5" + OfxImageEffectPropFieldToRender: + type: enum + dimension: 1 + values: + - OfxImageFieldNone + - OfxImageFieldBoth + - OfxImageFieldLower + - OfxImageFieldUpper + OfxImageEffectPropFrameRange: + type: double + dimension: 2 + OfxImageEffectPropFrameRate: + type: double + dimension: 1 + OfxImageEffectPropFrameStep: + type: double + dimension: 1 + OfxImageEffectPropInAnalysis: + type: bool + dimension: 1 + deprecated: "1.4" + OfxImageEffectPropInteractiveRenderStatus: + type: bool + dimension: 1 + OfxImageEffectPropMetalCommandQueue: + type: pointer + dimension: 1 + introduced: "1.5" + OfxImageEffectPropMetalEnabled: + type: bool + dimension: 1 + introduced: "1.5" + OfxImageEffectPropOCIOConfig: + type: string + dimension: 1 + introduced: "1.5" + OfxImageEffectPropOCIODisplay: + type: string + dimension: 1 + introduced: "1.5" + OfxImageEffectPropOCIOView: + type: string + dimension: 1 + introduced: "1.5" + OfxImageEffectPropOpenCLCommandQueue: + type: pointer + dimension: 1 + introduced: "1.5" + OfxImageEffectPropOpenCLEnabled: + type: bool + dimension: 1 + introduced: "1.5" + OfxImageEffectPropOpenCLImage: + type: int + dimension: 1 + introduced: "1.5" + OfxImageEffectPropOpenCLSupported: + type: enum + dimension: 1 + values: + - "false" + - "true" + introduced: "1.5" + OfxImageEffectPropOpenGLEnabled: + type: bool + dimension: 1 + OfxImageEffectPropOpenGLTextureIndex: + type: int + dimension: 1 + OfxImageEffectPropOpenGLTextureTarget: + type: int + dimension: 1 + OfxImageEffectPropPixelDepth: + type: enum + dimension: 1 + values: + - OfxBitDepthNone + - OfxBitDepthByte + - OfxBitDepthShort + - OfxBitDepthHalf + - OfxBitDepthFloat + OfxImageEffectPropPluginHandle: + type: pointer + dimension: 1 + OfxImageEffectPropPreMultiplication: + type: enum + dimension: 1 + values: + - OfxImageOpaque + - OfxImagePreMultiplied + - OfxImageUnPreMultiplied + OfxImageEffectPropProjectExtent: + type: double + dimension: 2 + OfxImageEffectPropProjectOffset: + type: double + dimension: 2 + OfxImageEffectPropPixelAspectRatio: + cname: kOfxImageEffectPropProjectPixelAspectRatio + type: double + dimension: 1 + OfxImageEffectPropProjectSize: + type: double + dimension: 2 + OfxImageEffectPropRegionOfDefinition: + type: int + dimension: 4 + OfxImageEffectPropRegionOfInterest: + type: int + dimension: 4 + OfxImageEffectPropRenderQualityDraft: + type: bool + dimension: 1 + OfxImageEffectPropRenderScale: + type: double + dimension: 2 + OfxImageEffectPropRenderWindow: + type: int + dimension: 4 + OfxImageEffectPropSequentialRenderStatus: + type: bool + dimension: 1 + OfxImageEffectPropSetableFielding: + type: bool + dimension: 1 + OfxImageEffectPropSetableFrameRate: + type: bool + dimension: 1 + OfxImageEffectPropSupportedComponents: + type: enum + dimension: 0 + values: + - OfxImageComponentNone + - OfxImageComponentRGBA + - OfxImageComponentRGB + - OfxImageComponentAlpha + OfxImageEffectPropSupportsOverlays: + type: bool + dimension: 1 + OfxImageEffectPropUnmappedFrameRange: + type: double + dimension: 2 + OfxImageEffectPropUnmappedFrameRate: + type: double + dimension: 1 + OfxImageEffectPropColourManagementConfig: + type: string + dimension: 1 + introduced: "1.5" + OfxImagePropBounds: + type: int + dimension: 4 + OfxImagePropData: + type: pointer + dimension: 1 + OfxImagePropField: + type: enum + dimension: 1 + values: + - OfxImageFieldNone + - OfxImageFieldBoth + - OfxImageFieldLower + - OfxImageFieldUpper + OfxImagePropPixelAspectRatio: + type: double + dimension: 1 + OfxImagePropRegionOfDefinition: + type: int + dimension: 4 + OfxImagePropRowBytes: + type: int + dimension: 1 + OfxImagePropUniqueIdentifier: + type: string + dimension: 1 + # Interact/Drawing + OfxInteractPropBackgroundColour: + type: double + dimension: 3 + OfxInteractPropBitDepth: + type: int + dimension: 1 + OfxInteractPropDrawContext: + type: pointer + dimension: 1 + OfxInteractPropHasAlpha: + type: bool + dimension: 1 + OfxInteractPropPenPosition: + type: double + dimension: 2 + OfxInteractPropPenPressure: + type: double + dimension: 1 + OfxInteractPropPenViewportPosition: + type: int + dimension: 2 + OfxInteractPropPixelScale: + type: double + dimension: 2 + OfxInteractPropSlaveToParam: + type: string + dimension: 0 + OfxInteractPropSuggestedColour: + type: double + dimension: 3 + OfxInteractPropViewport: + cname: kOfxInteractPropViewportSize + type: int + dimension: 2 + deprecated: "1.3" + OfxOpenGLPropPixelDepth: + type: enum + dimension: 0 + values: + - OfxBitDepthNone + - OfxBitDepthByte + - OfxBitDepthShort + - OfxBitDepthHalf + - OfxBitDepthFloat + OfxParamHostPropMaxPages: + type: int + dimension: 1 + OfxParamHostPropMaxParameters: + type: int + dimension: 1 + OfxParamHostPropPageRowColumnCount: + type: int + dimension: 2 + OfxParamHostPropSupportsBooleanAnimation: + type: bool + dimension: 1 + OfxParamHostPropSupportsChoiceAnimation: + type: bool + dimension: 1 + OfxParamHostPropSupportsCustomAnimation: + type: bool + dimension: 1 + OfxParamHostPropSupportsCustomInteract: + type: bool + dimension: 1 + OfxParamHostPropSupportsParametricAnimation: + type: bool + dimension: 1 + OfxParamHostPropSupportsStrChoice: + type: bool + dimension: 1 + introduced: "1.5" + OfxParamHostPropSupportsStrChoiceAnimation: + type: bool + dimension: 1 + introduced: "1.5" + OfxParamHostPropSupportsStringAnimation: + type: bool + dimension: 1 + # Param + OfxParamPropAnimates: + type: bool + dimension: 1 + OfxParamPropCacheInvalidation: + type: enum + dimension: 1 + values: + - OfxParamInvalidateValueChange + - OfxParamInvalidateValueChangeToEnd + - OfxParamInvalidateAll + OfxParamPropCanUndo: + type: bool + dimension: 1 + OfxParamPropChoiceEnum: + type: bool + dimension: 1 + added: "1.5" + OfxParamPropChoiceOption: + type: string + dimension: 0 + OfxParamPropChoiceOrder: + type: int + dimension: 0 + OfxParamPropCustomCallbackV1: + cname: kOfxParamPropCustomInterpCallbackV1 + type: pointer + dimension: 1 + OfxParamPropCustomValue: + type: string + dimension: 2 + # This is special because its type and dims vary depending on the param + OfxParamPropDefault: + type: [int, double, string, bytes] + dimension: 0 + OfxParamPropDefaultCoordinateSystem: + type: enum + dimension: 1 + values: + - OfxParamCoordinatesCanonical + - OfxParamCoordinatesNormalised + OfxParamPropDigits: + type: int + dimension: 1 + OfxParamPropDimensionLabel: + type: string + dimension: 1 + OfxParamPropDisplayMax: + type: [int, double] + dimension: 0 + OfxParamPropDisplayMin: + type: [int, double] + dimension: 0 + OfxParamPropDoubleType: + type: enum + dimension: 1 + values: + - OfxParamDoubleTypePlain + - OfxParamDoubleTypeAngle + - OfxParamDoubleTypeScale + - OfxParamDoubleTypeTime + - OfxParamDoubleTypeAbsoluteTime + - OfxParamDoubleTypeX + - OfxParamDoubleTypeXAbsolute + - OfxParamDoubleTypeY + - OfxParamDoubleTypeYAbsolute + - OfxParamDoubleTypeXY + - OfxParamDoubleTypeXYAbsolute + OfxParamPropEvaluateOnChange: + type: bool + dimension: 1 + OfxParamPropGroupOpen: + type: bool + dimension: 1 + OfxParamPropHasHostOverlayHandle: + type: bool + dimension: 1 + OfxParamPropIncrement: + type: double + dimension: 1 + OfxParamPropInteractMinimumSize: + type: double + dimension: 2 + OfxParamPropInteractPreferedSize: + type: int + dimension: 2 + OfxParamPropInteractSize: + type: double + dimension: 2 + OfxParamPropInteractSizeAspect: + type: double + dimension: 1 + OfxParamPropInteractV1: + type: pointer + dimension: 1 + OfxParamPropInterpolationAmount: + type: double + dimension: 1 + OfxParamPropInterpolationTime: + type: double + dimension: 2 + OfxParamPropIsAnimating: + type: bool + dimension: 1 + OfxParamPropIsAutoKeying: + type: bool + dimension: 1 + OfxParamPropMax: + type: [int, double] + dimension: 0 + OfxParamPropMin: + type: [int, double] + dimension: 0 + OfxParamPropPageChild: + type: string + dimension: 0 + OfxParamPropParametricDimension: + type: int + dimension: 1 + OfxParamPropParametricInteractBackground: + type: pointer + dimension: 1 + OfxParamPropParametricRange: + type: double + dimension: 2 + OfxParamPropParametricUIColour: + type: double + dimension: 0 + OfxParamPropPersistant: + type: bool + dimension: 1 + OfxParamPropPluginMayWrite: + type: bool + dimension: 1 + deprecated: "1.4" + OfxParamPropShowTimeMarker: + type: bool + dimension: 1 + OfxParamPropStringMode: + type: enum + dimension: 1 + values: + - OfxParamStringIsSingleLine + - OfxParamStringIsMultiLine + - OfxParamStringIsFilePath + - OfxParamStringIsDirectoryPath + - OfxParamStringIsLabel + - OfxParamStringIsRichTextFormat + kOfxParamPropUseHostOverlayHandle: + cname: kOfxParamPropUseHostOverlayHandle + type: bool + dimension: 1 + OfxParamPropStringFilePathExists: + type: bool + dimension: 1 + OfxPluginPropParamPageOrder: + type: string + dimension: 0 + OfxPropChangeReason: + type: enum + dimension: 1 + values: + - OfxChangeUserEdited + - OfxChangePluginEdited + - OfxChangeTime + OfxPropEffectInstance: + type: pointer + dimension: 1 + OfxPropHostOSHandle: + type: pointer + dimension: 1 + OfxPropInstanceData: + type: pointer + dimension: 1 + OfxPropIsInteractive: + type: bool + dimension: 1 + kOfxPropKeyString: + cname: kOfxPropKeyString + type: string + dimension: 1 + kOfxPropKeySym: + cname: kOfxPropKeySym + type: int + dimension: 1 + OfxPropParamSetNeedsSyncing: + type: bool + dimension: 1 diff --git a/include/ofxInteract.h b/include/ofxInteract.h index 3acc6d33..6b5e061a 100644 --- a/include/ofxInteract.h +++ b/include/ofxInteract.h @@ -111,7 +111,7 @@ This is used to indicate the status of the 'pen' in an interact. If a pen has on */ #define kOfxInteractPropPenPressure "OfxInteractPropPenPressure" -/** @brief Indicates whether the dits per component in the interact's openGL frame buffer +/** @brief Indicates the bits per component in the interact's openGL frame buffer - Type - int X 1 - Property Set - interact instance and descriptor (read only) diff --git a/include/ofxKeySyms.h b/include/ofxKeySyms.h index 01397f6a..2535b7d1 100644 --- a/include/ofxKeySyms.h +++ b/include/ofxKeySyms.h @@ -31,7 +31,7 @@ the UTF8 value. /** @brief This property encodes a single keypresses that generates a unicode code point. The value is stored as a UTF8 string. - Type - C string X 1, UTF8 - - Property Set - an read only in argument for the actions ::kOfxInteractActionKeyDown, ::kOfxInteractActionKeyUp and ::kOfxInteractActionKeyRepeat. + - Property Set - a read-only in argument for the actions ::kOfxInteractActionKeyDown, ::kOfxInteractActionKeyUp and ::kOfxInteractActionKeyRepeat. - Valid Values - a UTF8 string representing a single character, or the empty string. This property represents the UTF8 encode value of a single key press by a user in an OFX interact. diff --git a/include/ofxParam.h b/include/ofxParam.h index af834e0f..772d3f91 100644 --- a/include/ofxParam.h +++ b/include/ofxParam.h @@ -717,7 +717,7 @@ Setting this will also reset ::kOfxParamPropDisplayMin. - Property Set - plugin parameter descriptor (read/write) and instance (read/write), - Default - the largest possible value corresponding to the parameter type (eg: INT_MAX for an integer, DBL_MAX for a double parameter) -Setting this will also reset :;kOfxParamPropDisplayMax. +Setting this will also reset ::kOfxParamPropDisplayMax. */ #define kOfxParamPropMax "OfxParamPropMax" diff --git a/include/ofxParametricParam.h b/include/ofxParametricParam.h index 2d52fdd0..4fa073d9 100644 --- a/include/ofxParametricParam.h +++ b/include/ofxParametricParam.h @@ -61,7 +61,7 @@ This indicates the dimension of the parametric param. - Property Set - parametric param descriptor (read/write) and instance (read only) - default - unset, - Value Values - three values for each dimension (see ::kOfxParamPropParametricDimension) - being interpretted as R, G and B of the colour for each curve drawn in the UI. + being interpreted as R, G and B of the colour for each curve drawn in the UI. This sets the colour of a parametric param curve drawn a host user interface. A colour triple is needed for each dimension of the oparametric param. diff --git a/scripts/gen-props.py b/scripts/gen-props.py new file mode 100644 index 00000000..3caf9cbe --- /dev/null +++ b/scripts/gen-props.py @@ -0,0 +1,450 @@ +# Copyright OpenFX and contributors to the OpenFX project. +# SPDX-License-Identifier: BSD-3-Clause + +import os +import re +import sys +import difflib +import argparse +import yaml +import logging +from pathlib import Path +from collections.abc import Iterable + +# Set up basic configuration for logging +logging.basicConfig( + level=logging.INFO, # Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL + format='%(levelname)s: %(message)s', # Format of the log messages + datefmt='%Y-%m-%d %H:%M:%S' # Date format +) + +# Global vars and config + +generated_source_header = """// Copyright OpenFX and contributors to the OpenFX project. +// SPDX-License-Identifier: BSD-3-Clause +// NOTE: This file is auto-generated by gen-props.py. DO NOT EDIT. +""" + + +def getPropertiesFromFile(path): + """Get all OpenFX property definitions from C header file. + + Uses a heuristic to identify property #define lines: + anything starting with '#define' and containing 'Prop' in the name. + """ + props = set() + with open(path) as f: + try: + lines = f.readlines() + except UnicodeDecodeError as e: + logging.error(f'error reading {path}: {e}') + raise e + for l in lines: + # Detect lines that correspond to a property definition, e.g: + # #define kOfxPropLala "OfxPropLala" + splits=l.split() + if len(splits) < 3: + continue + if splits[0] != '#define': + continue + # ignore these + nonProperties = ('kOfxPropertySuite', + # prop values, not props + 'kOfxImageEffectPropColourManagementNone', + 'kOfxImageEffectPropColourManagementBasic', + 'kOfxImageEffectPropColourManagementCore', + 'kOfxImageEffectPropColourManagementFull', + 'kOfxImageEffectPropColourManagementOCIO', + ) + if splits[1] in nonProperties: + continue + # these are props, as well as anything with Prop in the name + badlyNamedProperties = ("kOfxImageEffectFrameVarying", + "kOfxImageEffectPluginRenderThreadSafety") + if 'Prop' in splits[1] \ + or any(s in splits[1] for s in badlyNamedProperties): + props.add(splits[1]) + return props + +def getPropertiesFromDir(dir): + """ + Recursively get all property definitions from source files in a dir. + """ + + extensions = {'.c', '.h', '.cxx', '.hxx', '.cpp', '.hpp'} + + props = set() + for root, _dirs, files in os.walk(dir): + for file in files: + # Get the file extension + file_extension = os.path.splitext(file)[1] + + if file_extension in extensions: + file_path = os.path.join(root, file) + props |= getPropertiesFromFile(file_path) + return list(props) + +def get_def(name: str, defs): + if name.endswith('_REF'): + defname = name.replace("_REF", "_DEF") + return defs[defname] + else: + return [name] + +def expand_set_props(props_by_set): + """Expand refs in props_by_sets. + YAML can't interpolate a list, so we do it here, using + our own method: + - A prop set may end with _DEF in which case it's just a definition + containing a list of prop names. + - A prop *name* may be _REF which means to interpolate the + corresponding DEF list into this set's props. + Returns a new props_by_set with DEFs removed and all lists interpolated. + """ + # First get all the list defs + defs = {} + sets = {} + for key, value in props_by_set.items(): + if key.endswith('_DEF'): + defs[key] = value # should be a list to be interpolated + else: + sets[key] = value + for key in sets: + if not sets[key].get('props'): + pass # do nothing, no expansion needed in inArgs/outArgs for now + else: + sets[key]['props'] = [item for element in sets[key]['props'] \ + for item in get_def(element, defs)] + return sets + +def get_cname(propname, props_metadata): + """Get the C `#define` name for a property name. + + Look up the special cname in props_metadata, or in the normal + case just prepend "k". + """ + return props_metadata[propname].get('cname', "k" + propname) + +def find_stringname(cname, props_metadata): + """Try to find the actual string corresponding to the C #define name. + This may be slow; looks through all the metadata for a matching + "cname", otherwise strips "k". + """ + for p in props_metadata: + if props_metadata[p].get('cname') == cname: + return p + if cname.startswith("k"): + return cname[1:] + return "unknown-stringname-for-" + cname + +def find_missing(all_props, props_metadata): + """Find and print all mismatches between prop defs and metadata. + + Returns 0 if no errors. + """ + errs = 0 + for p in sorted(all_props): # constants from #include files, with "k" prefix + stringval = find_stringname(p, props_metadata) + if not props_metadata.get(stringval): + logging.error(f"No YAML metadata found for {p}") + errs += 1 + for p in sorted(props_metadata): + cname = get_cname(p, props_metadata) + if cname not in all_props: + logging.error(f"No prop definition found for '{p}' in source/include") + matches = difflib.get_close_matches(p, all_props, 3, 0.9) + if matches: + logging.info(f" Did you mean: {matches}") + errs += 1 + return errs + +def props_for_set(pset, props_by_set, name_only=True): + """Generator yielding all props for the given prop set (not used for actions). + This implements the options override scheme, parsing the prop name etc. + If not name_only, yields a dict of name and other options. + """ + if not props_by_set[pset].get('props'): + return + # All the default options for this propset. Merged into each prop. + propset_options = props_by_set[pset].copy() + propset_options.pop('props', None) + for p in props_by_set[pset]['props']: + # Parse p, of form NAME | key=value,key=value + pattern = r'^\s*(\w+)\s*\|\s*([\w\s,=]*)$' + match = re.match(pattern, p) + if not match: + if name_only: + yield p + else: + yield {**propset_options, **{"name": p}} + continue + name = match.group(1) + if name_only: + yield name + else: + # parse key/value pairs, apply defaults, and include name + key_values_str = match.group(2) + if not key_values_str: + options = {} + else: + key_value_pattern = r'(\w+)=([\w-]+)' + options = dict(re.findall(key_value_pattern, key_values_str)) + yield {**propset_options, **options, **{"name": name}} + +def check_props_by_set(props_by_set, props_by_action, props_metadata): + """Find and print all mismatches between prop set specs, props, and metadata. + + * Each prop name in props_by_set should have a match in props_metadata + Note that props_by_pset may have multiple levels, e.g. inArgs for an action. + Returns 0 if no errors. + """ + errs = 0 + for pset in sorted(props_by_set): + for p in props_for_set(pset, props_by_set): + if not props_metadata.get(p): + logging.error(f"No props metadata found for {pset}.{p}") + errs += 1 + for pset in sorted(props_by_action): + # For actions, the value of props_by_set[pset] is a dict, each + # (e.g. inArgs, outArgs) containing a list of props. + for subset in sorted(props_by_action[pset]): + if not props_by_action[pset][subset]: + continue + for p in props_by_action[pset][subset]: + if not props_metadata.get(p): + logging.error(f"No props metadata found for action {pset}.{subset}.{p}") + errs += 1 + return errs + +def check_props_used_by_set(props_by_set, props_by_action, props_metadata): + """Find and print all mismatches between prop set specs, props, and metadata. + + * Each prop name in props_metadata should be used in at least one set. + Returns 0 if no errors. + """ + errs = 0 + for prop in props_metadata: + found = 0 + for pset in props_by_set: + for set_prop in props_for_set(pset, props_by_set): + if set_prop == prop: + found += 1 + for pset in props_by_action: + # inArgs/outArgs + for subset in sorted(props_by_action[pset]): + if not props_by_action[pset][subset]: + continue + for set_prop in props_by_action[pset][subset]: + if set_prop == prop: + found += 1 + if not found and not props_metadata[prop].get('deprecated'): + logging.error(f"Prop {prop} not used in any prop set in YML file") + return errs + +def gen_props_metadata(props_metadata, outfile_path: Path): + """Generate a header file with metadata for each prop""" + with open(outfile_path, 'w') as outfile: + outfile.write(generated_source_header) + outfile.write(""" +#pragma once + +#include +#include +#include "ofxImageEffect.h" +#include "ofxGPURender.h" +#include "ofxColour.h" +#include "ofxDrawSuite.h" +#include "ofxParametricParam.h" +#include "ofxKeySyms.h" +#include "ofxOld.h" + +namespace OpenFX { +enum class PropType { + Int, + Double, + Enum, + Bool, + String, + Bytes, + Pointer +}; + +struct PropsMetadata { + std::string_view name; + std::vector types; + int dimension; + std::vector values; // for enums +}; + +""") + n_props = len(props_metadata) + outfile.write(f"static inline const std::array props_metadata {{ {{\n") + for p in sorted(props_metadata): + try: + md = props_metadata[p] + types = md.get('type') + if isinstance(types, str): # make it always a list + types = (types,) + prop_type_defs = "{" + ",".join(f'PropType::{t.capitalize()}' for t in types) + "}" + host_opt = md.get('hostOptional', 'false') + if host_opt in ('True', 'true', 1): + host_opt = 'true' + if host_opt in ('False', 'false', 0): + host_opt = 'false' + if md['type'] == 'enum': + assert isinstance(md['values'], list) + values = "{" + ",".join(f'\"{v}\"' for v in md['values']) + "}" + else: + values = "{}" + outfile.write(f"{{ \"{p}\", {prop_type_defs}, {md['dimension']}, " + f"{values} }},\n") + except Exception as e: + logging.error(f"Error: {p} is missing metadata? {e}") + raise(e) + outfile.write("} };\n\n") + + # Generate static asserts to ensure our constants match the string values + outfile.write("// Static asserts to check #define names vs. strings\n") + for p in sorted(props_metadata): + cname = get_cname(p, props_metadata) + outfile.write(f"static_assert(std::string_view(\"{p}\") == std::string_view({cname}));\n") + + outfile.write("} // namespace OpenFX\n") + + + +def gen_props_by_set(props_by_set, props_by_action, outfile_path: Path): + """Generate a header file with definitions of all prop sets, including their props""" + with open(outfile_path, 'w') as outfile: + outfile.write(generated_source_header) + outfile.write(""" +#pragma once + +#include +#include +#include +#include +#include "ofxImageEffect.h" +#include "ofxGPURender.h" +#include "ofxColour.h" +#include "ofxDrawSuite.h" +#include "ofxParametricParam.h" +#include "ofxKeySyms.h" +// #include "ofxOld.h" + +namespace OpenFX { + +struct Prop { + const char *name; + bool host_write; + bool plugin_write; + bool host_optional; +}; + +""") + outfile.write("// Properties for property sets\n") + outfile.write("static inline const std::map> prop_sets {\n") + + for pset in sorted(props_by_set.keys()): + propdefs = [] + for p in props_for_set(pset, props_by_set, False): + host_write = 'true' if p['write'] in ('host', 'all') else 'false' + plugin_write = 'true' if p['write'] in ('plugin', 'all') else 'false' + propdefs.append(f"{{ \"{p['name']}\", {host_write} , {plugin_write}, false }}") + propdefs_str = ",\n ".join(propdefs) + outfile.write(f"{{ \"{pset}\", {{ {propdefs_str} }} }},\n") + outfile.write("};\n\n") + + actions = sorted(props_by_action.keys()) + + outfile.write("// Actions\n") + outfile.write(f"static inline const std::array actions {{\n") + for pset in actions: + if not pset.startswith("kOfx"): + pset = '"' + pset + '"' # quote if it's not a known constant + outfile.write(f" {pset},\n") + outfile.write("};\n\n") + + outfile.write("// Properties for action args\n") + outfile.write("static inline const std::map, std::vector> action_props {\n") + for pset in actions: + for subset in props_by_action[pset]: + if not props_by_action[pset][subset]: + continue + propnames = ",\n ".join(sorted([f'"{p}"' for p in props_by_action[pset][subset]])) + if not pset.startswith("kOfx"): + psetname = '"' + pset + '"' # quote if it's not a known constant + else: + psetname = pset + outfile.write(f"{{ {{ {psetname}, \"{subset}\" }}, {{ {propnames} }} }},\n") + + outfile.write("};\n\n") + + outfile.write("// Static asserts for standard action names\n") + for pset in actions: + if not pset.startswith("Ofx"): + continue + outfile.write(f"static_assert(std::string_view(\"{pset}\") == std::string_view(k{pset}));\n") + + outfile.write("} // namespace OpenFX\n") + +def main(args): + script_dir = os.path.dirname(os.path.abspath(__file__)) + include_dir = Path(script_dir).parent / 'include' + all_props = getPropertiesFromDir(include_dir) + logging.info(f'Got {len(all_props)} props from "include" dir') + + with open(include_dir / 'ofx-props.yml', 'r') as props_file: + props_data = yaml.safe_load(props_file) + props_by_set = expand_set_props(props_data['propertySets']) + props_by_action = props_data['Actions'] + props_metadata = props_data['properties'] + + if args.verbose: + print("\n=== Checking ofx-props.yml: should map 1:1 to props found in source/header files") + errs = find_missing(all_props, props_metadata) + if not errs and args.verbose: + print(" ✔️ ALL OK") + + if args.verbose: + print("\n=== Checking ofx-props.yml: every prop in a set should have metadata in the YML file") + errs = check_props_by_set(props_by_set, props_by_action, props_metadata) + if not errs and args.verbose: + print(" ✔️ ALL OK") + + if args.verbose: + print("\n=== Checking ofx-props.yml: every prop should be used in in at least one set in the YML file") + errs = check_props_used_by_set(props_by_set, props_by_action, props_metadata) + if not errs and args.verbose: + print(" ✔️ ALL OK") + + if args.verbose: + print(f"=== Generating {args.props_metadata}") + gen_props_metadata(props_metadata, support_include_dir / args.props_metadata) + + if args.verbose: + print(f"=== Generating {args.props_metadata}") + gen_props_metadata(props_metadata, support_include_dir / args.props_metadata) + + if args.verbose: + print(f"=== Generating props by set header {args.props_by_set}") + gen_props_by_set(props_by_set, props_by_action, support_include_dir / args.props_by_set) + +if __name__ == "__main__": + script_dir = os.path.dirname(os.path.abspath(__file__)) + support_include_dir = Path(script_dir).parent / 'Support/include' + parser = argparse.ArgumentParser(description="Check OpenFX properties and generate ancillary data structures", + formatter_class=argparse.ArgumentDefaultsHelpFormatter) + + # Define arguments here + parser.add_argument('-v', '--verbose', action='store_true', help='Enable verbose mode') + parser.add_argument('--props-metadata', default=support_include_dir/"ofxPropsMetadata.h", + help="Generate property metadata into this file") + parser.add_argument('--props-by-set', default=support_include_dir/"ofxPropsBySet.h", + help="Generate props by set metadata into this file") + + # Parse the arguments + args = parser.parse_args() + + # Call the main function with parsed arguments + main(args)