From 75678061a4b07b7cc4b61b85651e12d10ba72465 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 27 Aug 2024 17:34:16 -0400 Subject: [PATCH 01/14] Add property checker/metadata system * include/ofx-props.yml is the property reference/metadata * scripts/gen-props.py is the checker and source generator All props are included in the YML definition, and the script generates C++ files with all the property metadata and suite assignments. Signed-off-by: Gary Oberbrunner --- Documentation/build.sh | 2 +- Documentation/genPropertiesReference.py | 97 +- .../Reference/ofxPropertiesReference.rst | 26 + include/ofx-props.yml | 1225 +++++++++++++++++ include/ofxInteract.h | 2 +- include/ofxKeySyms.h | 2 +- include/ofxParam.h | 2 +- include/ofxParametricParam.h | 2 +- scripts/gen-props.py | 292 ++++ 9 files changed, 1606 insertions(+), 44 deletions(-) create mode 100644 include/ofx-props.yml create mode 100644 scripts/gen-props.py diff --git a/Documentation/build.sh b/Documentation/build.sh index 9c05d3711..79483efa2 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 13451b790..d594ddc4d 100755 --- a/Documentation/genPropertiesReference.py +++ b/Documentation/genPropertiesReference.py @@ -2,67 +2,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 c38454c28..ef8ff53ec 100644 --- a/Documentation/sources/Reference/ofxPropertiesReference.rst +++ b/Documentation/sources/Reference/ofxPropertiesReference.rst @@ -1,6 +1,8 @@ .. _propertiesReference: Properties Reference ===================== +.. doxygendefine:: kOfxImageClipPropColourspace + .. doxygendefine:: kOfxImageClipPropConnected .. doxygendefine:: kOfxImageClipPropContinuousSamples @@ -13,6 +15,8 @@ Properties Reference .. doxygendefine:: kOfxImageClipPropOptional +.. doxygendefine:: kOfxImageClipPropPreferredColourspaces + .. doxygendefine:: kOfxImageClipPropUnmappedComponents .. doxygendefine:: kOfxImageClipPropUnmappedPixelDepth @@ -21,6 +25,8 @@ Properties Reference .. doxygendefine:: kOfxImageEffectHostPropIsBackground +.. doxygendefine:: kOfxImageEffectHostPropNativeOrigin + .. doxygendefine:: kOfxImageEffectInstancePropEffectDuration .. doxygendefine:: kOfxImageEffectInstancePropSequentialRender @@ -41,6 +47,12 @@ Properties Reference .. doxygendefine:: kOfxImageEffectPropClipPreferencesSlaveParam +.. doxygendefine:: kOfxImageEffectPropColourManagementAvailableConfigs + +.. doxygendefine:: kOfxImageEffectPropColourManagementConfig + +.. doxygendefine:: kOfxImageEffectPropColourManagementStyle + .. doxygendefine:: kOfxImageEffectPropComponents .. doxygendefine:: kOfxImageEffectPropContext @@ -53,6 +65,8 @@ Properties Reference .. doxygendefine:: kOfxImageEffectPropCudaStreamSupported +.. doxygendefine:: kOfxImageEffectPropDisplayColourspace + .. doxygendefine:: kOfxImageEffectPropFieldToRender .. doxygendefine:: kOfxImageEffectPropFrameRange @@ -71,12 +85,22 @@ Properties Reference .. doxygendefine:: kOfxImageEffectPropMetalRenderSupported +.. doxygendefine:: kOfxImageEffectPropOCIOConfig + +.. doxygendefine:: kOfxImageEffectPropOCIODisplay + +.. doxygendefine:: kOfxImageEffectPropOCIOView + .. doxygendefine:: kOfxImageEffectPropOpenCLCommandQueue .. doxygendefine:: kOfxImageEffectPropOpenCLEnabled +.. doxygendefine:: kOfxImageEffectPropOpenCLImage + .. doxygendefine:: kOfxImageEffectPropOpenCLRenderSupported +.. doxygendefine:: kOfxImageEffectPropOpenCLSupported + .. doxygendefine:: kOfxImageEffectPropOpenGLEnabled .. doxygendefine:: kOfxImageEffectPropOpenGLRenderSupported @@ -285,6 +309,8 @@ Properties Reference .. doxygendefine:: kOfxParamPropShowTimeMarker +.. doxygendefine:: kOfxParamPropStringFilePathExists + .. doxygendefine:: kOfxParamPropStringMode .. doxygendefine:: kOfxParamPropType diff --git a/include/ofx-props.yml b/include/ofx-props.yml new file mode 100644 index 000000000..34b06b9db --- /dev/null +++ b/include/ofx-props.yml @@ -0,0 +1,1225 @@ +######################################################################## +# All OpenFX properties. +######################################################################## + +# List all properties by property-set, and then metadata for each +# property. + +propertySets: + General: + - kOfxPropTime + ImageEffectHost: + - kOfxPropAPIVersion + - kOfxPropType + - kOfxPropName + - kOfxPropLabel + - kOfxPropVersion + - kOfxPropVersionLabel + - kOfxImageEffectHostPropIsBackground + - kOfxImageEffectPropSupportsOverlays + - kOfxImageEffectPropSupportsMultiResolution + - kOfxImageEffectPropSupportsTiles + - kOfxImageEffectPropTemporalClipAccess + - kOfxImageEffectPropSupportedComponents + - kOfxImageEffectPropSupportedContexts + - kOfxImageEffectPropSupportsMultipleClipDepths + - kOfxImageEffectPropSupportsMultipleClipPARs + - kOfxImageEffectPropSetableFrameRate + - kOfxImageEffectPropSetableFielding + - kOfxParamHostPropSupportsCustomInteract + - kOfxParamHostPropSupportsStringAnimation + - kOfxParamHostPropSupportsChoiceAnimation + - kOfxParamHostPropSupportsBooleanAnimation + - kOfxParamHostPropSupportsCustomAnimation + - kOfxParamHostPropMaxParameters + - kOfxParamHostPropMaxPages + - kOfxParamHostPropPageRowColumnCount + - kOfxPropHostOSHandle + - kOfxParamHostPropSupportsParametricAnimation + - kOfxImageEffectInstancePropSequentialRender + - kOfxImageEffectPropOpenGLRenderSupported + - kOfxImageEffectPropRenderQualityDraft + - kOfxImageEffectHostPropNativeOrigin + EffectDescriptor: + - kOfxPropType + - kOfxPropLabel + - kOfxPropShortLabel + - kOfxPropLongLabel + - kOfxPropVersion + - kOfxPropVersionLabel + - kOfxPropPluginDescription + - kOfxImageEffectPropSupportedContexts + - kOfxImageEffectPluginPropGrouping + - kOfxImageEffectPluginPropSingleInstance + - kOfxImageEffectPluginRenderThreadSafety + - kOfxImageEffectPluginPropHostFrameThreading + - kOfxImageEffectPluginPropOverlayInteractV1 + - kOfxImageEffectPropSupportsMultiResolution + - kOfxImageEffectPropSupportsTiles + - kOfxImageEffectPropTemporalClipAccess + - kOfxImageEffectPropSupportedPixelDepths + - kOfxImageEffectPluginPropFieldRenderTwiceAlways + - kOfxImageEffectPropSupportsMultipleClipDepths + - kOfxImageEffectPropSupportsMultipleClipPARs + - kOfxImageEffectPluginRenderThreadSafety + - kOfxImageEffectPropClipPreferencesSlaveParam + - kOfxImageEffectPropOpenGLRenderSupported + - kOfxPluginPropFilePath + ImageEffectHost: + - kOfxPropAPIVersion + - kOfxPropType + - kOfxPropName + - kOfxPropLabel + - kOfxPropVersion + - kOfxPropVersionLabel + - kOfxImageEffectHostPropIsBackground + - kOfxImageEffectPropSupportsOverlays + - kOfxImageEffectPropSupportsMultiResolution + - kOfxImageEffectPropSupportsTiles + - kOfxImageEffectPropTemporalClipAccess + - kOfxImageEffectPropSupportedComponents + - kOfxImageEffectPropSupportedContexts + - kOfxImageEffectPropSupportsMultipleClipDepths + - kOfxImageEffectPropSupportsMultipleClipPARs + - kOfxImageEffectPropSetableFrameRate + - kOfxImageEffectPropSetableFielding + - kOfxParamHostPropSupportsCustomInteract + - kOfxParamHostPropSupportsStringAnimation + - kOfxParamHostPropSupportsChoiceAnimation + - kOfxParamHostPropSupportsBooleanAnimation + - kOfxParamHostPropSupportsCustomAnimation + - kOfxParamHostPropMaxParameters + - kOfxParamHostPropMaxPages + - kOfxParamHostPropPageRowColumnCount + - kOfxPropHostOSHandle + - kOfxParamHostPropSupportsParametricAnimation + - kOfxImageEffectInstancePropSequentialRender + - kOfxImageEffectPropOpenGLRenderSupported + - kOfxImageEffectPropRenderQualityDraft + - kOfxImageEffectHostPropNativeOrigin + EffectDescriptor: + - kOfxPropType + - kOfxPropLabel + - kOfxPropShortLabel + - kOfxPropLongLabel + - kOfxPropVersion + - kOfxPropVersionLabel + - kOfxPropPluginDescription + - kOfxImageEffectPropSupportedContexts + - kOfxImageEffectPluginPropGrouping + - kOfxImageEffectPluginPropSingleInstance + - kOfxImageEffectPluginRenderThreadSafety + - kOfxImageEffectPluginPropHostFrameThreading + - kOfxImageEffectPluginPropOverlayInteractV1 + - kOfxImageEffectPropSupportsMultiResolution + - kOfxImageEffectPropSupportsTiles + - kOfxImageEffectPropTemporalClipAccess + - kOfxImageEffectPropSupportedPixelDepths + - kOfxImageEffectPluginPropFieldRenderTwiceAlways + - kOfxImageEffectPropSupportsMultipleClipDepths + - kOfxImageEffectPropSupportsMultipleClipPARs + - kOfxImageEffectPluginRenderThreadSafety + - kOfxImageEffectPropClipPreferencesSlaveParam + - kOfxImageEffectPropOpenGLRenderSupported + - kOfxPluginPropFilePath + EffectInstance: + - kOfxPropType + - kOfxImageEffectPropContext + - kOfxPropInstanceData + - kOfxImageEffectPropProjectSize + - kOfxImageEffectPropProjectOffset + - kOfxImageEffectPropProjectExtent + - kOfxImageEffectPropProjectPixelAspectRatio + - kOfxImageEffectInstancePropEffectDuration + - kOfxImageEffectInstancePropSequentialRender + - kOfxImageEffectPropSupportsTiles + - kOfxImageEffectPropOpenGLRenderSupported + - kOfxImageEffectPropFrameRate + - kOfxPropIsInteractive + + ClipDescriptor: + - kOfxPropType + - kOfxPropName + - kOfxPropLabel + - kOfxPropShortLabel + - kOfxPropLongLabel + - kOfxImageEffectPropSupportedComponents + - kOfxImageEffectPropTemporalClipAccess + - kOfxImageClipPropOptional + - kOfxImageClipPropFieldExtraction + - kOfxImageClipPropIsMask + - kOfxImageEffectPropSupportsTiles + + ClipInstance: + + - kOfxPropType + - kOfxPropName + - kOfxPropLabel + - kOfxPropShortLabel + - kOfxPropLongLabel + - kOfxImageEffectPropSupportedComponents + - kOfxImageEffectPropTemporalClipAccess + - kOfxImageClipPropColourspace + - kOfxImageClipPropPreferredColourspaces + - kOfxImageClipPropOptional + - kOfxImageClipPropFieldExtraction + - kOfxImageClipPropIsMask + - kOfxImageEffectPropSupportsTiles + - kOfxImageEffectPropPixelDepth + - kOfxImageEffectPropComponents + - kOfxImageClipPropUnmappedPixelDepth + - kOfxImageClipPropUnmappedComponents + - kOfxImageEffectPropPreMultiplication + - kOfxImagePropPixelAspectRatio + - kOfxImageEffectPropFrameRate + - kOfxImageEffectPropFrameRange + - kOfxImageClipPropFieldOrder + - kOfxImageClipPropConnected + - kOfxImageEffectPropUnmappedFrameRange + - kOfxImageEffectPropUnmappedFrameRate + - kOfxImageClipPropContinuousSamples + + Image: + + - kOfxPropType + - kOfxImageEffectPropPixelDepth + - kOfxImageEffectPropComponents + - kOfxImageEffectPropPreMultiplication + - kOfxImageEffectPropRenderScale + - kOfxImagePropPixelAspectRatio + - kOfxImagePropData + - kOfxImagePropBounds + - kOfxImagePropRegionOfDefinition + - kOfxImagePropRowBytes + - kOfxImagePropField + - kOfxImagePropUniqueIdentifier + + ParameterSet: + - kOfxPropParamSetNeedsSyncing + + ParamsCommon_DEF: + - kOfxPropType + - kOfxPropName + - kOfxPropLabel + - kOfxPropShortLabel + - kOfxPropLongLabel + - kOfxParamPropType + - kOfxParamPropSecret + - kOfxParamPropHint + - kOfxParamPropScriptName + - kOfxParamPropParent + - kOfxParamPropEnabled + - kOfxParamPropDataPtr + - kOfxPropIcon + ParamsAllButGroupPage_DEF: + - kOfxParamPropInteractV1 + - kOfxParamPropInteractSize + - kOfxParamPropInteractSizeAspect + - kOfxParamPropInteractMinimumSize + - kOfxParamPropInteractPreferedSize + - kOfxParamPropHasHostOverlayHandle + - kOfxParamPropUseHostOverlayHandle + ParamsValue_DEF: + - kOfxParamPropDefault + - kOfxParamPropAnimates + - kOfxParamPropIsAnimating + - kOfxParamPropIsAutoKeying + - kOfxParamPropPersistant + - kOfxParamPropEvaluateOnChange + - kOfxParamPropPluginMayWrite + - kOfxParamPropCacheInvalidation + - kOfxParamPropCanUndo + ParamsNumeric_DEF: + - kOfxParamPropMin + - kOfxParamPropMax + - kOfxParamPropDisplayMin + - kOfxParamPropDisplayMax + ParamsDouble_DEF: + - kOfxParamPropIncrement + - kOfxParamPropDigits + + ParamsGroup: + - kOfxParamPropGroupOpen + - ParamsCommon_REF + + ParamDouble1D: + - kOfxParamPropShowTimeMarker + - kOfxParamPropDoubleType + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + - ParamsNumeric_REF + - ParamsDouble_REF + + ParamsDouble2D3D: + - kOfxParamPropDoubleType + + ParamsNormalizedSpatial: + - kOfxParamPropDefaultCoordinateSystem + + ParamsInt2D3D: + - kOfxParamPropDimensionLabel + + ParamsString: + - kOfxParamPropStringMode + - kOfxParamPropStringFilePathExists + + ParamsChoice: + - kOfxParamPropChoiceOption + - kOfxParamPropChoiceOrder + + ParamsCustom: + - kOfxParamPropCustomInterpCallbackV1 + + ParamsPage: + - kOfxParamPropPageChild + + ParamsParametric: + - kOfxParamPropAnimates + - kOfxParamPropIsAnimating + - kOfxParamPropIsAutoKeying + - kOfxParamPropPersistant + - kOfxParamPropEvaluateOnChange + - kOfxParamPropPluginMayWrite + - kOfxParamPropCacheInvalidation + - kOfxParamPropCanUndo + - kOfxParamPropParametricDimension + - kOfxParamPropParametricUIColour + - kOfxParamPropParametricInteractBackground + - kOfxParamPropParametricRange + + InteractDescriptor: + - kOfxInteractPropHasAlpha + - kOfxInteractPropBitDepth + + InteractInstance: + - kOfxPropEffectInstance + - kOfxPropInstanceData + - kOfxInteractPropPixelScale + - kOfxInteractPropBackgroundColour + - kOfxInteractPropHasAlpha + - kOfxInteractPropBitDepth + - kOfxInteractPropSlaveToParam + - kOfxInteractPropSuggestedColour + + Misc: + - kOfxImageEffectFrameVarying + - kOfxImageEffectPluginPropOverlayInteractV2 + - kOfxImageEffectPropColourManagementAvailableConfigs + - kOfxImageEffectPropColourManagementConfig + - kOfxImageEffectPropColourManagementStyle + - kOfxImageEffectPropCudaEnabled + - kOfxImageEffectPropCudaRenderSupported + - kOfxImageEffectPropCudaStream + - kOfxImageEffectPropCudaStreamSupported + - kOfxImageEffectPropDisplayColourspace + - kOfxImageEffectPropFieldToRender + - kOfxImageEffectPropFrameStep + - kOfxImageEffectPropInAnalysis + - kOfxImageEffectPropInteractiveRenderStatus + - kOfxImageEffectPropMetalCommandQueue + - kOfxImageEffectPropMetalEnabled + - kOfxImageEffectPropMetalRenderSupported + - kOfxImageEffectPropOCIOConfig + - kOfxImageEffectPropOCIODisplay + - kOfxImageEffectPropOCIOView + - kOfxImageEffectPropOpenCLCommandQueue + - kOfxImageEffectPropOpenCLEnabled + - kOfxImageEffectPropOpenCLImage + - kOfxImageEffectPropOpenCLRenderSupported + - kOfxImageEffectPropOpenCLSupported + - kOfxImageEffectPropOpenGLEnabled + - kOfxImageEffectPropOpenGLTextureIndex + - kOfxImageEffectPropOpenGLTextureTarget + - kOfxImageEffectPropPluginHandle + - kOfxImageEffectPropRegionOfDefinition + - kOfxImageEffectPropRegionOfInterest + - kOfxImageEffectPropRenderWindow + - kOfxImageEffectPropSequentialRenderStatus + - kOfxInteractPropDrawContext + - kOfxInteractPropPenPosition + - kOfxInteractPropPenPressure + - kOfxInteractPropPenViewportPosition + - kOfxInteractPropViewportSize + - kOfxOpenGLPropPixelDepth + - kOfxParamHostPropSupportsStrChoice + - kOfxParamHostPropSupportsStrChoiceAnimation + - kOfxParamPropChoiceEnum + - kOfxParamPropCustomValue + - kOfxParamPropInterpolationAmount + - kOfxParamPropInterpolationTime + - kOfxPluginPropParamPageOrder + - kOfxPropChangeReason + - kOfxPropKeyString + - kOfxPropKeySym + + + +# 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: + kOfxPropType: + type: string + dimension: 1 + writable: host + kOfxPropName: + type: string + dimension: 1 + writable: host + kOfxPropTime: + type: double + dimension: 1 + writable: all + + # Param props + kOfxParamPropSecret: + type: bool + dimension: 1 + writable: all + kOfxParamPropHint: + type: string + dimension: 1 + writable: all + kOfxParamPropScriptName: + type: string + dimension: 1 + writable: all + kOfxParamPropParent: + type: string + dimension: 1 + writable: all + kOfxParamPropEnabled: + type: bool + dimension: 1 + writable: all + optional: true + kOfxParamPropDataPtr: + type: pointer + dimension: 1 + writable: all + kOfxParamPropType: + type: string + dimension: 1 + writable: host + kOfxPropLabel: + type: string + dimension: 1 + writable: plugin + kOfxPropShortLabel: + type: string + dimension: 1 + writable: plugin + hostOptional: true + kOfxPropLongLabel: + type: string + dimension: 1 + writable: plugin + hostOptional: true + kOfxPropIcon: + type: string + dimension: 2 + writable: plugin + hostOptional: true + + # host props + kOfxPropAPIVersion: + type: int + dimension: 0 + writable: host + kOfxPropLabel: + type: string + dimension: 1 + writable: host + kOfxPropVersion: + type: int + dimension: 0 + writable: host + kOfxPropVersionLabel: + type: string + dimension: 1 + writable: host + + # ImageEffect props: + kOfxPropPluginDescription: + type: string + dimension: 1 + writable: plugin + kOfxImageEffectPropSupportedContexts: + type: string + dimension: 0 + writable: plugin + kOfxImageEffectPluginPropGrouping: + type: string + dimension: 1 + writable: plugin + kOfxImageEffectPluginPropSingleInstance: + type: int + dimension: 1 + writable: plugin + kOfxImageEffectPluginRenderThreadSafety: + type: string + dimension: 1 + writable: plugin + kOfxImageEffectPluginPropHostFrameThreading: + type: int + dimension: 1 + writable: plugin + kOfxImageEffectPluginPropOverlayInteractV1: + type: pointer + dimension: 1 + writable: plugin + kOfxImageEffectPropSupportsMultiResolution: + type: int + dimension: 1 + writable: plugin + kOfxImageEffectPropSupportsTiles: + type: int + dimension: 1 + writable: plugin + kOfxImageEffectPropTemporalClipAccess: + type: int + dimension: 1 + writable: plugin + kOfxImageEffectPropSupportedPixelDepths: + type: string + dimension: 0 + writable: plugin + kOfxImageEffectPluginPropFieldRenderTwiceAlways: + type: int + dimension: 1 + writable: plugin + kOfxImageEffectPropSupportsMultipleClipDepths: + type: int + dimension: 1 + writable: plugin + kOfxImageEffectPropSupportsMultipleClipPARs: + type: int + dimension: 1 + writable: plugin + kOfxImageEffectPropClipPreferencesSlaveParam: + type: string + dimension: 0 + writable: plugin + kOfxImageEffectInstancePropSequentialRender: + type: int + dimension: 1 + writable: plugin + kOfxPluginPropFilePath: + type: enum + dimension: 1 + values: ['false', 'true', 'needed'] + writable: plugin + kOfxImageEffectPropOpenGLRenderSupported: + type: enum + dimension: 1 + values: ['false', 'true', 'needed'] + writable: plugin + kOfxImageEffectPropCudaRenderSupported: + type: enum + dimension: 1 + values: ['false', 'true', 'needed'] + writable: plugin + kOfxImageEffectPropCudaStreamSupported: + type: enum + dimension: 1 + values: ['false', 'true', 'needed'] + writable: plugin + kOfxImageEffectPropMetalRenderSupported: + type: enum + dimension: 1 + values: ['false', 'true', 'needed'] + writable: plugin + kOfxImageEffectPropOpenCLRenderSupported: + type: enum + dimension: 1 + values: ['false', 'true', 'needed'] + writable: plugin + + # Clip props + kOfxImageClipPropColourspace: + type: string + dimension: 1 + writable: all + kOfxImageClipPropConnected: + type: bool + dimension: 1 + writable: host + kOfxImageClipPropContinuousSamples: + type: bool + dimension: 1 + writable: all + kOfxImageClipPropFieldExtraction: + type: enum + dimension: 1 + writable: plugin + values: ['kOfxImageFieldNone', + 'kOfxImageFieldLower', + 'kOfxImageFieldUpper', + 'kOfxImageFieldBoth', + 'kOfxImageFieldSingle', + 'kOfxImageFieldDoubled'] + kOfxImageClipPropFieldOrder: + type: enum + dimension: 1 + writable: all + values: ['kOfxImageFieldNone', + 'kOfxImageFieldLower', + 'kOfxImageFieldUpper'] + kOfxImageClipPropIsMask: + type: bool + dimension: 1 + writable: plugin + kOfxImageClipPropOptional: + type: bool + dimension: 1 + writable: plugin + kOfxImageClipPropPreferredColourspaces: + type: string + dimension: 0 + writable: plugin + kOfxImageClipPropUnmappedComponents: + type: enum + dimension: 1 + writable: host + values: + - kOfxImageComponentNone + - kOfxImageComponentRGBA + - kOfxImageComponentRGB + - kOfxImageComponentAlpha + kOfxImageClipPropUnmappedPixelDepth: + type: enum + dimension: 1 + writable: host + values: + - kOfxBitDepthNone + - kOfxBitDepthByte + - kOfxBitDepthShort + - kOfxBitDepthHalf + - kOfxBitDepthFloat + + # Image Effect + kOfxImageEffectFrameVarying: + type: bool + dimension: 1 + writable: plugin + kOfxImageEffectHostPropIsBackground: + type: bool + dimension: 1 + writable: host + kOfxImageEffectHostPropNativeOrigin: + type: enum + dimension: 1 + writable: host + values: + kOfxImageEffectHostPropNativeOriginBottomLeft + kOfxImageEffectHostPropNativeOriginTopLeft + kOfxImageEffectHostPropNativeOriginCenter + kOfxImageEffectInstancePropEffectDuration: + type: double + dimension: 1 + writable: host + kOfxImageEffectPluginPropOverlayInteractV1: + type: pointer + dimension: 1 + writable: all + kOfxImageEffectPluginPropOverlayInteractV2: + type: pointer + dimension: 1 + writable: all + kOfxImageEffectPropColourManagementAvailableConfigs: + type: string + dimension: 0 + writable: all + kOfxImageEffectPropColourManagementStyle: + type: enum + dimension: 1 + writable: all + values: + - kOfxImageEffectPropColourManagementNone + - kOfxImageEffectPropColourManagementBasic + - kOfxImageEffectPropColourManagementCore + - kOfxImageEffectPropColourManagementFull + - kOfxImageEffectPropColourManagementOCIO + kOfxImageEffectPropComponents: + type: enum + dimension: 1 + writable: host + values: + - kOfxImageComponentNone + - kOfxImageComponentRGBA + - kOfxImageComponentRGB + - kOfxImageComponentAlpha + kOfxImageEffectPropContext: + type: enum + dimension: 1 + writable: host + values: + - kOfxImageEffectContextGenerator + - kOfxImageEffectContextFilter + - kOfxImageEffectContextTransition + - kOfxImageEffectContextPaint + - kOfxImageEffectContextGeneral + - kOfxImageEffectContextRetimer + kOfxImageEffectPropCudaEnabled: + type: bool + dimension: 1 + writable: all + kOfxImageEffectPropCudaStream: + type: pointer + dimension: 1 + writable: host + kOfxImageEffectPropDisplayColourspace: + type: string + dimension: 1 + writable: host + kOfxImageEffectPropFieldToRender: + type: enum + dimension: 1 + writable: host + values: + - kOfxImageFieldNone + - kOfxImageFieldBoth + - kOfxImageFieldLower + - kOfxImageFieldUpper + kOfxImageEffectPropFrameRange: + type: double + dimension: 2 + writable: host + kOfxImageEffectPropFrameRate: + type: double + dimension: 1 + writable: all + kOfxImageEffectPropFrameStep: + type: double + dimension: 1 + writable: host + kOfxImageEffectPropInAnalysis: + type: bool + dimension: 1 + writable: all + deprecated: "1.4" + kOfxImageEffectPropInteractiveRenderStatus: + type: bool + dimension: 1 + writable: host + kOfxImageEffectPropMetalCommandQueue: + type: pointer + dimension: 1 + writable: host + kOfxImageEffectPropMetalEnabled: + type: bool + dimension: 1 + writable: host + kOfxImageEffectPropOCIOConfig: + type: string + dimension: 1 + writable: host + kOfxImageEffectPropOCIODisplay: + type: string + dimension: 1 + writable: host + kOfxImageEffectPropOCIOView: + type: string + dimension: 1 + writable: host + kOfxImageEffectPropOpenCLCommandQueue: + type: pointer + dimension: 1 + writable: host + kOfxImageEffectPropOpenCLEnabled: + type: bool + dimension: 1 + writable: host + kOfxImageEffectPropOpenCLImage: + type: int + dimension: 1 + kOfxImageEffectPropOpenCLSupported: + type: enum + dimension: 1 + values: + - "false" + - "true" + kOfxImageEffectPropOpenGLEnabled: + type: bool + dimension: 1 + writable: host + kOfxImageEffectPropOpenGLTextureIndex: + type: int + dimension: 1 + writable: host + kOfxImageEffectPropOpenGLTextureTarget: + type: int + dimension: 1 + writable: host + kOfxImageEffectPropPixelDepth: + type: enum + dimension: 1 + writable: host + values: + - kOfxBitDepthNone + - kOfxBitDepthByte + - kOfxBitDepthShort + - kOfxBitDepthHalf + - kOfxBitDepthFloat + kOfxImageEffectPropPluginHandle: + type: pointer + dimension: 1 + writable: host + kOfxImageEffectPropPreMultiplication: + type: enum + dimension: 1 + writable: all + values: + - kOfxImageOpaque + - kOfxImagePreMultiplied + - kOfxImageUnPreMultiplied + kOfxImageEffectPropProjectExtent: + type: double + dimension: 2 + writable: host + kOfxImageEffectPropProjectOffset: + type: double + dimension: 2 + writable: host + kOfxImageEffectPropProjectPixelAspectRatio: + type: double + dimension: 1 + writable: host + kOfxImageEffectPropProjectSize: + type: double + dimension: 2 + writable: host + kOfxImageEffectPropRegionOfDefinition: + type: int + dimension: 4 + writable: host + kOfxImageEffectPropRegionOfInterest: + type: int + dimension: 4 + writable: host + kOfxImageEffectPropRenderQualityDraft: + type: bool + dimension: 1 + writable: host + kOfxImageEffectPropRenderScale: + type: double + dimension: 2 + writable: host + kOfxImageEffectPropRenderWindow: + type: int + dimension: 4 + writable: host + kOfxImageEffectPropSequentialRenderStatus: + type: bool + dimension: 1 + writable: host + kOfxImageEffectPropSetableFielding: + type: bool + dimension: 1 + writable: host + kOfxImageEffectPropSetableFrameRate: + type: bool + dimension: 1 + writable: host + kOfxImageEffectPropSupportedComponents: + type: enum + dimension: 0 + writable: host + values: + - kOfxImageComponentNone + - kOfxImageComponentRGBA + - kOfxImageComponentRGB + - kOfxImageComponentAlpha + kOfxImageEffectPropSupportsOverlays: + type: bool + dimension: 1 + writable: host + kOfxImageEffectPropUnmappedFrameRange: + type: double + dimension: 2 + writable: host + kOfxImageEffectPropUnmappedFrameRate: + type: double + dimension: 1 + writable: host + kOfxImageEffectPropColourManagementConfig: + type: string + dimension: 1 + writable: host + kOfxImagePropBounds: + type: int + dimension: 4 + writable: host + kOfxImagePropData: + type: pointer + dimension: 1 + writable: host + kOfxImagePropField: + type: enum + dimension: 1 + writable: host + values: + - kOfxImageFieldNone + - kOfxImageFieldBoth + - kOfxImageFieldLower + - kOfxImageFieldUpper + kOfxImagePropPixelAspectRatio: + type: double + dimension: 1 + writable: all + kOfxImagePropRegionOfDefinition: + type: int + dimension: 4 + writable: host + kOfxImagePropRowBytes: + type: int + dimension: 1 + writable: host + kOfxImagePropUniqueIdentifier: + type: string + dimension: 1 + writable: host + + # Interact/Drawing + kOfxInteractPropBackgroundColour: + type: double + dimension: 3 + writable: host + kOfxInteractPropBitDepth: + type: int + dimension: 1 + writable: host + kOfxInteractPropDrawContext: + type: pointer + dimension: 1 + writable: host + kOfxInteractPropHasAlpha: + type: bool + dimension: 1 + writable: host + kOfxInteractPropPenPosition: + type: double + dimension: 2 + writable: host + kOfxInteractPropPenPressure: + type: double + dimension: 1 + writable: host + kOfxInteractPropPenViewportPosition: + type: int + dimension: 2 + writable: host + kOfxInteractPropPixelScale: + type: double + dimension: 2 + writable: host + kOfxInteractPropSlaveToParam: + type: string + dimension: 0 + writable: all + kOfxInteractPropSuggestedColour: + type: double + dimension: 3 + writable: host + kOfxInteractPropViewportSize: + type: int + dimension: 2 + writable: host + deprecated: "1.3" + + kOfxOpenGLPropPixelDepth: + type: enum + dimension: 0 + writable: host + values: + - kOfxBitDepthNone + - kOfxBitDepthByte + - kOfxBitDepthShort + - kOfxBitDepthHalf + - kOfxBitDepthFloat + kOfxParamHostPropMaxPages: + type: int + dimension: 1 + writable: host + kOfxParamHostPropMaxParameters: + type: int + dimension: 1 + writable: host + kOfxParamHostPropPageRowColumnCount: + type: int + dimension: 2 + writable: host + kOfxParamHostPropSupportsBooleanAnimation: + type: bool + dimension: 1 + writable: host + kOfxParamHostPropSupportsChoiceAnimation: + type: bool + dimension: 1 + writable: host + kOfxParamHostPropSupportsCustomAnimation: + type: bool + dimension: 1 + writable: host + kOfxParamHostPropSupportsCustomInteract: + type: bool + dimension: 1 + writable: host + kOfxParamHostPropSupportsParametricAnimation: + type: bool + dimension: 1 + writable: host + kOfxParamHostPropSupportsStrChoice: + type: bool + dimension: 1 + writable: host + kOfxParamHostPropSupportsStrChoiceAnimation: + type: bool + dimension: 1 + writable: host + kOfxParamHostPropSupportsStringAnimation: + type: bool + dimension: 1 + writable: host + + + # Param + kOfxParamPropAnimates: + type: bool + dimension: 1 + writable: host + kOfxParamPropCacheInvalidation: + type: enum + dimension: 1 + writable: all + values: + - kOfxParamInvalidateValueChange + - kOfxParamInvalidateValueChangeToEnd + - kOfxParamInvalidateAll + kOfxParamPropCanUndo: + type: bool + dimension: 1 + writable: plugin + kOfxParamPropChoiceEnum: + type: bool + dimension: 1 + writable: host + added: "1.5" + kOfxParamPropChoiceOption: + type: string + dimension: 0 + writable: plugin + kOfxParamPropChoiceOrder: + type: int + dimension: 0 + writable: plugin + kOfxParamPropCustomInterpCallbackV1: + type: pointer + dimension: 1 + writable: plugin + kOfxParamPropCustomValue: + type: string + dimension: 2 + writable: plugin + # This is special because its type and dims vary depending on the param + kOfxParamPropDefault: + type: [int, double, string, bytes] + dimension: 0 + writable: plugin + kOfxParamPropDefaultCoordinateSystem: + type: enum + dimension: 1 + writable: plugin + values: + - kOfxParamCoordinatesCanonical + - kOfxParamCoordinatesNormalised + kOfxParamPropDigits: + type: int + dimension: 1 + writable: plugin + kOfxParamPropDimensionLabel: + type: string + dimension: 1 + writable: plugin + kOfxParamPropDisplayMax: + type: [int, double] + dimension: 0 + writable: plugin + kOfxParamPropDisplayMin: + type: [int, double] + dimension: 0 + writable: plugin + kOfxParamPropDoubleType: + type: enum + dimension: 1 + writable: plugin + values: + - kOfxParamDoubleTypePlain + - kOfxParamDoubleTypeAngle + - kOfxParamDoubleTypeScale + - kOfxParamDoubleTypeTime + - kOfxParamDoubleTypeAbsoluteTime + - kOfxParamDoubleTypeX + - kOfxParamDoubleTypeXAbsolute + - kOfxParamDoubleTypeY + - kOfxParamDoubleTypeYAbsolute + - kOfxParamDoubleTypeXY + - kOfxParamDoubleTypeXYAbsolute + kOfxParamPropEvaluateOnChange: + type: bool + dimension: 1 + writable: plugin + kOfxParamPropGroupOpen: + type: bool + dimension: 1 + writable: plugin + kOfxParamPropHasHostOverlayHandle: + type: bool + dimension: 1 + writable: host + kOfxParamPropIncrement: + type: double + dimension: 1 + writable: plugin + kOfxParamPropInteractMinimumSize: + type: double + dimension: 2 + writable: plugin + kOfxParamPropInteractPreferedSize: + type: int + dimension: 2 + writable: plugin + kOfxParamPropInteractSize: + type: double + dimension: 2 + writable: plugin + kOfxParamPropInteractSizeAspect: + type: double + dimension: 1 + writable: plugin + kOfxParamPropInteractV1: + type: pointer + dimension: 1 + writable: plugin + kOfxParamPropInterpolationAmount: + type: double + dimension: 1 + writable: plugin + kOfxParamPropInterpolationTime: + type: double + dimension: 2 + writable: plugin + kOfxParamPropIsAnimating: + type: bool + dimension: 1 + writable: host + kOfxParamPropIsAutoKeying: + type: bool + dimension: 1 + writable: host + kOfxParamPropMax: + type: [int, double] + dimension: 0 + writable: plugin + kOfxParamPropMin: + type: [int, double] + dimension: 0 + writable: plugin + kOfxParamPropPageChild: + type: string + dimension: 0 + writable: plugin + kOfxParamPropParametricDimension: + type: int + dimension: 1 + writable: plugin + kOfxParamPropParametricInteractBackground: + type: pointer + dimension: 1 + writable: plugin + kOfxParamPropParametricRange: + type: double + dimension: 2 + writable: plugin + kOfxParamPropParametricUIColour: + type: double + dimension: 0 + writable: plugin + kOfxParamPropPersistant: + type: int + dimension: 1 + writable: plugin + kOfxParamPropPluginMayWrite: + type: int + dimension: 1 + writable: plugin + deprecated: "1.4" + kOfxParamPropShowTimeMarker: + type: bool + dimension: 1 + writable: plugin + kOfxParamPropStringMode: + type: enum + dimension: 1 + writable: plugin + values: + - kOfxParamStringIsSingleLine + - kOfxParamStringIsMultiLine + - kOfxParamStringIsFilePath + - kOfxParamStringIsDirectoryPath + - kOfxParamStringIsLabel + - kOfxParamStringIsRichTextFormat + kOfxParamPropUseHostOverlayHandle: + type: bool + dimension: 1 + writable: host + kOfxParamPropStringFilePathExists: + type: bool + dimension: 1 + writable: plugin + kOfxPluginPropParamPageOrder: + type: string + dimension: 0 + writable: plugin + kOfxPropChangeReason: + type: enum + dimension: 1 + writable: host + values: + - kOfxChangeUserEdited + - kOfxChangePluginEdited + - kOfxChangeTime + kOfxPropEffectInstance: + type: pointer + dimension: 1 + writable: host + kOfxPropHostOSHandle: + type: pointer + dimension: 1 + writable: host + kOfxPropInstanceData: + type: pointer + dimension: 1 + writable: plugin + kOfxPropIsInteractive: + type: bool + dimension: 1 + writable: host + kOfxPropKeyString: + type: string + dimension: 1 + writable: host + kOfxPropKeySym: + type: int + dimension: 1 + writable: host + kOfxPropParamSetNeedsSyncing: + type: bool + dimension: 1 + writable: plugin diff --git a/include/ofxInteract.h b/include/ofxInteract.h index 3acc6d338..6b5e061a2 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 01397f6a3..2535b7d15 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 af834e0fa..772d3f918 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 2d52fdd0f..4fa073d96 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 000000000..940bc9023 --- /dev/null +++ b/scripts/gen-props.py @@ -0,0 +1,292 @@ +# Copyright OpenFX and contributors to the OpenFX project. +# SPDX-License-Identifier: BSD-3-Clause + +import os +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 +) + +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: + sets[key] = [item for element in sets[key] \ + for item in get_def(element, defs)] + return sets + + +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): + if not props_metadata.get(p): + logging.error(f"No YAML metadata found for {p}") + errs += 1 + for p in sorted(props_metadata): + if p 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 check_props_by_set(props_by_set, 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 + Returns 0 if no errors. + """ + errs = 0 + for pset in sorted(props_by_set): + for prop in sorted(props_by_set[pset]): + if not props_metadata.get(prop): + logging.error(f"No props metadata found for {pset}.{prop}") + errs += 1 + return errs + +def check_props_used_by_set(props_by_set, 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_by_set[pset]: + if set_prop == prop: + found += 1 + if not found: + 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(""" +#include +#include +#include "ofxImageEffect.h" +#include "ofxGPURender.h" +#include "ofxColour.h" +#include "ofxDrawSuite.h" +#include "ofxParametricParam.h" +#include "ofxKeySyms.h" +#include "ofxOld.h" + +enum class PropType { + Int, + Double, + Enum, + Bool, + String, + Bytes, + Pointer +}; + +enum class Writable { + Host, + Plugin, + All +}; + +struct PropsMetadata { + std::string name; + std::vector types; + int dimension; + Writable writable; + bool host_optional; + std::vector values; // for enums +}; + +""") + outfile.write("const std::vector props_metadata {\n") + for p in 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) + "}" + writable = "Writable::" + md.get('writable', "unknown").capitalize() + 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': + values = "{" + ",".join(f'"{v}"' for v in md['values']) + "}" + else: + values = "{}" + outfile.write(f"{{ {p}, {prop_type_defs}, {md['dimension']}, " + f"{writable}, {host_opt}, {values} }},\n") + except Exception as e: + logging.error(f"Error: {p} is missing metadata? {e}") + raise(e) + outfile.write("};\n") + +def gen_props_by_set(props_by_set, 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(""" +#include +#include +#include +#include "ofxImageEffect.h" +#include "ofxGPURender.h" +#include "ofxColour.h" +#include "ofxDrawSuite.h" +#include "ofxParametricParam.h" +#include "ofxKeySyms.h" +#include "ofxOld.h" + +""") + outfile.write("const std::map> prop_sets {\n") + for pset in sorted(props_by_set.keys()): + propnames = ",".join(props_by_set[pset]) + outfile.write(f"{{ \"{pset}\", {{ {propnames} }} }},\n") + outfile.write("};\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 = props_data['propertySets'] + props_by_set = expand_set_props(props_by_set) + 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_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_metadata) + if not errs and args.verbose: + print(" ✔️ ALL OK") + + if args.verbose: + print("=== Generating gen_props_metadata.hxx") + gen_props_metadata(props_metadata, include_dir / 'gen_props_metadata.hxx') + if args.verbose: + print("=== Generating props by set header gen_props_by_set.hxx") + gen_props_by_set(props_by_set, include_dir / 'gen_props_by_set.hxx') + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description="Check OpenFX properties and generate ancillary data structures") + + # Define arguments here + parser.add_argument('-v', '--verbose', action='store_true', help='Enable verbose mode') + + # Parse the arguments + args = parser.parse_args() + + # Call the main function with parsed arguments + main(args) From 23973af0db04c300f45ba021289d7b2befee6385 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Wed, 28 Aug 2024 18:10:05 -0400 Subject: [PATCH 02/14] Props metadata: fixes, namespacing, sorting Signed-off-by: Gary Oberbrunner --- include/ofx-props.yml | 8 +++++--- scripts/gen-props.py | 18 +++++++++++------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/include/ofx-props.yml b/include/ofx-props.yml index 34b06b9db..6edf6e704 100644 --- a/include/ofx-props.yml +++ b/include/ofx-props.yml @@ -617,9 +617,9 @@ properties: dimension: 1 writable: host values: - kOfxImageEffectHostPropNativeOriginBottomLeft - kOfxImageEffectHostPropNativeOriginTopLeft - kOfxImageEffectHostPropNativeOriginCenter + - kOfxImageEffectHostPropNativeOriginBottomLeft + - kOfxImageEffectHostPropNativeOriginTopLeft + - kOfxImageEffectHostPropNativeOriginCenter kOfxImageEffectInstancePropEffectDuration: type: double dimension: 1 @@ -739,9 +739,11 @@ properties: kOfxImageEffectPropOpenCLImage: type: int dimension: 1 + writable: host kOfxImageEffectPropOpenCLSupported: type: enum dimension: 1 + writable: all values: - "false" - "true" diff --git a/scripts/gen-props.py b/scripts/gen-props.py index 940bc9023..9c4ba19eb 100644 --- a/scripts/gen-props.py +++ b/scripts/gen-props.py @@ -169,6 +169,7 @@ def gen_props_metadata(props_metadata, outfile_path: Path): #include "ofxKeySyms.h" #include "ofxOld.h" +namespace OpenFX { enum class PropType { Int, Double, @@ -191,12 +192,12 @@ def gen_props_metadata(props_metadata, outfile_path: Path): int dimension; Writable writable; bool host_optional; - std::vector values; // for enums + std::vector values; // for enums }; """) outfile.write("const std::vector props_metadata {\n") - for p in props_metadata: + for p in sorted(props_metadata): try: md = props_metadata[p] types = md.get('type') @@ -210,7 +211,8 @@ def gen_props_metadata(props_metadata, outfile_path: Path): if host_opt in ('False', 'false', 0): host_opt = 'false' if md['type'] == 'enum': - values = "{" + ",".join(f'"{v}"' for v in md['values']) + "}" + 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']}, " @@ -218,7 +220,7 @@ def gen_props_metadata(props_metadata, outfile_path: Path): except Exception as e: logging.error(f"Error: {p} is missing metadata? {e}") raise(e) - outfile.write("};\n") + outfile.write("};\n} // namespace OpenFX\n") def gen_props_by_set(props_by_set, outfile_path: Path): """Generate a header file with definitions of all prop sets, including their props""" @@ -235,12 +237,13 @@ def gen_props_by_set(props_by_set, outfile_path: Path): #include "ofxKeySyms.h" #include "ofxOld.h" +namespace OpenFX { """) - outfile.write("const std::map> prop_sets {\n") + outfile.write("const std::map> prop_sets {\n") for pset in sorted(props_by_set.keys()): - propnames = ",".join(props_by_set[pset]) + propnames = ",\n ".join(sorted(props_by_set[pset])) outfile.write(f"{{ \"{pset}\", {{ {propnames} }} }},\n") - outfile.write("};\n") + outfile.write("};\n} // namespace OpenFX\n") def main(args): script_dir = os.path.dirname(os.path.abspath(__file__)) @@ -275,6 +278,7 @@ def main(args): if args.verbose: print("=== Generating gen_props_metadata.hxx") gen_props_metadata(props_metadata, include_dir / 'gen_props_metadata.hxx') + if args.verbose: print("=== Generating props by set header gen_props_by_set.hxx") gen_props_by_set(props_by_set, include_dir / 'gen_props_by_set.hxx') From 3569bc75616bd5e3f81f141803f368f4719805a5 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Sun, 1 Sep 2024 22:06:50 -0400 Subject: [PATCH 03/14] Add all actions with their property sets, clean up misc list Signed-off-by: Gary Oberbrunner --- include/ofx-props.yml | 517 ++++++++++++++++++++++++++++++++---------- scripts/gen-props.py | 63 ++++- 2 files changed, 450 insertions(+), 130 deletions(-) diff --git a/include/ofx-props.yml b/include/ofx-props.yml index 6edf6e704..6f4728563 100644 --- a/include/ofx-props.yml +++ b/include/ofx-props.yml @@ -31,6 +31,8 @@ propertySets: - kOfxParamHostPropSupportsChoiceAnimation - kOfxParamHostPropSupportsBooleanAnimation - kOfxParamHostPropSupportsCustomAnimation + - kOfxParamHostPropSupportsStrChoice + - kOfxParamHostPropSupportsStrChoiceAnimation - kOfxParamHostPropMaxParameters - kOfxParamHostPropMaxPages - kOfxParamHostPropPageRowColumnCount @@ -40,6 +42,9 @@ propertySets: - kOfxImageEffectPropOpenGLRenderSupported - kOfxImageEffectPropRenderQualityDraft - kOfxImageEffectHostPropNativeOrigin + - kOfxImageEffectPropColourManagementAvailableConfigs + - kOfxImageEffectPropColourManagementStyle + EffectDescriptor: - kOfxPropType - kOfxPropLabel @@ -65,77 +70,32 @@ propertySets: - kOfxImageEffectPropClipPreferencesSlaveParam - kOfxImageEffectPropOpenGLRenderSupported - kOfxPluginPropFilePath - ImageEffectHost: - - kOfxPropAPIVersion + - kOfxOpenGLPropPixelDepth + - kOfxImageEffectPluginPropOverlayInteractV2 + - kOfxImageEffectPropColourManagementAvailableConfigs + - kOfxImageEffectPropColourManagementStyle + + EffectInstance: - kOfxPropType - - kOfxPropName - - kOfxPropLabel - - kOfxPropVersion - - kOfxPropVersionLabel - - kOfxImageEffectHostPropIsBackground - - kOfxImageEffectPropSupportsOverlays - - kOfxImageEffectPropSupportsMultiResolution - - kOfxImageEffectPropSupportsTiles - - kOfxImageEffectPropTemporalClipAccess - - kOfxImageEffectPropSupportedComponents - - kOfxImageEffectPropSupportedContexts - - kOfxImageEffectPropSupportsMultipleClipDepths - - kOfxImageEffectPropSupportsMultipleClipPARs - - kOfxImageEffectPropSetableFrameRate - - kOfxImageEffectPropSetableFielding - - kOfxParamHostPropSupportsCustomInteract - - kOfxParamHostPropSupportsStringAnimation - - kOfxParamHostPropSupportsChoiceAnimation - - kOfxParamHostPropSupportsBooleanAnimation - - kOfxParamHostPropSupportsCustomAnimation - - kOfxParamHostPropMaxParameters - - kOfxParamHostPropMaxPages - - kOfxParamHostPropPageRowColumnCount - - kOfxPropHostOSHandle - - kOfxParamHostPropSupportsParametricAnimation + - kOfxImageEffectPropContext + - kOfxPropInstanceData + - kOfxImageEffectPropProjectSize + - kOfxImageEffectPropProjectOffset + - kOfxImageEffectPropProjectExtent + - kOfxImageEffectPropProjectPixelAspectRatio + - kOfxImageEffectInstancePropEffectDuration - kOfxImageEffectInstancePropSequentialRender - - kOfxImageEffectPropOpenGLRenderSupported - - kOfxImageEffectPropRenderQualityDraft - - kOfxImageEffectHostPropNativeOrigin - EffectDescriptor: - - kOfxPropType - - kOfxPropLabel - - kOfxPropShortLabel - - kOfxPropLongLabel - - kOfxPropVersion - - kOfxPropVersionLabel - - kOfxPropPluginDescription - - kOfxImageEffectPropSupportedContexts - - kOfxImageEffectPluginPropGrouping - - kOfxImageEffectPluginPropSingleInstance - - kOfxImageEffectPluginRenderThreadSafety - - kOfxImageEffectPluginPropHostFrameThreading - - kOfxImageEffectPluginPropOverlayInteractV1 - - kOfxImageEffectPropSupportsMultiResolution - kOfxImageEffectPropSupportsTiles - - kOfxImageEffectPropTemporalClipAccess - - kOfxImageEffectPropSupportedPixelDepths - - kOfxImageEffectPluginPropFieldRenderTwiceAlways - - kOfxImageEffectPropSupportsMultipleClipDepths - - kOfxImageEffectPropSupportsMultipleClipPARs - - kOfxImageEffectPluginRenderThreadSafety - - kOfxImageEffectPropClipPreferencesSlaveParam - kOfxImageEffectPropOpenGLRenderSupported - - kOfxPluginPropFilePath - EffectInstance: - - kOfxPropType - - kOfxImageEffectPropContext - - kOfxPropInstanceData - - kOfxImageEffectPropProjectSize - - kOfxImageEffectPropProjectOffset - - kOfxImageEffectPropProjectExtent - - kOfxImageEffectPropProjectPixelAspectRatio - - kOfxImageEffectInstancePropEffectDuration - - kOfxImageEffectInstancePropSequentialRender - - kOfxImageEffectPropSupportsTiles - - kOfxImageEffectPropOpenGLRenderSupported - - kOfxImageEffectPropFrameRate - - kOfxPropIsInteractive + - kOfxImageEffectPropFrameRate + - kOfxPropIsInteractive + - kOfxImageEffectPropOCIOConfig + - kOfxImageEffectPropOCIODisplay + - kOfxImageEffectPropOCIOView + - kOfxImageEffectPropColourManagementConfig + - kOfxImageEffectPropColourManagementStyle + - kOfxImageEffectPropDisplayColourspace + - kOfxImageEffectPropPluginHandle ClipDescriptor: - kOfxPropType @@ -196,6 +156,7 @@ propertySets: ParameterSet: - kOfxPropParamSetNeedsSyncing + - kOfxPluginPropParamPageOrder ParamsCommon_DEF: - kOfxPropType @@ -253,26 +214,68 @@ propertySets: ParamsDouble2D3D: - kOfxParamPropDoubleType + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + - ParamsNumeric_REF + - ParamsDouble_REF ParamsNormalizedSpatial: - kOfxParamPropDefaultCoordinateSystem + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + - ParamsNumeric_REF + - ParamsDouble_REF ParamsInt2D3D: - kOfxParamPropDimensionLabel + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + - ParamsNumeric_REF ParamsString: - kOfxParamPropStringMode - kOfxParamPropStringFilePathExists + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + - ParamsNumeric_REF + + ParamsByte: + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + - ParamsNumeric_REF ParamsChoice: - kOfxParamPropChoiceOption - kOfxParamPropChoiceOrder + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + + ParamsStrChoice: + - kOfxParamPropChoiceOption + - kOfxParamPropChoiceEnum + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF ParamsCustom: - kOfxParamPropCustomInterpCallbackV1 + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF ParamsPage: - kOfxParamPropPageChild + - ParamsCommon_REF + + ParamsGroup: + - kOfxParamPropGroupOpen + - ParamsCommon_REF ParamsParametric: - kOfxParamPropAnimates @@ -287,6 +290,9 @@ propertySets: - kOfxParamPropParametricUIColour - kOfxParamPropParametricInteractBackground - kOfxParamPropParametricRange + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF InteractDescriptor: - kOfxInteractPropHasAlpha @@ -302,58 +308,301 @@ propertySets: - kOfxInteractPropSlaveToParam - kOfxInteractPropSuggestedColour - Misc: - - kOfxImageEffectFrameVarying - - kOfxImageEffectPluginPropOverlayInteractV2 - - kOfxImageEffectPropColourManagementAvailableConfigs - - kOfxImageEffectPropColourManagementConfig - - kOfxImageEffectPropColourManagementStyle - - kOfxImageEffectPropCudaEnabled - - kOfxImageEffectPropCudaRenderSupported - - kOfxImageEffectPropCudaStream - - kOfxImageEffectPropCudaStreamSupported - - kOfxImageEffectPropDisplayColourspace - - kOfxImageEffectPropFieldToRender - - kOfxImageEffectPropFrameStep - - kOfxImageEffectPropInAnalysis - - kOfxImageEffectPropInteractiveRenderStatus - - kOfxImageEffectPropMetalCommandQueue - - kOfxImageEffectPropMetalEnabled - - kOfxImageEffectPropMetalRenderSupported - - kOfxImageEffectPropOCIOConfig - - kOfxImageEffectPropOCIODisplay - - kOfxImageEffectPropOCIOView - - kOfxImageEffectPropOpenCLCommandQueue - - kOfxImageEffectPropOpenCLEnabled - - kOfxImageEffectPropOpenCLImage - - kOfxImageEffectPropOpenCLRenderSupported - - kOfxImageEffectPropOpenCLSupported - - kOfxImageEffectPropOpenGLEnabled - - kOfxImageEffectPropOpenGLTextureIndex - - kOfxImageEffectPropOpenGLTextureTarget - - kOfxImageEffectPropPluginHandle - - kOfxImageEffectPropRegionOfDefinition - - kOfxImageEffectPropRegionOfInterest - - kOfxImageEffectPropRenderWindow - - kOfxImageEffectPropSequentialRenderStatus - - kOfxInteractPropDrawContext - - kOfxInteractPropPenPosition - - kOfxInteractPropPenPressure - - kOfxInteractPropPenViewportPosition - - kOfxInteractPropViewportSize - - kOfxOpenGLPropPixelDepth - - kOfxParamHostPropSupportsStrChoice - - kOfxParamHostPropSupportsStrChoiceAnimation - - kOfxParamPropChoiceEnum - - kOfxParamPropCustomValue - - kOfxParamPropInterpolationAmount - - kOfxParamPropInterpolationTime - - kOfxPluginPropParamPageOrder - - kOfxPropChangeReason - - kOfxPropKeyString - - kOfxPropKeySym - + kOfxActionLoad: + inArgs: + outArgs: + + kOfxActionDescribe: + inArgs: + outArgs: + + kOfxActionUnload: + inArgs: + outArgs: + + kOfxActionPurgeCaches: + inArgs: + outArgs: + + kOfxActionSyncPrivateData: + inArgs: + outArgs: + + kOfxActionCreateInstance: + inArgs: + outArgs: + + kOfxActionDestroyInstance: + inArgs: + outArgs: + + kOfxActionInstanceChanged: + inArgs: + - kOfxPropType + - kOfxPropName + - kOfxPropChangeReason + - kOfxPropTime + - kOfxImageEffectPropRenderScale + outArgs: + + kOfxActionBeginInstanceChanged: + inArgs: + - kOfxPropChangeReason + outArgs: [] + kOfxActionEndInstanceChanged: + inArgs: + - kOfxPropChangeReason + outArgs: + + kOfxActionDestroyInstance: + inArgs: + outArgs: + + kOfxActionBeginInstanceEdit: + inArgs: + outArgs: + + kOfxActionEndInstanceEdit: + inArgs: + outArgs: + + kOfxImageEffectActionGetRegionOfDefinition: + inArgs: + - kOfxPropTime + - kOfxImageEffectPropRenderScale + outArgs: + - kOfxImageEffectPropRegionOfDefinition + + kOfxImageEffectActionGetRegionsOfInterest: + inArgs: + - kOfxPropTime + - kOfxImageEffectPropRenderScale + - kOfxImageEffectPropRegionOfInterest + outArgs: + # - kOfxImageEffectClipPropRoI_ # with clip name + + kOfxImageEffectActionGetTimeDomain: + inArgs: + outArgs: + - kOfxImageEffectPropFrameRange + + kOfxImageEffectActionGetFramesNeeded: + inArgs: + - kOfxPropTime + outArgs: + - kOfxImageEffectPropFrameRange + + kOfxImageEffectActionGetClipPreferences: + inArgs: + outArgs: + - kOfxImageEffectPropFrameRate + - kOfxImageClipPropFieldOrder + - kOfxImageEffectPropPreMultiplication + - kOfxImageClipPropContinuousSamples + - kOfxImageEffectFrameVarying + # these special props all have the clip name postpended after "_" + # - OfxImageClipPropComponents_ + # - OfxImageClipPropDepth_ + # - OfxImageClipPropPreferredColourspaces_ + # - OfxImageClipPropPAR_ + + kOfxImageEffectActionIsIdentity: + inArgs: + - kOfxPropTime + - kOfxImageEffectPropFieldToRender + - kOfxImageEffectPropRenderWindow + - kOfxImageEffectPropRenderScale + + kOfxImageEffectActionRender: + inArgs: + - kOfxPropTime + - kOfxImageEffectPropSequentialRenderStatus + - kOfxImageEffectPropInteractiveRenderStatus + - kOfxImageEffectPropRenderQualityDraft + - kOfxImageEffectPropCudaEnabled + - kOfxImageEffectPropCudaRenderSupported + - kOfxImageEffectPropCudaStream + - kOfxImageEffectPropCudaStreamSupported + - kOfxImageEffectPropMetalCommandQueue + - kOfxImageEffectPropMetalEnabled + - kOfxImageEffectPropMetalRenderSupported + - kOfxImageEffectPropOpenCLCommandQueue + - kOfxImageEffectPropOpenCLEnabled + - kOfxImageEffectPropOpenCLImage + - kOfxImageEffectPropOpenCLRenderSupported + - kOfxImageEffectPropOpenCLSupported + - kOfxImageEffectPropOpenGLEnabled + - kOfxImageEffectPropOpenGLTextureIndex + - kOfxImageEffectPropOpenGLTextureTarget + - kOfxImageEffectPropInteractiveRenderStatus + + kOfxImageEffectActionBeginSequenceRender: + inArgs: + - kOfxImageEffectPropFrameRange + - kOfxImageEffectPropFrameStep + - kOfxPropIsInteractive + - kOfxImageEffectPropRenderScale + - kOfxImageEffectPropSequentialRenderStatus + - kOfxImageEffectPropInteractiveRenderStatus + - kOfxImageEffectPropCudaEnabled + - kOfxImageEffectPropCudaRenderSupported + - kOfxImageEffectPropCudaStream + - kOfxImageEffectPropCudaStreamSupported + - kOfxImageEffectPropMetalCommandQueue + - kOfxImageEffectPropMetalEnabled + - kOfxImageEffectPropMetalRenderSupported + - kOfxImageEffectPropOpenCLCommandQueue + - kOfxImageEffectPropOpenCLEnabled + - kOfxImageEffectPropOpenCLImage + - kOfxImageEffectPropOpenCLRenderSupported + - kOfxImageEffectPropOpenCLSupported + - kOfxImageEffectPropOpenGLEnabled + - kOfxImageEffectPropOpenGLTextureIndex + - kOfxImageEffectPropOpenGLTextureTarget + - kOfxImageEffectPropInteractiveRenderStatus + outArgs: + + kOfxImageEffectActionEndSequenceRender: + inArgs: + - kOfxImageEffectPropFrameRange + - kOfxImageEffectPropFrameStep + - kOfxPropIsInteractive + - kOfxImageEffectPropRenderScale + - kOfxImageEffectPropSequentialRenderStatus + - kOfxImageEffectPropInteractiveRenderStatus + - kOfxImageEffectPropCudaEnabled + - kOfxImageEffectPropCudaRenderSupported + - kOfxImageEffectPropCudaStream + - kOfxImageEffectPropCudaStreamSupported + - kOfxImageEffectPropMetalCommandQueue + - kOfxImageEffectPropMetalEnabled + - kOfxImageEffectPropMetalRenderSupported + - kOfxImageEffectPropOpenCLCommandQueue + - kOfxImageEffectPropOpenCLEnabled + - kOfxImageEffectPropOpenCLImage + - kOfxImageEffectPropOpenCLRenderSupported + - kOfxImageEffectPropOpenCLSupported + - kOfxImageEffectPropOpenGLEnabled + - kOfxImageEffectPropOpenGLTextureIndex + - kOfxImageEffectPropOpenGLTextureTarget + - kOfxImageEffectPropInteractiveRenderStatus + outArgs: + + kOfxImageEffectActionDescribeInContext: + inArgs: + - kOfxImageEffectPropContext + outArgs: + + kOfxActionDescribeInteract: + inArgs: + outArgs: + kOfxActionCreateInstanceInteract: + inArgs: + outArgs: + kOfxActionDestroyInstanceInteract: + inArgs: + outArgs: + kOfxActionInteractActionDraw: + inArgs: + - kOfxPropEffectInstance + - kOfxInteractPropDrawContext + - kOfxInteractPropPixelScale + - kOfxInteractPropBackgroundColour + - kOfxPropTime + - kOfxImageEffectPropRenderScale + outArgs: + + kOfxActionInteractActionPenMotion: + inArgs: + - kOfxPropEffectInstance + - kOfxInteractPropPixelScale + - kOfxInteractPropBackgroundColour + - kOfxPropTime + - kOfxImageEffectPropRenderScale + - kOfxInteractPropPenPosition + - kOfxInteractPropPenViewportPosition + - kOfxInteractPropPenPressure + outArgs: + + kOfxActionInteractActionPenDown: + inArgs: + - kOfxPropEffectInstance + - kOfxInteractPropPixelScale + - kOfxInteractPropBackgroundColour + - kOfxPropTime + - kOfxImageEffectPropRenderScale + - kOfxInteractPropPenPosition + - kOfxInteractPropPenViewportPosition + - kOfxInteractPropPenPressure + outArgs: + + kOfxActionInteractActionPenUp: + inArgs: + - kOfxPropEffectInstance + - kOfxInteractPropPixelScale + - kOfxInteractPropBackgroundColour + - kOfxPropTime + - kOfxImageEffectPropRenderScale + - kOfxInteractPropPenPosition + - kOfxInteractPropPenViewportPosition + - kOfxInteractPropPenPressure + outArgs: + + kOfxActionInteractActionKeyDown: + inArgs: + - kOfxPropEffectInstance + - kOfxPropKeySym + - kOfxPropKeyString + - kOfxPropTime + - kOfxImageEffectPropRenderScale + outArgs: + + kOfxActionInteractActionKeyUp: + inArgs: + - kOfxPropEffectInstance + - kOfxPropKeySym + - kOfxPropKeyString + - kOfxPropTime + - kOfxImageEffectPropRenderScale + outArgs: + + kOfxActionInteractActionKeyRepeat: + inArgs: + - kOfxPropEffectInstance + - kOfxPropKeySym + - kOfxPropKeyString + - kOfxPropTime + - kOfxImageEffectPropRenderScale + outArgs: + + kOfxActionInteractActionGainFocus: + inArgs: + - kOfxPropEffectInstance + - kOfxInteractPropPixelScale + - kOfxInteractPropBackgroundColour + - kOfxPropTime + - kOfxImageEffectPropRenderScale + outArgs: + + kOfxActionInteractActionLoseFocus: + inArgs: + - kOfxPropEffectInstance + - kOfxInteractPropPixelScale + - kOfxInteractPropBackgroundColour + - kOfxPropTime + - kOfxImageEffectPropRenderScale + outArgs: + + CustomParamInterpFunc: + inArgs: + - kOfxParamPropCustomValue + - kOfxParamPropInterpolationTime + - kOfxParamPropInterpolationAmount + outArgs: + - kOfxParamPropCustomValue + - kOfxParamPropInterpolationTime + # Properties by name. # Notes: @@ -602,6 +851,38 @@ properties: - kOfxBitDepthShort - kOfxBitDepthHalf - kOfxBitDepthFloat + # # Special props, with clip names postpended: + # OfxImageClipPropComponents_: + # type: enum + # dimension: 1 + # writable: host + # values: + # - kOfxImageComponentNone + # - kOfxImageComponentRGBA + # - kOfxImageComponentRGB + # - kOfxImageComponentAlpha + # OfxImageClipPropDepth_: + # type: enum + # dimension: 1 + # writable: host + # values: + # - kOfxBitDepthNone + # - kOfxBitDepthByte + # - kOfxBitDepthShort + # - kOfxBitDepthHalf + # - kOfxBitDepthFloat + # OfxImageClipPropPreferredColourspaces_: + # type: string + # dimension: 1 + # writable: plugin + # OfxImageClipPropPAR_: + # type: double + # dimension: 1 + # writable: plugin + # OfxImageClipPropRoI_: + # type: int + # dimension: 4 + # writable: plugin # Image Effect kOfxImageEffectFrameVarying: diff --git a/scripts/gen-props.py b/scripts/gen-props.py index 9c4ba19eb..1d50e94e4 100644 --- a/scripts/gen-props.py +++ b/scripts/gen-props.py @@ -100,8 +100,11 @@ def expand_set_props(props_by_set): else: sets[key] = value for key in sets: - sets[key] = [item for element in sets[key] \ - for item in get_def(element, defs)] + if isinstance(sets[key], dict): + pass # do nothing, no expansion needed in inArgs/outArgs for now + else: + sets[key] = [item for element in sets[key] \ + for item in get_def(element, defs)] return sets @@ -128,14 +131,27 @@ def check_props_by_set(props_by_set, 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 prop in sorted(props_by_set[pset]): - if not props_metadata.get(prop): - logging.error(f"No props metadata found for {pset}.{prop}") - errs += 1 + # For actions, the value of props_by_set[pset] is a dict, each + # (e.g. inArgs, outArgs) containing a list of props. For + # regular property sets, the value is a list of props. + if isinstance(props_by_set[pset], dict): + for subset in sorted(props_by_set[pset]): + if not props_by_set[pset][subset]: + continue + for p in props_by_set[pset][subset]: + if not props_metadata.get(p): + logging.error(f"No props metadata found for {pset}.{subset}.{p}") + errs += 1 + else: + for p in props_by_set[pset]: + if not props_metadata.get(p): + logging.error(f"No props metadata found for {pset}.{p}") + errs += 1 return errs def check_props_used_by_set(props_by_set, props_metadata): @@ -148,10 +164,19 @@ def check_props_used_by_set(props_by_set, props_metadata): for prop in props_metadata: found = 0 for pset in props_by_set: - for set_prop in props_by_set[pset]: - if set_prop == prop: - found += 1 - if not found: + if isinstance(props_by_set[pset], dict): + # inArgs/outArgs + for subset in sorted(props_by_set[pset]): + if not props_by_set[pset][subset]: + continue + for set_prop in props_by_set[pset][subset]: + if set_prop == prop: + found += 1 + else: + for set_prop in props_by_set[pset]: + 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 @@ -212,7 +237,7 @@ def gen_props_metadata(props_metadata, outfile_path: Path): host_opt = 'false' if md['type'] == 'enum': assert isinstance(md['values'], list) - values = "{" + ",".join(f'{v}' for v in md['values']) + "}" + values = "{" + ",".join(f'\"{v}\"' for v in md['values']) + "}" else: values = "{}" outfile.write(f"{{ {p}, {prop_type_defs}, {md['dimension']}, " @@ -235,14 +260,28 @@ def gen_props_by_set(props_by_set, outfile_path: Path): #include "ofxDrawSuite.h" #include "ofxParametricParam.h" #include "ofxKeySyms.h" -#include "ofxOld.h" +// #include "ofxOld.h" namespace OpenFX { """) outfile.write("const std::map> prop_sets {\n") for pset in sorted(props_by_set.keys()): + if isinstance(props_by_set[pset], dict): + continue propnames = ",\n ".join(sorted(props_by_set[pset])) outfile.write(f"{{ \"{pset}\", {{ {propnames} }} }},\n") + + outfile.write("};\n\n") + outfile.write("const std::map> action_props {\n") + for pset in sorted(props_by_set.keys()): + if not isinstance(props_by_set[pset], dict): # actions have a dict of args + continue + for subset in props_by_set[pset]: + if not props_by_set[pset][subset]: + continue + propnames = ",\n ".join(sorted(props_by_set[pset][subset])) + outfile.write(f"{{ \"{pset}.{subset}\", {{ {propnames} }} }},\n") + outfile.write("};\n} // namespace OpenFX\n") def main(args): From dd8b1b56a293390a735dfe08882f6d8ef14ec410 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Mon, 2 Sep 2024 06:10:07 -0400 Subject: [PATCH 04/14] Generate list of all actions, & fix action names Signed-off-by: Gary Oberbrunner --- include/ofx-props.yml | 18 +++++++++--------- scripts/gen-props.py | 27 +++++++++++++++++++++------ 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/include/ofx-props.yml b/include/ofx-props.yml index 6f4728563..4f45327c6 100644 --- a/include/ofx-props.yml +++ b/include/ofx-props.yml @@ -503,7 +503,7 @@ propertySets: kOfxActionDestroyInstanceInteract: inArgs: outArgs: - kOfxActionInteractActionDraw: + kOfxInteractActionDraw: inArgs: - kOfxPropEffectInstance - kOfxInteractPropDrawContext @@ -513,7 +513,7 @@ propertySets: - kOfxImageEffectPropRenderScale outArgs: - kOfxActionInteractActionPenMotion: + kOfxInteractActionPenMotion: inArgs: - kOfxPropEffectInstance - kOfxInteractPropPixelScale @@ -525,7 +525,7 @@ propertySets: - kOfxInteractPropPenPressure outArgs: - kOfxActionInteractActionPenDown: + kOfxInteractActionPenDown: inArgs: - kOfxPropEffectInstance - kOfxInteractPropPixelScale @@ -537,7 +537,7 @@ propertySets: - kOfxInteractPropPenPressure outArgs: - kOfxActionInteractActionPenUp: + kOfxInteractActionPenUp: inArgs: - kOfxPropEffectInstance - kOfxInteractPropPixelScale @@ -549,7 +549,7 @@ propertySets: - kOfxInteractPropPenPressure outArgs: - kOfxActionInteractActionKeyDown: + kOfxInteractActionKeyDown: inArgs: - kOfxPropEffectInstance - kOfxPropKeySym @@ -558,7 +558,7 @@ propertySets: - kOfxImageEffectPropRenderScale outArgs: - kOfxActionInteractActionKeyUp: + kOfxInteractActionKeyUp: inArgs: - kOfxPropEffectInstance - kOfxPropKeySym @@ -567,7 +567,7 @@ propertySets: - kOfxImageEffectPropRenderScale outArgs: - kOfxActionInteractActionKeyRepeat: + kOfxInteractActionKeyRepeat: inArgs: - kOfxPropEffectInstance - kOfxPropKeySym @@ -576,7 +576,7 @@ propertySets: - kOfxImageEffectPropRenderScale outArgs: - kOfxActionInteractActionGainFocus: + kOfxInteractActionGainFocus: inArgs: - kOfxPropEffectInstance - kOfxInteractPropPixelScale @@ -585,7 +585,7 @@ propertySets: - kOfxImageEffectPropRenderScale outArgs: - kOfxActionInteractActionLoseFocus: + kOfxInteractActionLoseFocus: inArgs: - kOfxPropEffectInstance - kOfxInteractPropPixelScale diff --git a/scripts/gen-props.py b/scripts/gen-props.py index 1d50e94e4..5b4a404a0 100644 --- a/scripts/gen-props.py +++ b/scripts/gen-props.py @@ -264,23 +264,38 @@ def gen_props_by_set(props_by_set, outfile_path: Path): namespace OpenFX { """) - outfile.write("const std::map> prop_sets {\n") + outfile.write("// Properties for property sets\n") + outfile.write("const std::map> prop_sets {\n") for pset in sorted(props_by_set.keys()): if isinstance(props_by_set[pset], dict): continue propnames = ",\n ".join(sorted(props_by_set[pset])) outfile.write(f"{{ \"{pset}\", {{ {propnames} }} }},\n") + outfile.write("};\n\n") + + actions = sorted([pset for pset in props_by_set.keys() + if isinstance(props_by_set[pset], dict)]) + outfile.write("// Actions\n") + outfile.write(f"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") # use string constant outfile.write("};\n\n") - outfile.write("const std::map> action_props {\n") - for pset in sorted(props_by_set.keys()): - if not isinstance(props_by_set[pset], dict): # actions have a dict of args - continue + + outfile.write("// Properties for action args\n") + outfile.write("const std::map, std::vector> action_props {\n") + for pset in actions: for subset in props_by_set[pset]: if not props_by_set[pset][subset]: continue propnames = ",\n ".join(sorted(props_by_set[pset][subset])) - outfile.write(f"{{ \"{pset}.{subset}\", {{ {propnames} }} }},\n") + 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} // namespace OpenFX\n") From 38270d6cb4a6e402b94a272ef3423d403734afb3 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Mon, 2 Sep 2024 06:30:57 -0400 Subject: [PATCH 05/14] Commit generated source files, with proper headers Also include them into prop tester plugin, to test whether they compile properly. TODO: prop tester should use the metadata to do better tests. Signed-off-by: Gary Oberbrunner --- Examples/Test/testProperties.cpp | 2 + include/ofxPropsBySet.h | 732 +++++++++++++++++++++++++++++++ include/ofxPropsMetadata.h | 224 ++++++++++ scripts/gen-props.py | 26 +- 4 files changed, 980 insertions(+), 4 deletions(-) create mode 100644 include/ofxPropsBySet.h create mode 100644 include/ofxPropsMetadata.h diff --git a/Examples/Test/testProperties.cpp b/Examples/Test/testProperties.cpp index d30808c7d..b3fdbf4b9 100644 --- a/Examples/Test/testProperties.cpp +++ b/Examples/Test/testProperties.cpp @@ -15,6 +15,8 @@ run it through a c beautifier or emacs auto formatting, automagic indenting will #include "ofxMemory.h" #include "ofxMultiThread.h" #include "ofxMessage.h" +#include "ofxPropsBySet.h" +#include "ofxPropsMetadata.h" #include "ofxLog.H" diff --git a/include/ofxPropsBySet.h b/include/ofxPropsBySet.h new file mode 100644 index 000000000..1d43c40b6 --- /dev/null +++ b/include/ofxPropsBySet.h @@ -0,0 +1,732 @@ +// 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 "ofxImageEffect.h" +#include "ofxGPURender.h" +#include "ofxColour.h" +#include "ofxDrawSuite.h" +#include "ofxParametricParam.h" +#include "ofxKeySyms.h" +// #include "ofxOld.h" + +namespace OpenFX { +// Properties for property sets +const std::map> prop_sets { +{ "ClipDescriptor", { kOfxImageClipPropFieldExtraction, + kOfxImageClipPropIsMask, + kOfxImageClipPropOptional, + kOfxImageEffectPropSupportedComponents, + kOfxImageEffectPropSupportsTiles, + kOfxImageEffectPropTemporalClipAccess, + kOfxPropLabel, + kOfxPropLongLabel, + kOfxPropName, + kOfxPropShortLabel, + kOfxPropType } }, +{ "ClipInstance", { kOfxImageClipPropColourspace, + kOfxImageClipPropConnected, + kOfxImageClipPropContinuousSamples, + kOfxImageClipPropFieldExtraction, + kOfxImageClipPropFieldOrder, + kOfxImageClipPropIsMask, + kOfxImageClipPropOptional, + kOfxImageClipPropPreferredColourspaces, + kOfxImageClipPropUnmappedComponents, + kOfxImageClipPropUnmappedPixelDepth, + kOfxImageEffectPropComponents, + kOfxImageEffectPropFrameRange, + kOfxImageEffectPropFrameRate, + kOfxImageEffectPropPixelDepth, + kOfxImageEffectPropPreMultiplication, + kOfxImageEffectPropSupportedComponents, + kOfxImageEffectPropSupportsTiles, + kOfxImageEffectPropTemporalClipAccess, + kOfxImageEffectPropUnmappedFrameRange, + kOfxImageEffectPropUnmappedFrameRate, + kOfxImagePropPixelAspectRatio, + kOfxPropLabel, + kOfxPropLongLabel, + kOfxPropName, + kOfxPropShortLabel, + kOfxPropType } }, +{ "EffectDescriptor", { kOfxImageEffectPluginPropFieldRenderTwiceAlways, + kOfxImageEffectPluginPropGrouping, + kOfxImageEffectPluginPropHostFrameThreading, + kOfxImageEffectPluginPropOverlayInteractV1, + kOfxImageEffectPluginPropOverlayInteractV2, + kOfxImageEffectPluginPropSingleInstance, + kOfxImageEffectPluginRenderThreadSafety, + kOfxImageEffectPluginRenderThreadSafety, + kOfxImageEffectPropClipPreferencesSlaveParam, + kOfxImageEffectPropColourManagementAvailableConfigs, + kOfxImageEffectPropColourManagementStyle, + kOfxImageEffectPropOpenGLRenderSupported, + kOfxImageEffectPropSupportedContexts, + kOfxImageEffectPropSupportedPixelDepths, + kOfxImageEffectPropSupportsMultiResolution, + kOfxImageEffectPropSupportsMultipleClipDepths, + kOfxImageEffectPropSupportsMultipleClipPARs, + kOfxImageEffectPropSupportsTiles, + kOfxImageEffectPropTemporalClipAccess, + kOfxOpenGLPropPixelDepth, + kOfxPluginPropFilePath, + kOfxPropLabel, + kOfxPropLongLabel, + kOfxPropPluginDescription, + kOfxPropShortLabel, + kOfxPropType, + kOfxPropVersion, + kOfxPropVersionLabel } }, +{ "EffectInstance", { kOfxImageEffectInstancePropEffectDuration, + kOfxImageEffectInstancePropSequentialRender, + kOfxImageEffectPropColourManagementConfig, + kOfxImageEffectPropColourManagementStyle, + kOfxImageEffectPropContext, + kOfxImageEffectPropDisplayColourspace, + kOfxImageEffectPropFrameRate, + kOfxImageEffectPropOCIOConfig, + kOfxImageEffectPropOCIODisplay, + kOfxImageEffectPropOCIOView, + kOfxImageEffectPropOpenGLRenderSupported, + kOfxImageEffectPropPluginHandle, + kOfxImageEffectPropProjectExtent, + kOfxImageEffectPropProjectOffset, + kOfxImageEffectPropProjectPixelAspectRatio, + kOfxImageEffectPropProjectSize, + kOfxImageEffectPropSupportsTiles, + kOfxPropInstanceData, + kOfxPropIsInteractive, + kOfxPropType } }, +{ "General", { kOfxPropTime } }, +{ "Image", { kOfxImageEffectPropComponents, + kOfxImageEffectPropPixelDepth, + kOfxImageEffectPropPreMultiplication, + kOfxImageEffectPropRenderScale, + kOfxImagePropBounds, + kOfxImagePropData, + kOfxImagePropField, + kOfxImagePropPixelAspectRatio, + kOfxImagePropRegionOfDefinition, + kOfxImagePropRowBytes, + kOfxImagePropUniqueIdentifier, + kOfxPropType } }, +{ "ImageEffectHost", { kOfxImageEffectHostPropIsBackground, + kOfxImageEffectHostPropNativeOrigin, + kOfxImageEffectInstancePropSequentialRender, + kOfxImageEffectPropColourManagementAvailableConfigs, + kOfxImageEffectPropColourManagementStyle, + kOfxImageEffectPropOpenGLRenderSupported, + kOfxImageEffectPropRenderQualityDraft, + kOfxImageEffectPropSetableFielding, + kOfxImageEffectPropSetableFrameRate, + kOfxImageEffectPropSupportedComponents, + kOfxImageEffectPropSupportedContexts, + kOfxImageEffectPropSupportsMultiResolution, + kOfxImageEffectPropSupportsMultipleClipDepths, + kOfxImageEffectPropSupportsMultipleClipPARs, + kOfxImageEffectPropSupportsOverlays, + kOfxImageEffectPropSupportsTiles, + kOfxImageEffectPropTemporalClipAccess, + kOfxParamHostPropMaxPages, + kOfxParamHostPropMaxParameters, + kOfxParamHostPropPageRowColumnCount, + kOfxParamHostPropSupportsBooleanAnimation, + kOfxParamHostPropSupportsChoiceAnimation, + kOfxParamHostPropSupportsCustomAnimation, + kOfxParamHostPropSupportsCustomInteract, + kOfxParamHostPropSupportsParametricAnimation, + kOfxParamHostPropSupportsStrChoice, + kOfxParamHostPropSupportsStrChoiceAnimation, + kOfxParamHostPropSupportsStringAnimation, + kOfxPropAPIVersion, + kOfxPropHostOSHandle, + kOfxPropLabel, + kOfxPropName, + kOfxPropType, + kOfxPropVersion, + kOfxPropVersionLabel } }, +{ "InteractDescriptor", { kOfxInteractPropBitDepth, + kOfxInteractPropHasAlpha } }, +{ "InteractInstance", { kOfxInteractPropBackgroundColour, + kOfxInteractPropBitDepth, + kOfxInteractPropHasAlpha, + kOfxInteractPropPixelScale, + kOfxInteractPropSlaveToParam, + kOfxInteractPropSuggestedColour, + kOfxPropEffectInstance, + kOfxPropInstanceData } }, +{ "ParamDouble1D", { kOfxParamPropAnimates, + kOfxParamPropCacheInvalidation, + kOfxParamPropCanUndo, + kOfxParamPropDataPtr, + kOfxParamPropDefault, + kOfxParamPropDigits, + kOfxParamPropDisplayMax, + kOfxParamPropDisplayMin, + kOfxParamPropDoubleType, + kOfxParamPropEnabled, + kOfxParamPropEvaluateOnChange, + kOfxParamPropHasHostOverlayHandle, + kOfxParamPropHint, + kOfxParamPropIncrement, + kOfxParamPropInteractMinimumSize, + kOfxParamPropInteractPreferedSize, + kOfxParamPropInteractSize, + kOfxParamPropInteractSizeAspect, + kOfxParamPropInteractV1, + kOfxParamPropIsAnimating, + kOfxParamPropIsAutoKeying, + kOfxParamPropMax, + kOfxParamPropMin, + kOfxParamPropParent, + kOfxParamPropPersistant, + kOfxParamPropPluginMayWrite, + kOfxParamPropScriptName, + kOfxParamPropSecret, + kOfxParamPropShowTimeMarker, + kOfxParamPropType, + kOfxParamPropUseHostOverlayHandle, + kOfxPropIcon, + kOfxPropLabel, + kOfxPropLongLabel, + kOfxPropName, + kOfxPropShortLabel, + kOfxPropType } }, +{ "ParameterSet", { kOfxPluginPropParamPageOrder, + kOfxPropParamSetNeedsSyncing } }, +{ "ParamsByte", { kOfxParamPropAnimates, + kOfxParamPropCacheInvalidation, + kOfxParamPropCanUndo, + kOfxParamPropDataPtr, + kOfxParamPropDefault, + kOfxParamPropDisplayMax, + kOfxParamPropDisplayMin, + kOfxParamPropEnabled, + kOfxParamPropEvaluateOnChange, + kOfxParamPropHasHostOverlayHandle, + kOfxParamPropHint, + kOfxParamPropInteractMinimumSize, + kOfxParamPropInteractPreferedSize, + kOfxParamPropInteractSize, + kOfxParamPropInteractSizeAspect, + kOfxParamPropInteractV1, + kOfxParamPropIsAnimating, + kOfxParamPropIsAutoKeying, + kOfxParamPropMax, + kOfxParamPropMin, + kOfxParamPropParent, + kOfxParamPropPersistant, + kOfxParamPropPluginMayWrite, + kOfxParamPropScriptName, + kOfxParamPropSecret, + kOfxParamPropType, + kOfxParamPropUseHostOverlayHandle, + kOfxPropIcon, + kOfxPropLabel, + kOfxPropLongLabel, + kOfxPropName, + kOfxPropShortLabel, + kOfxPropType } }, +{ "ParamsChoice", { kOfxParamPropAnimates, + kOfxParamPropCacheInvalidation, + kOfxParamPropCanUndo, + kOfxParamPropChoiceOption, + kOfxParamPropChoiceOrder, + kOfxParamPropDataPtr, + kOfxParamPropDefault, + kOfxParamPropEnabled, + kOfxParamPropEvaluateOnChange, + kOfxParamPropHasHostOverlayHandle, + kOfxParamPropHint, + kOfxParamPropInteractMinimumSize, + kOfxParamPropInteractPreferedSize, + kOfxParamPropInteractSize, + kOfxParamPropInteractSizeAspect, + kOfxParamPropInteractV1, + kOfxParamPropIsAnimating, + kOfxParamPropIsAutoKeying, + kOfxParamPropParent, + kOfxParamPropPersistant, + kOfxParamPropPluginMayWrite, + kOfxParamPropScriptName, + kOfxParamPropSecret, + kOfxParamPropType, + kOfxParamPropUseHostOverlayHandle, + kOfxPropIcon, + kOfxPropLabel, + kOfxPropLongLabel, + kOfxPropName, + kOfxPropShortLabel, + kOfxPropType } }, +{ "ParamsCustom", { kOfxParamPropAnimates, + kOfxParamPropCacheInvalidation, + kOfxParamPropCanUndo, + kOfxParamPropCustomInterpCallbackV1, + kOfxParamPropDataPtr, + kOfxParamPropDefault, + kOfxParamPropEnabled, + kOfxParamPropEvaluateOnChange, + kOfxParamPropHasHostOverlayHandle, + kOfxParamPropHint, + kOfxParamPropInteractMinimumSize, + kOfxParamPropInteractPreferedSize, + kOfxParamPropInteractSize, + kOfxParamPropInteractSizeAspect, + kOfxParamPropInteractV1, + kOfxParamPropIsAnimating, + kOfxParamPropIsAutoKeying, + kOfxParamPropParent, + kOfxParamPropPersistant, + kOfxParamPropPluginMayWrite, + kOfxParamPropScriptName, + kOfxParamPropSecret, + kOfxParamPropType, + kOfxParamPropUseHostOverlayHandle, + kOfxPropIcon, + kOfxPropLabel, + kOfxPropLongLabel, + kOfxPropName, + kOfxPropShortLabel, + kOfxPropType } }, +{ "ParamsDouble2D3D", { kOfxParamPropAnimates, + kOfxParamPropCacheInvalidation, + kOfxParamPropCanUndo, + kOfxParamPropDataPtr, + kOfxParamPropDefault, + kOfxParamPropDigits, + kOfxParamPropDisplayMax, + kOfxParamPropDisplayMin, + kOfxParamPropDoubleType, + kOfxParamPropEnabled, + kOfxParamPropEvaluateOnChange, + kOfxParamPropHasHostOverlayHandle, + kOfxParamPropHint, + kOfxParamPropIncrement, + kOfxParamPropInteractMinimumSize, + kOfxParamPropInteractPreferedSize, + kOfxParamPropInteractSize, + kOfxParamPropInteractSizeAspect, + kOfxParamPropInteractV1, + kOfxParamPropIsAnimating, + kOfxParamPropIsAutoKeying, + kOfxParamPropMax, + kOfxParamPropMin, + kOfxParamPropParent, + kOfxParamPropPersistant, + kOfxParamPropPluginMayWrite, + kOfxParamPropScriptName, + kOfxParamPropSecret, + kOfxParamPropType, + kOfxParamPropUseHostOverlayHandle, + kOfxPropIcon, + kOfxPropLabel, + kOfxPropLongLabel, + kOfxPropName, + kOfxPropShortLabel, + kOfxPropType } }, +{ "ParamsGroup", { kOfxParamPropDataPtr, + kOfxParamPropEnabled, + kOfxParamPropGroupOpen, + kOfxParamPropHint, + kOfxParamPropParent, + kOfxParamPropScriptName, + kOfxParamPropSecret, + kOfxParamPropType, + kOfxPropIcon, + kOfxPropLabel, + kOfxPropLongLabel, + kOfxPropName, + kOfxPropShortLabel, + kOfxPropType } }, +{ "ParamsInt2D3D", { kOfxParamPropAnimates, + kOfxParamPropCacheInvalidation, + kOfxParamPropCanUndo, + kOfxParamPropDataPtr, + kOfxParamPropDefault, + kOfxParamPropDimensionLabel, + kOfxParamPropDisplayMax, + kOfxParamPropDisplayMin, + kOfxParamPropEnabled, + kOfxParamPropEvaluateOnChange, + kOfxParamPropHasHostOverlayHandle, + kOfxParamPropHint, + kOfxParamPropInteractMinimumSize, + kOfxParamPropInteractPreferedSize, + kOfxParamPropInteractSize, + kOfxParamPropInteractSizeAspect, + kOfxParamPropInteractV1, + kOfxParamPropIsAnimating, + kOfxParamPropIsAutoKeying, + kOfxParamPropMax, + kOfxParamPropMin, + kOfxParamPropParent, + kOfxParamPropPersistant, + kOfxParamPropPluginMayWrite, + kOfxParamPropScriptName, + kOfxParamPropSecret, + kOfxParamPropType, + kOfxParamPropUseHostOverlayHandle, + kOfxPropIcon, + kOfxPropLabel, + kOfxPropLongLabel, + kOfxPropName, + kOfxPropShortLabel, + kOfxPropType } }, +{ "ParamsNormalizedSpatial", { kOfxParamPropAnimates, + kOfxParamPropCacheInvalidation, + kOfxParamPropCanUndo, + kOfxParamPropDataPtr, + kOfxParamPropDefault, + kOfxParamPropDefaultCoordinateSystem, + kOfxParamPropDigits, + kOfxParamPropDisplayMax, + kOfxParamPropDisplayMin, + kOfxParamPropEnabled, + kOfxParamPropEvaluateOnChange, + kOfxParamPropHasHostOverlayHandle, + kOfxParamPropHint, + kOfxParamPropIncrement, + kOfxParamPropInteractMinimumSize, + kOfxParamPropInteractPreferedSize, + kOfxParamPropInteractSize, + kOfxParamPropInteractSizeAspect, + kOfxParamPropInteractV1, + kOfxParamPropIsAnimating, + kOfxParamPropIsAutoKeying, + kOfxParamPropMax, + kOfxParamPropMin, + kOfxParamPropParent, + kOfxParamPropPersistant, + kOfxParamPropPluginMayWrite, + kOfxParamPropScriptName, + kOfxParamPropSecret, + kOfxParamPropType, + kOfxParamPropUseHostOverlayHandle, + kOfxPropIcon, + kOfxPropLabel, + kOfxPropLongLabel, + kOfxPropName, + kOfxPropShortLabel, + kOfxPropType } }, +{ "ParamsPage", { kOfxParamPropDataPtr, + kOfxParamPropEnabled, + kOfxParamPropHint, + kOfxParamPropPageChild, + kOfxParamPropParent, + kOfxParamPropScriptName, + kOfxParamPropSecret, + kOfxParamPropType, + kOfxPropIcon, + kOfxPropLabel, + kOfxPropLongLabel, + kOfxPropName, + kOfxPropShortLabel, + kOfxPropType } }, +{ "ParamsParametric", { kOfxParamPropAnimates, + kOfxParamPropAnimates, + kOfxParamPropCacheInvalidation, + kOfxParamPropCacheInvalidation, + kOfxParamPropCanUndo, + kOfxParamPropCanUndo, + kOfxParamPropDataPtr, + kOfxParamPropDefault, + kOfxParamPropEnabled, + kOfxParamPropEvaluateOnChange, + kOfxParamPropEvaluateOnChange, + kOfxParamPropHasHostOverlayHandle, + kOfxParamPropHint, + kOfxParamPropInteractMinimumSize, + kOfxParamPropInteractPreferedSize, + kOfxParamPropInteractSize, + kOfxParamPropInteractSizeAspect, + kOfxParamPropInteractV1, + kOfxParamPropIsAnimating, + kOfxParamPropIsAnimating, + kOfxParamPropIsAutoKeying, + kOfxParamPropIsAutoKeying, + kOfxParamPropParametricDimension, + kOfxParamPropParametricInteractBackground, + kOfxParamPropParametricRange, + kOfxParamPropParametricUIColour, + kOfxParamPropParent, + kOfxParamPropPersistant, + kOfxParamPropPersistant, + kOfxParamPropPluginMayWrite, + kOfxParamPropPluginMayWrite, + kOfxParamPropScriptName, + kOfxParamPropSecret, + kOfxParamPropType, + kOfxParamPropUseHostOverlayHandle, + kOfxPropIcon, + kOfxPropLabel, + kOfxPropLongLabel, + kOfxPropName, + kOfxPropShortLabel, + kOfxPropType } }, +{ "ParamsStrChoice", { kOfxParamPropAnimates, + kOfxParamPropCacheInvalidation, + kOfxParamPropCanUndo, + kOfxParamPropChoiceEnum, + kOfxParamPropChoiceOption, + kOfxParamPropDataPtr, + kOfxParamPropDefault, + kOfxParamPropEnabled, + kOfxParamPropEvaluateOnChange, + kOfxParamPropHasHostOverlayHandle, + kOfxParamPropHint, + kOfxParamPropInteractMinimumSize, + kOfxParamPropInteractPreferedSize, + kOfxParamPropInteractSize, + kOfxParamPropInteractSizeAspect, + kOfxParamPropInteractV1, + kOfxParamPropIsAnimating, + kOfxParamPropIsAutoKeying, + kOfxParamPropParent, + kOfxParamPropPersistant, + kOfxParamPropPluginMayWrite, + kOfxParamPropScriptName, + kOfxParamPropSecret, + kOfxParamPropType, + kOfxParamPropUseHostOverlayHandle, + kOfxPropIcon, + kOfxPropLabel, + kOfxPropLongLabel, + kOfxPropName, + kOfxPropShortLabel, + kOfxPropType } }, +{ "ParamsString", { kOfxParamPropAnimates, + kOfxParamPropCacheInvalidation, + kOfxParamPropCanUndo, + kOfxParamPropDataPtr, + kOfxParamPropDefault, + kOfxParamPropDisplayMax, + kOfxParamPropDisplayMin, + kOfxParamPropEnabled, + kOfxParamPropEvaluateOnChange, + kOfxParamPropHasHostOverlayHandle, + kOfxParamPropHint, + kOfxParamPropInteractMinimumSize, + kOfxParamPropInteractPreferedSize, + kOfxParamPropInteractSize, + kOfxParamPropInteractSizeAspect, + kOfxParamPropInteractV1, + kOfxParamPropIsAnimating, + kOfxParamPropIsAutoKeying, + kOfxParamPropMax, + kOfxParamPropMin, + kOfxParamPropParent, + kOfxParamPropPersistant, + kOfxParamPropPluginMayWrite, + kOfxParamPropScriptName, + kOfxParamPropSecret, + kOfxParamPropStringFilePathExists, + kOfxParamPropStringMode, + kOfxParamPropType, + kOfxParamPropUseHostOverlayHandle, + kOfxPropIcon, + kOfxPropLabel, + kOfxPropLongLabel, + kOfxPropName, + kOfxPropShortLabel, + kOfxPropType } }, +}; + +// Actions +const std::array actions { + "CustomParamInterpFunc", + kOfxActionBeginInstanceChanged, + kOfxActionBeginInstanceEdit, + kOfxActionCreateInstance, + kOfxActionCreateInstanceInteract, + kOfxActionDescribe, + kOfxActionDescribeInteract, + kOfxActionDestroyInstance, + kOfxActionDestroyInstanceInteract, + kOfxActionEndInstanceChanged, + kOfxActionEndInstanceEdit, + kOfxActionInstanceChanged, + kOfxActionLoad, + kOfxActionPurgeCaches, + kOfxActionSyncPrivateData, + kOfxActionUnload, + kOfxImageEffectActionBeginSequenceRender, + kOfxImageEffectActionDescribeInContext, + kOfxImageEffectActionEndSequenceRender, + kOfxImageEffectActionGetClipPreferences, + kOfxImageEffectActionGetFramesNeeded, + kOfxImageEffectActionGetRegionOfDefinition, + kOfxImageEffectActionGetRegionsOfInterest, + kOfxImageEffectActionGetTimeDomain, + kOfxImageEffectActionIsIdentity, + kOfxImageEffectActionRender, + kOfxInteractActionDraw, + kOfxInteractActionGainFocus, + kOfxInteractActionKeyDown, + kOfxInteractActionKeyRepeat, + kOfxInteractActionKeyUp, + kOfxInteractActionLoseFocus, + kOfxInteractActionPenDown, + kOfxInteractActionPenMotion, + kOfxInteractActionPenUp, +}; + +// Properties for action args +const std::map, std::vector> action_props { +{ { "CustomParamInterpFunc", "inArgs" }, { kOfxParamPropCustomValue, + kOfxParamPropInterpolationAmount, + kOfxParamPropInterpolationTime } }, +{ { "CustomParamInterpFunc", "outArgs" }, { kOfxParamPropCustomValue, + kOfxParamPropInterpolationTime } }, +{ { kOfxActionBeginInstanceChanged, "inArgs" }, { kOfxPropChangeReason } }, +{ { kOfxActionEndInstanceChanged, "inArgs" }, { kOfxPropChangeReason } }, +{ { kOfxActionInstanceChanged, "inArgs" }, { kOfxImageEffectPropRenderScale, + kOfxPropChangeReason, + kOfxPropName, + kOfxPropTime, + kOfxPropType } }, +{ { kOfxImageEffectActionBeginSequenceRender, "inArgs" }, { kOfxImageEffectPropCudaEnabled, + kOfxImageEffectPropCudaRenderSupported, + kOfxImageEffectPropCudaStream, + kOfxImageEffectPropCudaStreamSupported, + kOfxImageEffectPropFrameRange, + kOfxImageEffectPropFrameStep, + kOfxImageEffectPropInteractiveRenderStatus, + kOfxImageEffectPropInteractiveRenderStatus, + kOfxImageEffectPropMetalCommandQueue, + kOfxImageEffectPropMetalEnabled, + kOfxImageEffectPropMetalRenderSupported, + kOfxImageEffectPropOpenCLCommandQueue, + kOfxImageEffectPropOpenCLEnabled, + kOfxImageEffectPropOpenCLImage, + kOfxImageEffectPropOpenCLRenderSupported, + kOfxImageEffectPropOpenCLSupported, + kOfxImageEffectPropOpenGLEnabled, + kOfxImageEffectPropOpenGLTextureIndex, + kOfxImageEffectPropOpenGLTextureTarget, + kOfxImageEffectPropRenderScale, + kOfxImageEffectPropSequentialRenderStatus, + kOfxPropIsInteractive } }, +{ { kOfxImageEffectActionDescribeInContext, "inArgs" }, { kOfxImageEffectPropContext } }, +{ { kOfxImageEffectActionEndSequenceRender, "inArgs" }, { kOfxImageEffectPropCudaEnabled, + kOfxImageEffectPropCudaRenderSupported, + kOfxImageEffectPropCudaStream, + kOfxImageEffectPropCudaStreamSupported, + kOfxImageEffectPropFrameRange, + kOfxImageEffectPropFrameStep, + kOfxImageEffectPropInteractiveRenderStatus, + kOfxImageEffectPropInteractiveRenderStatus, + kOfxImageEffectPropMetalCommandQueue, + kOfxImageEffectPropMetalEnabled, + kOfxImageEffectPropMetalRenderSupported, + kOfxImageEffectPropOpenCLCommandQueue, + kOfxImageEffectPropOpenCLEnabled, + kOfxImageEffectPropOpenCLImage, + kOfxImageEffectPropOpenCLRenderSupported, + kOfxImageEffectPropOpenCLSupported, + kOfxImageEffectPropOpenGLEnabled, + kOfxImageEffectPropOpenGLTextureIndex, + kOfxImageEffectPropOpenGLTextureTarget, + kOfxImageEffectPropRenderScale, + kOfxImageEffectPropSequentialRenderStatus, + kOfxPropIsInteractive } }, +{ { kOfxImageEffectActionGetClipPreferences, "outArgs" }, { kOfxImageClipPropContinuousSamples, + kOfxImageClipPropFieldOrder, + kOfxImageEffectFrameVarying, + kOfxImageEffectPropFrameRate, + kOfxImageEffectPropPreMultiplication } }, +{ { kOfxImageEffectActionGetFramesNeeded, "inArgs" }, { kOfxPropTime } }, +{ { kOfxImageEffectActionGetFramesNeeded, "outArgs" }, { kOfxImageEffectPropFrameRange } }, +{ { kOfxImageEffectActionGetRegionOfDefinition, "inArgs" }, { kOfxImageEffectPropRenderScale, + kOfxPropTime } }, +{ { kOfxImageEffectActionGetRegionOfDefinition, "outArgs" }, { kOfxImageEffectPropRegionOfDefinition } }, +{ { kOfxImageEffectActionGetRegionsOfInterest, "inArgs" }, { kOfxImageEffectPropRegionOfInterest, + kOfxImageEffectPropRenderScale, + kOfxPropTime } }, +{ { kOfxImageEffectActionGetTimeDomain, "outArgs" }, { kOfxImageEffectPropFrameRange } }, +{ { kOfxImageEffectActionIsIdentity, "inArgs" }, { kOfxImageEffectPropFieldToRender, + kOfxImageEffectPropRenderScale, + kOfxImageEffectPropRenderWindow, + kOfxPropTime } }, +{ { kOfxImageEffectActionRender, "inArgs" }, { kOfxImageEffectPropCudaEnabled, + kOfxImageEffectPropCudaRenderSupported, + kOfxImageEffectPropCudaStream, + kOfxImageEffectPropCudaStreamSupported, + kOfxImageEffectPropInteractiveRenderStatus, + kOfxImageEffectPropInteractiveRenderStatus, + kOfxImageEffectPropMetalCommandQueue, + kOfxImageEffectPropMetalEnabled, + kOfxImageEffectPropMetalRenderSupported, + kOfxImageEffectPropOpenCLCommandQueue, + kOfxImageEffectPropOpenCLEnabled, + kOfxImageEffectPropOpenCLImage, + kOfxImageEffectPropOpenCLRenderSupported, + kOfxImageEffectPropOpenCLSupported, + kOfxImageEffectPropOpenGLEnabled, + kOfxImageEffectPropOpenGLTextureIndex, + kOfxImageEffectPropOpenGLTextureTarget, + kOfxImageEffectPropRenderQualityDraft, + kOfxImageEffectPropSequentialRenderStatus, + kOfxPropTime } }, +{ { kOfxInteractActionDraw, "inArgs" }, { kOfxImageEffectPropRenderScale, + kOfxInteractPropBackgroundColour, + kOfxInteractPropDrawContext, + kOfxInteractPropPixelScale, + kOfxPropEffectInstance, + kOfxPropTime } }, +{ { kOfxInteractActionGainFocus, "inArgs" }, { kOfxImageEffectPropRenderScale, + kOfxInteractPropBackgroundColour, + kOfxInteractPropPixelScale, + kOfxPropEffectInstance, + kOfxPropTime } }, +{ { kOfxInteractActionKeyDown, "inArgs" }, { kOfxImageEffectPropRenderScale, + kOfxPropEffectInstance, + kOfxPropKeyString, + kOfxPropKeySym, + kOfxPropTime } }, +{ { kOfxInteractActionKeyRepeat, "inArgs" }, { kOfxImageEffectPropRenderScale, + kOfxPropEffectInstance, + kOfxPropKeyString, + kOfxPropKeySym, + kOfxPropTime } }, +{ { kOfxInteractActionKeyUp, "inArgs" }, { kOfxImageEffectPropRenderScale, + kOfxPropEffectInstance, + kOfxPropKeyString, + kOfxPropKeySym, + kOfxPropTime } }, +{ { kOfxInteractActionLoseFocus, "inArgs" }, { kOfxImageEffectPropRenderScale, + kOfxInteractPropBackgroundColour, + kOfxInteractPropPixelScale, + kOfxPropEffectInstance, + kOfxPropTime } }, +{ { kOfxInteractActionPenDown, "inArgs" }, { kOfxImageEffectPropRenderScale, + kOfxInteractPropBackgroundColour, + kOfxInteractPropPenPosition, + kOfxInteractPropPenPressure, + kOfxInteractPropPenViewportPosition, + kOfxInteractPropPixelScale, + kOfxPropEffectInstance, + kOfxPropTime } }, +{ { kOfxInteractActionPenMotion, "inArgs" }, { kOfxImageEffectPropRenderScale, + kOfxInteractPropBackgroundColour, + kOfxInteractPropPenPosition, + kOfxInteractPropPenPressure, + kOfxInteractPropPenViewportPosition, + kOfxInteractPropPixelScale, + kOfxPropEffectInstance, + kOfxPropTime } }, +{ { kOfxInteractActionPenUp, "inArgs" }, { kOfxImageEffectPropRenderScale, + kOfxInteractPropBackgroundColour, + kOfxInteractPropPenPosition, + kOfxInteractPropPenPressure, + kOfxInteractPropPenViewportPosition, + kOfxInteractPropPixelScale, + kOfxPropEffectInstance, + kOfxPropTime } }, +}; +} // namespace OpenFX diff --git a/include/ofxPropsMetadata.h b/include/ofxPropsMetadata.h new file mode 100644 index 000000000..9bb94140a --- /dev/null +++ b/include/ofxPropsMetadata.h @@ -0,0 +1,224 @@ +// 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 +}; + +enum class Writable { + Host, + Plugin, + All +}; + +struct PropsMetadata { + std::string name; + std::vector types; + int dimension; + Writable writable; + bool host_optional; + std::vector values; // for enums +}; + +const std::vector props_metadata { +{ kOfxImageClipPropColourspace, {PropType::String}, 1, Writable::All, false, {} }, +{ kOfxImageClipPropConnected, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxImageClipPropContinuousSamples, {PropType::Bool}, 1, Writable::All, false, {} }, +{ kOfxImageClipPropFieldExtraction, {PropType::Enum}, 1, Writable::Plugin, false, {"kOfxImageFieldNone","kOfxImageFieldLower","kOfxImageFieldUpper","kOfxImageFieldBoth","kOfxImageFieldSingle","kOfxImageFieldDoubled"} }, +{ kOfxImageClipPropFieldOrder, {PropType::Enum}, 1, Writable::All, false, {"kOfxImageFieldNone","kOfxImageFieldLower","kOfxImageFieldUpper"} }, +{ kOfxImageClipPropIsMask, {PropType::Bool}, 1, Writable::Plugin, false, {} }, +{ kOfxImageClipPropOptional, {PropType::Bool}, 1, Writable::Plugin, false, {} }, +{ kOfxImageClipPropPreferredColourspaces, {PropType::String}, 0, Writable::Plugin, false, {} }, +{ kOfxImageClipPropUnmappedComponents, {PropType::Enum}, 1, Writable::Host, false, {"kOfxImageComponentNone","kOfxImageComponentRGBA","kOfxImageComponentRGB","kOfxImageComponentAlpha"} }, +{ kOfxImageClipPropUnmappedPixelDepth, {PropType::Enum}, 1, Writable::Host, false, {"kOfxBitDepthNone","kOfxBitDepthByte","kOfxBitDepthShort","kOfxBitDepthHalf","kOfxBitDepthFloat"} }, +{ kOfxImageEffectFrameVarying, {PropType::Bool}, 1, Writable::Plugin, false, {} }, +{ kOfxImageEffectHostPropIsBackground, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectHostPropNativeOrigin, {PropType::Enum}, 1, Writable::Host, false, {"kOfxImageEffectHostPropNativeOriginBottomLeft","kOfxImageEffectHostPropNativeOriginTopLeft","kOfxImageEffectHostPropNativeOriginCenter"} }, +{ kOfxImageEffectInstancePropEffectDuration, {PropType::Double}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectInstancePropSequentialRender, {PropType::Int}, 1, Writable::Plugin, false, {} }, +{ kOfxImageEffectPluginPropFieldRenderTwiceAlways, {PropType::Int}, 1, Writable::Plugin, false, {} }, +{ kOfxImageEffectPluginPropGrouping, {PropType::String}, 1, Writable::Plugin, false, {} }, +{ kOfxImageEffectPluginPropHostFrameThreading, {PropType::Int}, 1, Writable::Plugin, false, {} }, +{ kOfxImageEffectPluginPropOverlayInteractV1, {PropType::Pointer}, 1, Writable::All, false, {} }, +{ kOfxImageEffectPluginPropOverlayInteractV2, {PropType::Pointer}, 1, Writable::All, false, {} }, +{ kOfxImageEffectPluginPropSingleInstance, {PropType::Int}, 1, Writable::Plugin, false, {} }, +{ kOfxImageEffectPluginRenderThreadSafety, {PropType::String}, 1, Writable::Plugin, false, {} }, +{ kOfxImageEffectPropClipPreferencesSlaveParam, {PropType::String}, 0, Writable::Plugin, false, {} }, +{ kOfxImageEffectPropColourManagementAvailableConfigs, {PropType::String}, 0, Writable::All, false, {} }, +{ kOfxImageEffectPropColourManagementConfig, {PropType::String}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropColourManagementStyle, {PropType::Enum}, 1, Writable::All, false, {"kOfxImageEffectPropColourManagementNone","kOfxImageEffectPropColourManagementBasic","kOfxImageEffectPropColourManagementCore","kOfxImageEffectPropColourManagementFull","kOfxImageEffectPropColourManagementOCIO"} }, +{ kOfxImageEffectPropComponents, {PropType::Enum}, 1, Writable::Host, false, {"kOfxImageComponentNone","kOfxImageComponentRGBA","kOfxImageComponentRGB","kOfxImageComponentAlpha"} }, +{ kOfxImageEffectPropContext, {PropType::Enum}, 1, Writable::Host, false, {"kOfxImageEffectContextGenerator","kOfxImageEffectContextFilter","kOfxImageEffectContextTransition","kOfxImageEffectContextPaint","kOfxImageEffectContextGeneral","kOfxImageEffectContextRetimer"} }, +{ kOfxImageEffectPropCudaEnabled, {PropType::Bool}, 1, Writable::All, false, {} }, +{ kOfxImageEffectPropCudaRenderSupported, {PropType::Enum}, 1, Writable::Plugin, false, {"false","true","needed"} }, +{ kOfxImageEffectPropCudaStream, {PropType::Pointer}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropCudaStreamSupported, {PropType::Enum}, 1, Writable::Plugin, false, {"false","true","needed"} }, +{ kOfxImageEffectPropDisplayColourspace, {PropType::String}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropFieldToRender, {PropType::Enum}, 1, Writable::Host, false, {"kOfxImageFieldNone","kOfxImageFieldBoth","kOfxImageFieldLower","kOfxImageFieldUpper"} }, +{ kOfxImageEffectPropFrameRange, {PropType::Double}, 2, Writable::Host, false, {} }, +{ kOfxImageEffectPropFrameRate, {PropType::Double}, 1, Writable::All, false, {} }, +{ kOfxImageEffectPropFrameStep, {PropType::Double}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropInAnalysis, {PropType::Bool}, 1, Writable::All, false, {} }, +{ kOfxImageEffectPropInteractiveRenderStatus, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropMetalCommandQueue, {PropType::Pointer}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropMetalEnabled, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropMetalRenderSupported, {PropType::Enum}, 1, Writable::Plugin, false, {"false","true","needed"} }, +{ kOfxImageEffectPropOCIOConfig, {PropType::String}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropOCIODisplay, {PropType::String}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropOCIOView, {PropType::String}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropOpenCLCommandQueue, {PropType::Pointer}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropOpenCLEnabled, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropOpenCLImage, {PropType::Int}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropOpenCLRenderSupported, {PropType::Enum}, 1, Writable::Plugin, false, {"false","true","needed"} }, +{ kOfxImageEffectPropOpenCLSupported, {PropType::Enum}, 1, Writable::All, false, {"false","true"} }, +{ kOfxImageEffectPropOpenGLEnabled, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropOpenGLRenderSupported, {PropType::Enum}, 1, Writable::Plugin, false, {"false","true","needed"} }, +{ kOfxImageEffectPropOpenGLTextureIndex, {PropType::Int}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropOpenGLTextureTarget, {PropType::Int}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropPixelDepth, {PropType::Enum}, 1, Writable::Host, false, {"kOfxBitDepthNone","kOfxBitDepthByte","kOfxBitDepthShort","kOfxBitDepthHalf","kOfxBitDepthFloat"} }, +{ kOfxImageEffectPropPluginHandle, {PropType::Pointer}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropPreMultiplication, {PropType::Enum}, 1, Writable::All, false, {"kOfxImageOpaque","kOfxImagePreMultiplied","kOfxImageUnPreMultiplied"} }, +{ kOfxImageEffectPropProjectExtent, {PropType::Double}, 2, Writable::Host, false, {} }, +{ kOfxImageEffectPropProjectOffset, {PropType::Double}, 2, Writable::Host, false, {} }, +{ kOfxImageEffectPropProjectPixelAspectRatio, {PropType::Double}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropProjectSize, {PropType::Double}, 2, Writable::Host, false, {} }, +{ kOfxImageEffectPropRegionOfDefinition, {PropType::Int}, 4, Writable::Host, false, {} }, +{ kOfxImageEffectPropRegionOfInterest, {PropType::Int}, 4, Writable::Host, false, {} }, +{ kOfxImageEffectPropRenderQualityDraft, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropRenderScale, {PropType::Double}, 2, Writable::Host, false, {} }, +{ kOfxImageEffectPropRenderWindow, {PropType::Int}, 4, Writable::Host, false, {} }, +{ kOfxImageEffectPropSequentialRenderStatus, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropSetableFielding, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropSetableFrameRate, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropSupportedComponents, {PropType::Enum}, 0, Writable::Host, false, {"kOfxImageComponentNone","kOfxImageComponentRGBA","kOfxImageComponentRGB","kOfxImageComponentAlpha"} }, +{ kOfxImageEffectPropSupportedContexts, {PropType::String}, 0, Writable::Plugin, false, {} }, +{ kOfxImageEffectPropSupportedPixelDepths, {PropType::String}, 0, Writable::Plugin, false, {} }, +{ kOfxImageEffectPropSupportsMultiResolution, {PropType::Int}, 1, Writable::Plugin, false, {} }, +{ kOfxImageEffectPropSupportsMultipleClipDepths, {PropType::Int}, 1, Writable::Plugin, false, {} }, +{ kOfxImageEffectPropSupportsMultipleClipPARs, {PropType::Int}, 1, Writable::Plugin, false, {} }, +{ kOfxImageEffectPropSupportsOverlays, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxImageEffectPropSupportsTiles, {PropType::Int}, 1, Writable::Plugin, false, {} }, +{ kOfxImageEffectPropTemporalClipAccess, {PropType::Int}, 1, Writable::Plugin, false, {} }, +{ kOfxImageEffectPropUnmappedFrameRange, {PropType::Double}, 2, Writable::Host, false, {} }, +{ kOfxImageEffectPropUnmappedFrameRate, {PropType::Double}, 1, Writable::Host, false, {} }, +{ kOfxImagePropBounds, {PropType::Int}, 4, Writable::Host, false, {} }, +{ kOfxImagePropData, {PropType::Pointer}, 1, Writable::Host, false, {} }, +{ kOfxImagePropField, {PropType::Enum}, 1, Writable::Host, false, {"kOfxImageFieldNone","kOfxImageFieldBoth","kOfxImageFieldLower","kOfxImageFieldUpper"} }, +{ kOfxImagePropPixelAspectRatio, {PropType::Double}, 1, Writable::All, false, {} }, +{ kOfxImagePropRegionOfDefinition, {PropType::Int}, 4, Writable::Host, false, {} }, +{ kOfxImagePropRowBytes, {PropType::Int}, 1, Writable::Host, false, {} }, +{ kOfxImagePropUniqueIdentifier, {PropType::String}, 1, Writable::Host, false, {} }, +{ kOfxInteractPropBackgroundColour, {PropType::Double}, 3, Writable::Host, false, {} }, +{ kOfxInteractPropBitDepth, {PropType::Int}, 1, Writable::Host, false, {} }, +{ kOfxInteractPropDrawContext, {PropType::Pointer}, 1, Writable::Host, false, {} }, +{ kOfxInteractPropHasAlpha, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxInteractPropPenPosition, {PropType::Double}, 2, Writable::Host, false, {} }, +{ kOfxInteractPropPenPressure, {PropType::Double}, 1, Writable::Host, false, {} }, +{ kOfxInteractPropPenViewportPosition, {PropType::Int}, 2, Writable::Host, false, {} }, +{ kOfxInteractPropPixelScale, {PropType::Double}, 2, Writable::Host, false, {} }, +{ kOfxInteractPropSlaveToParam, {PropType::String}, 0, Writable::All, false, {} }, +{ kOfxInteractPropSuggestedColour, {PropType::Double}, 3, Writable::Host, false, {} }, +{ kOfxInteractPropViewportSize, {PropType::Int}, 2, Writable::Host, false, {} }, +{ kOfxOpenGLPropPixelDepth, {PropType::Enum}, 0, Writable::Host, false, {"kOfxBitDepthNone","kOfxBitDepthByte","kOfxBitDepthShort","kOfxBitDepthHalf","kOfxBitDepthFloat"} }, +{ kOfxParamHostPropMaxPages, {PropType::Int}, 1, Writable::Host, false, {} }, +{ kOfxParamHostPropMaxParameters, {PropType::Int}, 1, Writable::Host, false, {} }, +{ kOfxParamHostPropPageRowColumnCount, {PropType::Int}, 2, Writable::Host, false, {} }, +{ kOfxParamHostPropSupportsBooleanAnimation, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxParamHostPropSupportsChoiceAnimation, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxParamHostPropSupportsCustomAnimation, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxParamHostPropSupportsCustomInteract, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxParamHostPropSupportsParametricAnimation, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxParamHostPropSupportsStrChoice, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxParamHostPropSupportsStrChoiceAnimation, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxParamHostPropSupportsStringAnimation, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxParamPropAnimates, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxParamPropCacheInvalidation, {PropType::Enum}, 1, Writable::All, false, {"kOfxParamInvalidateValueChange","kOfxParamInvalidateValueChangeToEnd","kOfxParamInvalidateAll"} }, +{ kOfxParamPropCanUndo, {PropType::Bool}, 1, Writable::Plugin, false, {} }, +{ kOfxParamPropChoiceEnum, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxParamPropChoiceOption, {PropType::String}, 0, Writable::Plugin, false, {} }, +{ kOfxParamPropChoiceOrder, {PropType::Int}, 0, Writable::Plugin, false, {} }, +{ kOfxParamPropCustomInterpCallbackV1, {PropType::Pointer}, 1, Writable::Plugin, false, {} }, +{ kOfxParamPropCustomValue, {PropType::String}, 2, Writable::Plugin, false, {} }, +{ kOfxParamPropDataPtr, {PropType::Pointer}, 1, Writable::All, false, {} }, +{ kOfxParamPropDefault, {PropType::Int,PropType::Double,PropType::String,PropType::Bytes}, 0, Writable::Plugin, false, {} }, +{ kOfxParamPropDefaultCoordinateSystem, {PropType::Enum}, 1, Writable::Plugin, false, {"kOfxParamCoordinatesCanonical","kOfxParamCoordinatesNormalised"} }, +{ kOfxParamPropDigits, {PropType::Int}, 1, Writable::Plugin, false, {} }, +{ kOfxParamPropDimensionLabel, {PropType::String}, 1, Writable::Plugin, false, {} }, +{ kOfxParamPropDisplayMax, {PropType::Int,PropType::Double}, 0, Writable::Plugin, false, {} }, +{ kOfxParamPropDisplayMin, {PropType::Int,PropType::Double}, 0, Writable::Plugin, false, {} }, +{ kOfxParamPropDoubleType, {PropType::Enum}, 1, Writable::Plugin, false, {"kOfxParamDoubleTypePlain","kOfxParamDoubleTypeAngle","kOfxParamDoubleTypeScale","kOfxParamDoubleTypeTime","kOfxParamDoubleTypeAbsoluteTime","kOfxParamDoubleTypeX","kOfxParamDoubleTypeXAbsolute","kOfxParamDoubleTypeY","kOfxParamDoubleTypeYAbsolute","kOfxParamDoubleTypeXY","kOfxParamDoubleTypeXYAbsolute"} }, +{ kOfxParamPropEnabled, {PropType::Bool}, 1, Writable::All, false, {} }, +{ kOfxParamPropEvaluateOnChange, {PropType::Bool}, 1, Writable::Plugin, false, {} }, +{ kOfxParamPropGroupOpen, {PropType::Bool}, 1, Writable::Plugin, false, {} }, +{ kOfxParamPropHasHostOverlayHandle, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxParamPropHint, {PropType::String}, 1, Writable::All, false, {} }, +{ kOfxParamPropIncrement, {PropType::Double}, 1, Writable::Plugin, false, {} }, +{ kOfxParamPropInteractMinimumSize, {PropType::Double}, 2, Writable::Plugin, false, {} }, +{ kOfxParamPropInteractPreferedSize, {PropType::Int}, 2, Writable::Plugin, false, {} }, +{ kOfxParamPropInteractSize, {PropType::Double}, 2, Writable::Plugin, false, {} }, +{ kOfxParamPropInteractSizeAspect, {PropType::Double}, 1, Writable::Plugin, false, {} }, +{ kOfxParamPropInteractV1, {PropType::Pointer}, 1, Writable::Plugin, false, {} }, +{ kOfxParamPropInterpolationAmount, {PropType::Double}, 1, Writable::Plugin, false, {} }, +{ kOfxParamPropInterpolationTime, {PropType::Double}, 2, Writable::Plugin, false, {} }, +{ kOfxParamPropIsAnimating, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxParamPropIsAutoKeying, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxParamPropMax, {PropType::Int,PropType::Double}, 0, Writable::Plugin, false, {} }, +{ kOfxParamPropMin, {PropType::Int,PropType::Double}, 0, Writable::Plugin, false, {} }, +{ kOfxParamPropPageChild, {PropType::String}, 0, Writable::Plugin, false, {} }, +{ kOfxParamPropParametricDimension, {PropType::Int}, 1, Writable::Plugin, false, {} }, +{ kOfxParamPropParametricInteractBackground, {PropType::Pointer}, 1, Writable::Plugin, false, {} }, +{ kOfxParamPropParametricRange, {PropType::Double}, 2, Writable::Plugin, false, {} }, +{ kOfxParamPropParametricUIColour, {PropType::Double}, 0, Writable::Plugin, false, {} }, +{ kOfxParamPropParent, {PropType::String}, 1, Writable::All, false, {} }, +{ kOfxParamPropPersistant, {PropType::Int}, 1, Writable::Plugin, false, {} }, +{ kOfxParamPropPluginMayWrite, {PropType::Int}, 1, Writable::Plugin, false, {} }, +{ kOfxParamPropScriptName, {PropType::String}, 1, Writable::All, false, {} }, +{ kOfxParamPropSecret, {PropType::Bool}, 1, Writable::All, false, {} }, +{ kOfxParamPropShowTimeMarker, {PropType::Bool}, 1, Writable::Plugin, false, {} }, +{ kOfxParamPropStringFilePathExists, {PropType::Bool}, 1, Writable::Plugin, false, {} }, +{ kOfxParamPropStringMode, {PropType::Enum}, 1, Writable::Plugin, false, {"kOfxParamStringIsSingleLine","kOfxParamStringIsMultiLine","kOfxParamStringIsFilePath","kOfxParamStringIsDirectoryPath","kOfxParamStringIsLabel","kOfxParamStringIsRichTextFormat"} }, +{ kOfxParamPropType, {PropType::String}, 1, Writable::Host, false, {} }, +{ kOfxParamPropUseHostOverlayHandle, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxPluginPropFilePath, {PropType::Enum}, 1, Writable::Plugin, false, {"false","true","needed"} }, +{ kOfxPluginPropParamPageOrder, {PropType::String}, 0, Writable::Plugin, false, {} }, +{ kOfxPropAPIVersion, {PropType::Int}, 0, Writable::Host, false, {} }, +{ kOfxPropChangeReason, {PropType::Enum}, 1, Writable::Host, false, {"kOfxChangeUserEdited","kOfxChangePluginEdited","kOfxChangeTime"} }, +{ kOfxPropEffectInstance, {PropType::Pointer}, 1, Writable::Host, false, {} }, +{ kOfxPropHostOSHandle, {PropType::Pointer}, 1, Writable::Host, false, {} }, +{ kOfxPropIcon, {PropType::String}, 2, Writable::Plugin, true, {} }, +{ kOfxPropInstanceData, {PropType::Pointer}, 1, Writable::Plugin, false, {} }, +{ kOfxPropIsInteractive, {PropType::Bool}, 1, Writable::Host, false, {} }, +{ kOfxPropKeyString, {PropType::String}, 1, Writable::Host, false, {} }, +{ kOfxPropKeySym, {PropType::Int}, 1, Writable::Host, false, {} }, +{ kOfxPropLabel, {PropType::String}, 1, Writable::Host, false, {} }, +{ kOfxPropLongLabel, {PropType::String}, 1, Writable::Plugin, true, {} }, +{ kOfxPropName, {PropType::String}, 1, Writable::Host, false, {} }, +{ kOfxPropParamSetNeedsSyncing, {PropType::Bool}, 1, Writable::Plugin, false, {} }, +{ kOfxPropPluginDescription, {PropType::String}, 1, Writable::Plugin, false, {} }, +{ kOfxPropShortLabel, {PropType::String}, 1, Writable::Plugin, true, {} }, +{ kOfxPropTime, {PropType::Double}, 1, Writable::All, false, {} }, +{ kOfxPropType, {PropType::String}, 1, Writable::Host, false, {} }, +{ kOfxPropVersion, {PropType::Int}, 0, Writable::Host, false, {} }, +{ kOfxPropVersionLabel, {PropType::String}, 1, Writable::Host, false, {} }, +}; +} // namespace OpenFX diff --git a/scripts/gen-props.py b/scripts/gen-props.py index 5b4a404a0..07a7619ff 100644 --- a/scripts/gen-props.py +++ b/scripts/gen-props.py @@ -16,6 +16,14 @@ 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. @@ -183,7 +191,10 @@ def check_props_used_by_set(props_by_set, props_metadata): 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" @@ -250,7 +261,10 @@ def gen_props_metadata(props_metadata, outfile_path: Path): def gen_props_by_set(props_by_set, 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 @@ -330,18 +344,22 @@ def main(args): print(" ✔️ ALL OK") if args.verbose: - print("=== Generating gen_props_metadata.hxx") - gen_props_metadata(props_metadata, include_dir / 'gen_props_metadata.hxx') + print(f"=== Generating {args.props_metadata}") + gen_props_metadata(props_metadata, include_dir / args.props_metadata) if args.verbose: - print("=== Generating props by set header gen_props_by_set.hxx") - gen_props_by_set(props_by_set, include_dir / 'gen_props_by_set.hxx') + print(f"=== Generating props by set header {args.props_by_set}") + gen_props_by_set(props_by_set, include_dir / args.props_by_set) if __name__ == "__main__": parser = argparse.ArgumentParser(description="Check OpenFX properties and generate ancillary data structures") # Define arguments here parser.add_argument('-v', '--verbose', action='store_true', help='Enable verbose mode') + parser.add_argument('--props-metadata', default="ofxPropsMetadata.h", + help="Generate property metadata into this file") + parser.add_argument('--props-by-set', default="ofxPropsBySet.h", + help="Generate props by set metadata into this file") # Parse the arguments args = parser.parse_args() From fa86f250381efdc4b5c4db3cfed3945b573263d5 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Mon, 2 Sep 2024 06:47:32 -0400 Subject: [PATCH 06/14] Fix CI build: ofxPropsBySet needs Signed-off-by: Gary Oberbrunner --- include/ofxPropsBySet.h | 1 + scripts/gen-props.py | 1 + 2 files changed, 2 insertions(+) diff --git a/include/ofxPropsBySet.h b/include/ofxPropsBySet.h index 1d43c40b6..84faf1588 100644 --- a/include/ofxPropsBySet.h +++ b/include/ofxPropsBySet.h @@ -7,6 +7,7 @@ #include #include #include +#include #include "ofxImageEffect.h" #include "ofxGPURender.h" #include "ofxColour.h" diff --git a/scripts/gen-props.py b/scripts/gen-props.py index 07a7619ff..a5a679f8a 100644 --- a/scripts/gen-props.py +++ b/scripts/gen-props.py @@ -268,6 +268,7 @@ def gen_props_by_set(props_by_set, outfile_path: Path): #include #include #include +#include #include "ofxImageEffect.h" #include "ofxGPURender.h" #include "ofxColour.h" From ce0c92202d51839f8f082276374c8a0e9a3d4356 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 3 Sep 2024 12:35:42 -0400 Subject: [PATCH 07/14] ofx-props.yml: Remove writable defs, not the right place for that Signed-off-by: Gary Oberbrunner --- include/ofx-props.yml | 186 ------------------------------------------ 1 file changed, 186 deletions(-) diff --git a/include/ofx-props.yml b/include/ofx-props.yml index 4f45327c6..9e7697cbf 100644 --- a/include/ofx-props.yml +++ b/include/ofx-props.yml @@ -616,197 +616,153 @@ properties: kOfxPropType: type: string dimension: 1 - writable: host kOfxPropName: type: string dimension: 1 - writable: host kOfxPropTime: type: double dimension: 1 - writable: all # Param props kOfxParamPropSecret: type: bool dimension: 1 - writable: all kOfxParamPropHint: type: string dimension: 1 - writable: all kOfxParamPropScriptName: type: string dimension: 1 - writable: all kOfxParamPropParent: type: string dimension: 1 - writable: all kOfxParamPropEnabled: type: bool dimension: 1 - writable: all optional: true kOfxParamPropDataPtr: type: pointer dimension: 1 - writable: all kOfxParamPropType: type: string dimension: 1 - writable: host kOfxPropLabel: type: string dimension: 1 - writable: plugin kOfxPropShortLabel: type: string dimension: 1 - writable: plugin hostOptional: true kOfxPropLongLabel: type: string dimension: 1 - writable: plugin hostOptional: true kOfxPropIcon: type: string dimension: 2 - writable: plugin hostOptional: true # host props kOfxPropAPIVersion: type: int dimension: 0 - writable: host kOfxPropLabel: type: string dimension: 1 - writable: host kOfxPropVersion: type: int dimension: 0 - writable: host kOfxPropVersionLabel: type: string dimension: 1 - writable: host # ImageEffect props: kOfxPropPluginDescription: type: string dimension: 1 - writable: plugin kOfxImageEffectPropSupportedContexts: type: string dimension: 0 - writable: plugin kOfxImageEffectPluginPropGrouping: type: string dimension: 1 - writable: plugin kOfxImageEffectPluginPropSingleInstance: type: int dimension: 1 - writable: plugin kOfxImageEffectPluginRenderThreadSafety: type: string dimension: 1 - writable: plugin kOfxImageEffectPluginPropHostFrameThreading: type: int dimension: 1 - writable: plugin kOfxImageEffectPluginPropOverlayInteractV1: type: pointer dimension: 1 - writable: plugin kOfxImageEffectPropSupportsMultiResolution: type: int dimension: 1 - writable: plugin kOfxImageEffectPropSupportsTiles: type: int dimension: 1 - writable: plugin kOfxImageEffectPropTemporalClipAccess: type: int dimension: 1 - writable: plugin kOfxImageEffectPropSupportedPixelDepths: type: string dimension: 0 - writable: plugin kOfxImageEffectPluginPropFieldRenderTwiceAlways: type: int dimension: 1 - writable: plugin kOfxImageEffectPropSupportsMultipleClipDepths: type: int dimension: 1 - writable: plugin kOfxImageEffectPropSupportsMultipleClipPARs: type: int dimension: 1 - writable: plugin kOfxImageEffectPropClipPreferencesSlaveParam: type: string dimension: 0 - writable: plugin kOfxImageEffectInstancePropSequentialRender: type: int dimension: 1 - writable: plugin kOfxPluginPropFilePath: type: enum dimension: 1 values: ['false', 'true', 'needed'] - writable: plugin kOfxImageEffectPropOpenGLRenderSupported: type: enum dimension: 1 values: ['false', 'true', 'needed'] - writable: plugin kOfxImageEffectPropCudaRenderSupported: type: enum dimension: 1 values: ['false', 'true', 'needed'] - writable: plugin kOfxImageEffectPropCudaStreamSupported: type: enum dimension: 1 values: ['false', 'true', 'needed'] - writable: plugin kOfxImageEffectPropMetalRenderSupported: type: enum dimension: 1 values: ['false', 'true', 'needed'] - writable: plugin kOfxImageEffectPropOpenCLRenderSupported: type: enum dimension: 1 values: ['false', 'true', 'needed'] - writable: plugin # Clip props kOfxImageClipPropColourspace: type: string dimension: 1 - writable: all kOfxImageClipPropConnected: type: bool dimension: 1 - writable: host kOfxImageClipPropContinuousSamples: type: bool dimension: 1 - writable: all kOfxImageClipPropFieldExtraction: type: enum dimension: 1 - writable: plugin values: ['kOfxImageFieldNone', 'kOfxImageFieldLower', 'kOfxImageFieldUpper', @@ -816,26 +772,21 @@ properties: kOfxImageClipPropFieldOrder: type: enum dimension: 1 - writable: all values: ['kOfxImageFieldNone', 'kOfxImageFieldLower', 'kOfxImageFieldUpper'] kOfxImageClipPropIsMask: type: bool dimension: 1 - writable: plugin kOfxImageClipPropOptional: type: bool dimension: 1 - writable: plugin kOfxImageClipPropPreferredColourspaces: type: string dimension: 0 - writable: plugin kOfxImageClipPropUnmappedComponents: type: enum dimension: 1 - writable: host values: - kOfxImageComponentNone - kOfxImageComponentRGBA @@ -844,7 +795,6 @@ properties: kOfxImageClipPropUnmappedPixelDepth: type: enum dimension: 1 - writable: host values: - kOfxBitDepthNone - kOfxBitDepthByte @@ -855,7 +805,6 @@ properties: # OfxImageClipPropComponents_: # type: enum # dimension: 1 - # writable: host # values: # - kOfxImageComponentNone # - kOfxImageComponentRGBA @@ -864,7 +813,6 @@ properties: # OfxImageClipPropDepth_: # type: enum # dimension: 1 - # writable: host # values: # - kOfxBitDepthNone # - kOfxBitDepthByte @@ -874,29 +822,23 @@ properties: # OfxImageClipPropPreferredColourspaces_: # type: string # dimension: 1 - # writable: plugin # OfxImageClipPropPAR_: # type: double # dimension: 1 - # writable: plugin # OfxImageClipPropRoI_: # type: int # dimension: 4 - # writable: plugin # Image Effect kOfxImageEffectFrameVarying: type: bool dimension: 1 - writable: plugin kOfxImageEffectHostPropIsBackground: type: bool dimension: 1 - writable: host kOfxImageEffectHostPropNativeOrigin: type: enum dimension: 1 - writable: host values: - kOfxImageEffectHostPropNativeOriginBottomLeft - kOfxImageEffectHostPropNativeOriginTopLeft @@ -904,23 +846,18 @@ properties: kOfxImageEffectInstancePropEffectDuration: type: double dimension: 1 - writable: host kOfxImageEffectPluginPropOverlayInteractV1: type: pointer dimension: 1 - writable: all kOfxImageEffectPluginPropOverlayInteractV2: type: pointer dimension: 1 - writable: all kOfxImageEffectPropColourManagementAvailableConfigs: type: string dimension: 0 - writable: all kOfxImageEffectPropColourManagementStyle: type: enum dimension: 1 - writable: all values: - kOfxImageEffectPropColourManagementNone - kOfxImageEffectPropColourManagementBasic @@ -930,7 +867,6 @@ properties: kOfxImageEffectPropComponents: type: enum dimension: 1 - writable: host values: - kOfxImageComponentNone - kOfxImageComponentRGBA @@ -939,7 +875,6 @@ properties: kOfxImageEffectPropContext: type: enum dimension: 1 - writable: host values: - kOfxImageEffectContextGenerator - kOfxImageEffectContextFilter @@ -950,19 +885,15 @@ properties: kOfxImageEffectPropCudaEnabled: type: bool dimension: 1 - writable: all kOfxImageEffectPropCudaStream: type: pointer dimension: 1 - writable: host kOfxImageEffectPropDisplayColourspace: type: string dimension: 1 - writable: host kOfxImageEffectPropFieldToRender: type: enum dimension: 1 - writable: host values: - kOfxImageFieldNone - kOfxImageFieldBoth @@ -971,79 +902,61 @@ properties: kOfxImageEffectPropFrameRange: type: double dimension: 2 - writable: host kOfxImageEffectPropFrameRate: type: double dimension: 1 - writable: all kOfxImageEffectPropFrameStep: type: double dimension: 1 - writable: host kOfxImageEffectPropInAnalysis: type: bool dimension: 1 - writable: all deprecated: "1.4" kOfxImageEffectPropInteractiveRenderStatus: type: bool dimension: 1 - writable: host kOfxImageEffectPropMetalCommandQueue: type: pointer dimension: 1 - writable: host kOfxImageEffectPropMetalEnabled: type: bool dimension: 1 - writable: host kOfxImageEffectPropOCIOConfig: type: string dimension: 1 - writable: host kOfxImageEffectPropOCIODisplay: type: string dimension: 1 - writable: host kOfxImageEffectPropOCIOView: type: string dimension: 1 - writable: host kOfxImageEffectPropOpenCLCommandQueue: type: pointer dimension: 1 - writable: host kOfxImageEffectPropOpenCLEnabled: type: bool dimension: 1 - writable: host kOfxImageEffectPropOpenCLImage: type: int dimension: 1 - writable: host kOfxImageEffectPropOpenCLSupported: type: enum dimension: 1 - writable: all values: - "false" - "true" kOfxImageEffectPropOpenGLEnabled: type: bool dimension: 1 - writable: host kOfxImageEffectPropOpenGLTextureIndex: type: int dimension: 1 - writable: host kOfxImageEffectPropOpenGLTextureTarget: type: int dimension: 1 - writable: host kOfxImageEffectPropPixelDepth: type: enum dimension: 1 - writable: host values: - kOfxBitDepthNone - kOfxBitDepthByte @@ -1053,11 +966,9 @@ properties: kOfxImageEffectPropPluginHandle: type: pointer dimension: 1 - writable: host kOfxImageEffectPropPreMultiplication: type: enum dimension: 1 - writable: all values: - kOfxImageOpaque - kOfxImagePreMultiplied @@ -1065,55 +976,42 @@ properties: kOfxImageEffectPropProjectExtent: type: double dimension: 2 - writable: host kOfxImageEffectPropProjectOffset: type: double dimension: 2 - writable: host kOfxImageEffectPropProjectPixelAspectRatio: type: double dimension: 1 - writable: host kOfxImageEffectPropProjectSize: type: double dimension: 2 - writable: host kOfxImageEffectPropRegionOfDefinition: type: int dimension: 4 - writable: host kOfxImageEffectPropRegionOfInterest: type: int dimension: 4 - writable: host kOfxImageEffectPropRenderQualityDraft: type: bool dimension: 1 - writable: host kOfxImageEffectPropRenderScale: type: double dimension: 2 - writable: host kOfxImageEffectPropRenderWindow: type: int dimension: 4 - writable: host kOfxImageEffectPropSequentialRenderStatus: type: bool dimension: 1 - writable: host kOfxImageEffectPropSetableFielding: type: bool dimension: 1 - writable: host kOfxImageEffectPropSetableFrameRate: type: bool dimension: 1 - writable: host kOfxImageEffectPropSupportedComponents: type: enum dimension: 0 - writable: host values: - kOfxImageComponentNone - kOfxImageComponentRGBA @@ -1122,31 +1020,24 @@ properties: kOfxImageEffectPropSupportsOverlays: type: bool dimension: 1 - writable: host kOfxImageEffectPropUnmappedFrameRange: type: double dimension: 2 - writable: host kOfxImageEffectPropUnmappedFrameRate: type: double dimension: 1 - writable: host kOfxImageEffectPropColourManagementConfig: type: string dimension: 1 - writable: host kOfxImagePropBounds: type: int dimension: 4 - writable: host kOfxImagePropData: type: pointer dimension: 1 - writable: host kOfxImagePropField: type: enum dimension: 1 - writable: host values: - kOfxImageFieldNone - kOfxImageFieldBoth @@ -1155,71 +1046,55 @@ properties: kOfxImagePropPixelAspectRatio: type: double dimension: 1 - writable: all kOfxImagePropRegionOfDefinition: type: int dimension: 4 - writable: host kOfxImagePropRowBytes: type: int dimension: 1 - writable: host kOfxImagePropUniqueIdentifier: type: string dimension: 1 - writable: host # Interact/Drawing kOfxInteractPropBackgroundColour: type: double dimension: 3 - writable: host kOfxInteractPropBitDepth: type: int dimension: 1 - writable: host kOfxInteractPropDrawContext: type: pointer dimension: 1 - writable: host kOfxInteractPropHasAlpha: type: bool dimension: 1 - writable: host kOfxInteractPropPenPosition: type: double dimension: 2 - writable: host kOfxInteractPropPenPressure: type: double dimension: 1 - writable: host kOfxInteractPropPenViewportPosition: type: int dimension: 2 - writable: host kOfxInteractPropPixelScale: type: double dimension: 2 - writable: host kOfxInteractPropSlaveToParam: type: string dimension: 0 - writable: all kOfxInteractPropSuggestedColour: type: double dimension: 3 - writable: host kOfxInteractPropViewportSize: type: int dimension: 2 - writable: host deprecated: "1.3" kOfxOpenGLPropPixelDepth: type: enum dimension: 0 - writable: host values: - kOfxBitDepthNone - kOfxBitDepthByte @@ -1229,58 +1104,45 @@ properties: kOfxParamHostPropMaxPages: type: int dimension: 1 - writable: host kOfxParamHostPropMaxParameters: type: int dimension: 1 - writable: host kOfxParamHostPropPageRowColumnCount: type: int dimension: 2 - writable: host kOfxParamHostPropSupportsBooleanAnimation: type: bool dimension: 1 - writable: host kOfxParamHostPropSupportsChoiceAnimation: type: bool dimension: 1 - writable: host kOfxParamHostPropSupportsCustomAnimation: type: bool dimension: 1 - writable: host kOfxParamHostPropSupportsCustomInteract: type: bool dimension: 1 - writable: host kOfxParamHostPropSupportsParametricAnimation: type: bool dimension: 1 - writable: host kOfxParamHostPropSupportsStrChoice: type: bool dimension: 1 - writable: host kOfxParamHostPropSupportsStrChoiceAnimation: type: bool dimension: 1 - writable: host kOfxParamHostPropSupportsStringAnimation: type: bool dimension: 1 - writable: host # Param kOfxParamPropAnimates: type: bool dimension: 1 - writable: host kOfxParamPropCacheInvalidation: type: enum dimension: 1 - writable: all values: - kOfxParamInvalidateValueChange - kOfxParamInvalidateValueChangeToEnd @@ -1288,60 +1150,47 @@ properties: kOfxParamPropCanUndo: type: bool dimension: 1 - writable: plugin kOfxParamPropChoiceEnum: type: bool dimension: 1 - writable: host added: "1.5" kOfxParamPropChoiceOption: type: string dimension: 0 - writable: plugin kOfxParamPropChoiceOrder: type: int dimension: 0 - writable: plugin kOfxParamPropCustomInterpCallbackV1: type: pointer dimension: 1 - writable: plugin kOfxParamPropCustomValue: type: string dimension: 2 - writable: plugin # This is special because its type and dims vary depending on the param kOfxParamPropDefault: type: [int, double, string, bytes] dimension: 0 - writable: plugin kOfxParamPropDefaultCoordinateSystem: type: enum dimension: 1 - writable: plugin values: - kOfxParamCoordinatesCanonical - kOfxParamCoordinatesNormalised kOfxParamPropDigits: type: int dimension: 1 - writable: plugin kOfxParamPropDimensionLabel: type: string dimension: 1 - writable: plugin kOfxParamPropDisplayMax: type: [int, double] dimension: 0 - writable: plugin kOfxParamPropDisplayMin: type: [int, double] dimension: 0 - writable: plugin kOfxParamPropDoubleType: type: enum dimension: 1 - writable: plugin values: - kOfxParamDoubleTypePlain - kOfxParamDoubleTypeAngle @@ -1357,100 +1206,76 @@ properties: kOfxParamPropEvaluateOnChange: type: bool dimension: 1 - writable: plugin kOfxParamPropGroupOpen: type: bool dimension: 1 - writable: plugin kOfxParamPropHasHostOverlayHandle: type: bool dimension: 1 - writable: host kOfxParamPropIncrement: type: double dimension: 1 - writable: plugin kOfxParamPropInteractMinimumSize: type: double dimension: 2 - writable: plugin kOfxParamPropInteractPreferedSize: type: int dimension: 2 - writable: plugin kOfxParamPropInteractSize: type: double dimension: 2 - writable: plugin kOfxParamPropInteractSizeAspect: type: double dimension: 1 - writable: plugin kOfxParamPropInteractV1: type: pointer dimension: 1 - writable: plugin kOfxParamPropInterpolationAmount: type: double dimension: 1 - writable: plugin kOfxParamPropInterpolationTime: type: double dimension: 2 - writable: plugin kOfxParamPropIsAnimating: type: bool dimension: 1 - writable: host kOfxParamPropIsAutoKeying: type: bool dimension: 1 - writable: host kOfxParamPropMax: type: [int, double] dimension: 0 - writable: plugin kOfxParamPropMin: type: [int, double] dimension: 0 - writable: plugin kOfxParamPropPageChild: type: string dimension: 0 - writable: plugin kOfxParamPropParametricDimension: type: int dimension: 1 - writable: plugin kOfxParamPropParametricInteractBackground: type: pointer dimension: 1 - writable: plugin kOfxParamPropParametricRange: type: double dimension: 2 - writable: plugin kOfxParamPropParametricUIColour: type: double dimension: 0 - writable: plugin kOfxParamPropPersistant: type: int dimension: 1 - writable: plugin kOfxParamPropPluginMayWrite: type: int dimension: 1 - writable: plugin deprecated: "1.4" kOfxParamPropShowTimeMarker: type: bool dimension: 1 - writable: plugin kOfxParamPropStringMode: type: enum dimension: 1 - writable: plugin values: - kOfxParamStringIsSingleLine - kOfxParamStringIsMultiLine @@ -1461,19 +1286,15 @@ properties: kOfxParamPropUseHostOverlayHandle: type: bool dimension: 1 - writable: host kOfxParamPropStringFilePathExists: type: bool dimension: 1 - writable: plugin kOfxPluginPropParamPageOrder: type: string dimension: 0 - writable: plugin kOfxPropChangeReason: type: enum dimension: 1 - writable: host values: - kOfxChangeUserEdited - kOfxChangePluginEdited @@ -1481,28 +1302,21 @@ properties: kOfxPropEffectInstance: type: pointer dimension: 1 - writable: host kOfxPropHostOSHandle: type: pointer dimension: 1 - writable: host kOfxPropInstanceData: type: pointer dimension: 1 - writable: plugin kOfxPropIsInteractive: type: bool dimension: 1 - writable: host kOfxPropKeyString: type: string dimension: 1 - writable: host kOfxPropKeySym: type: int dimension: 1 - writable: host kOfxPropParamSetNeedsSyncing: type: bool dimension: 1 - writable: plugin From c53632b67475bba728198db136e72a1051724ccd Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 3 Sep 2024 13:19:12 -0400 Subject: [PATCH 08/14] Props metadata: use strings, not C #define names, for prop names The strings are the true spec, not the #define names. This also adds a set of static_assert tests to ensure the #define names match their strings. But doing this brought up that there are some mismatches between the strings and their #defines. Those will be accounted for in a following commit. Signed-off-by: Gary Oberbrunner --- Examples/Test/testProperties.cpp | 2 - Support/Plugins/Tester/Tester.cpp | 3 + Support/include/ofxPropsBySet.h | 733 +++++++++++++++ Support/include/ofxPropsMetadata.h | 395 ++++++++ include/ofx-props.yml | 1338 ++++++++++++++-------------- include/ofxPropsBySet.h | 733 --------------- include/ofxPropsMetadata.h | 224 ----- scripts/gen-props.py | 52 +- 8 files changed, 1830 insertions(+), 1650 deletions(-) create mode 100644 Support/include/ofxPropsBySet.h create mode 100644 Support/include/ofxPropsMetadata.h delete mode 100644 include/ofxPropsBySet.h delete mode 100644 include/ofxPropsMetadata.h diff --git a/Examples/Test/testProperties.cpp b/Examples/Test/testProperties.cpp index b3fdbf4b9..d30808c7d 100644 --- a/Examples/Test/testProperties.cpp +++ b/Examples/Test/testProperties.cpp @@ -15,8 +15,6 @@ run it through a c beautifier or emacs auto formatting, automagic indenting will #include "ofxMemory.h" #include "ofxMultiThread.h" #include "ofxMessage.h" -#include "ofxPropsBySet.h" -#include "ofxPropsMetadata.h" #include "ofxLog.H" diff --git a/Support/Plugins/Tester/Tester.cpp b/Support/Plugins/Tester/Tester.cpp index 9ede6917f..8bf3682fe 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 000000000..4b8037672 --- /dev/null +++ b/Support/include/ofxPropsBySet.h @@ -0,0 +1,733 @@ +// 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 { +// Properties for property sets +const std::map> prop_sets { +{ "ClipDescriptor", { "OfxImageClipPropFieldExtraction", + "OfxImageClipPropIsMask", + "OfxImageClipPropOptional", + "OfxImageEffectPropSupportedComponents", + "OfxImageEffectPropSupportsTiles", + "OfxImageEffectPropTemporalClipAccess", + "OfxPropLabel", + "OfxPropLongLabel", + "OfxPropName", + "OfxPropShortLabel", + "OfxPropType" } }, +{ "ClipInstance", { "OfxImageClipPropColourspace", + "OfxImageClipPropConnected", + "OfxImageClipPropContinuousSamples", + "OfxImageClipPropFieldExtraction", + "OfxImageClipPropFieldOrder", + "OfxImageClipPropIsMask", + "OfxImageClipPropOptional", + "OfxImageClipPropPreferredColourspaces", + "OfxImageClipPropUnmappedComponents", + "OfxImageClipPropUnmappedPixelDepth", + "OfxImageEffectPropComponents", + "OfxImageEffectPropFrameRange", + "OfxImageEffectPropFrameRate", + "OfxImageEffectPropPixelDepth", + "OfxImageEffectPropPreMultiplication", + "OfxImageEffectPropSupportedComponents", + "OfxImageEffectPropSupportsTiles", + "OfxImageEffectPropTemporalClipAccess", + "OfxImageEffectPropUnmappedFrameRange", + "OfxImageEffectPropUnmappedFrameRate", + "OfxImagePropPixelAspectRatio", + "OfxPropLabel", + "OfxPropLongLabel", + "OfxPropName", + "OfxPropShortLabel", + "OfxPropType" } }, +{ "EffectDescriptor", { "OfxImageEffectPluginPropFieldRenderTwiceAlways", + "OfxImageEffectPluginPropGrouping", + "OfxImageEffectPluginPropHostFrameThreading", + "OfxImageEffectPluginPropOverlayInteractV1", + "OfxImageEffectPluginPropOverlayInteractV2", + "OfxImageEffectPluginPropSingleInstance", + "OfxImageEffectPluginRenderThreadSafety", + "OfxImageEffectPluginRenderThreadSafety", + "OfxImageEffectPropClipPreferencesSlaveParam", + "OfxImageEffectPropColourManagementAvailableConfigs", + "OfxImageEffectPropColourManagementStyle", + "OfxImageEffectPropOpenGLRenderSupported", + "OfxImageEffectPropSupportedContexts", + "OfxImageEffectPropSupportedPixelDepths", + "OfxImageEffectPropSupportsMultiResolution", + "OfxImageEffectPropSupportsMultipleClipDepths", + "OfxImageEffectPropSupportsMultipleClipPARs", + "OfxImageEffectPropSupportsTiles", + "OfxImageEffectPropTemporalClipAccess", + "OfxOpenGLPropPixelDepth", + "OfxPluginPropFilePath", + "OfxPropLabel", + "OfxPropLongLabel", + "OfxPropPluginDescription", + "OfxPropShortLabel", + "OfxPropType", + "OfxPropVersion", + "OfxPropVersionLabel" } }, +{ "EffectInstance", { "OfxImageEffectInstancePropEffectDuration", + "OfxImageEffectInstancePropSequentialRender", + "OfxImageEffectPropColourManagementConfig", + "OfxImageEffectPropColourManagementStyle", + "OfxImageEffectPropContext", + "OfxImageEffectPropDisplayColourspace", + "OfxImageEffectPropFrameRate", + "OfxImageEffectPropOCIOConfig", + "OfxImageEffectPropOCIODisplay", + "OfxImageEffectPropOCIOView", + "OfxImageEffectPropOpenGLRenderSupported", + "OfxImageEffectPropPluginHandle", + "OfxImageEffectPropProjectExtent", + "OfxImageEffectPropProjectOffset", + "OfxImageEffectPropProjectPixelAspectRatio", + "OfxImageEffectPropProjectSize", + "OfxImageEffectPropSupportsTiles", + "OfxPropInstanceData", + "OfxPropIsInteractive", + "OfxPropType" } }, +{ "General", { "OfxPropTime" } }, +{ "Image", { "OfxImageEffectPropComponents", + "OfxImageEffectPropPixelDepth", + "OfxImageEffectPropPreMultiplication", + "OfxImageEffectPropRenderScale", + "OfxImagePropBounds", + "OfxImagePropData", + "OfxImagePropField", + "OfxImagePropPixelAspectRatio", + "OfxImagePropRegionOfDefinition", + "OfxImagePropRowBytes", + "OfxImagePropUniqueIdentifier", + "OfxPropType" } }, +{ "ImageEffectHost", { "OfxImageEffectHostPropIsBackground", + "OfxImageEffectHostPropNativeOrigin", + "OfxImageEffectInstancePropSequentialRender", + "OfxImageEffectPropColourManagementAvailableConfigs", + "OfxImageEffectPropColourManagementStyle", + "OfxImageEffectPropOpenGLRenderSupported", + "OfxImageEffectPropRenderQualityDraft", + "OfxImageEffectPropSetableFielding", + "OfxImageEffectPropSetableFrameRate", + "OfxImageEffectPropSupportedComponents", + "OfxImageEffectPropSupportedContexts", + "OfxImageEffectPropSupportsMultiResolution", + "OfxImageEffectPropSupportsMultipleClipDepths", + "OfxImageEffectPropSupportsMultipleClipPARs", + "OfxImageEffectPropSupportsOverlays", + "OfxImageEffectPropSupportsTiles", + "OfxImageEffectPropTemporalClipAccess", + "OfxParamHostPropMaxPages", + "OfxParamHostPropMaxParameters", + "OfxParamHostPropPageRowColumnCount", + "OfxParamHostPropSupportsBooleanAnimation", + "OfxParamHostPropSupportsChoiceAnimation", + "OfxParamHostPropSupportsCustomAnimation", + "OfxParamHostPropSupportsCustomInteract", + "OfxParamHostPropSupportsParametricAnimation", + "OfxParamHostPropSupportsStrChoice", + "OfxParamHostPropSupportsStrChoiceAnimation", + "OfxParamHostPropSupportsStringAnimation", + "OfxPropAPIVersion", + "OfxPropHostOSHandle", + "OfxPropLabel", + "OfxPropName", + "OfxPropType", + "OfxPropVersion", + "OfxPropVersionLabel" } }, +{ "InteractDescriptor", { "OfxInteractPropBitDepth", + "OfxInteractPropHasAlpha" } }, +{ "InteractInstance", { "OfxInteractPropBackgroundColour", + "OfxInteractPropBitDepth", + "OfxInteractPropHasAlpha", + "OfxInteractPropPixelScale", + "OfxInteractPropSlaveToParam", + "OfxInteractPropSuggestedColour", + "OfxPropEffectInstance", + "OfxPropInstanceData" } }, +{ "ParamDouble1D", { "OfxParamPropAnimates", + "OfxParamPropCacheInvalidation", + "OfxParamPropCanUndo", + "OfxParamPropDataPtr", + "OfxParamPropDefault", + "OfxParamPropDigits", + "OfxParamPropDisplayMax", + "OfxParamPropDisplayMin", + "OfxParamPropDoubleType", + "OfxParamPropEnabled", + "OfxParamPropEvaluateOnChange", + "OfxParamPropHasHostOverlayHandle", + "OfxParamPropHint", + "OfxParamPropIncrement", + "OfxParamPropInteractMinimumSize", + "OfxParamPropInteractPreferedSize", + "OfxParamPropInteractSize", + "OfxParamPropInteractSizeAspect", + "OfxParamPropInteractV1", + "OfxParamPropIsAnimating", + "OfxParamPropIsAutoKeying", + "OfxParamPropMax", + "OfxParamPropMin", + "OfxParamPropParent", + "OfxParamPropPersistant", + "OfxParamPropPluginMayWrite", + "OfxParamPropScriptName", + "OfxParamPropSecret", + "OfxParamPropShowTimeMarker", + "OfxParamPropType", + "OfxParamPropUseHostOverlayHandle", + "OfxPropIcon", + "OfxPropLabel", + "OfxPropLongLabel", + "OfxPropName", + "OfxPropShortLabel", + "OfxPropType" } }, +{ "ParameterSet", { "OfxPluginPropParamPageOrder", + "OfxPropParamSetNeedsSyncing" } }, +{ "ParamsByte", { "OfxParamPropAnimates", + "OfxParamPropCacheInvalidation", + "OfxParamPropCanUndo", + "OfxParamPropDataPtr", + "OfxParamPropDefault", + "OfxParamPropDisplayMax", + "OfxParamPropDisplayMin", + "OfxParamPropEnabled", + "OfxParamPropEvaluateOnChange", + "OfxParamPropHasHostOverlayHandle", + "OfxParamPropHint", + "OfxParamPropInteractMinimumSize", + "OfxParamPropInteractPreferedSize", + "OfxParamPropInteractSize", + "OfxParamPropInteractSizeAspect", + "OfxParamPropInteractV1", + "OfxParamPropIsAnimating", + "OfxParamPropIsAutoKeying", + "OfxParamPropMax", + "OfxParamPropMin", + "OfxParamPropParent", + "OfxParamPropPersistant", + "OfxParamPropPluginMayWrite", + "OfxParamPropScriptName", + "OfxParamPropSecret", + "OfxParamPropType", + "OfxParamPropUseHostOverlayHandle", + "OfxPropIcon", + "OfxPropLabel", + "OfxPropLongLabel", + "OfxPropName", + "OfxPropShortLabel", + "OfxPropType" } }, +{ "ParamsChoice", { "OfxParamPropAnimates", + "OfxParamPropCacheInvalidation", + "OfxParamPropCanUndo", + "OfxParamPropChoiceOption", + "OfxParamPropChoiceOrder", + "OfxParamPropDataPtr", + "OfxParamPropDefault", + "OfxParamPropEnabled", + "OfxParamPropEvaluateOnChange", + "OfxParamPropHasHostOverlayHandle", + "OfxParamPropHint", + "OfxParamPropInteractMinimumSize", + "OfxParamPropInteractPreferedSize", + "OfxParamPropInteractSize", + "OfxParamPropInteractSizeAspect", + "OfxParamPropInteractV1", + "OfxParamPropIsAnimating", + "OfxParamPropIsAutoKeying", + "OfxParamPropParent", + "OfxParamPropPersistant", + "OfxParamPropPluginMayWrite", + "OfxParamPropScriptName", + "OfxParamPropSecret", + "OfxParamPropType", + "OfxParamPropUseHostOverlayHandle", + "OfxPropIcon", + "OfxPropLabel", + "OfxPropLongLabel", + "OfxPropName", + "OfxPropShortLabel", + "OfxPropType" } }, +{ "ParamsCustom", { "OfxParamPropAnimates", + "OfxParamPropCacheInvalidation", + "OfxParamPropCanUndo", + "OfxParamPropCustomInterpCallbackV1", + "OfxParamPropDataPtr", + "OfxParamPropDefault", + "OfxParamPropEnabled", + "OfxParamPropEvaluateOnChange", + "OfxParamPropHasHostOverlayHandle", + "OfxParamPropHint", + "OfxParamPropInteractMinimumSize", + "OfxParamPropInteractPreferedSize", + "OfxParamPropInteractSize", + "OfxParamPropInteractSizeAspect", + "OfxParamPropInteractV1", + "OfxParamPropIsAnimating", + "OfxParamPropIsAutoKeying", + "OfxParamPropParent", + "OfxParamPropPersistant", + "OfxParamPropPluginMayWrite", + "OfxParamPropScriptName", + "OfxParamPropSecret", + "OfxParamPropType", + "OfxParamPropUseHostOverlayHandle", + "OfxPropIcon", + "OfxPropLabel", + "OfxPropLongLabel", + "OfxPropName", + "OfxPropShortLabel", + "OfxPropType" } }, +{ "ParamsDouble2D3D", { "OfxParamPropAnimates", + "OfxParamPropCacheInvalidation", + "OfxParamPropCanUndo", + "OfxParamPropDataPtr", + "OfxParamPropDefault", + "OfxParamPropDigits", + "OfxParamPropDisplayMax", + "OfxParamPropDisplayMin", + "OfxParamPropDoubleType", + "OfxParamPropEnabled", + "OfxParamPropEvaluateOnChange", + "OfxParamPropHasHostOverlayHandle", + "OfxParamPropHint", + "OfxParamPropIncrement", + "OfxParamPropInteractMinimumSize", + "OfxParamPropInteractPreferedSize", + "OfxParamPropInteractSize", + "OfxParamPropInteractSizeAspect", + "OfxParamPropInteractV1", + "OfxParamPropIsAnimating", + "OfxParamPropIsAutoKeying", + "OfxParamPropMax", + "OfxParamPropMin", + "OfxParamPropParent", + "OfxParamPropPersistant", + "OfxParamPropPluginMayWrite", + "OfxParamPropScriptName", + "OfxParamPropSecret", + "OfxParamPropType", + "OfxParamPropUseHostOverlayHandle", + "OfxPropIcon", + "OfxPropLabel", + "OfxPropLongLabel", + "OfxPropName", + "OfxPropShortLabel", + "OfxPropType" } }, +{ "ParamsGroup", { "OfxParamPropDataPtr", + "OfxParamPropEnabled", + "OfxParamPropGroupOpen", + "OfxParamPropHint", + "OfxParamPropParent", + "OfxParamPropScriptName", + "OfxParamPropSecret", + "OfxParamPropType", + "OfxPropIcon", + "OfxPropLabel", + "OfxPropLongLabel", + "OfxPropName", + "OfxPropShortLabel", + "OfxPropType" } }, +{ "ParamsInt2D3D", { "OfxParamPropAnimates", + "OfxParamPropCacheInvalidation", + "OfxParamPropCanUndo", + "OfxParamPropDataPtr", + "OfxParamPropDefault", + "OfxParamPropDimensionLabel", + "OfxParamPropDisplayMax", + "OfxParamPropDisplayMin", + "OfxParamPropEnabled", + "OfxParamPropEvaluateOnChange", + "OfxParamPropHasHostOverlayHandle", + "OfxParamPropHint", + "OfxParamPropInteractMinimumSize", + "OfxParamPropInteractPreferedSize", + "OfxParamPropInteractSize", + "OfxParamPropInteractSizeAspect", + "OfxParamPropInteractV1", + "OfxParamPropIsAnimating", + "OfxParamPropIsAutoKeying", + "OfxParamPropMax", + "OfxParamPropMin", + "OfxParamPropParent", + "OfxParamPropPersistant", + "OfxParamPropPluginMayWrite", + "OfxParamPropScriptName", + "OfxParamPropSecret", + "OfxParamPropType", + "OfxParamPropUseHostOverlayHandle", + "OfxPropIcon", + "OfxPropLabel", + "OfxPropLongLabel", + "OfxPropName", + "OfxPropShortLabel", + "OfxPropType" } }, +{ "ParamsNormalizedSpatial", { "OfxParamPropAnimates", + "OfxParamPropCacheInvalidation", + "OfxParamPropCanUndo", + "OfxParamPropDataPtr", + "OfxParamPropDefault", + "OfxParamPropDefaultCoordinateSystem", + "OfxParamPropDigits", + "OfxParamPropDisplayMax", + "OfxParamPropDisplayMin", + "OfxParamPropEnabled", + "OfxParamPropEvaluateOnChange", + "OfxParamPropHasHostOverlayHandle", + "OfxParamPropHint", + "OfxParamPropIncrement", + "OfxParamPropInteractMinimumSize", + "OfxParamPropInteractPreferedSize", + "OfxParamPropInteractSize", + "OfxParamPropInteractSizeAspect", + "OfxParamPropInteractV1", + "OfxParamPropIsAnimating", + "OfxParamPropIsAutoKeying", + "OfxParamPropMax", + "OfxParamPropMin", + "OfxParamPropParent", + "OfxParamPropPersistant", + "OfxParamPropPluginMayWrite", + "OfxParamPropScriptName", + "OfxParamPropSecret", + "OfxParamPropType", + "OfxParamPropUseHostOverlayHandle", + "OfxPropIcon", + "OfxPropLabel", + "OfxPropLongLabel", + "OfxPropName", + "OfxPropShortLabel", + "OfxPropType" } }, +{ "ParamsPage", { "OfxParamPropDataPtr", + "OfxParamPropEnabled", + "OfxParamPropHint", + "OfxParamPropPageChild", + "OfxParamPropParent", + "OfxParamPropScriptName", + "OfxParamPropSecret", + "OfxParamPropType", + "OfxPropIcon", + "OfxPropLabel", + "OfxPropLongLabel", + "OfxPropName", + "OfxPropShortLabel", + "OfxPropType" } }, +{ "ParamsParametric", { "OfxParamPropAnimates", + "OfxParamPropAnimates", + "OfxParamPropCacheInvalidation", + "OfxParamPropCacheInvalidation", + "OfxParamPropCanUndo", + "OfxParamPropCanUndo", + "OfxParamPropDataPtr", + "OfxParamPropDefault", + "OfxParamPropEnabled", + "OfxParamPropEvaluateOnChange", + "OfxParamPropEvaluateOnChange", + "OfxParamPropHasHostOverlayHandle", + "OfxParamPropHint", + "OfxParamPropInteractMinimumSize", + "OfxParamPropInteractPreferedSize", + "OfxParamPropInteractSize", + "OfxParamPropInteractSizeAspect", + "OfxParamPropInteractV1", + "OfxParamPropIsAnimating", + "OfxParamPropIsAnimating", + "OfxParamPropIsAutoKeying", + "OfxParamPropIsAutoKeying", + "OfxParamPropParametricDimension", + "OfxParamPropParametricInteractBackground", + "OfxParamPropParametricRange", + "OfxParamPropParametricUIColour", + "OfxParamPropParent", + "OfxParamPropPersistant", + "OfxParamPropPersistant", + "OfxParamPropPluginMayWrite", + "OfxParamPropPluginMayWrite", + "OfxParamPropScriptName", + "OfxParamPropSecret", + "OfxParamPropType", + "OfxParamPropUseHostOverlayHandle", + "OfxPropIcon", + "OfxPropLabel", + "OfxPropLongLabel", + "OfxPropName", + "OfxPropShortLabel", + "OfxPropType" } }, +{ "ParamsStrChoice", { "OfxParamPropAnimates", + "OfxParamPropCacheInvalidation", + "OfxParamPropCanUndo", + "OfxParamPropChoiceEnum", + "OfxParamPropChoiceOption", + "OfxParamPropDataPtr", + "OfxParamPropDefault", + "OfxParamPropEnabled", + "OfxParamPropEvaluateOnChange", + "OfxParamPropHasHostOverlayHandle", + "OfxParamPropHint", + "OfxParamPropInteractMinimumSize", + "OfxParamPropInteractPreferedSize", + "OfxParamPropInteractSize", + "OfxParamPropInteractSizeAspect", + "OfxParamPropInteractV1", + "OfxParamPropIsAnimating", + "OfxParamPropIsAutoKeying", + "OfxParamPropParent", + "OfxParamPropPersistant", + "OfxParamPropPluginMayWrite", + "OfxParamPropScriptName", + "OfxParamPropSecret", + "OfxParamPropType", + "OfxParamPropUseHostOverlayHandle", + "OfxPropIcon", + "OfxPropLabel", + "OfxPropLongLabel", + "OfxPropName", + "OfxPropShortLabel", + "OfxPropType" } }, +{ "ParamsString", { "OfxParamPropAnimates", + "OfxParamPropCacheInvalidation", + "OfxParamPropCanUndo", + "OfxParamPropDataPtr", + "OfxParamPropDefault", + "OfxParamPropDisplayMax", + "OfxParamPropDisplayMin", + "OfxParamPropEnabled", + "OfxParamPropEvaluateOnChange", + "OfxParamPropHasHostOverlayHandle", + "OfxParamPropHint", + "OfxParamPropInteractMinimumSize", + "OfxParamPropInteractPreferedSize", + "OfxParamPropInteractSize", + "OfxParamPropInteractSizeAspect", + "OfxParamPropInteractV1", + "OfxParamPropIsAnimating", + "OfxParamPropIsAutoKeying", + "OfxParamPropMax", + "OfxParamPropMin", + "OfxParamPropParent", + "OfxParamPropPersistant", + "OfxParamPropPluginMayWrite", + "OfxParamPropScriptName", + "OfxParamPropSecret", + "OfxParamPropStringFilePathExists", + "OfxParamPropStringMode", + "OfxParamPropType", + "OfxParamPropUseHostOverlayHandle", + "OfxPropIcon", + "OfxPropLabel", + "OfxPropLongLabel", + "OfxPropName", + "OfxPropShortLabel", + "OfxPropType" } }, +}; + +// Actions +const std::array actions { + "CustomParamInterpFunc", + "OfxActionBeginInstanceChanged", + "OfxActionBeginInstanceEdit", + "OfxActionCreateInstance", + "OfxActionCreateInstanceInteract", + "OfxActionDescribe", + "OfxActionDescribeInteract", + "OfxActionDestroyInstance", + "OfxActionDestroyInstanceInteract", + "OfxActionEndInstanceChanged", + "OfxActionEndInstanceEdit", + "OfxActionInstanceChanged", + "OfxActionLoad", + "OfxActionPurgeCaches", + "OfxActionSyncPrivateData", + "OfxActionUnload", + "OfxImageEffectActionBeginSequenceRender", + "OfxImageEffectActionDescribeInContext", + "OfxImageEffectActionEndSequenceRender", + "OfxImageEffectActionGetClipPreferences", + "OfxImageEffectActionGetFramesNeeded", + "OfxImageEffectActionGetRegionOfDefinition", + "OfxImageEffectActionGetRegionsOfInterest", + "OfxImageEffectActionGetTimeDomain", + "OfxImageEffectActionIsIdentity", + "OfxImageEffectActionRender", + "OfxInteractActionDraw", + "OfxInteractActionGainFocus", + "OfxInteractActionKeyDown", + "OfxInteractActionKeyRepeat", + "OfxInteractActionKeyUp", + "OfxInteractActionLoseFocus", + "OfxInteractActionPenDown", + "OfxInteractActionPenMotion", + "OfxInteractActionPenUp", +}; + +// Properties for action args +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" } }, +{ { "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", + "OfxPropKeyString", + "OfxPropKeySym", + "OfxPropTime" } }, +{ { "OfxInteractActionKeyRepeat", "inArgs" }, { "OfxImageEffectPropRenderScale", + "OfxPropEffectInstance", + "OfxPropKeyString", + "OfxPropKeySym", + "OfxPropTime" } }, +{ { "OfxInteractActionKeyUp", "inArgs" }, { "OfxImageEffectPropRenderScale", + "OfxPropEffectInstance", + "OfxPropKeyString", + "OfxPropKeySym", + "OfxPropTime" } }, +{ { "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" } }, +}; +} // namespace OpenFX diff --git a/Support/include/ofxPropsMetadata.h b/Support/include/ofxPropsMetadata.h new file mode 100644 index 000000000..fdb69ecf6 --- /dev/null +++ b/Support/include/ofxPropsMetadata.h @@ -0,0 +1,395 @@ +// 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 name; + std::vector types; + int dimension; + std::vector values; // for enums +}; + +const std::vector 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::Int}, 1, {} }, +{ "OfxImageEffectPluginPropFieldRenderTwiceAlways", {PropType::Int}, 1, {} }, +{ "OfxImageEffectPluginPropGrouping", {PropType::String}, 1, {} }, +{ "OfxImageEffectPluginPropHostFrameThreading", {PropType::Int}, 1, {} }, +{ "OfxImageEffectPluginPropOverlayInteractV1", {PropType::Pointer}, 1, {} }, +{ "OfxImageEffectPluginPropOverlayInteractV2", {PropType::Pointer}, 1, {} }, +{ "OfxImageEffectPluginPropSingleInstance", {PropType::Int}, 1, {} }, +{ "OfxImageEffectPluginRenderThreadSafety", {PropType::String}, 1, {} }, +{ "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"} }, +{ "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, {} }, +{ "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, {} }, +{ "OfxImageEffectPropProjectPixelAspectRatio", {PropType::Double}, 1, {} }, +{ "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::String}, 0, {} }, +{ "OfxImageEffectPropSupportedPixelDepths", {PropType::String}, 0, {} }, +{ "OfxImageEffectPropSupportsMultiResolution", {PropType::Int}, 1, {} }, +{ "OfxImageEffectPropSupportsMultipleClipDepths", {PropType::Int}, 1, {} }, +{ "OfxImageEffectPropSupportsMultipleClipPARs", {PropType::Int}, 1, {} }, +{ "OfxImageEffectPropSupportsOverlays", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPropSupportsTiles", {PropType::Int}, 1, {} }, +{ "OfxImageEffectPropTemporalClipAccess", {PropType::Int}, 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, {} }, +{ "OfxInteractPropViewportSize", {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, {} }, +{ "OfxParamPropCustomInterpCallbackV1", {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::Int}, 1, {} }, +{ "OfxParamPropPluginMayWrite", {PropType::Int}, 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, {} }, +{ "OfxParamPropUseHostOverlayHandle", {PropType::Bool}, 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, {} }, +{ "OfxPropKeyString", {PropType::String}, 1, {} }, +{ "OfxPropKeySym", {PropType::Int}, 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, {} }, +}; +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("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("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("OfxImageEffectPropProjectPixelAspectRatio") == std::string_view(kOfxImageEffectPropProjectPixelAspectRatio)); +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("OfxImageEffectPropSupportsMultipleClipDepths") == std::string_view(kOfxImageEffectPropSupportsMultipleClipDepths)); +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("OfxInteractPropViewportSize") == 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("OfxParamPropCustomInterpCallbackV1") == 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("OfxParamPropUseHostOverlayHandle") == std::string_view(kOfxParamPropUseHostOverlayHandle)); +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("OfxPropKeyString") == std::string_view(kOfxPropKeyString)); +static_assert(std::string_view("OfxPropKeySym") == std::string_view(kOfxPropKeySym)); +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)); +} // namespace OpenFX diff --git a/include/ofx-props.yml b/include/ofx-props.yml index 9e7697cbf..f750b24bf 100644 --- a/include/ofx-props.yml +++ b/include/ofx-props.yml @@ -7,205 +7,205 @@ propertySets: General: - - kOfxPropTime + - OfxPropTime ImageEffectHost: - - kOfxPropAPIVersion - - kOfxPropType - - kOfxPropName - - kOfxPropLabel - - kOfxPropVersion - - kOfxPropVersionLabel - - kOfxImageEffectHostPropIsBackground - - kOfxImageEffectPropSupportsOverlays - - kOfxImageEffectPropSupportsMultiResolution - - kOfxImageEffectPropSupportsTiles - - kOfxImageEffectPropTemporalClipAccess - - kOfxImageEffectPropSupportedComponents - - kOfxImageEffectPropSupportedContexts - - kOfxImageEffectPropSupportsMultipleClipDepths - - kOfxImageEffectPropSupportsMultipleClipPARs - - kOfxImageEffectPropSetableFrameRate - - kOfxImageEffectPropSetableFielding - - kOfxParamHostPropSupportsCustomInteract - - kOfxParamHostPropSupportsStringAnimation - - kOfxParamHostPropSupportsChoiceAnimation - - kOfxParamHostPropSupportsBooleanAnimation - - kOfxParamHostPropSupportsCustomAnimation - - kOfxParamHostPropSupportsStrChoice - - kOfxParamHostPropSupportsStrChoiceAnimation - - kOfxParamHostPropMaxParameters - - kOfxParamHostPropMaxPages - - kOfxParamHostPropPageRowColumnCount - - kOfxPropHostOSHandle - - kOfxParamHostPropSupportsParametricAnimation - - kOfxImageEffectInstancePropSequentialRender - - kOfxImageEffectPropOpenGLRenderSupported - - kOfxImageEffectPropRenderQualityDraft - - kOfxImageEffectHostPropNativeOrigin - - kOfxImageEffectPropColourManagementAvailableConfigs - - kOfxImageEffectPropColourManagementStyle + - OfxPropAPIVersion + - OfxPropType + - OfxPropName + - OfxPropLabel + - OfxPropVersion + - OfxPropVersionLabel + - OfxImageEffectHostPropIsBackground + - OfxImageEffectPropSupportsOverlays + - OfxImageEffectPropSupportsMultiResolution + - OfxImageEffectPropSupportsTiles + - OfxImageEffectPropTemporalClipAccess + - OfxImageEffectPropSupportedComponents + - OfxImageEffectPropSupportedContexts + - OfxImageEffectPropSupportsMultipleClipDepths + - OfxImageEffectPropSupportsMultipleClipPARs + - OfxImageEffectPropSetableFrameRate + - OfxImageEffectPropSetableFielding + - OfxParamHostPropSupportsCustomInteract + - OfxParamHostPropSupportsStringAnimation + - OfxParamHostPropSupportsChoiceAnimation + - OfxParamHostPropSupportsBooleanAnimation + - OfxParamHostPropSupportsCustomAnimation + - OfxParamHostPropSupportsStrChoice + - OfxParamHostPropSupportsStrChoiceAnimation + - OfxParamHostPropMaxParameters + - OfxParamHostPropMaxPages + - OfxParamHostPropPageRowColumnCount + - OfxPropHostOSHandle + - OfxParamHostPropSupportsParametricAnimation + - OfxImageEffectInstancePropSequentialRender + - OfxImageEffectPropOpenGLRenderSupported + - OfxImageEffectPropRenderQualityDraft + - OfxImageEffectHostPropNativeOrigin + - OfxImageEffectPropColourManagementAvailableConfigs + - OfxImageEffectPropColourManagementStyle EffectDescriptor: - - kOfxPropType - - kOfxPropLabel - - kOfxPropShortLabel - - kOfxPropLongLabel - - kOfxPropVersion - - kOfxPropVersionLabel - - kOfxPropPluginDescription - - kOfxImageEffectPropSupportedContexts - - kOfxImageEffectPluginPropGrouping - - kOfxImageEffectPluginPropSingleInstance - - kOfxImageEffectPluginRenderThreadSafety - - kOfxImageEffectPluginPropHostFrameThreading - - kOfxImageEffectPluginPropOverlayInteractV1 - - kOfxImageEffectPropSupportsMultiResolution - - kOfxImageEffectPropSupportsTiles - - kOfxImageEffectPropTemporalClipAccess - - kOfxImageEffectPropSupportedPixelDepths - - kOfxImageEffectPluginPropFieldRenderTwiceAlways - - kOfxImageEffectPropSupportsMultipleClipDepths - - kOfxImageEffectPropSupportsMultipleClipPARs - - kOfxImageEffectPluginRenderThreadSafety - - kOfxImageEffectPropClipPreferencesSlaveParam - - kOfxImageEffectPropOpenGLRenderSupported - - kOfxPluginPropFilePath - - kOfxOpenGLPropPixelDepth - - kOfxImageEffectPluginPropOverlayInteractV2 - - kOfxImageEffectPropColourManagementAvailableConfigs - - kOfxImageEffectPropColourManagementStyle + - OfxPropType + - OfxPropLabel + - OfxPropShortLabel + - OfxPropLongLabel + - OfxPropVersion + - OfxPropVersionLabel + - OfxPropPluginDescription + - OfxImageEffectPropSupportedContexts + - OfxImageEffectPluginPropGrouping + - OfxImageEffectPluginPropSingleInstance + - OfxImageEffectPluginRenderThreadSafety + - OfxImageEffectPluginPropHostFrameThreading + - OfxImageEffectPluginPropOverlayInteractV1 + - OfxImageEffectPropSupportsMultiResolution + - OfxImageEffectPropSupportsTiles + - OfxImageEffectPropTemporalClipAccess + - OfxImageEffectPropSupportedPixelDepths + - OfxImageEffectPluginPropFieldRenderTwiceAlways + - OfxImageEffectPropSupportsMultipleClipDepths + - OfxImageEffectPropSupportsMultipleClipPARs + - OfxImageEffectPluginRenderThreadSafety + - OfxImageEffectPropClipPreferencesSlaveParam + - OfxImageEffectPropOpenGLRenderSupported + - OfxPluginPropFilePath + - OfxOpenGLPropPixelDepth + - OfxImageEffectPluginPropOverlayInteractV2 + - OfxImageEffectPropColourManagementAvailableConfigs + - OfxImageEffectPropColourManagementStyle EffectInstance: - - kOfxPropType - - kOfxImageEffectPropContext - - kOfxPropInstanceData - - kOfxImageEffectPropProjectSize - - kOfxImageEffectPropProjectOffset - - kOfxImageEffectPropProjectExtent - - kOfxImageEffectPropProjectPixelAspectRatio - - kOfxImageEffectInstancePropEffectDuration - - kOfxImageEffectInstancePropSequentialRender - - kOfxImageEffectPropSupportsTiles - - kOfxImageEffectPropOpenGLRenderSupported - - kOfxImageEffectPropFrameRate - - kOfxPropIsInteractive - - kOfxImageEffectPropOCIOConfig - - kOfxImageEffectPropOCIODisplay - - kOfxImageEffectPropOCIOView - - kOfxImageEffectPropColourManagementConfig - - kOfxImageEffectPropColourManagementStyle - - kOfxImageEffectPropDisplayColourspace - - kOfxImageEffectPropPluginHandle + - OfxPropType + - OfxImageEffectPropContext + - OfxPropInstanceData + - OfxImageEffectPropProjectSize + - OfxImageEffectPropProjectOffset + - OfxImageEffectPropProjectExtent + - OfxImageEffectPropProjectPixelAspectRatio + - OfxImageEffectInstancePropEffectDuration + - OfxImageEffectInstancePropSequentialRender + - OfxImageEffectPropSupportsTiles + - OfxImageEffectPropOpenGLRenderSupported + - OfxImageEffectPropFrameRate + - OfxPropIsInteractive + - OfxImageEffectPropOCIOConfig + - OfxImageEffectPropOCIODisplay + - OfxImageEffectPropOCIOView + - OfxImageEffectPropColourManagementConfig + - OfxImageEffectPropColourManagementStyle + - OfxImageEffectPropDisplayColourspace + - OfxImageEffectPropPluginHandle ClipDescriptor: - - kOfxPropType - - kOfxPropName - - kOfxPropLabel - - kOfxPropShortLabel - - kOfxPropLongLabel - - kOfxImageEffectPropSupportedComponents - - kOfxImageEffectPropTemporalClipAccess - - kOfxImageClipPropOptional - - kOfxImageClipPropFieldExtraction - - kOfxImageClipPropIsMask - - kOfxImageEffectPropSupportsTiles + - OfxPropType + - OfxPropName + - OfxPropLabel + - OfxPropShortLabel + - OfxPropLongLabel + - OfxImageEffectPropSupportedComponents + - OfxImageEffectPropTemporalClipAccess + - OfxImageClipPropOptional + - OfxImageClipPropFieldExtraction + - OfxImageClipPropIsMask + - OfxImageEffectPropSupportsTiles ClipInstance: - - kOfxPropType - - kOfxPropName - - kOfxPropLabel - - kOfxPropShortLabel - - kOfxPropLongLabel - - kOfxImageEffectPropSupportedComponents - - kOfxImageEffectPropTemporalClipAccess - - kOfxImageClipPropColourspace - - kOfxImageClipPropPreferredColourspaces - - kOfxImageClipPropOptional - - kOfxImageClipPropFieldExtraction - - kOfxImageClipPropIsMask - - kOfxImageEffectPropSupportsTiles - - kOfxImageEffectPropPixelDepth - - kOfxImageEffectPropComponents - - kOfxImageClipPropUnmappedPixelDepth - - kOfxImageClipPropUnmappedComponents - - kOfxImageEffectPropPreMultiplication - - kOfxImagePropPixelAspectRatio - - kOfxImageEffectPropFrameRate - - kOfxImageEffectPropFrameRange - - kOfxImageClipPropFieldOrder - - kOfxImageClipPropConnected - - kOfxImageEffectPropUnmappedFrameRange - - kOfxImageEffectPropUnmappedFrameRate - - kOfxImageClipPropContinuousSamples + - 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: - - kOfxPropType - - kOfxImageEffectPropPixelDepth - - kOfxImageEffectPropComponents - - kOfxImageEffectPropPreMultiplication - - kOfxImageEffectPropRenderScale - - kOfxImagePropPixelAspectRatio - - kOfxImagePropData - - kOfxImagePropBounds - - kOfxImagePropRegionOfDefinition - - kOfxImagePropRowBytes - - kOfxImagePropField - - kOfxImagePropUniqueIdentifier + - OfxPropType + - OfxImageEffectPropPixelDepth + - OfxImageEffectPropComponents + - OfxImageEffectPropPreMultiplication + - OfxImageEffectPropRenderScale + - OfxImagePropPixelAspectRatio + - OfxImagePropData + - OfxImagePropBounds + - OfxImagePropRegionOfDefinition + - OfxImagePropRowBytes + - OfxImagePropField + - OfxImagePropUniqueIdentifier ParameterSet: - - kOfxPropParamSetNeedsSyncing - - kOfxPluginPropParamPageOrder + - OfxPropParamSetNeedsSyncing + - OfxPluginPropParamPageOrder ParamsCommon_DEF: - - kOfxPropType - - kOfxPropName - - kOfxPropLabel - - kOfxPropShortLabel - - kOfxPropLongLabel - - kOfxParamPropType - - kOfxParamPropSecret - - kOfxParamPropHint - - kOfxParamPropScriptName - - kOfxParamPropParent - - kOfxParamPropEnabled - - kOfxParamPropDataPtr - - kOfxPropIcon + - OfxPropType + - OfxPropName + - OfxPropLabel + - OfxPropShortLabel + - OfxPropLongLabel + - OfxParamPropType + - OfxParamPropSecret + - OfxParamPropHint + - OfxParamPropScriptName + - OfxParamPropParent + - OfxParamPropEnabled + - OfxParamPropDataPtr + - OfxPropIcon ParamsAllButGroupPage_DEF: - - kOfxParamPropInteractV1 - - kOfxParamPropInteractSize - - kOfxParamPropInteractSizeAspect - - kOfxParamPropInteractMinimumSize - - kOfxParamPropInteractPreferedSize - - kOfxParamPropHasHostOverlayHandle - - kOfxParamPropUseHostOverlayHandle + - OfxParamPropInteractV1 + - OfxParamPropInteractSize + - OfxParamPropInteractSizeAspect + - OfxParamPropInteractMinimumSize + - OfxParamPropInteractPreferedSize + - OfxParamPropHasHostOverlayHandle + - OfxParamPropUseHostOverlayHandle ParamsValue_DEF: - - kOfxParamPropDefault - - kOfxParamPropAnimates - - kOfxParamPropIsAnimating - - kOfxParamPropIsAutoKeying - - kOfxParamPropPersistant - - kOfxParamPropEvaluateOnChange - - kOfxParamPropPluginMayWrite - - kOfxParamPropCacheInvalidation - - kOfxParamPropCanUndo + - OfxParamPropDefault + - OfxParamPropAnimates + - OfxParamPropIsAnimating + - OfxParamPropIsAutoKeying + - OfxParamPropPersistant + - OfxParamPropEvaluateOnChange + - OfxParamPropPluginMayWrite + - OfxParamPropCacheInvalidation + - OfxParamPropCanUndo ParamsNumeric_DEF: - - kOfxParamPropMin - - kOfxParamPropMax - - kOfxParamPropDisplayMin - - kOfxParamPropDisplayMax + - OfxParamPropMin + - OfxParamPropMax + - OfxParamPropDisplayMin + - OfxParamPropDisplayMax ParamsDouble_DEF: - - kOfxParamPropIncrement - - kOfxParamPropDigits + - OfxParamPropIncrement + - OfxParamPropDigits ParamsGroup: - - kOfxParamPropGroupOpen + - OfxParamPropGroupOpen - ParamsCommon_REF ParamDouble1D: - - kOfxParamPropShowTimeMarker - - kOfxParamPropDoubleType + - OfxParamPropShowTimeMarker + - OfxParamPropDoubleType - ParamsCommon_REF - ParamsAllButGroupPage_REF - ParamsValue_REF @@ -213,7 +213,7 @@ propertySets: - ParamsDouble_REF ParamsDouble2D3D: - - kOfxParamPropDoubleType + - OfxParamPropDoubleType - ParamsCommon_REF - ParamsAllButGroupPage_REF - ParamsValue_REF @@ -221,7 +221,7 @@ propertySets: - ParamsDouble_REF ParamsNormalizedSpatial: - - kOfxParamPropDefaultCoordinateSystem + - OfxParamPropDefaultCoordinateSystem - ParamsCommon_REF - ParamsAllButGroupPage_REF - ParamsValue_REF @@ -229,15 +229,15 @@ propertySets: - ParamsDouble_REF ParamsInt2D3D: - - kOfxParamPropDimensionLabel + - OfxParamPropDimensionLabel - ParamsCommon_REF - ParamsAllButGroupPage_REF - ParamsValue_REF - ParamsNumeric_REF ParamsString: - - kOfxParamPropStringMode - - kOfxParamPropStringFilePathExists + - OfxParamPropStringMode + - OfxParamPropStringFilePathExists - ParamsCommon_REF - ParamsAllButGroupPage_REF - ParamsValue_REF @@ -250,358 +250,358 @@ propertySets: - ParamsNumeric_REF ParamsChoice: - - kOfxParamPropChoiceOption - - kOfxParamPropChoiceOrder + - OfxParamPropChoiceOption + - OfxParamPropChoiceOrder - ParamsCommon_REF - ParamsAllButGroupPage_REF - ParamsValue_REF ParamsStrChoice: - - kOfxParamPropChoiceOption - - kOfxParamPropChoiceEnum + - OfxParamPropChoiceOption + - OfxParamPropChoiceEnum - ParamsCommon_REF - ParamsAllButGroupPage_REF - ParamsValue_REF ParamsCustom: - - kOfxParamPropCustomInterpCallbackV1 + - OfxParamPropCustomInterpCallbackV1 - ParamsCommon_REF - ParamsAllButGroupPage_REF - ParamsValue_REF ParamsPage: - - kOfxParamPropPageChild + - OfxParamPropPageChild - ParamsCommon_REF ParamsGroup: - - kOfxParamPropGroupOpen + - OfxParamPropGroupOpen - ParamsCommon_REF ParamsParametric: - - kOfxParamPropAnimates - - kOfxParamPropIsAnimating - - kOfxParamPropIsAutoKeying - - kOfxParamPropPersistant - - kOfxParamPropEvaluateOnChange - - kOfxParamPropPluginMayWrite - - kOfxParamPropCacheInvalidation - - kOfxParamPropCanUndo - - kOfxParamPropParametricDimension - - kOfxParamPropParametricUIColour - - kOfxParamPropParametricInteractBackground - - kOfxParamPropParametricRange + - OfxParamPropAnimates + - OfxParamPropIsAnimating + - OfxParamPropIsAutoKeying + - OfxParamPropPersistant + - OfxParamPropEvaluateOnChange + - OfxParamPropPluginMayWrite + - OfxParamPropCacheInvalidation + - OfxParamPropCanUndo + - OfxParamPropParametricDimension + - OfxParamPropParametricUIColour + - OfxParamPropParametricInteractBackground + - OfxParamPropParametricRange - ParamsCommon_REF - ParamsAllButGroupPage_REF - ParamsValue_REF InteractDescriptor: - - kOfxInteractPropHasAlpha - - kOfxInteractPropBitDepth + - OfxInteractPropHasAlpha + - OfxInteractPropBitDepth InteractInstance: - - kOfxPropEffectInstance - - kOfxPropInstanceData - - kOfxInteractPropPixelScale - - kOfxInteractPropBackgroundColour - - kOfxInteractPropHasAlpha - - kOfxInteractPropBitDepth - - kOfxInteractPropSlaveToParam - - kOfxInteractPropSuggestedColour + - OfxPropEffectInstance + - OfxPropInstanceData + - OfxInteractPropPixelScale + - OfxInteractPropBackgroundColour + - OfxInteractPropHasAlpha + - OfxInteractPropBitDepth + - OfxInteractPropSlaveToParam + - OfxInteractPropSuggestedColour - kOfxActionLoad: + OfxActionLoad: inArgs: outArgs: - kOfxActionDescribe: + OfxActionDescribe: inArgs: outArgs: - kOfxActionUnload: + OfxActionUnload: inArgs: outArgs: - kOfxActionPurgeCaches: + OfxActionPurgeCaches: inArgs: outArgs: - kOfxActionSyncPrivateData: + OfxActionSyncPrivateData: inArgs: outArgs: - kOfxActionCreateInstance: + OfxActionCreateInstance: inArgs: outArgs: - kOfxActionDestroyInstance: + OfxActionDestroyInstance: inArgs: outArgs: - kOfxActionInstanceChanged: + OfxActionInstanceChanged: inArgs: - - kOfxPropType - - kOfxPropName - - kOfxPropChangeReason - - kOfxPropTime - - kOfxImageEffectPropRenderScale + - OfxPropType + - OfxPropName + - OfxPropChangeReason + - OfxPropTime + - OfxImageEffectPropRenderScale outArgs: - kOfxActionBeginInstanceChanged: + OfxActionBeginInstanceChanged: inArgs: - - kOfxPropChangeReason + - OfxPropChangeReason outArgs: [] - kOfxActionEndInstanceChanged: + OfxActionEndInstanceChanged: inArgs: - - kOfxPropChangeReason + - OfxPropChangeReason outArgs: - kOfxActionDestroyInstance: + OfxActionDestroyInstance: inArgs: outArgs: - kOfxActionBeginInstanceEdit: + OfxActionBeginInstanceEdit: inArgs: outArgs: - kOfxActionEndInstanceEdit: + OfxActionEndInstanceEdit: inArgs: outArgs: - kOfxImageEffectActionGetRegionOfDefinition: + OfxImageEffectActionGetRegionOfDefinition: inArgs: - - kOfxPropTime - - kOfxImageEffectPropRenderScale + - OfxPropTime + - OfxImageEffectPropRenderScale outArgs: - - kOfxImageEffectPropRegionOfDefinition + - OfxImageEffectPropRegionOfDefinition - kOfxImageEffectActionGetRegionsOfInterest: + OfxImageEffectActionGetRegionsOfInterest: inArgs: - - kOfxPropTime - - kOfxImageEffectPropRenderScale - - kOfxImageEffectPropRegionOfInterest + - OfxPropTime + - OfxImageEffectPropRenderScale + - OfxImageEffectPropRegionOfInterest outArgs: - # - kOfxImageEffectClipPropRoI_ # with clip name + # - OfxImageEffectClipPropRoI_ # with clip name - kOfxImageEffectActionGetTimeDomain: + OfxImageEffectActionGetTimeDomain: inArgs: outArgs: - - kOfxImageEffectPropFrameRange + - OfxImageEffectPropFrameRange - kOfxImageEffectActionGetFramesNeeded: + OfxImageEffectActionGetFramesNeeded: inArgs: - - kOfxPropTime + - OfxPropTime outArgs: - - kOfxImageEffectPropFrameRange + - OfxImageEffectPropFrameRange - kOfxImageEffectActionGetClipPreferences: + OfxImageEffectActionGetClipPreferences: inArgs: outArgs: - - kOfxImageEffectPropFrameRate - - kOfxImageClipPropFieldOrder - - kOfxImageEffectPropPreMultiplication - - kOfxImageClipPropContinuousSamples - - kOfxImageEffectFrameVarying + - OfxImageEffectPropFrameRate + - OfxImageClipPropFieldOrder + - OfxImageEffectPropPreMultiplication + - OfxImageClipPropContinuousSamples + - OfxImageEffectFrameVarying # these special props all have the clip name postpended after "_" # - OfxImageClipPropComponents_ # - OfxImageClipPropDepth_ # - OfxImageClipPropPreferredColourspaces_ # - OfxImageClipPropPAR_ - kOfxImageEffectActionIsIdentity: + OfxImageEffectActionIsIdentity: inArgs: - - kOfxPropTime - - kOfxImageEffectPropFieldToRender - - kOfxImageEffectPropRenderWindow - - kOfxImageEffectPropRenderScale + - OfxPropTime + - OfxImageEffectPropFieldToRender + - OfxImageEffectPropRenderWindow + - OfxImageEffectPropRenderScale - kOfxImageEffectActionRender: + OfxImageEffectActionRender: inArgs: - - kOfxPropTime - - kOfxImageEffectPropSequentialRenderStatus - - kOfxImageEffectPropInteractiveRenderStatus - - kOfxImageEffectPropRenderQualityDraft - - kOfxImageEffectPropCudaEnabled - - kOfxImageEffectPropCudaRenderSupported - - kOfxImageEffectPropCudaStream - - kOfxImageEffectPropCudaStreamSupported - - kOfxImageEffectPropMetalCommandQueue - - kOfxImageEffectPropMetalEnabled - - kOfxImageEffectPropMetalRenderSupported - - kOfxImageEffectPropOpenCLCommandQueue - - kOfxImageEffectPropOpenCLEnabled - - kOfxImageEffectPropOpenCLImage - - kOfxImageEffectPropOpenCLRenderSupported - - kOfxImageEffectPropOpenCLSupported - - kOfxImageEffectPropOpenGLEnabled - - kOfxImageEffectPropOpenGLTextureIndex - - kOfxImageEffectPropOpenGLTextureTarget - - kOfxImageEffectPropInteractiveRenderStatus + - OfxPropTime + - OfxImageEffectPropSequentialRenderStatus + - OfxImageEffectPropInteractiveRenderStatus + - OfxImageEffectPropRenderQualityDraft + - OfxImageEffectPropCudaEnabled + - OfxImageEffectPropCudaRenderSupported + - OfxImageEffectPropCudaStream + - OfxImageEffectPropCudaStreamSupported + - OfxImageEffectPropMetalCommandQueue + - OfxImageEffectPropMetalEnabled + - OfxImageEffectPropMetalRenderSupported + - OfxImageEffectPropOpenCLCommandQueue + - OfxImageEffectPropOpenCLEnabled + - OfxImageEffectPropOpenCLImage + - OfxImageEffectPropOpenCLRenderSupported + - OfxImageEffectPropOpenCLSupported + - OfxImageEffectPropOpenGLEnabled + - OfxImageEffectPropOpenGLTextureIndex + - OfxImageEffectPropOpenGLTextureTarget + - OfxImageEffectPropInteractiveRenderStatus - kOfxImageEffectActionBeginSequenceRender: + OfxImageEffectActionBeginSequenceRender: inArgs: - - kOfxImageEffectPropFrameRange - - kOfxImageEffectPropFrameStep - - kOfxPropIsInteractive - - kOfxImageEffectPropRenderScale - - kOfxImageEffectPropSequentialRenderStatus - - kOfxImageEffectPropInteractiveRenderStatus - - kOfxImageEffectPropCudaEnabled - - kOfxImageEffectPropCudaRenderSupported - - kOfxImageEffectPropCudaStream - - kOfxImageEffectPropCudaStreamSupported - - kOfxImageEffectPropMetalCommandQueue - - kOfxImageEffectPropMetalEnabled - - kOfxImageEffectPropMetalRenderSupported - - kOfxImageEffectPropOpenCLCommandQueue - - kOfxImageEffectPropOpenCLEnabled - - kOfxImageEffectPropOpenCLImage - - kOfxImageEffectPropOpenCLRenderSupported - - kOfxImageEffectPropOpenCLSupported - - kOfxImageEffectPropOpenGLEnabled - - kOfxImageEffectPropOpenGLTextureIndex - - kOfxImageEffectPropOpenGLTextureTarget - - kOfxImageEffectPropInteractiveRenderStatus + - OfxImageEffectPropFrameRange + - OfxImageEffectPropFrameStep + - OfxPropIsInteractive + - OfxImageEffectPropRenderScale + - OfxImageEffectPropSequentialRenderStatus + - OfxImageEffectPropInteractiveRenderStatus + - OfxImageEffectPropCudaEnabled + - OfxImageEffectPropCudaRenderSupported + - OfxImageEffectPropCudaStream + - OfxImageEffectPropCudaStreamSupported + - OfxImageEffectPropMetalCommandQueue + - OfxImageEffectPropMetalEnabled + - OfxImageEffectPropMetalRenderSupported + - OfxImageEffectPropOpenCLCommandQueue + - OfxImageEffectPropOpenCLEnabled + - OfxImageEffectPropOpenCLImage + - OfxImageEffectPropOpenCLRenderSupported + - OfxImageEffectPropOpenCLSupported + - OfxImageEffectPropOpenGLEnabled + - OfxImageEffectPropOpenGLTextureIndex + - OfxImageEffectPropOpenGLTextureTarget + - OfxImageEffectPropInteractiveRenderStatus outArgs: - kOfxImageEffectActionEndSequenceRender: + OfxImageEffectActionEndSequenceRender: inArgs: - - kOfxImageEffectPropFrameRange - - kOfxImageEffectPropFrameStep - - kOfxPropIsInteractive - - kOfxImageEffectPropRenderScale - - kOfxImageEffectPropSequentialRenderStatus - - kOfxImageEffectPropInteractiveRenderStatus - - kOfxImageEffectPropCudaEnabled - - kOfxImageEffectPropCudaRenderSupported - - kOfxImageEffectPropCudaStream - - kOfxImageEffectPropCudaStreamSupported - - kOfxImageEffectPropMetalCommandQueue - - kOfxImageEffectPropMetalEnabled - - kOfxImageEffectPropMetalRenderSupported - - kOfxImageEffectPropOpenCLCommandQueue - - kOfxImageEffectPropOpenCLEnabled - - kOfxImageEffectPropOpenCLImage - - kOfxImageEffectPropOpenCLRenderSupported - - kOfxImageEffectPropOpenCLSupported - - kOfxImageEffectPropOpenGLEnabled - - kOfxImageEffectPropOpenGLTextureIndex - - kOfxImageEffectPropOpenGLTextureTarget - - kOfxImageEffectPropInteractiveRenderStatus + - OfxImageEffectPropFrameRange + - OfxImageEffectPropFrameStep + - OfxPropIsInteractive + - OfxImageEffectPropRenderScale + - OfxImageEffectPropSequentialRenderStatus + - OfxImageEffectPropInteractiveRenderStatus + - OfxImageEffectPropCudaEnabled + - OfxImageEffectPropCudaRenderSupported + - OfxImageEffectPropCudaStream + - OfxImageEffectPropCudaStreamSupported + - OfxImageEffectPropMetalCommandQueue + - OfxImageEffectPropMetalEnabled + - OfxImageEffectPropMetalRenderSupported + - OfxImageEffectPropOpenCLCommandQueue + - OfxImageEffectPropOpenCLEnabled + - OfxImageEffectPropOpenCLImage + - OfxImageEffectPropOpenCLRenderSupported + - OfxImageEffectPropOpenCLSupported + - OfxImageEffectPropOpenGLEnabled + - OfxImageEffectPropOpenGLTextureIndex + - OfxImageEffectPropOpenGLTextureTarget + - OfxImageEffectPropInteractiveRenderStatus outArgs: - kOfxImageEffectActionDescribeInContext: + OfxImageEffectActionDescribeInContext: inArgs: - - kOfxImageEffectPropContext + - OfxImageEffectPropContext outArgs: - kOfxActionDescribeInteract: + OfxActionDescribeInteract: inArgs: outArgs: - kOfxActionCreateInstanceInteract: + OfxActionCreateInstanceInteract: inArgs: outArgs: - kOfxActionDestroyInstanceInteract: + OfxActionDestroyInstanceInteract: inArgs: outArgs: - kOfxInteractActionDraw: + OfxInteractActionDraw: inArgs: - - kOfxPropEffectInstance - - kOfxInteractPropDrawContext - - kOfxInteractPropPixelScale - - kOfxInteractPropBackgroundColour - - kOfxPropTime - - kOfxImageEffectPropRenderScale + - OfxPropEffectInstance + - OfxInteractPropDrawContext + - OfxInteractPropPixelScale + - OfxInteractPropBackgroundColour + - OfxPropTime + - OfxImageEffectPropRenderScale outArgs: - kOfxInteractActionPenMotion: + OfxInteractActionPenMotion: inArgs: - - kOfxPropEffectInstance - - kOfxInteractPropPixelScale - - kOfxInteractPropBackgroundColour - - kOfxPropTime - - kOfxImageEffectPropRenderScale - - kOfxInteractPropPenPosition - - kOfxInteractPropPenViewportPosition - - kOfxInteractPropPenPressure + - OfxPropEffectInstance + - OfxInteractPropPixelScale + - OfxInteractPropBackgroundColour + - OfxPropTime + - OfxImageEffectPropRenderScale + - OfxInteractPropPenPosition + - OfxInteractPropPenViewportPosition + - OfxInteractPropPenPressure outArgs: - kOfxInteractActionPenDown: + OfxInteractActionPenDown: inArgs: - - kOfxPropEffectInstance - - kOfxInteractPropPixelScale - - kOfxInteractPropBackgroundColour - - kOfxPropTime - - kOfxImageEffectPropRenderScale - - kOfxInteractPropPenPosition - - kOfxInteractPropPenViewportPosition - - kOfxInteractPropPenPressure + - OfxPropEffectInstance + - OfxInteractPropPixelScale + - OfxInteractPropBackgroundColour + - OfxPropTime + - OfxImageEffectPropRenderScale + - OfxInteractPropPenPosition + - OfxInteractPropPenViewportPosition + - OfxInteractPropPenPressure outArgs: - kOfxInteractActionPenUp: + OfxInteractActionPenUp: inArgs: - - kOfxPropEffectInstance - - kOfxInteractPropPixelScale - - kOfxInteractPropBackgroundColour - - kOfxPropTime - - kOfxImageEffectPropRenderScale - - kOfxInteractPropPenPosition - - kOfxInteractPropPenViewportPosition - - kOfxInteractPropPenPressure + - OfxPropEffectInstance + - OfxInteractPropPixelScale + - OfxInteractPropBackgroundColour + - OfxPropTime + - OfxImageEffectPropRenderScale + - OfxInteractPropPenPosition + - OfxInteractPropPenViewportPosition + - OfxInteractPropPenPressure outArgs: - kOfxInteractActionKeyDown: + OfxInteractActionKeyDown: inArgs: - - kOfxPropEffectInstance - - kOfxPropKeySym - - kOfxPropKeyString - - kOfxPropTime - - kOfxImageEffectPropRenderScale + - OfxPropEffectInstance + - OfxPropKeySym + - OfxPropKeyString + - OfxPropTime + - OfxImageEffectPropRenderScale outArgs: - kOfxInteractActionKeyUp: + OfxInteractActionKeyUp: inArgs: - - kOfxPropEffectInstance - - kOfxPropKeySym - - kOfxPropKeyString - - kOfxPropTime - - kOfxImageEffectPropRenderScale + - OfxPropEffectInstance + - OfxPropKeySym + - OfxPropKeyString + - OfxPropTime + - OfxImageEffectPropRenderScale outArgs: - kOfxInteractActionKeyRepeat: + OfxInteractActionKeyRepeat: inArgs: - - kOfxPropEffectInstance - - kOfxPropKeySym - - kOfxPropKeyString - - kOfxPropTime - - kOfxImageEffectPropRenderScale + - OfxPropEffectInstance + - OfxPropKeySym + - OfxPropKeyString + - OfxPropTime + - OfxImageEffectPropRenderScale outArgs: - kOfxInteractActionGainFocus: + OfxInteractActionGainFocus: inArgs: - - kOfxPropEffectInstance - - kOfxInteractPropPixelScale - - kOfxInteractPropBackgroundColour - - kOfxPropTime - - kOfxImageEffectPropRenderScale + - OfxPropEffectInstance + - OfxInteractPropPixelScale + - OfxInteractPropBackgroundColour + - OfxPropTime + - OfxImageEffectPropRenderScale outArgs: - kOfxInteractActionLoseFocus: + OfxInteractActionLoseFocus: inArgs: - - kOfxPropEffectInstance - - kOfxInteractPropPixelScale - - kOfxInteractPropBackgroundColour - - kOfxPropTime - - kOfxImageEffectPropRenderScale + - OfxPropEffectInstance + - OfxInteractPropPixelScale + - OfxInteractPropBackgroundColour + - OfxPropTime + - OfxImageEffectPropRenderScale outArgs: CustomParamInterpFunc: inArgs: - - kOfxParamPropCustomValue - - kOfxParamPropInterpolationTime - - kOfxParamPropInterpolationAmount + - OfxParamPropCustomValue + - OfxParamPropInterpolationTime + - OfxParamPropInterpolationAmount outArgs: - - kOfxParamPropCustomValue - - kOfxParamPropInterpolationTime + - OfxParamPropCustomValue + - OfxParamPropInterpolationTime # Properties by name. @@ -613,212 +613,212 @@ propertySets: # pluginOptional: is it optional for a plugin to support this prop? Only include if true. # dimension: 0 means "any dimension OK" properties: - kOfxPropType: + OfxPropType: type: string dimension: 1 - kOfxPropName: + OfxPropName: type: string dimension: 1 - kOfxPropTime: + OfxPropTime: type: double dimension: 1 # Param props - kOfxParamPropSecret: + OfxParamPropSecret: type: bool dimension: 1 - kOfxParamPropHint: + OfxParamPropHint: type: string dimension: 1 - kOfxParamPropScriptName: + OfxParamPropScriptName: type: string dimension: 1 - kOfxParamPropParent: + OfxParamPropParent: type: string dimension: 1 - kOfxParamPropEnabled: + OfxParamPropEnabled: type: bool dimension: 1 optional: true - kOfxParamPropDataPtr: + OfxParamPropDataPtr: type: pointer dimension: 1 - kOfxParamPropType: + OfxParamPropType: type: string dimension: 1 - kOfxPropLabel: + OfxPropLabel: type: string dimension: 1 - kOfxPropShortLabel: + OfxPropShortLabel: type: string dimension: 1 hostOptional: true - kOfxPropLongLabel: + OfxPropLongLabel: type: string dimension: 1 hostOptional: true - kOfxPropIcon: + OfxPropIcon: type: string dimension: 2 hostOptional: true # host props - kOfxPropAPIVersion: + OfxPropAPIVersion: type: int dimension: 0 - kOfxPropLabel: + OfxPropLabel: type: string dimension: 1 - kOfxPropVersion: + OfxPropVersion: type: int dimension: 0 - kOfxPropVersionLabel: + OfxPropVersionLabel: type: string dimension: 1 # ImageEffect props: - kOfxPropPluginDescription: + OfxPropPluginDescription: type: string dimension: 1 - kOfxImageEffectPropSupportedContexts: + OfxImageEffectPropSupportedContexts: type: string dimension: 0 - kOfxImageEffectPluginPropGrouping: + OfxImageEffectPluginPropGrouping: type: string dimension: 1 - kOfxImageEffectPluginPropSingleInstance: + OfxImageEffectPluginPropSingleInstance: type: int dimension: 1 - kOfxImageEffectPluginRenderThreadSafety: + OfxImageEffectPluginRenderThreadSafety: type: string dimension: 1 - kOfxImageEffectPluginPropHostFrameThreading: + OfxImageEffectPluginPropHostFrameThreading: type: int dimension: 1 - kOfxImageEffectPluginPropOverlayInteractV1: + OfxImageEffectPluginPropOverlayInteractV1: type: pointer dimension: 1 - kOfxImageEffectPropSupportsMultiResolution: + OfxImageEffectPropSupportsMultiResolution: type: int dimension: 1 - kOfxImageEffectPropSupportsTiles: + OfxImageEffectPropSupportsTiles: type: int dimension: 1 - kOfxImageEffectPropTemporalClipAccess: + OfxImageEffectPropTemporalClipAccess: type: int dimension: 1 - kOfxImageEffectPropSupportedPixelDepths: + OfxImageEffectPropSupportedPixelDepths: type: string dimension: 0 - kOfxImageEffectPluginPropFieldRenderTwiceAlways: + OfxImageEffectPluginPropFieldRenderTwiceAlways: type: int dimension: 1 - kOfxImageEffectPropSupportsMultipleClipDepths: + OfxImageEffectPropSupportsMultipleClipDepths: type: int dimension: 1 - kOfxImageEffectPropSupportsMultipleClipPARs: + OfxImageEffectPropSupportsMultipleClipPARs: type: int dimension: 1 - kOfxImageEffectPropClipPreferencesSlaveParam: + OfxImageEffectPropClipPreferencesSlaveParam: type: string dimension: 0 - kOfxImageEffectInstancePropSequentialRender: + OfxImageEffectInstancePropSequentialRender: type: int dimension: 1 - kOfxPluginPropFilePath: + OfxPluginPropFilePath: type: enum dimension: 1 values: ['false', 'true', 'needed'] - kOfxImageEffectPropOpenGLRenderSupported: + OfxImageEffectPropOpenGLRenderSupported: type: enum dimension: 1 values: ['false', 'true', 'needed'] - kOfxImageEffectPropCudaRenderSupported: + OfxImageEffectPropCudaRenderSupported: type: enum dimension: 1 values: ['false', 'true', 'needed'] - kOfxImageEffectPropCudaStreamSupported: + OfxImageEffectPropCudaStreamSupported: type: enum dimension: 1 values: ['false', 'true', 'needed'] - kOfxImageEffectPropMetalRenderSupported: + OfxImageEffectPropMetalRenderSupported: type: enum dimension: 1 values: ['false', 'true', 'needed'] - kOfxImageEffectPropOpenCLRenderSupported: + OfxImageEffectPropOpenCLRenderSupported: type: enum dimension: 1 values: ['false', 'true', 'needed'] # Clip props - kOfxImageClipPropColourspace: + OfxImageClipPropColourspace: type: string dimension: 1 - kOfxImageClipPropConnected: + OfxImageClipPropConnected: type: bool dimension: 1 - kOfxImageClipPropContinuousSamples: + OfxImageClipPropContinuousSamples: type: bool dimension: 1 - kOfxImageClipPropFieldExtraction: + OfxImageClipPropFieldExtraction: type: enum dimension: 1 - values: ['kOfxImageFieldNone', - 'kOfxImageFieldLower', - 'kOfxImageFieldUpper', - 'kOfxImageFieldBoth', - 'kOfxImageFieldSingle', - 'kOfxImageFieldDoubled'] - kOfxImageClipPropFieldOrder: + values: ['OfxImageFieldNone', + 'OfxImageFieldLower', + 'OfxImageFieldUpper', + 'OfxImageFieldBoth', + 'OfxImageFieldSingle', + 'OfxImageFieldDoubled'] + OfxImageClipPropFieldOrder: type: enum dimension: 1 - values: ['kOfxImageFieldNone', - 'kOfxImageFieldLower', - 'kOfxImageFieldUpper'] - kOfxImageClipPropIsMask: + values: ['OfxImageFieldNone', + 'OfxImageFieldLower', + 'OfxImageFieldUpper'] + OfxImageClipPropIsMask: type: bool dimension: 1 - kOfxImageClipPropOptional: + OfxImageClipPropOptional: type: bool dimension: 1 - kOfxImageClipPropPreferredColourspaces: + OfxImageClipPropPreferredColourspaces: type: string dimension: 0 - kOfxImageClipPropUnmappedComponents: + OfxImageClipPropUnmappedComponents: type: enum dimension: 1 values: - - kOfxImageComponentNone - - kOfxImageComponentRGBA - - kOfxImageComponentRGB - - kOfxImageComponentAlpha - kOfxImageClipPropUnmappedPixelDepth: + - OfxImageComponentNone + - OfxImageComponentRGBA + - OfxImageComponentRGB + - OfxImageComponentAlpha + OfxImageClipPropUnmappedPixelDepth: type: enum dimension: 1 values: - - kOfxBitDepthNone - - kOfxBitDepthByte - - kOfxBitDepthShort - - kOfxBitDepthHalf - - kOfxBitDepthFloat + - OfxBitDepthNone + - OfxBitDepthByte + - OfxBitDepthShort + - OfxBitDepthHalf + - OfxBitDepthFloat # # Special props, with clip names postpended: # OfxImageClipPropComponents_: # type: enum # dimension: 1 # values: - # - kOfxImageComponentNone - # - kOfxImageComponentRGBA - # - kOfxImageComponentRGB - # - kOfxImageComponentAlpha + # - OfxImageComponentNone + # - OfxImageComponentRGBA + # - OfxImageComponentRGB + # - OfxImageComponentAlpha # OfxImageClipPropDepth_: # type: enum # dimension: 1 # values: - # - kOfxBitDepthNone - # - kOfxBitDepthByte - # - kOfxBitDepthShort - # - kOfxBitDepthHalf - # - kOfxBitDepthFloat + # - OfxBitDepthNone + # - OfxBitDepthByte + # - OfxBitDepthShort + # - OfxBitDepthHalf + # - OfxBitDepthFloat # OfxImageClipPropPreferredColourspaces_: # type: string # dimension: 1 @@ -830,493 +830,493 @@ properties: # dimension: 4 # Image Effect - kOfxImageEffectFrameVarying: + OfxImageEffectFrameVarying: type: bool dimension: 1 - kOfxImageEffectHostPropIsBackground: + OfxImageEffectHostPropIsBackground: type: bool dimension: 1 - kOfxImageEffectHostPropNativeOrigin: + OfxImageEffectHostPropNativeOrigin: type: enum dimension: 1 values: - - kOfxImageEffectHostPropNativeOriginBottomLeft - - kOfxImageEffectHostPropNativeOriginTopLeft - - kOfxImageEffectHostPropNativeOriginCenter - kOfxImageEffectInstancePropEffectDuration: + - OfxImageEffectHostPropNativeOriginBottomLeft + - OfxImageEffectHostPropNativeOriginTopLeft + - OfxImageEffectHostPropNativeOriginCenter + OfxImageEffectInstancePropEffectDuration: type: double dimension: 1 - kOfxImageEffectPluginPropOverlayInteractV1: + OfxImageEffectPluginPropOverlayInteractV1: type: pointer dimension: 1 - kOfxImageEffectPluginPropOverlayInteractV2: + OfxImageEffectPluginPropOverlayInteractV2: type: pointer dimension: 1 - kOfxImageEffectPropColourManagementAvailableConfigs: + OfxImageEffectPropColourManagementAvailableConfigs: type: string dimension: 0 - kOfxImageEffectPropColourManagementStyle: + OfxImageEffectPropColourManagementStyle: type: enum dimension: 1 values: - - kOfxImageEffectPropColourManagementNone - - kOfxImageEffectPropColourManagementBasic - - kOfxImageEffectPropColourManagementCore - - kOfxImageEffectPropColourManagementFull - - kOfxImageEffectPropColourManagementOCIO - kOfxImageEffectPropComponents: + - OfxImageEffectPropColourManagementNone + - OfxImageEffectPropColourManagementBasic + - OfxImageEffectPropColourManagementCore + - OfxImageEffectPropColourManagementFull + - OfxImageEffectPropColourManagementOCIO + OfxImageEffectPropComponents: type: enum dimension: 1 values: - - kOfxImageComponentNone - - kOfxImageComponentRGBA - - kOfxImageComponentRGB - - kOfxImageComponentAlpha - kOfxImageEffectPropContext: + - OfxImageComponentNone + - OfxImageComponentRGBA + - OfxImageComponentRGB + - OfxImageComponentAlpha + OfxImageEffectPropContext: type: enum dimension: 1 values: - - kOfxImageEffectContextGenerator - - kOfxImageEffectContextFilter - - kOfxImageEffectContextTransition - - kOfxImageEffectContextPaint - - kOfxImageEffectContextGeneral - - kOfxImageEffectContextRetimer - kOfxImageEffectPropCudaEnabled: + - OfxImageEffectContextGenerator + - OfxImageEffectContextFilter + - OfxImageEffectContextTransition + - OfxImageEffectContextPaint + - OfxImageEffectContextGeneral + - OfxImageEffectContextRetimer + OfxImageEffectPropCudaEnabled: type: bool dimension: 1 - kOfxImageEffectPropCudaStream: + OfxImageEffectPropCudaStream: type: pointer dimension: 1 - kOfxImageEffectPropDisplayColourspace: + OfxImageEffectPropDisplayColourspace: type: string dimension: 1 - kOfxImageEffectPropFieldToRender: + OfxImageEffectPropFieldToRender: type: enum dimension: 1 values: - - kOfxImageFieldNone - - kOfxImageFieldBoth - - kOfxImageFieldLower - - kOfxImageFieldUpper - kOfxImageEffectPropFrameRange: + - OfxImageFieldNone + - OfxImageFieldBoth + - OfxImageFieldLower + - OfxImageFieldUpper + OfxImageEffectPropFrameRange: type: double dimension: 2 - kOfxImageEffectPropFrameRate: + OfxImageEffectPropFrameRate: type: double dimension: 1 - kOfxImageEffectPropFrameStep: + OfxImageEffectPropFrameStep: type: double dimension: 1 - kOfxImageEffectPropInAnalysis: + OfxImageEffectPropInAnalysis: type: bool dimension: 1 deprecated: "1.4" - kOfxImageEffectPropInteractiveRenderStatus: + OfxImageEffectPropInteractiveRenderStatus: type: bool dimension: 1 - kOfxImageEffectPropMetalCommandQueue: + OfxImageEffectPropMetalCommandQueue: type: pointer dimension: 1 - kOfxImageEffectPropMetalEnabled: + OfxImageEffectPropMetalEnabled: type: bool dimension: 1 - kOfxImageEffectPropOCIOConfig: + OfxImageEffectPropOCIOConfig: type: string dimension: 1 - kOfxImageEffectPropOCIODisplay: + OfxImageEffectPropOCIODisplay: type: string dimension: 1 - kOfxImageEffectPropOCIOView: + OfxImageEffectPropOCIOView: type: string dimension: 1 - kOfxImageEffectPropOpenCLCommandQueue: + OfxImageEffectPropOpenCLCommandQueue: type: pointer dimension: 1 - kOfxImageEffectPropOpenCLEnabled: + OfxImageEffectPropOpenCLEnabled: type: bool dimension: 1 - kOfxImageEffectPropOpenCLImage: + OfxImageEffectPropOpenCLImage: type: int dimension: 1 - kOfxImageEffectPropOpenCLSupported: + OfxImageEffectPropOpenCLSupported: type: enum dimension: 1 values: - "false" - "true" - kOfxImageEffectPropOpenGLEnabled: + OfxImageEffectPropOpenGLEnabled: type: bool dimension: 1 - kOfxImageEffectPropOpenGLTextureIndex: + OfxImageEffectPropOpenGLTextureIndex: type: int dimension: 1 - kOfxImageEffectPropOpenGLTextureTarget: + OfxImageEffectPropOpenGLTextureTarget: type: int dimension: 1 - kOfxImageEffectPropPixelDepth: + OfxImageEffectPropPixelDepth: type: enum dimension: 1 values: - - kOfxBitDepthNone - - kOfxBitDepthByte - - kOfxBitDepthShort - - kOfxBitDepthHalf - - kOfxBitDepthFloat - kOfxImageEffectPropPluginHandle: + - OfxBitDepthNone + - OfxBitDepthByte + - OfxBitDepthShort + - OfxBitDepthHalf + - OfxBitDepthFloat + OfxImageEffectPropPluginHandle: type: pointer dimension: 1 - kOfxImageEffectPropPreMultiplication: + OfxImageEffectPropPreMultiplication: type: enum dimension: 1 values: - - kOfxImageOpaque - - kOfxImagePreMultiplied - - kOfxImageUnPreMultiplied - kOfxImageEffectPropProjectExtent: + - OfxImageOpaque + - OfxImagePreMultiplied + - OfxImageUnPreMultiplied + OfxImageEffectPropProjectExtent: type: double dimension: 2 - kOfxImageEffectPropProjectOffset: + OfxImageEffectPropProjectOffset: type: double dimension: 2 - kOfxImageEffectPropProjectPixelAspectRatio: + OfxImageEffectPropProjectPixelAspectRatio: type: double dimension: 1 - kOfxImageEffectPropProjectSize: + OfxImageEffectPropProjectSize: type: double dimension: 2 - kOfxImageEffectPropRegionOfDefinition: + OfxImageEffectPropRegionOfDefinition: type: int dimension: 4 - kOfxImageEffectPropRegionOfInterest: + OfxImageEffectPropRegionOfInterest: type: int dimension: 4 - kOfxImageEffectPropRenderQualityDraft: + OfxImageEffectPropRenderQualityDraft: type: bool dimension: 1 - kOfxImageEffectPropRenderScale: + OfxImageEffectPropRenderScale: type: double dimension: 2 - kOfxImageEffectPropRenderWindow: + OfxImageEffectPropRenderWindow: type: int dimension: 4 - kOfxImageEffectPropSequentialRenderStatus: + OfxImageEffectPropSequentialRenderStatus: type: bool dimension: 1 - kOfxImageEffectPropSetableFielding: + OfxImageEffectPropSetableFielding: type: bool dimension: 1 - kOfxImageEffectPropSetableFrameRate: + OfxImageEffectPropSetableFrameRate: type: bool dimension: 1 - kOfxImageEffectPropSupportedComponents: + OfxImageEffectPropSupportedComponents: type: enum dimension: 0 values: - - kOfxImageComponentNone - - kOfxImageComponentRGBA - - kOfxImageComponentRGB - - kOfxImageComponentAlpha - kOfxImageEffectPropSupportsOverlays: + - OfxImageComponentNone + - OfxImageComponentRGBA + - OfxImageComponentRGB + - OfxImageComponentAlpha + OfxImageEffectPropSupportsOverlays: type: bool dimension: 1 - kOfxImageEffectPropUnmappedFrameRange: + OfxImageEffectPropUnmappedFrameRange: type: double dimension: 2 - kOfxImageEffectPropUnmappedFrameRate: + OfxImageEffectPropUnmappedFrameRate: type: double dimension: 1 - kOfxImageEffectPropColourManagementConfig: + OfxImageEffectPropColourManagementConfig: type: string dimension: 1 - kOfxImagePropBounds: + OfxImagePropBounds: type: int dimension: 4 - kOfxImagePropData: + OfxImagePropData: type: pointer dimension: 1 - kOfxImagePropField: + OfxImagePropField: type: enum dimension: 1 values: - - kOfxImageFieldNone - - kOfxImageFieldBoth - - kOfxImageFieldLower - - kOfxImageFieldUpper - kOfxImagePropPixelAspectRatio: + - OfxImageFieldNone + - OfxImageFieldBoth + - OfxImageFieldLower + - OfxImageFieldUpper + OfxImagePropPixelAspectRatio: type: double dimension: 1 - kOfxImagePropRegionOfDefinition: + OfxImagePropRegionOfDefinition: type: int dimension: 4 - kOfxImagePropRowBytes: + OfxImagePropRowBytes: type: int dimension: 1 - kOfxImagePropUniqueIdentifier: + OfxImagePropUniqueIdentifier: type: string dimension: 1 # Interact/Drawing - kOfxInteractPropBackgroundColour: + OfxInteractPropBackgroundColour: type: double dimension: 3 - kOfxInteractPropBitDepth: + OfxInteractPropBitDepth: type: int dimension: 1 - kOfxInteractPropDrawContext: + OfxInteractPropDrawContext: type: pointer dimension: 1 - kOfxInteractPropHasAlpha: + OfxInteractPropHasAlpha: type: bool dimension: 1 - kOfxInteractPropPenPosition: + OfxInteractPropPenPosition: type: double dimension: 2 - kOfxInteractPropPenPressure: + OfxInteractPropPenPressure: type: double dimension: 1 - kOfxInteractPropPenViewportPosition: + OfxInteractPropPenViewportPosition: type: int dimension: 2 - kOfxInteractPropPixelScale: + OfxInteractPropPixelScale: type: double dimension: 2 - kOfxInteractPropSlaveToParam: + OfxInteractPropSlaveToParam: type: string dimension: 0 - kOfxInteractPropSuggestedColour: + OfxInteractPropSuggestedColour: type: double dimension: 3 - kOfxInteractPropViewportSize: + OfxInteractPropViewportSize: type: int dimension: 2 deprecated: "1.3" - kOfxOpenGLPropPixelDepth: + OfxOpenGLPropPixelDepth: type: enum dimension: 0 values: - - kOfxBitDepthNone - - kOfxBitDepthByte - - kOfxBitDepthShort - - kOfxBitDepthHalf - - kOfxBitDepthFloat - kOfxParamHostPropMaxPages: + - OfxBitDepthNone + - OfxBitDepthByte + - OfxBitDepthShort + - OfxBitDepthHalf + - OfxBitDepthFloat + OfxParamHostPropMaxPages: type: int dimension: 1 - kOfxParamHostPropMaxParameters: + OfxParamHostPropMaxParameters: type: int dimension: 1 - kOfxParamHostPropPageRowColumnCount: + OfxParamHostPropPageRowColumnCount: type: int dimension: 2 - kOfxParamHostPropSupportsBooleanAnimation: + OfxParamHostPropSupportsBooleanAnimation: type: bool dimension: 1 - kOfxParamHostPropSupportsChoiceAnimation: + OfxParamHostPropSupportsChoiceAnimation: type: bool dimension: 1 - kOfxParamHostPropSupportsCustomAnimation: + OfxParamHostPropSupportsCustomAnimation: type: bool dimension: 1 - kOfxParamHostPropSupportsCustomInteract: + OfxParamHostPropSupportsCustomInteract: type: bool dimension: 1 - kOfxParamHostPropSupportsParametricAnimation: + OfxParamHostPropSupportsParametricAnimation: type: bool dimension: 1 - kOfxParamHostPropSupportsStrChoice: + OfxParamHostPropSupportsStrChoice: type: bool dimension: 1 - kOfxParamHostPropSupportsStrChoiceAnimation: + OfxParamHostPropSupportsStrChoiceAnimation: type: bool dimension: 1 - kOfxParamHostPropSupportsStringAnimation: + OfxParamHostPropSupportsStringAnimation: type: bool dimension: 1 # Param - kOfxParamPropAnimates: + OfxParamPropAnimates: type: bool dimension: 1 - kOfxParamPropCacheInvalidation: + OfxParamPropCacheInvalidation: type: enum dimension: 1 values: - - kOfxParamInvalidateValueChange - - kOfxParamInvalidateValueChangeToEnd - - kOfxParamInvalidateAll - kOfxParamPropCanUndo: + - OfxParamInvalidateValueChange + - OfxParamInvalidateValueChangeToEnd + - OfxParamInvalidateAll + OfxParamPropCanUndo: type: bool dimension: 1 - kOfxParamPropChoiceEnum: + OfxParamPropChoiceEnum: type: bool dimension: 1 added: "1.5" - kOfxParamPropChoiceOption: + OfxParamPropChoiceOption: type: string dimension: 0 - kOfxParamPropChoiceOrder: + OfxParamPropChoiceOrder: type: int dimension: 0 - kOfxParamPropCustomInterpCallbackV1: + OfxParamPropCustomInterpCallbackV1: type: pointer dimension: 1 - kOfxParamPropCustomValue: + OfxParamPropCustomValue: type: string dimension: 2 # This is special because its type and dims vary depending on the param - kOfxParamPropDefault: + OfxParamPropDefault: type: [int, double, string, bytes] dimension: 0 - kOfxParamPropDefaultCoordinateSystem: + OfxParamPropDefaultCoordinateSystem: type: enum dimension: 1 values: - - kOfxParamCoordinatesCanonical - - kOfxParamCoordinatesNormalised - kOfxParamPropDigits: + - OfxParamCoordinatesCanonical + - OfxParamCoordinatesNormalised + OfxParamPropDigits: type: int dimension: 1 - kOfxParamPropDimensionLabel: + OfxParamPropDimensionLabel: type: string dimension: 1 - kOfxParamPropDisplayMax: + OfxParamPropDisplayMax: type: [int, double] dimension: 0 - kOfxParamPropDisplayMin: + OfxParamPropDisplayMin: type: [int, double] dimension: 0 - kOfxParamPropDoubleType: + OfxParamPropDoubleType: type: enum dimension: 1 values: - - kOfxParamDoubleTypePlain - - kOfxParamDoubleTypeAngle - - kOfxParamDoubleTypeScale - - kOfxParamDoubleTypeTime - - kOfxParamDoubleTypeAbsoluteTime - - kOfxParamDoubleTypeX - - kOfxParamDoubleTypeXAbsolute - - kOfxParamDoubleTypeY - - kOfxParamDoubleTypeYAbsolute - - kOfxParamDoubleTypeXY - - kOfxParamDoubleTypeXYAbsolute - kOfxParamPropEvaluateOnChange: + - OfxParamDoubleTypePlain + - OfxParamDoubleTypeAngle + - OfxParamDoubleTypeScale + - OfxParamDoubleTypeTime + - OfxParamDoubleTypeAbsoluteTime + - OfxParamDoubleTypeX + - OfxParamDoubleTypeXAbsolute + - OfxParamDoubleTypeY + - OfxParamDoubleTypeYAbsolute + - OfxParamDoubleTypeXY + - OfxParamDoubleTypeXYAbsolute + OfxParamPropEvaluateOnChange: type: bool dimension: 1 - kOfxParamPropGroupOpen: + OfxParamPropGroupOpen: type: bool dimension: 1 - kOfxParamPropHasHostOverlayHandle: + OfxParamPropHasHostOverlayHandle: type: bool dimension: 1 - kOfxParamPropIncrement: + OfxParamPropIncrement: type: double dimension: 1 - kOfxParamPropInteractMinimumSize: + OfxParamPropInteractMinimumSize: type: double dimension: 2 - kOfxParamPropInteractPreferedSize: + OfxParamPropInteractPreferedSize: type: int dimension: 2 - kOfxParamPropInteractSize: + OfxParamPropInteractSize: type: double dimension: 2 - kOfxParamPropInteractSizeAspect: + OfxParamPropInteractSizeAspect: type: double dimension: 1 - kOfxParamPropInteractV1: + OfxParamPropInteractV1: type: pointer dimension: 1 - kOfxParamPropInterpolationAmount: + OfxParamPropInterpolationAmount: type: double dimension: 1 - kOfxParamPropInterpolationTime: + OfxParamPropInterpolationTime: type: double dimension: 2 - kOfxParamPropIsAnimating: + OfxParamPropIsAnimating: type: bool dimension: 1 - kOfxParamPropIsAutoKeying: + OfxParamPropIsAutoKeying: type: bool dimension: 1 - kOfxParamPropMax: + OfxParamPropMax: type: [int, double] dimension: 0 - kOfxParamPropMin: + OfxParamPropMin: type: [int, double] dimension: 0 - kOfxParamPropPageChild: + OfxParamPropPageChild: type: string dimension: 0 - kOfxParamPropParametricDimension: + OfxParamPropParametricDimension: type: int dimension: 1 - kOfxParamPropParametricInteractBackground: + OfxParamPropParametricInteractBackground: type: pointer dimension: 1 - kOfxParamPropParametricRange: + OfxParamPropParametricRange: type: double dimension: 2 - kOfxParamPropParametricUIColour: + OfxParamPropParametricUIColour: type: double dimension: 0 - kOfxParamPropPersistant: + OfxParamPropPersistant: type: int dimension: 1 - kOfxParamPropPluginMayWrite: + OfxParamPropPluginMayWrite: type: int dimension: 1 deprecated: "1.4" - kOfxParamPropShowTimeMarker: + OfxParamPropShowTimeMarker: type: bool dimension: 1 - kOfxParamPropStringMode: + OfxParamPropStringMode: type: enum dimension: 1 values: - - kOfxParamStringIsSingleLine - - kOfxParamStringIsMultiLine - - kOfxParamStringIsFilePath - - kOfxParamStringIsDirectoryPath - - kOfxParamStringIsLabel - - kOfxParamStringIsRichTextFormat - kOfxParamPropUseHostOverlayHandle: + - OfxParamStringIsSingleLine + - OfxParamStringIsMultiLine + - OfxParamStringIsFilePath + - OfxParamStringIsDirectoryPath + - OfxParamStringIsLabel + - OfxParamStringIsRichTextFormat + OfxParamPropUseHostOverlayHandle: type: bool dimension: 1 - kOfxParamPropStringFilePathExists: + OfxParamPropStringFilePathExists: type: bool dimension: 1 - kOfxPluginPropParamPageOrder: + OfxPluginPropParamPageOrder: type: string dimension: 0 - kOfxPropChangeReason: + OfxPropChangeReason: type: enum dimension: 1 values: - - kOfxChangeUserEdited - - kOfxChangePluginEdited - - kOfxChangeTime - kOfxPropEffectInstance: + - OfxChangeUserEdited + - OfxChangePluginEdited + - OfxChangeTime + OfxPropEffectInstance: type: pointer dimension: 1 - kOfxPropHostOSHandle: + OfxPropHostOSHandle: type: pointer dimension: 1 - kOfxPropInstanceData: + OfxPropInstanceData: type: pointer dimension: 1 - kOfxPropIsInteractive: + OfxPropIsInteractive: type: bool dimension: 1 - kOfxPropKeyString: + OfxPropKeyString: type: string dimension: 1 - kOfxPropKeySym: + OfxPropKeySym: type: int dimension: 1 - kOfxPropParamSetNeedsSyncing: + OfxPropParamSetNeedsSyncing: type: bool dimension: 1 diff --git a/include/ofxPropsBySet.h b/include/ofxPropsBySet.h deleted file mode 100644 index 84faf1588..000000000 --- a/include/ofxPropsBySet.h +++ /dev/null @@ -1,733 +0,0 @@ -// 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 { -// Properties for property sets -const std::map> prop_sets { -{ "ClipDescriptor", { kOfxImageClipPropFieldExtraction, - kOfxImageClipPropIsMask, - kOfxImageClipPropOptional, - kOfxImageEffectPropSupportedComponents, - kOfxImageEffectPropSupportsTiles, - kOfxImageEffectPropTemporalClipAccess, - kOfxPropLabel, - kOfxPropLongLabel, - kOfxPropName, - kOfxPropShortLabel, - kOfxPropType } }, -{ "ClipInstance", { kOfxImageClipPropColourspace, - kOfxImageClipPropConnected, - kOfxImageClipPropContinuousSamples, - kOfxImageClipPropFieldExtraction, - kOfxImageClipPropFieldOrder, - kOfxImageClipPropIsMask, - kOfxImageClipPropOptional, - kOfxImageClipPropPreferredColourspaces, - kOfxImageClipPropUnmappedComponents, - kOfxImageClipPropUnmappedPixelDepth, - kOfxImageEffectPropComponents, - kOfxImageEffectPropFrameRange, - kOfxImageEffectPropFrameRate, - kOfxImageEffectPropPixelDepth, - kOfxImageEffectPropPreMultiplication, - kOfxImageEffectPropSupportedComponents, - kOfxImageEffectPropSupportsTiles, - kOfxImageEffectPropTemporalClipAccess, - kOfxImageEffectPropUnmappedFrameRange, - kOfxImageEffectPropUnmappedFrameRate, - kOfxImagePropPixelAspectRatio, - kOfxPropLabel, - kOfxPropLongLabel, - kOfxPropName, - kOfxPropShortLabel, - kOfxPropType } }, -{ "EffectDescriptor", { kOfxImageEffectPluginPropFieldRenderTwiceAlways, - kOfxImageEffectPluginPropGrouping, - kOfxImageEffectPluginPropHostFrameThreading, - kOfxImageEffectPluginPropOverlayInteractV1, - kOfxImageEffectPluginPropOverlayInteractV2, - kOfxImageEffectPluginPropSingleInstance, - kOfxImageEffectPluginRenderThreadSafety, - kOfxImageEffectPluginRenderThreadSafety, - kOfxImageEffectPropClipPreferencesSlaveParam, - kOfxImageEffectPropColourManagementAvailableConfigs, - kOfxImageEffectPropColourManagementStyle, - kOfxImageEffectPropOpenGLRenderSupported, - kOfxImageEffectPropSupportedContexts, - kOfxImageEffectPropSupportedPixelDepths, - kOfxImageEffectPropSupportsMultiResolution, - kOfxImageEffectPropSupportsMultipleClipDepths, - kOfxImageEffectPropSupportsMultipleClipPARs, - kOfxImageEffectPropSupportsTiles, - kOfxImageEffectPropTemporalClipAccess, - kOfxOpenGLPropPixelDepth, - kOfxPluginPropFilePath, - kOfxPropLabel, - kOfxPropLongLabel, - kOfxPropPluginDescription, - kOfxPropShortLabel, - kOfxPropType, - kOfxPropVersion, - kOfxPropVersionLabel } }, -{ "EffectInstance", { kOfxImageEffectInstancePropEffectDuration, - kOfxImageEffectInstancePropSequentialRender, - kOfxImageEffectPropColourManagementConfig, - kOfxImageEffectPropColourManagementStyle, - kOfxImageEffectPropContext, - kOfxImageEffectPropDisplayColourspace, - kOfxImageEffectPropFrameRate, - kOfxImageEffectPropOCIOConfig, - kOfxImageEffectPropOCIODisplay, - kOfxImageEffectPropOCIOView, - kOfxImageEffectPropOpenGLRenderSupported, - kOfxImageEffectPropPluginHandle, - kOfxImageEffectPropProjectExtent, - kOfxImageEffectPropProjectOffset, - kOfxImageEffectPropProjectPixelAspectRatio, - kOfxImageEffectPropProjectSize, - kOfxImageEffectPropSupportsTiles, - kOfxPropInstanceData, - kOfxPropIsInteractive, - kOfxPropType } }, -{ "General", { kOfxPropTime } }, -{ "Image", { kOfxImageEffectPropComponents, - kOfxImageEffectPropPixelDepth, - kOfxImageEffectPropPreMultiplication, - kOfxImageEffectPropRenderScale, - kOfxImagePropBounds, - kOfxImagePropData, - kOfxImagePropField, - kOfxImagePropPixelAspectRatio, - kOfxImagePropRegionOfDefinition, - kOfxImagePropRowBytes, - kOfxImagePropUniqueIdentifier, - kOfxPropType } }, -{ "ImageEffectHost", { kOfxImageEffectHostPropIsBackground, - kOfxImageEffectHostPropNativeOrigin, - kOfxImageEffectInstancePropSequentialRender, - kOfxImageEffectPropColourManagementAvailableConfigs, - kOfxImageEffectPropColourManagementStyle, - kOfxImageEffectPropOpenGLRenderSupported, - kOfxImageEffectPropRenderQualityDraft, - kOfxImageEffectPropSetableFielding, - kOfxImageEffectPropSetableFrameRate, - kOfxImageEffectPropSupportedComponents, - kOfxImageEffectPropSupportedContexts, - kOfxImageEffectPropSupportsMultiResolution, - kOfxImageEffectPropSupportsMultipleClipDepths, - kOfxImageEffectPropSupportsMultipleClipPARs, - kOfxImageEffectPropSupportsOverlays, - kOfxImageEffectPropSupportsTiles, - kOfxImageEffectPropTemporalClipAccess, - kOfxParamHostPropMaxPages, - kOfxParamHostPropMaxParameters, - kOfxParamHostPropPageRowColumnCount, - kOfxParamHostPropSupportsBooleanAnimation, - kOfxParamHostPropSupportsChoiceAnimation, - kOfxParamHostPropSupportsCustomAnimation, - kOfxParamHostPropSupportsCustomInteract, - kOfxParamHostPropSupportsParametricAnimation, - kOfxParamHostPropSupportsStrChoice, - kOfxParamHostPropSupportsStrChoiceAnimation, - kOfxParamHostPropSupportsStringAnimation, - kOfxPropAPIVersion, - kOfxPropHostOSHandle, - kOfxPropLabel, - kOfxPropName, - kOfxPropType, - kOfxPropVersion, - kOfxPropVersionLabel } }, -{ "InteractDescriptor", { kOfxInteractPropBitDepth, - kOfxInteractPropHasAlpha } }, -{ "InteractInstance", { kOfxInteractPropBackgroundColour, - kOfxInteractPropBitDepth, - kOfxInteractPropHasAlpha, - kOfxInteractPropPixelScale, - kOfxInteractPropSlaveToParam, - kOfxInteractPropSuggestedColour, - kOfxPropEffectInstance, - kOfxPropInstanceData } }, -{ "ParamDouble1D", { kOfxParamPropAnimates, - kOfxParamPropCacheInvalidation, - kOfxParamPropCanUndo, - kOfxParamPropDataPtr, - kOfxParamPropDefault, - kOfxParamPropDigits, - kOfxParamPropDisplayMax, - kOfxParamPropDisplayMin, - kOfxParamPropDoubleType, - kOfxParamPropEnabled, - kOfxParamPropEvaluateOnChange, - kOfxParamPropHasHostOverlayHandle, - kOfxParamPropHint, - kOfxParamPropIncrement, - kOfxParamPropInteractMinimumSize, - kOfxParamPropInteractPreferedSize, - kOfxParamPropInteractSize, - kOfxParamPropInteractSizeAspect, - kOfxParamPropInteractV1, - kOfxParamPropIsAnimating, - kOfxParamPropIsAutoKeying, - kOfxParamPropMax, - kOfxParamPropMin, - kOfxParamPropParent, - kOfxParamPropPersistant, - kOfxParamPropPluginMayWrite, - kOfxParamPropScriptName, - kOfxParamPropSecret, - kOfxParamPropShowTimeMarker, - kOfxParamPropType, - kOfxParamPropUseHostOverlayHandle, - kOfxPropIcon, - kOfxPropLabel, - kOfxPropLongLabel, - kOfxPropName, - kOfxPropShortLabel, - kOfxPropType } }, -{ "ParameterSet", { kOfxPluginPropParamPageOrder, - kOfxPropParamSetNeedsSyncing } }, -{ "ParamsByte", { kOfxParamPropAnimates, - kOfxParamPropCacheInvalidation, - kOfxParamPropCanUndo, - kOfxParamPropDataPtr, - kOfxParamPropDefault, - kOfxParamPropDisplayMax, - kOfxParamPropDisplayMin, - kOfxParamPropEnabled, - kOfxParamPropEvaluateOnChange, - kOfxParamPropHasHostOverlayHandle, - kOfxParamPropHint, - kOfxParamPropInteractMinimumSize, - kOfxParamPropInteractPreferedSize, - kOfxParamPropInteractSize, - kOfxParamPropInteractSizeAspect, - kOfxParamPropInteractV1, - kOfxParamPropIsAnimating, - kOfxParamPropIsAutoKeying, - kOfxParamPropMax, - kOfxParamPropMin, - kOfxParamPropParent, - kOfxParamPropPersistant, - kOfxParamPropPluginMayWrite, - kOfxParamPropScriptName, - kOfxParamPropSecret, - kOfxParamPropType, - kOfxParamPropUseHostOverlayHandle, - kOfxPropIcon, - kOfxPropLabel, - kOfxPropLongLabel, - kOfxPropName, - kOfxPropShortLabel, - kOfxPropType } }, -{ "ParamsChoice", { kOfxParamPropAnimates, - kOfxParamPropCacheInvalidation, - kOfxParamPropCanUndo, - kOfxParamPropChoiceOption, - kOfxParamPropChoiceOrder, - kOfxParamPropDataPtr, - kOfxParamPropDefault, - kOfxParamPropEnabled, - kOfxParamPropEvaluateOnChange, - kOfxParamPropHasHostOverlayHandle, - kOfxParamPropHint, - kOfxParamPropInteractMinimumSize, - kOfxParamPropInteractPreferedSize, - kOfxParamPropInteractSize, - kOfxParamPropInteractSizeAspect, - kOfxParamPropInteractV1, - kOfxParamPropIsAnimating, - kOfxParamPropIsAutoKeying, - kOfxParamPropParent, - kOfxParamPropPersistant, - kOfxParamPropPluginMayWrite, - kOfxParamPropScriptName, - kOfxParamPropSecret, - kOfxParamPropType, - kOfxParamPropUseHostOverlayHandle, - kOfxPropIcon, - kOfxPropLabel, - kOfxPropLongLabel, - kOfxPropName, - kOfxPropShortLabel, - kOfxPropType } }, -{ "ParamsCustom", { kOfxParamPropAnimates, - kOfxParamPropCacheInvalidation, - kOfxParamPropCanUndo, - kOfxParamPropCustomInterpCallbackV1, - kOfxParamPropDataPtr, - kOfxParamPropDefault, - kOfxParamPropEnabled, - kOfxParamPropEvaluateOnChange, - kOfxParamPropHasHostOverlayHandle, - kOfxParamPropHint, - kOfxParamPropInteractMinimumSize, - kOfxParamPropInteractPreferedSize, - kOfxParamPropInteractSize, - kOfxParamPropInteractSizeAspect, - kOfxParamPropInteractV1, - kOfxParamPropIsAnimating, - kOfxParamPropIsAutoKeying, - kOfxParamPropParent, - kOfxParamPropPersistant, - kOfxParamPropPluginMayWrite, - kOfxParamPropScriptName, - kOfxParamPropSecret, - kOfxParamPropType, - kOfxParamPropUseHostOverlayHandle, - kOfxPropIcon, - kOfxPropLabel, - kOfxPropLongLabel, - kOfxPropName, - kOfxPropShortLabel, - kOfxPropType } }, -{ "ParamsDouble2D3D", { kOfxParamPropAnimates, - kOfxParamPropCacheInvalidation, - kOfxParamPropCanUndo, - kOfxParamPropDataPtr, - kOfxParamPropDefault, - kOfxParamPropDigits, - kOfxParamPropDisplayMax, - kOfxParamPropDisplayMin, - kOfxParamPropDoubleType, - kOfxParamPropEnabled, - kOfxParamPropEvaluateOnChange, - kOfxParamPropHasHostOverlayHandle, - kOfxParamPropHint, - kOfxParamPropIncrement, - kOfxParamPropInteractMinimumSize, - kOfxParamPropInteractPreferedSize, - kOfxParamPropInteractSize, - kOfxParamPropInteractSizeAspect, - kOfxParamPropInteractV1, - kOfxParamPropIsAnimating, - kOfxParamPropIsAutoKeying, - kOfxParamPropMax, - kOfxParamPropMin, - kOfxParamPropParent, - kOfxParamPropPersistant, - kOfxParamPropPluginMayWrite, - kOfxParamPropScriptName, - kOfxParamPropSecret, - kOfxParamPropType, - kOfxParamPropUseHostOverlayHandle, - kOfxPropIcon, - kOfxPropLabel, - kOfxPropLongLabel, - kOfxPropName, - kOfxPropShortLabel, - kOfxPropType } }, -{ "ParamsGroup", { kOfxParamPropDataPtr, - kOfxParamPropEnabled, - kOfxParamPropGroupOpen, - kOfxParamPropHint, - kOfxParamPropParent, - kOfxParamPropScriptName, - kOfxParamPropSecret, - kOfxParamPropType, - kOfxPropIcon, - kOfxPropLabel, - kOfxPropLongLabel, - kOfxPropName, - kOfxPropShortLabel, - kOfxPropType } }, -{ "ParamsInt2D3D", { kOfxParamPropAnimates, - kOfxParamPropCacheInvalidation, - kOfxParamPropCanUndo, - kOfxParamPropDataPtr, - kOfxParamPropDefault, - kOfxParamPropDimensionLabel, - kOfxParamPropDisplayMax, - kOfxParamPropDisplayMin, - kOfxParamPropEnabled, - kOfxParamPropEvaluateOnChange, - kOfxParamPropHasHostOverlayHandle, - kOfxParamPropHint, - kOfxParamPropInteractMinimumSize, - kOfxParamPropInteractPreferedSize, - kOfxParamPropInteractSize, - kOfxParamPropInteractSizeAspect, - kOfxParamPropInteractV1, - kOfxParamPropIsAnimating, - kOfxParamPropIsAutoKeying, - kOfxParamPropMax, - kOfxParamPropMin, - kOfxParamPropParent, - kOfxParamPropPersistant, - kOfxParamPropPluginMayWrite, - kOfxParamPropScriptName, - kOfxParamPropSecret, - kOfxParamPropType, - kOfxParamPropUseHostOverlayHandle, - kOfxPropIcon, - kOfxPropLabel, - kOfxPropLongLabel, - kOfxPropName, - kOfxPropShortLabel, - kOfxPropType } }, -{ "ParamsNormalizedSpatial", { kOfxParamPropAnimates, - kOfxParamPropCacheInvalidation, - kOfxParamPropCanUndo, - kOfxParamPropDataPtr, - kOfxParamPropDefault, - kOfxParamPropDefaultCoordinateSystem, - kOfxParamPropDigits, - kOfxParamPropDisplayMax, - kOfxParamPropDisplayMin, - kOfxParamPropEnabled, - kOfxParamPropEvaluateOnChange, - kOfxParamPropHasHostOverlayHandle, - kOfxParamPropHint, - kOfxParamPropIncrement, - kOfxParamPropInteractMinimumSize, - kOfxParamPropInteractPreferedSize, - kOfxParamPropInteractSize, - kOfxParamPropInteractSizeAspect, - kOfxParamPropInteractV1, - kOfxParamPropIsAnimating, - kOfxParamPropIsAutoKeying, - kOfxParamPropMax, - kOfxParamPropMin, - kOfxParamPropParent, - kOfxParamPropPersistant, - kOfxParamPropPluginMayWrite, - kOfxParamPropScriptName, - kOfxParamPropSecret, - kOfxParamPropType, - kOfxParamPropUseHostOverlayHandle, - kOfxPropIcon, - kOfxPropLabel, - kOfxPropLongLabel, - kOfxPropName, - kOfxPropShortLabel, - kOfxPropType } }, -{ "ParamsPage", { kOfxParamPropDataPtr, - kOfxParamPropEnabled, - kOfxParamPropHint, - kOfxParamPropPageChild, - kOfxParamPropParent, - kOfxParamPropScriptName, - kOfxParamPropSecret, - kOfxParamPropType, - kOfxPropIcon, - kOfxPropLabel, - kOfxPropLongLabel, - kOfxPropName, - kOfxPropShortLabel, - kOfxPropType } }, -{ "ParamsParametric", { kOfxParamPropAnimates, - kOfxParamPropAnimates, - kOfxParamPropCacheInvalidation, - kOfxParamPropCacheInvalidation, - kOfxParamPropCanUndo, - kOfxParamPropCanUndo, - kOfxParamPropDataPtr, - kOfxParamPropDefault, - kOfxParamPropEnabled, - kOfxParamPropEvaluateOnChange, - kOfxParamPropEvaluateOnChange, - kOfxParamPropHasHostOverlayHandle, - kOfxParamPropHint, - kOfxParamPropInteractMinimumSize, - kOfxParamPropInteractPreferedSize, - kOfxParamPropInteractSize, - kOfxParamPropInteractSizeAspect, - kOfxParamPropInteractV1, - kOfxParamPropIsAnimating, - kOfxParamPropIsAnimating, - kOfxParamPropIsAutoKeying, - kOfxParamPropIsAutoKeying, - kOfxParamPropParametricDimension, - kOfxParamPropParametricInteractBackground, - kOfxParamPropParametricRange, - kOfxParamPropParametricUIColour, - kOfxParamPropParent, - kOfxParamPropPersistant, - kOfxParamPropPersistant, - kOfxParamPropPluginMayWrite, - kOfxParamPropPluginMayWrite, - kOfxParamPropScriptName, - kOfxParamPropSecret, - kOfxParamPropType, - kOfxParamPropUseHostOverlayHandle, - kOfxPropIcon, - kOfxPropLabel, - kOfxPropLongLabel, - kOfxPropName, - kOfxPropShortLabel, - kOfxPropType } }, -{ "ParamsStrChoice", { kOfxParamPropAnimates, - kOfxParamPropCacheInvalidation, - kOfxParamPropCanUndo, - kOfxParamPropChoiceEnum, - kOfxParamPropChoiceOption, - kOfxParamPropDataPtr, - kOfxParamPropDefault, - kOfxParamPropEnabled, - kOfxParamPropEvaluateOnChange, - kOfxParamPropHasHostOverlayHandle, - kOfxParamPropHint, - kOfxParamPropInteractMinimumSize, - kOfxParamPropInteractPreferedSize, - kOfxParamPropInteractSize, - kOfxParamPropInteractSizeAspect, - kOfxParamPropInteractV1, - kOfxParamPropIsAnimating, - kOfxParamPropIsAutoKeying, - kOfxParamPropParent, - kOfxParamPropPersistant, - kOfxParamPropPluginMayWrite, - kOfxParamPropScriptName, - kOfxParamPropSecret, - kOfxParamPropType, - kOfxParamPropUseHostOverlayHandle, - kOfxPropIcon, - kOfxPropLabel, - kOfxPropLongLabel, - kOfxPropName, - kOfxPropShortLabel, - kOfxPropType } }, -{ "ParamsString", { kOfxParamPropAnimates, - kOfxParamPropCacheInvalidation, - kOfxParamPropCanUndo, - kOfxParamPropDataPtr, - kOfxParamPropDefault, - kOfxParamPropDisplayMax, - kOfxParamPropDisplayMin, - kOfxParamPropEnabled, - kOfxParamPropEvaluateOnChange, - kOfxParamPropHasHostOverlayHandle, - kOfxParamPropHint, - kOfxParamPropInteractMinimumSize, - kOfxParamPropInteractPreferedSize, - kOfxParamPropInteractSize, - kOfxParamPropInteractSizeAspect, - kOfxParamPropInteractV1, - kOfxParamPropIsAnimating, - kOfxParamPropIsAutoKeying, - kOfxParamPropMax, - kOfxParamPropMin, - kOfxParamPropParent, - kOfxParamPropPersistant, - kOfxParamPropPluginMayWrite, - kOfxParamPropScriptName, - kOfxParamPropSecret, - kOfxParamPropStringFilePathExists, - kOfxParamPropStringMode, - kOfxParamPropType, - kOfxParamPropUseHostOverlayHandle, - kOfxPropIcon, - kOfxPropLabel, - kOfxPropLongLabel, - kOfxPropName, - kOfxPropShortLabel, - kOfxPropType } }, -}; - -// Actions -const std::array actions { - "CustomParamInterpFunc", - kOfxActionBeginInstanceChanged, - kOfxActionBeginInstanceEdit, - kOfxActionCreateInstance, - kOfxActionCreateInstanceInteract, - kOfxActionDescribe, - kOfxActionDescribeInteract, - kOfxActionDestroyInstance, - kOfxActionDestroyInstanceInteract, - kOfxActionEndInstanceChanged, - kOfxActionEndInstanceEdit, - kOfxActionInstanceChanged, - kOfxActionLoad, - kOfxActionPurgeCaches, - kOfxActionSyncPrivateData, - kOfxActionUnload, - kOfxImageEffectActionBeginSequenceRender, - kOfxImageEffectActionDescribeInContext, - kOfxImageEffectActionEndSequenceRender, - kOfxImageEffectActionGetClipPreferences, - kOfxImageEffectActionGetFramesNeeded, - kOfxImageEffectActionGetRegionOfDefinition, - kOfxImageEffectActionGetRegionsOfInterest, - kOfxImageEffectActionGetTimeDomain, - kOfxImageEffectActionIsIdentity, - kOfxImageEffectActionRender, - kOfxInteractActionDraw, - kOfxInteractActionGainFocus, - kOfxInteractActionKeyDown, - kOfxInteractActionKeyRepeat, - kOfxInteractActionKeyUp, - kOfxInteractActionLoseFocus, - kOfxInteractActionPenDown, - kOfxInteractActionPenMotion, - kOfxInteractActionPenUp, -}; - -// Properties for action args -const std::map, std::vector> action_props { -{ { "CustomParamInterpFunc", "inArgs" }, { kOfxParamPropCustomValue, - kOfxParamPropInterpolationAmount, - kOfxParamPropInterpolationTime } }, -{ { "CustomParamInterpFunc", "outArgs" }, { kOfxParamPropCustomValue, - kOfxParamPropInterpolationTime } }, -{ { kOfxActionBeginInstanceChanged, "inArgs" }, { kOfxPropChangeReason } }, -{ { kOfxActionEndInstanceChanged, "inArgs" }, { kOfxPropChangeReason } }, -{ { kOfxActionInstanceChanged, "inArgs" }, { kOfxImageEffectPropRenderScale, - kOfxPropChangeReason, - kOfxPropName, - kOfxPropTime, - kOfxPropType } }, -{ { kOfxImageEffectActionBeginSequenceRender, "inArgs" }, { kOfxImageEffectPropCudaEnabled, - kOfxImageEffectPropCudaRenderSupported, - kOfxImageEffectPropCudaStream, - kOfxImageEffectPropCudaStreamSupported, - kOfxImageEffectPropFrameRange, - kOfxImageEffectPropFrameStep, - kOfxImageEffectPropInteractiveRenderStatus, - kOfxImageEffectPropInteractiveRenderStatus, - kOfxImageEffectPropMetalCommandQueue, - kOfxImageEffectPropMetalEnabled, - kOfxImageEffectPropMetalRenderSupported, - kOfxImageEffectPropOpenCLCommandQueue, - kOfxImageEffectPropOpenCLEnabled, - kOfxImageEffectPropOpenCLImage, - kOfxImageEffectPropOpenCLRenderSupported, - kOfxImageEffectPropOpenCLSupported, - kOfxImageEffectPropOpenGLEnabled, - kOfxImageEffectPropOpenGLTextureIndex, - kOfxImageEffectPropOpenGLTextureTarget, - kOfxImageEffectPropRenderScale, - kOfxImageEffectPropSequentialRenderStatus, - kOfxPropIsInteractive } }, -{ { kOfxImageEffectActionDescribeInContext, "inArgs" }, { kOfxImageEffectPropContext } }, -{ { kOfxImageEffectActionEndSequenceRender, "inArgs" }, { kOfxImageEffectPropCudaEnabled, - kOfxImageEffectPropCudaRenderSupported, - kOfxImageEffectPropCudaStream, - kOfxImageEffectPropCudaStreamSupported, - kOfxImageEffectPropFrameRange, - kOfxImageEffectPropFrameStep, - kOfxImageEffectPropInteractiveRenderStatus, - kOfxImageEffectPropInteractiveRenderStatus, - kOfxImageEffectPropMetalCommandQueue, - kOfxImageEffectPropMetalEnabled, - kOfxImageEffectPropMetalRenderSupported, - kOfxImageEffectPropOpenCLCommandQueue, - kOfxImageEffectPropOpenCLEnabled, - kOfxImageEffectPropOpenCLImage, - kOfxImageEffectPropOpenCLRenderSupported, - kOfxImageEffectPropOpenCLSupported, - kOfxImageEffectPropOpenGLEnabled, - kOfxImageEffectPropOpenGLTextureIndex, - kOfxImageEffectPropOpenGLTextureTarget, - kOfxImageEffectPropRenderScale, - kOfxImageEffectPropSequentialRenderStatus, - kOfxPropIsInteractive } }, -{ { kOfxImageEffectActionGetClipPreferences, "outArgs" }, { kOfxImageClipPropContinuousSamples, - kOfxImageClipPropFieldOrder, - kOfxImageEffectFrameVarying, - kOfxImageEffectPropFrameRate, - kOfxImageEffectPropPreMultiplication } }, -{ { kOfxImageEffectActionGetFramesNeeded, "inArgs" }, { kOfxPropTime } }, -{ { kOfxImageEffectActionGetFramesNeeded, "outArgs" }, { kOfxImageEffectPropFrameRange } }, -{ { kOfxImageEffectActionGetRegionOfDefinition, "inArgs" }, { kOfxImageEffectPropRenderScale, - kOfxPropTime } }, -{ { kOfxImageEffectActionGetRegionOfDefinition, "outArgs" }, { kOfxImageEffectPropRegionOfDefinition } }, -{ { kOfxImageEffectActionGetRegionsOfInterest, "inArgs" }, { kOfxImageEffectPropRegionOfInterest, - kOfxImageEffectPropRenderScale, - kOfxPropTime } }, -{ { kOfxImageEffectActionGetTimeDomain, "outArgs" }, { kOfxImageEffectPropFrameRange } }, -{ { kOfxImageEffectActionIsIdentity, "inArgs" }, { kOfxImageEffectPropFieldToRender, - kOfxImageEffectPropRenderScale, - kOfxImageEffectPropRenderWindow, - kOfxPropTime } }, -{ { kOfxImageEffectActionRender, "inArgs" }, { kOfxImageEffectPropCudaEnabled, - kOfxImageEffectPropCudaRenderSupported, - kOfxImageEffectPropCudaStream, - kOfxImageEffectPropCudaStreamSupported, - kOfxImageEffectPropInteractiveRenderStatus, - kOfxImageEffectPropInteractiveRenderStatus, - kOfxImageEffectPropMetalCommandQueue, - kOfxImageEffectPropMetalEnabled, - kOfxImageEffectPropMetalRenderSupported, - kOfxImageEffectPropOpenCLCommandQueue, - kOfxImageEffectPropOpenCLEnabled, - kOfxImageEffectPropOpenCLImage, - kOfxImageEffectPropOpenCLRenderSupported, - kOfxImageEffectPropOpenCLSupported, - kOfxImageEffectPropOpenGLEnabled, - kOfxImageEffectPropOpenGLTextureIndex, - kOfxImageEffectPropOpenGLTextureTarget, - kOfxImageEffectPropRenderQualityDraft, - kOfxImageEffectPropSequentialRenderStatus, - kOfxPropTime } }, -{ { kOfxInteractActionDraw, "inArgs" }, { kOfxImageEffectPropRenderScale, - kOfxInteractPropBackgroundColour, - kOfxInteractPropDrawContext, - kOfxInteractPropPixelScale, - kOfxPropEffectInstance, - kOfxPropTime } }, -{ { kOfxInteractActionGainFocus, "inArgs" }, { kOfxImageEffectPropRenderScale, - kOfxInteractPropBackgroundColour, - kOfxInteractPropPixelScale, - kOfxPropEffectInstance, - kOfxPropTime } }, -{ { kOfxInteractActionKeyDown, "inArgs" }, { kOfxImageEffectPropRenderScale, - kOfxPropEffectInstance, - kOfxPropKeyString, - kOfxPropKeySym, - kOfxPropTime } }, -{ { kOfxInteractActionKeyRepeat, "inArgs" }, { kOfxImageEffectPropRenderScale, - kOfxPropEffectInstance, - kOfxPropKeyString, - kOfxPropKeySym, - kOfxPropTime } }, -{ { kOfxInteractActionKeyUp, "inArgs" }, { kOfxImageEffectPropRenderScale, - kOfxPropEffectInstance, - kOfxPropKeyString, - kOfxPropKeySym, - kOfxPropTime } }, -{ { kOfxInteractActionLoseFocus, "inArgs" }, { kOfxImageEffectPropRenderScale, - kOfxInteractPropBackgroundColour, - kOfxInteractPropPixelScale, - kOfxPropEffectInstance, - kOfxPropTime } }, -{ { kOfxInteractActionPenDown, "inArgs" }, { kOfxImageEffectPropRenderScale, - kOfxInteractPropBackgroundColour, - kOfxInteractPropPenPosition, - kOfxInteractPropPenPressure, - kOfxInteractPropPenViewportPosition, - kOfxInteractPropPixelScale, - kOfxPropEffectInstance, - kOfxPropTime } }, -{ { kOfxInteractActionPenMotion, "inArgs" }, { kOfxImageEffectPropRenderScale, - kOfxInteractPropBackgroundColour, - kOfxInteractPropPenPosition, - kOfxInteractPropPenPressure, - kOfxInteractPropPenViewportPosition, - kOfxInteractPropPixelScale, - kOfxPropEffectInstance, - kOfxPropTime } }, -{ { kOfxInteractActionPenUp, "inArgs" }, { kOfxImageEffectPropRenderScale, - kOfxInteractPropBackgroundColour, - kOfxInteractPropPenPosition, - kOfxInteractPropPenPressure, - kOfxInteractPropPenViewportPosition, - kOfxInteractPropPixelScale, - kOfxPropEffectInstance, - kOfxPropTime } }, -}; -} // namespace OpenFX diff --git a/include/ofxPropsMetadata.h b/include/ofxPropsMetadata.h deleted file mode 100644 index 9bb94140a..000000000 --- a/include/ofxPropsMetadata.h +++ /dev/null @@ -1,224 +0,0 @@ -// 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 -}; - -enum class Writable { - Host, - Plugin, - All -}; - -struct PropsMetadata { - std::string name; - std::vector types; - int dimension; - Writable writable; - bool host_optional; - std::vector values; // for enums -}; - -const std::vector props_metadata { -{ kOfxImageClipPropColourspace, {PropType::String}, 1, Writable::All, false, {} }, -{ kOfxImageClipPropConnected, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxImageClipPropContinuousSamples, {PropType::Bool}, 1, Writable::All, false, {} }, -{ kOfxImageClipPropFieldExtraction, {PropType::Enum}, 1, Writable::Plugin, false, {"kOfxImageFieldNone","kOfxImageFieldLower","kOfxImageFieldUpper","kOfxImageFieldBoth","kOfxImageFieldSingle","kOfxImageFieldDoubled"} }, -{ kOfxImageClipPropFieldOrder, {PropType::Enum}, 1, Writable::All, false, {"kOfxImageFieldNone","kOfxImageFieldLower","kOfxImageFieldUpper"} }, -{ kOfxImageClipPropIsMask, {PropType::Bool}, 1, Writable::Plugin, false, {} }, -{ kOfxImageClipPropOptional, {PropType::Bool}, 1, Writable::Plugin, false, {} }, -{ kOfxImageClipPropPreferredColourspaces, {PropType::String}, 0, Writable::Plugin, false, {} }, -{ kOfxImageClipPropUnmappedComponents, {PropType::Enum}, 1, Writable::Host, false, {"kOfxImageComponentNone","kOfxImageComponentRGBA","kOfxImageComponentRGB","kOfxImageComponentAlpha"} }, -{ kOfxImageClipPropUnmappedPixelDepth, {PropType::Enum}, 1, Writable::Host, false, {"kOfxBitDepthNone","kOfxBitDepthByte","kOfxBitDepthShort","kOfxBitDepthHalf","kOfxBitDepthFloat"} }, -{ kOfxImageEffectFrameVarying, {PropType::Bool}, 1, Writable::Plugin, false, {} }, -{ kOfxImageEffectHostPropIsBackground, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectHostPropNativeOrigin, {PropType::Enum}, 1, Writable::Host, false, {"kOfxImageEffectHostPropNativeOriginBottomLeft","kOfxImageEffectHostPropNativeOriginTopLeft","kOfxImageEffectHostPropNativeOriginCenter"} }, -{ kOfxImageEffectInstancePropEffectDuration, {PropType::Double}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectInstancePropSequentialRender, {PropType::Int}, 1, Writable::Plugin, false, {} }, -{ kOfxImageEffectPluginPropFieldRenderTwiceAlways, {PropType::Int}, 1, Writable::Plugin, false, {} }, -{ kOfxImageEffectPluginPropGrouping, {PropType::String}, 1, Writable::Plugin, false, {} }, -{ kOfxImageEffectPluginPropHostFrameThreading, {PropType::Int}, 1, Writable::Plugin, false, {} }, -{ kOfxImageEffectPluginPropOverlayInteractV1, {PropType::Pointer}, 1, Writable::All, false, {} }, -{ kOfxImageEffectPluginPropOverlayInteractV2, {PropType::Pointer}, 1, Writable::All, false, {} }, -{ kOfxImageEffectPluginPropSingleInstance, {PropType::Int}, 1, Writable::Plugin, false, {} }, -{ kOfxImageEffectPluginRenderThreadSafety, {PropType::String}, 1, Writable::Plugin, false, {} }, -{ kOfxImageEffectPropClipPreferencesSlaveParam, {PropType::String}, 0, Writable::Plugin, false, {} }, -{ kOfxImageEffectPropColourManagementAvailableConfigs, {PropType::String}, 0, Writable::All, false, {} }, -{ kOfxImageEffectPropColourManagementConfig, {PropType::String}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropColourManagementStyle, {PropType::Enum}, 1, Writable::All, false, {"kOfxImageEffectPropColourManagementNone","kOfxImageEffectPropColourManagementBasic","kOfxImageEffectPropColourManagementCore","kOfxImageEffectPropColourManagementFull","kOfxImageEffectPropColourManagementOCIO"} }, -{ kOfxImageEffectPropComponents, {PropType::Enum}, 1, Writable::Host, false, {"kOfxImageComponentNone","kOfxImageComponentRGBA","kOfxImageComponentRGB","kOfxImageComponentAlpha"} }, -{ kOfxImageEffectPropContext, {PropType::Enum}, 1, Writable::Host, false, {"kOfxImageEffectContextGenerator","kOfxImageEffectContextFilter","kOfxImageEffectContextTransition","kOfxImageEffectContextPaint","kOfxImageEffectContextGeneral","kOfxImageEffectContextRetimer"} }, -{ kOfxImageEffectPropCudaEnabled, {PropType::Bool}, 1, Writable::All, false, {} }, -{ kOfxImageEffectPropCudaRenderSupported, {PropType::Enum}, 1, Writable::Plugin, false, {"false","true","needed"} }, -{ kOfxImageEffectPropCudaStream, {PropType::Pointer}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropCudaStreamSupported, {PropType::Enum}, 1, Writable::Plugin, false, {"false","true","needed"} }, -{ kOfxImageEffectPropDisplayColourspace, {PropType::String}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropFieldToRender, {PropType::Enum}, 1, Writable::Host, false, {"kOfxImageFieldNone","kOfxImageFieldBoth","kOfxImageFieldLower","kOfxImageFieldUpper"} }, -{ kOfxImageEffectPropFrameRange, {PropType::Double}, 2, Writable::Host, false, {} }, -{ kOfxImageEffectPropFrameRate, {PropType::Double}, 1, Writable::All, false, {} }, -{ kOfxImageEffectPropFrameStep, {PropType::Double}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropInAnalysis, {PropType::Bool}, 1, Writable::All, false, {} }, -{ kOfxImageEffectPropInteractiveRenderStatus, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropMetalCommandQueue, {PropType::Pointer}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropMetalEnabled, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropMetalRenderSupported, {PropType::Enum}, 1, Writable::Plugin, false, {"false","true","needed"} }, -{ kOfxImageEffectPropOCIOConfig, {PropType::String}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropOCIODisplay, {PropType::String}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropOCIOView, {PropType::String}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropOpenCLCommandQueue, {PropType::Pointer}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropOpenCLEnabled, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropOpenCLImage, {PropType::Int}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropOpenCLRenderSupported, {PropType::Enum}, 1, Writable::Plugin, false, {"false","true","needed"} }, -{ kOfxImageEffectPropOpenCLSupported, {PropType::Enum}, 1, Writable::All, false, {"false","true"} }, -{ kOfxImageEffectPropOpenGLEnabled, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropOpenGLRenderSupported, {PropType::Enum}, 1, Writable::Plugin, false, {"false","true","needed"} }, -{ kOfxImageEffectPropOpenGLTextureIndex, {PropType::Int}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropOpenGLTextureTarget, {PropType::Int}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropPixelDepth, {PropType::Enum}, 1, Writable::Host, false, {"kOfxBitDepthNone","kOfxBitDepthByte","kOfxBitDepthShort","kOfxBitDepthHalf","kOfxBitDepthFloat"} }, -{ kOfxImageEffectPropPluginHandle, {PropType::Pointer}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropPreMultiplication, {PropType::Enum}, 1, Writable::All, false, {"kOfxImageOpaque","kOfxImagePreMultiplied","kOfxImageUnPreMultiplied"} }, -{ kOfxImageEffectPropProjectExtent, {PropType::Double}, 2, Writable::Host, false, {} }, -{ kOfxImageEffectPropProjectOffset, {PropType::Double}, 2, Writable::Host, false, {} }, -{ kOfxImageEffectPropProjectPixelAspectRatio, {PropType::Double}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropProjectSize, {PropType::Double}, 2, Writable::Host, false, {} }, -{ kOfxImageEffectPropRegionOfDefinition, {PropType::Int}, 4, Writable::Host, false, {} }, -{ kOfxImageEffectPropRegionOfInterest, {PropType::Int}, 4, Writable::Host, false, {} }, -{ kOfxImageEffectPropRenderQualityDraft, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropRenderScale, {PropType::Double}, 2, Writable::Host, false, {} }, -{ kOfxImageEffectPropRenderWindow, {PropType::Int}, 4, Writable::Host, false, {} }, -{ kOfxImageEffectPropSequentialRenderStatus, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropSetableFielding, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropSetableFrameRate, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropSupportedComponents, {PropType::Enum}, 0, Writable::Host, false, {"kOfxImageComponentNone","kOfxImageComponentRGBA","kOfxImageComponentRGB","kOfxImageComponentAlpha"} }, -{ kOfxImageEffectPropSupportedContexts, {PropType::String}, 0, Writable::Plugin, false, {} }, -{ kOfxImageEffectPropSupportedPixelDepths, {PropType::String}, 0, Writable::Plugin, false, {} }, -{ kOfxImageEffectPropSupportsMultiResolution, {PropType::Int}, 1, Writable::Plugin, false, {} }, -{ kOfxImageEffectPropSupportsMultipleClipDepths, {PropType::Int}, 1, Writable::Plugin, false, {} }, -{ kOfxImageEffectPropSupportsMultipleClipPARs, {PropType::Int}, 1, Writable::Plugin, false, {} }, -{ kOfxImageEffectPropSupportsOverlays, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxImageEffectPropSupportsTiles, {PropType::Int}, 1, Writable::Plugin, false, {} }, -{ kOfxImageEffectPropTemporalClipAccess, {PropType::Int}, 1, Writable::Plugin, false, {} }, -{ kOfxImageEffectPropUnmappedFrameRange, {PropType::Double}, 2, Writable::Host, false, {} }, -{ kOfxImageEffectPropUnmappedFrameRate, {PropType::Double}, 1, Writable::Host, false, {} }, -{ kOfxImagePropBounds, {PropType::Int}, 4, Writable::Host, false, {} }, -{ kOfxImagePropData, {PropType::Pointer}, 1, Writable::Host, false, {} }, -{ kOfxImagePropField, {PropType::Enum}, 1, Writable::Host, false, {"kOfxImageFieldNone","kOfxImageFieldBoth","kOfxImageFieldLower","kOfxImageFieldUpper"} }, -{ kOfxImagePropPixelAspectRatio, {PropType::Double}, 1, Writable::All, false, {} }, -{ kOfxImagePropRegionOfDefinition, {PropType::Int}, 4, Writable::Host, false, {} }, -{ kOfxImagePropRowBytes, {PropType::Int}, 1, Writable::Host, false, {} }, -{ kOfxImagePropUniqueIdentifier, {PropType::String}, 1, Writable::Host, false, {} }, -{ kOfxInteractPropBackgroundColour, {PropType::Double}, 3, Writable::Host, false, {} }, -{ kOfxInteractPropBitDepth, {PropType::Int}, 1, Writable::Host, false, {} }, -{ kOfxInteractPropDrawContext, {PropType::Pointer}, 1, Writable::Host, false, {} }, -{ kOfxInteractPropHasAlpha, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxInteractPropPenPosition, {PropType::Double}, 2, Writable::Host, false, {} }, -{ kOfxInteractPropPenPressure, {PropType::Double}, 1, Writable::Host, false, {} }, -{ kOfxInteractPropPenViewportPosition, {PropType::Int}, 2, Writable::Host, false, {} }, -{ kOfxInteractPropPixelScale, {PropType::Double}, 2, Writable::Host, false, {} }, -{ kOfxInteractPropSlaveToParam, {PropType::String}, 0, Writable::All, false, {} }, -{ kOfxInteractPropSuggestedColour, {PropType::Double}, 3, Writable::Host, false, {} }, -{ kOfxInteractPropViewportSize, {PropType::Int}, 2, Writable::Host, false, {} }, -{ kOfxOpenGLPropPixelDepth, {PropType::Enum}, 0, Writable::Host, false, {"kOfxBitDepthNone","kOfxBitDepthByte","kOfxBitDepthShort","kOfxBitDepthHalf","kOfxBitDepthFloat"} }, -{ kOfxParamHostPropMaxPages, {PropType::Int}, 1, Writable::Host, false, {} }, -{ kOfxParamHostPropMaxParameters, {PropType::Int}, 1, Writable::Host, false, {} }, -{ kOfxParamHostPropPageRowColumnCount, {PropType::Int}, 2, Writable::Host, false, {} }, -{ kOfxParamHostPropSupportsBooleanAnimation, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxParamHostPropSupportsChoiceAnimation, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxParamHostPropSupportsCustomAnimation, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxParamHostPropSupportsCustomInteract, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxParamHostPropSupportsParametricAnimation, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxParamHostPropSupportsStrChoice, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxParamHostPropSupportsStrChoiceAnimation, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxParamHostPropSupportsStringAnimation, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxParamPropAnimates, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxParamPropCacheInvalidation, {PropType::Enum}, 1, Writable::All, false, {"kOfxParamInvalidateValueChange","kOfxParamInvalidateValueChangeToEnd","kOfxParamInvalidateAll"} }, -{ kOfxParamPropCanUndo, {PropType::Bool}, 1, Writable::Plugin, false, {} }, -{ kOfxParamPropChoiceEnum, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxParamPropChoiceOption, {PropType::String}, 0, Writable::Plugin, false, {} }, -{ kOfxParamPropChoiceOrder, {PropType::Int}, 0, Writable::Plugin, false, {} }, -{ kOfxParamPropCustomInterpCallbackV1, {PropType::Pointer}, 1, Writable::Plugin, false, {} }, -{ kOfxParamPropCustomValue, {PropType::String}, 2, Writable::Plugin, false, {} }, -{ kOfxParamPropDataPtr, {PropType::Pointer}, 1, Writable::All, false, {} }, -{ kOfxParamPropDefault, {PropType::Int,PropType::Double,PropType::String,PropType::Bytes}, 0, Writable::Plugin, false, {} }, -{ kOfxParamPropDefaultCoordinateSystem, {PropType::Enum}, 1, Writable::Plugin, false, {"kOfxParamCoordinatesCanonical","kOfxParamCoordinatesNormalised"} }, -{ kOfxParamPropDigits, {PropType::Int}, 1, Writable::Plugin, false, {} }, -{ kOfxParamPropDimensionLabel, {PropType::String}, 1, Writable::Plugin, false, {} }, -{ kOfxParamPropDisplayMax, {PropType::Int,PropType::Double}, 0, Writable::Plugin, false, {} }, -{ kOfxParamPropDisplayMin, {PropType::Int,PropType::Double}, 0, Writable::Plugin, false, {} }, -{ kOfxParamPropDoubleType, {PropType::Enum}, 1, Writable::Plugin, false, {"kOfxParamDoubleTypePlain","kOfxParamDoubleTypeAngle","kOfxParamDoubleTypeScale","kOfxParamDoubleTypeTime","kOfxParamDoubleTypeAbsoluteTime","kOfxParamDoubleTypeX","kOfxParamDoubleTypeXAbsolute","kOfxParamDoubleTypeY","kOfxParamDoubleTypeYAbsolute","kOfxParamDoubleTypeXY","kOfxParamDoubleTypeXYAbsolute"} }, -{ kOfxParamPropEnabled, {PropType::Bool}, 1, Writable::All, false, {} }, -{ kOfxParamPropEvaluateOnChange, {PropType::Bool}, 1, Writable::Plugin, false, {} }, -{ kOfxParamPropGroupOpen, {PropType::Bool}, 1, Writable::Plugin, false, {} }, -{ kOfxParamPropHasHostOverlayHandle, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxParamPropHint, {PropType::String}, 1, Writable::All, false, {} }, -{ kOfxParamPropIncrement, {PropType::Double}, 1, Writable::Plugin, false, {} }, -{ kOfxParamPropInteractMinimumSize, {PropType::Double}, 2, Writable::Plugin, false, {} }, -{ kOfxParamPropInteractPreferedSize, {PropType::Int}, 2, Writable::Plugin, false, {} }, -{ kOfxParamPropInteractSize, {PropType::Double}, 2, Writable::Plugin, false, {} }, -{ kOfxParamPropInteractSizeAspect, {PropType::Double}, 1, Writable::Plugin, false, {} }, -{ kOfxParamPropInteractV1, {PropType::Pointer}, 1, Writable::Plugin, false, {} }, -{ kOfxParamPropInterpolationAmount, {PropType::Double}, 1, Writable::Plugin, false, {} }, -{ kOfxParamPropInterpolationTime, {PropType::Double}, 2, Writable::Plugin, false, {} }, -{ kOfxParamPropIsAnimating, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxParamPropIsAutoKeying, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxParamPropMax, {PropType::Int,PropType::Double}, 0, Writable::Plugin, false, {} }, -{ kOfxParamPropMin, {PropType::Int,PropType::Double}, 0, Writable::Plugin, false, {} }, -{ kOfxParamPropPageChild, {PropType::String}, 0, Writable::Plugin, false, {} }, -{ kOfxParamPropParametricDimension, {PropType::Int}, 1, Writable::Plugin, false, {} }, -{ kOfxParamPropParametricInteractBackground, {PropType::Pointer}, 1, Writable::Plugin, false, {} }, -{ kOfxParamPropParametricRange, {PropType::Double}, 2, Writable::Plugin, false, {} }, -{ kOfxParamPropParametricUIColour, {PropType::Double}, 0, Writable::Plugin, false, {} }, -{ kOfxParamPropParent, {PropType::String}, 1, Writable::All, false, {} }, -{ kOfxParamPropPersistant, {PropType::Int}, 1, Writable::Plugin, false, {} }, -{ kOfxParamPropPluginMayWrite, {PropType::Int}, 1, Writable::Plugin, false, {} }, -{ kOfxParamPropScriptName, {PropType::String}, 1, Writable::All, false, {} }, -{ kOfxParamPropSecret, {PropType::Bool}, 1, Writable::All, false, {} }, -{ kOfxParamPropShowTimeMarker, {PropType::Bool}, 1, Writable::Plugin, false, {} }, -{ kOfxParamPropStringFilePathExists, {PropType::Bool}, 1, Writable::Plugin, false, {} }, -{ kOfxParamPropStringMode, {PropType::Enum}, 1, Writable::Plugin, false, {"kOfxParamStringIsSingleLine","kOfxParamStringIsMultiLine","kOfxParamStringIsFilePath","kOfxParamStringIsDirectoryPath","kOfxParamStringIsLabel","kOfxParamStringIsRichTextFormat"} }, -{ kOfxParamPropType, {PropType::String}, 1, Writable::Host, false, {} }, -{ kOfxParamPropUseHostOverlayHandle, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxPluginPropFilePath, {PropType::Enum}, 1, Writable::Plugin, false, {"false","true","needed"} }, -{ kOfxPluginPropParamPageOrder, {PropType::String}, 0, Writable::Plugin, false, {} }, -{ kOfxPropAPIVersion, {PropType::Int}, 0, Writable::Host, false, {} }, -{ kOfxPropChangeReason, {PropType::Enum}, 1, Writable::Host, false, {"kOfxChangeUserEdited","kOfxChangePluginEdited","kOfxChangeTime"} }, -{ kOfxPropEffectInstance, {PropType::Pointer}, 1, Writable::Host, false, {} }, -{ kOfxPropHostOSHandle, {PropType::Pointer}, 1, Writable::Host, false, {} }, -{ kOfxPropIcon, {PropType::String}, 2, Writable::Plugin, true, {} }, -{ kOfxPropInstanceData, {PropType::Pointer}, 1, Writable::Plugin, false, {} }, -{ kOfxPropIsInteractive, {PropType::Bool}, 1, Writable::Host, false, {} }, -{ kOfxPropKeyString, {PropType::String}, 1, Writable::Host, false, {} }, -{ kOfxPropKeySym, {PropType::Int}, 1, Writable::Host, false, {} }, -{ kOfxPropLabel, {PropType::String}, 1, Writable::Host, false, {} }, -{ kOfxPropLongLabel, {PropType::String}, 1, Writable::Plugin, true, {} }, -{ kOfxPropName, {PropType::String}, 1, Writable::Host, false, {} }, -{ kOfxPropParamSetNeedsSyncing, {PropType::Bool}, 1, Writable::Plugin, false, {} }, -{ kOfxPropPluginDescription, {PropType::String}, 1, Writable::Plugin, false, {} }, -{ kOfxPropShortLabel, {PropType::String}, 1, Writable::Plugin, true, {} }, -{ kOfxPropTime, {PropType::Double}, 1, Writable::All, false, {} }, -{ kOfxPropType, {PropType::String}, 1, Writable::Host, false, {} }, -{ kOfxPropVersion, {PropType::Int}, 0, Writable::Host, false, {} }, -{ kOfxPropVersionLabel, {PropType::String}, 1, Writable::Host, false, {} }, -}; -} // namespace OpenFX diff --git a/scripts/gen-props.py b/scripts/gen-props.py index a5a679f8a..a51a12840 100644 --- a/scripts/gen-props.py +++ b/scripts/gen-props.py @@ -122,12 +122,14 @@ def find_missing(all_props, props_metadata): Returns 0 if no errors. """ errs = 0 - for p in sorted(all_props): - if not props_metadata.get(p): + for p in sorted(all_props): # constants, with "k" prefix + assert(p.startswith("k")) + stringval = p[1:] + if not props_metadata.get(stringval): logging.error(f"No YAML metadata found for {p}") errs += 1 for p in sorted(props_metadata): - if p not in all_props: + if "k"+p 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: @@ -216,18 +218,10 @@ def gen_props_metadata(props_metadata, outfile_path: Path): Pointer }; -enum class Writable { - Host, - Plugin, - All -}; - struct PropsMetadata { std::string name; std::vector types; int dimension; - Writable writable; - bool host_optional; std::vector values; // for enums }; @@ -240,7 +234,6 @@ def gen_props_metadata(props_metadata, outfile_path: Path): if isinstance(types, str): # make it always a list types = (types,) prop_type_defs = "{" + ",".join(f'PropType::{t.capitalize()}' for t in types) + "}" - writable = "Writable::" + md.get('writable', "unknown").capitalize() host_opt = md.get('hostOptional', 'false') if host_opt in ('True', 'true', 1): host_opt = 'true' @@ -251,12 +244,20 @@ def gen_props_metadata(props_metadata, outfile_path: Path): values = "{" + ",".join(f'\"{v}\"' for v in md['values']) + "}" else: values = "{}" - outfile.write(f"{{ {p}, {prop_type_defs}, {md['dimension']}, " - f"{writable}, {host_opt}, {values} }},\n") + 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} // namespace OpenFX\n") + outfile.write("};\n") + + # Generate static asserts to ensure our constants match the string values + for p in sorted(props_metadata): + outfile.write(f"static_assert(std::string_view(\"{p}\") == std::string_view(k{p}));\n") + + outfile.write("} // namespace OpenFX\n") + + def gen_props_by_set(props_by_set, outfile_path: Path): """Generate a header file with definitions of all prop sets, including their props""" @@ -284,7 +285,7 @@ def gen_props_by_set(props_by_set, outfile_path: Path): for pset in sorted(props_by_set.keys()): if isinstance(props_by_set[pset], dict): continue - propnames = ",\n ".join(sorted(props_by_set[pset])) + propnames = ",\n ".join(sorted([f'"{p}"' for p in props_by_set[pset]])) outfile.write(f"{{ \"{pset}\", {{ {propnames} }} }},\n") outfile.write("};\n\n") @@ -305,7 +306,7 @@ def gen_props_by_set(props_by_set, outfile_path: Path): for subset in props_by_set[pset]: if not props_by_set[pset][subset]: continue - propnames = ",\n ".join(sorted(props_by_set[pset][subset])) + propnames = ",\n ".join(sorted([f'"{p}"' for p in props_by_set[pset][subset]])) if not pset.startswith("kOfx"): psetname = '"' + pset + '"' # quote if it's not a known constant else: @@ -346,20 +347,27 @@ def main(args): if args.verbose: print(f"=== Generating {args.props_metadata}") - gen_props_metadata(props_metadata, include_dir / 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, include_dir / args.props_by_set) + gen_props_by_set(props_by_set, support_include_dir / args.props_by_set) if __name__ == "__main__": - parser = argparse.ArgumentParser(description="Check OpenFX properties and generate ancillary data structures") + 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="ofxPropsMetadata.h", + 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="ofxPropsBySet.h", + parser.add_argument('--props-by-set', default=support_include_dir/"ofxPropsBySet.h", help="Generate props by set metadata into this file") # Parse the arguments From e8700f4741d6fcd096061cde0dafd3c76ec18398 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 3 Sep 2024 13:57:46 -0400 Subject: [PATCH 09/14] Account for some prop names that don't match their C #defines See `get_cname` and `find_stringname` in gen-props.py, and the new `cname` member of the props metadata. Signed-off-by: Gary Oberbrunner --- Support/include/ofxPropsBySet.h | 67 +++--- Support/include/ofxPropsMetadata.h | 30 +-- include/ofx-props.yml | 331 +++++++++++------------------ scripts/gen-props.py | 33 ++- 4 files changed, 201 insertions(+), 260 deletions(-) diff --git a/Support/include/ofxPropsBySet.h b/Support/include/ofxPropsBySet.h index 4b8037672..c5fdc32b6 100644 --- a/Support/include/ofxPropsBySet.h +++ b/Support/include/ofxPropsBySet.h @@ -67,11 +67,11 @@ const std::map> prop_sets { "OfxImageEffectPropClipPreferencesSlaveParam", "OfxImageEffectPropColourManagementAvailableConfigs", "OfxImageEffectPropColourManagementStyle", + "OfxImageEffectPropMultipleClipDepths", "OfxImageEffectPropOpenGLRenderSupported", "OfxImageEffectPropSupportedContexts", "OfxImageEffectPropSupportedPixelDepths", "OfxImageEffectPropSupportsMultiResolution", - "OfxImageEffectPropSupportsMultipleClipDepths", "OfxImageEffectPropSupportsMultipleClipPARs", "OfxImageEffectPropSupportsTiles", "OfxImageEffectPropTemporalClipAccess", @@ -95,16 +95,15 @@ const std::map> prop_sets { "OfxImageEffectPropOCIODisplay", "OfxImageEffectPropOCIOView", "OfxImageEffectPropOpenGLRenderSupported", + "OfxImageEffectPropPixelAspectRatio", "OfxImageEffectPropPluginHandle", "OfxImageEffectPropProjectExtent", "OfxImageEffectPropProjectOffset", - "OfxImageEffectPropProjectPixelAspectRatio", "OfxImageEffectPropProjectSize", "OfxImageEffectPropSupportsTiles", "OfxPropInstanceData", "OfxPropIsInteractive", "OfxPropType" } }, -{ "General", { "OfxPropTime" } }, { "Image", { "OfxImageEffectPropComponents", "OfxImageEffectPropPixelDepth", "OfxImageEffectPropPreMultiplication", @@ -122,6 +121,7 @@ const std::map> prop_sets { "OfxImageEffectInstancePropSequentialRender", "OfxImageEffectPropColourManagementAvailableConfigs", "OfxImageEffectPropColourManagementStyle", + "OfxImageEffectPropMultipleClipDepths", "OfxImageEffectPropOpenGLRenderSupported", "OfxImageEffectPropRenderQualityDraft", "OfxImageEffectPropSetableFielding", @@ -129,7 +129,6 @@ const std::map> prop_sets { "OfxImageEffectPropSupportedComponents", "OfxImageEffectPropSupportedContexts", "OfxImageEffectPropSupportsMultiResolution", - "OfxImageEffectPropSupportsMultipleClipDepths", "OfxImageEffectPropSupportsMultipleClipPARs", "OfxImageEffectPropSupportsOverlays", "OfxImageEffectPropSupportsTiles", @@ -192,13 +191,13 @@ const std::map> prop_sets { "OfxParamPropSecret", "OfxParamPropShowTimeMarker", "OfxParamPropType", - "OfxParamPropUseHostOverlayHandle", "OfxPropIcon", "OfxPropLabel", "OfxPropLongLabel", "OfxPropName", "OfxPropShortLabel", - "OfxPropType" } }, + "OfxPropType", + "kOfxParamPropUseHostOverlayHandle" } }, { "ParameterSet", { "OfxPluginPropParamPageOrder", "OfxPropParamSetNeedsSyncing" } }, { "ParamsByte", { "OfxParamPropAnimates", @@ -227,13 +226,13 @@ const std::map> prop_sets { "OfxParamPropScriptName", "OfxParamPropSecret", "OfxParamPropType", - "OfxParamPropUseHostOverlayHandle", "OfxPropIcon", "OfxPropLabel", "OfxPropLongLabel", "OfxPropName", "OfxPropShortLabel", - "OfxPropType" } }, + "OfxPropType", + "kOfxParamPropUseHostOverlayHandle" } }, { "ParamsChoice", { "OfxParamPropAnimates", "OfxParamPropCacheInvalidation", "OfxParamPropCanUndo", @@ -258,17 +257,17 @@ const std::map> prop_sets { "OfxParamPropScriptName", "OfxParamPropSecret", "OfxParamPropType", - "OfxParamPropUseHostOverlayHandle", "OfxPropIcon", "OfxPropLabel", "OfxPropLongLabel", "OfxPropName", "OfxPropShortLabel", - "OfxPropType" } }, + "OfxPropType", + "kOfxParamPropUseHostOverlayHandle" } }, { "ParamsCustom", { "OfxParamPropAnimates", "OfxParamPropCacheInvalidation", "OfxParamPropCanUndo", - "OfxParamPropCustomInterpCallbackV1", + "OfxParamPropCustomCallbackV1", "OfxParamPropDataPtr", "OfxParamPropDefault", "OfxParamPropEnabled", @@ -288,13 +287,13 @@ const std::map> prop_sets { "OfxParamPropScriptName", "OfxParamPropSecret", "OfxParamPropType", - "OfxParamPropUseHostOverlayHandle", "OfxPropIcon", "OfxPropLabel", "OfxPropLongLabel", "OfxPropName", "OfxPropShortLabel", - "OfxPropType" } }, + "OfxPropType", + "kOfxParamPropUseHostOverlayHandle" } }, { "ParamsDouble2D3D", { "OfxParamPropAnimates", "OfxParamPropCacheInvalidation", "OfxParamPropCanUndo", @@ -324,13 +323,13 @@ const std::map> prop_sets { "OfxParamPropScriptName", "OfxParamPropSecret", "OfxParamPropType", - "OfxParamPropUseHostOverlayHandle", "OfxPropIcon", "OfxPropLabel", "OfxPropLongLabel", "OfxPropName", "OfxPropShortLabel", - "OfxPropType" } }, + "OfxPropType", + "kOfxParamPropUseHostOverlayHandle" } }, { "ParamsGroup", { "OfxParamPropDataPtr", "OfxParamPropEnabled", "OfxParamPropGroupOpen", @@ -372,13 +371,13 @@ const std::map> prop_sets { "OfxParamPropScriptName", "OfxParamPropSecret", "OfxParamPropType", - "OfxParamPropUseHostOverlayHandle", "OfxPropIcon", "OfxPropLabel", "OfxPropLongLabel", "OfxPropName", "OfxPropShortLabel", - "OfxPropType" } }, + "OfxPropType", + "kOfxParamPropUseHostOverlayHandle" } }, { "ParamsNormalizedSpatial", { "OfxParamPropAnimates", "OfxParamPropCacheInvalidation", "OfxParamPropCanUndo", @@ -408,13 +407,13 @@ const std::map> prop_sets { "OfxParamPropScriptName", "OfxParamPropSecret", "OfxParamPropType", - "OfxParamPropUseHostOverlayHandle", "OfxPropIcon", "OfxPropLabel", "OfxPropLongLabel", "OfxPropName", "OfxPropShortLabel", - "OfxPropType" } }, + "OfxPropType", + "kOfxParamPropUseHostOverlayHandle" } }, { "ParamsPage", { "OfxParamPropDataPtr", "OfxParamPropEnabled", "OfxParamPropHint", @@ -463,13 +462,13 @@ const std::map> prop_sets { "OfxParamPropScriptName", "OfxParamPropSecret", "OfxParamPropType", - "OfxParamPropUseHostOverlayHandle", "OfxPropIcon", "OfxPropLabel", "OfxPropLongLabel", "OfxPropName", "OfxPropShortLabel", - "OfxPropType" } }, + "OfxPropType", + "kOfxParamPropUseHostOverlayHandle" } }, { "ParamsStrChoice", { "OfxParamPropAnimates", "OfxParamPropCacheInvalidation", "OfxParamPropCanUndo", @@ -494,13 +493,13 @@ const std::map> prop_sets { "OfxParamPropScriptName", "OfxParamPropSecret", "OfxParamPropType", - "OfxParamPropUseHostOverlayHandle", "OfxPropIcon", "OfxPropLabel", "OfxPropLongLabel", "OfxPropName", "OfxPropShortLabel", - "OfxPropType" } }, + "OfxPropType", + "kOfxParamPropUseHostOverlayHandle" } }, { "ParamsString", { "OfxParamPropAnimates", "OfxParamPropCacheInvalidation", "OfxParamPropCanUndo", @@ -529,13 +528,13 @@ const std::map> prop_sets { "OfxParamPropStringFilePathExists", "OfxParamPropStringMode", "OfxParamPropType", - "OfxParamPropUseHostOverlayHandle", "OfxPropIcon", "OfxPropLabel", "OfxPropLongLabel", "OfxPropName", "OfxPropShortLabel", - "OfxPropType" } }, + "OfxPropType", + "kOfxParamPropUseHostOverlayHandle" } }, }; // Actions @@ -687,19 +686,19 @@ const std::map, std::vector> action_pro "OfxPropTime" } }, { { "OfxInteractActionKeyDown", "inArgs" }, { "OfxImageEffectPropRenderScale", "OfxPropEffectInstance", - "OfxPropKeyString", - "OfxPropKeySym", - "OfxPropTime" } }, + "OfxPropTime", + "kOfxPropKeyString", + "kOfxPropKeySym" } }, { { "OfxInteractActionKeyRepeat", "inArgs" }, { "OfxImageEffectPropRenderScale", "OfxPropEffectInstance", - "OfxPropKeyString", - "OfxPropKeySym", - "OfxPropTime" } }, + "OfxPropTime", + "kOfxPropKeyString", + "kOfxPropKeySym" } }, { { "OfxInteractActionKeyUp", "inArgs" }, { "OfxImageEffectPropRenderScale", "OfxPropEffectInstance", - "OfxPropKeyString", - "OfxPropKeySym", - "OfxPropTime" } }, + "OfxPropTime", + "kOfxPropKeyString", + "kOfxPropKeySym" } }, { { "OfxInteractActionLoseFocus", "inArgs" }, { "OfxImageEffectPropRenderScale", "OfxInteractPropBackgroundColour", "OfxInteractPropPixelScale", diff --git a/Support/include/ofxPropsMetadata.h b/Support/include/ofxPropsMetadata.h index fdb69ecf6..0dbd32cda 100644 --- a/Support/include/ofxPropsMetadata.h +++ b/Support/include/ofxPropsMetadata.h @@ -75,6 +75,7 @@ const std::vector props_metadata { { "OfxImageEffectPropMetalCommandQueue", {PropType::Pointer}, 1, {} }, { "OfxImageEffectPropMetalEnabled", {PropType::Bool}, 1, {} }, { "OfxImageEffectPropMetalRenderSupported", {PropType::Enum}, 1, {"false","true","needed"} }, +{ "OfxImageEffectPropMultipleClipDepths", {PropType::Int}, 1, {} }, { "OfxImageEffectPropOCIOConfig", {PropType::String}, 1, {} }, { "OfxImageEffectPropOCIODisplay", {PropType::String}, 1, {} }, { "OfxImageEffectPropOCIOView", {PropType::String}, 1, {} }, @@ -87,12 +88,12 @@ const std::vector props_metadata { { "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, {} }, -{ "OfxImageEffectPropProjectPixelAspectRatio", {PropType::Double}, 1, {} }, { "OfxImageEffectPropProjectSize", {PropType::Double}, 2, {} }, { "OfxImageEffectPropRegionOfDefinition", {PropType::Int}, 4, {} }, { "OfxImageEffectPropRegionOfInterest", {PropType::Int}, 4, {} }, @@ -106,7 +107,6 @@ const std::vector props_metadata { { "OfxImageEffectPropSupportedContexts", {PropType::String}, 0, {} }, { "OfxImageEffectPropSupportedPixelDepths", {PropType::String}, 0, {} }, { "OfxImageEffectPropSupportsMultiResolution", {PropType::Int}, 1, {} }, -{ "OfxImageEffectPropSupportsMultipleClipDepths", {PropType::Int}, 1, {} }, { "OfxImageEffectPropSupportsMultipleClipPARs", {PropType::Int}, 1, {} }, { "OfxImageEffectPropSupportsOverlays", {PropType::Bool}, 1, {} }, { "OfxImageEffectPropSupportsTiles", {PropType::Int}, 1, {} }, @@ -130,7 +130,7 @@ const std::vector props_metadata { { "OfxInteractPropPixelScale", {PropType::Double}, 2, {} }, { "OfxInteractPropSlaveToParam", {PropType::String}, 0, {} }, { "OfxInteractPropSuggestedColour", {PropType::Double}, 3, {} }, -{ "OfxInteractPropViewportSize", {PropType::Int}, 2, {} }, +{ "OfxInteractPropViewport", {PropType::Int}, 2, {} }, { "OfxOpenGLPropPixelDepth", {PropType::Enum}, 0, {"OfxBitDepthNone","OfxBitDepthByte","OfxBitDepthShort","OfxBitDepthHalf","OfxBitDepthFloat"} }, { "OfxParamHostPropMaxPages", {PropType::Int}, 1, {} }, { "OfxParamHostPropMaxParameters", {PropType::Int}, 1, {} }, @@ -149,7 +149,7 @@ const std::vector props_metadata { { "OfxParamPropChoiceEnum", {PropType::Bool}, 1, {} }, { "OfxParamPropChoiceOption", {PropType::String}, 0, {} }, { "OfxParamPropChoiceOrder", {PropType::Int}, 0, {} }, -{ "OfxParamPropCustomInterpCallbackV1", {PropType::Pointer}, 1, {} }, +{ "OfxParamPropCustomCallbackV1", {PropType::Pointer}, 1, {} }, { "OfxParamPropCustomValue", {PropType::String}, 2, {} }, { "OfxParamPropDataPtr", {PropType::Pointer}, 1, {} }, { "OfxParamPropDefault", {PropType::Int,PropType::Double,PropType::String,PropType::Bytes}, 0, {} }, @@ -190,7 +190,6 @@ const std::vector props_metadata { { "OfxParamPropStringFilePathExists", {PropType::Bool}, 1, {} }, { "OfxParamPropStringMode", {PropType::Enum}, 1, {"OfxParamStringIsSingleLine","OfxParamStringIsMultiLine","OfxParamStringIsFilePath","OfxParamStringIsDirectoryPath","OfxParamStringIsLabel","OfxParamStringIsRichTextFormat"} }, { "OfxParamPropType", {PropType::String}, 1, {} }, -{ "OfxParamPropUseHostOverlayHandle", {PropType::Bool}, 1, {} }, { "OfxPluginPropFilePath", {PropType::Enum}, 1, {"false","true","needed"} }, { "OfxPluginPropParamPageOrder", {PropType::String}, 0, {} }, { "OfxPropAPIVersion", {PropType::Int}, 0, {} }, @@ -200,8 +199,6 @@ const std::vector props_metadata { { "OfxPropIcon", {PropType::String}, 2, {} }, { "OfxPropInstanceData", {PropType::Pointer}, 1, {} }, { "OfxPropIsInteractive", {PropType::Bool}, 1, {} }, -{ "OfxPropKeyString", {PropType::String}, 1, {} }, -{ "OfxPropKeySym", {PropType::Int}, 1, {} }, { "OfxPropLabel", {PropType::String}, 1, {} }, { "OfxPropLongLabel", {PropType::String}, 1, {} }, { "OfxPropName", {PropType::String}, 1, {} }, @@ -212,7 +209,12 @@ const std::vector props_metadata { { "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)); @@ -255,6 +257,7 @@ static_assert(std::string_view("OfxImageEffectPropInteractiveRenderStatus") == s 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)); @@ -267,12 +270,12 @@ static_assert(std::string_view("OfxImageEffectPropOpenGLEnabled") == std::string 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("OfxImageEffectPropProjectPixelAspectRatio") == std::string_view(kOfxImageEffectPropProjectPixelAspectRatio)); 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)); @@ -286,7 +289,6 @@ static_assert(std::string_view("OfxImageEffectPropSupportedComponents") == std:: 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("OfxImageEffectPropSupportsMultipleClipDepths") == std::string_view(kOfxImageEffectPropSupportsMultipleClipDepths)); 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)); @@ -310,7 +312,7 @@ static_assert(std::string_view("OfxInteractPropPenViewportPosition") == std::str 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("OfxInteractPropViewportSize") == std::string_view(kOfxInteractPropViewportSize)); +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)); @@ -329,7 +331,7 @@ static_assert(std::string_view("OfxParamPropCanUndo") == std::string_view(kOfxPa 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("OfxParamPropCustomInterpCallbackV1") == std::string_view(kOfxParamPropCustomInterpCallbackV1)); +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)); @@ -370,7 +372,6 @@ static_assert(std::string_view("OfxParamPropShowTimeMarker") == std::string_view 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("OfxParamPropUseHostOverlayHandle") == std::string_view(kOfxParamPropUseHostOverlayHandle)); 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)); @@ -380,8 +381,6 @@ static_assert(std::string_view("OfxPropHostOSHandle") == std::string_view(kOfxPr 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("OfxPropKeyString") == std::string_view(kOfxPropKeyString)); -static_assert(std::string_view("OfxPropKeySym") == std::string_view(kOfxPropKeySym)); 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)); @@ -392,4 +391,7 @@ 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 index f750b24bf..d0492226f 100644 --- a/include/ofx-props.yml +++ b/include/ofx-props.yml @@ -6,8 +6,6 @@ # property. propertySets: - General: - - OfxPropTime ImageEffectHost: - OfxPropAPIVersion - OfxPropType @@ -22,7 +20,7 @@ propertySets: - OfxImageEffectPropTemporalClipAccess - OfxImageEffectPropSupportedComponents - OfxImageEffectPropSupportedContexts - - OfxImageEffectPropSupportsMultipleClipDepths + - OfxImageEffectPropMultipleClipDepths - OfxImageEffectPropSupportsMultipleClipPARs - OfxImageEffectPropSetableFrameRate - OfxImageEffectPropSetableFielding @@ -44,7 +42,6 @@ propertySets: - OfxImageEffectHostPropNativeOrigin - OfxImageEffectPropColourManagementAvailableConfigs - OfxImageEffectPropColourManagementStyle - EffectDescriptor: - OfxPropType - OfxPropLabel @@ -64,7 +61,7 @@ propertySets: - OfxImageEffectPropTemporalClipAccess - OfxImageEffectPropSupportedPixelDepths - OfxImageEffectPluginPropFieldRenderTwiceAlways - - OfxImageEffectPropSupportsMultipleClipDepths + - OfxImageEffectPropMultipleClipDepths # should have been SupportsMultipleClipDepths - OfxImageEffectPropSupportsMultipleClipPARs - OfxImageEffectPluginRenderThreadSafety - OfxImageEffectPropClipPreferencesSlaveParam @@ -74,7 +71,6 @@ propertySets: - OfxImageEffectPluginPropOverlayInteractV2 - OfxImageEffectPropColourManagementAvailableConfigs - OfxImageEffectPropColourManagementStyle - EffectInstance: - OfxPropType - OfxImageEffectPropContext @@ -82,7 +78,7 @@ propertySets: - OfxImageEffectPropProjectSize - OfxImageEffectPropProjectOffset - OfxImageEffectPropProjectExtent - - OfxImageEffectPropProjectPixelAspectRatio + - OfxImageEffectPropPixelAspectRatio - OfxImageEffectInstancePropEffectDuration - OfxImageEffectInstancePropSequentialRender - OfxImageEffectPropSupportsTiles @@ -96,7 +92,6 @@ propertySets: - OfxImageEffectPropColourManagementStyle - OfxImageEffectPropDisplayColourspace - OfxImageEffectPropPluginHandle - ClipDescriptor: - OfxPropType - OfxPropName @@ -109,9 +104,7 @@ propertySets: - OfxImageClipPropFieldExtraction - OfxImageClipPropIsMask - OfxImageEffectPropSupportsTiles - ClipInstance: - - OfxPropType - OfxPropName - OfxPropLabel @@ -138,9 +131,7 @@ propertySets: - OfxImageEffectPropUnmappedFrameRange - OfxImageEffectPropUnmappedFrameRate - OfxImageClipPropContinuousSamples - Image: - - OfxPropType - OfxImageEffectPropPixelDepth - OfxImageEffectPropComponents @@ -153,11 +144,9 @@ propertySets: - OfxImagePropRowBytes - OfxImagePropField - OfxImagePropUniqueIdentifier - ParameterSet: - OfxPropParamSetNeedsSyncing - OfxPluginPropParamPageOrder - ParamsCommon_DEF: - OfxPropType - OfxPropName @@ -179,7 +168,7 @@ propertySets: - OfxParamPropInteractMinimumSize - OfxParamPropInteractPreferedSize - OfxParamPropHasHostOverlayHandle - - OfxParamPropUseHostOverlayHandle + - kOfxParamPropUseHostOverlayHandle ParamsValue_DEF: - OfxParamPropDefault - OfxParamPropAnimates @@ -196,13 +185,11 @@ propertySets: - OfxParamPropDisplayMin - OfxParamPropDisplayMax ParamsDouble_DEF: - - OfxParamPropIncrement - - OfxParamPropDigits - - ParamsGroup: + - OfxParamPropIncrement + - OfxParamPropDigits + ParamsGroup: - OfxParamPropGroupOpen - ParamsCommon_REF - ParamDouble1D: - OfxParamPropShowTimeMarker - OfxParamPropDoubleType @@ -211,7 +198,6 @@ propertySets: - ParamsValue_REF - ParamsNumeric_REF - ParamsDouble_REF - ParamsDouble2D3D: - OfxParamPropDoubleType - ParamsCommon_REF @@ -219,7 +205,6 @@ propertySets: - ParamsValue_REF - ParamsNumeric_REF - ParamsDouble_REF - ParamsNormalizedSpatial: - OfxParamPropDefaultCoordinateSystem - ParamsCommon_REF @@ -227,14 +212,12 @@ propertySets: - ParamsValue_REF - ParamsNumeric_REF - ParamsDouble_REF - ParamsInt2D3D: - OfxParamPropDimensionLabel - ParamsCommon_REF - ParamsAllButGroupPage_REF - ParamsValue_REF - ParamsNumeric_REF - ParamsString: - OfxParamPropStringMode - OfxParamPropStringFilePathExists @@ -242,41 +225,31 @@ propertySets: - ParamsAllButGroupPage_REF - ParamsValue_REF - ParamsNumeric_REF - ParamsByte: - ParamsCommon_REF - ParamsAllButGroupPage_REF - ParamsValue_REF - ParamsNumeric_REF - ParamsChoice: - OfxParamPropChoiceOption - OfxParamPropChoiceOrder - ParamsCommon_REF - ParamsAllButGroupPage_REF - ParamsValue_REF - ParamsStrChoice: - OfxParamPropChoiceOption - OfxParamPropChoiceEnum - ParamsCommon_REF - ParamsAllButGroupPage_REF - ParamsValue_REF - ParamsCustom: - - OfxParamPropCustomInterpCallbackV1 + - OfxParamPropCustomCallbackV1 - ParamsCommon_REF - ParamsAllButGroupPage_REF - ParamsValue_REF - ParamsPage: - OfxParamPropPageChild - ParamsCommon_REF - - ParamsGroup: - - OfxParamPropGroupOpen - - ParamsCommon_REF - ParamsParametric: - OfxParamPropAnimates - OfxParamPropIsAnimating @@ -293,11 +266,9 @@ propertySets: - ParamsCommon_REF - ParamsAllButGroupPage_REF - ParamsValue_REF - InteractDescriptor: - OfxInteractPropHasAlpha - OfxInteractPropBitDepth - InteractInstance: - OfxPropEffectInstance - OfxPropInstanceData @@ -307,92 +278,71 @@ propertySets: - OfxInteractPropBitDepth - OfxInteractPropSlaveToParam - OfxInteractPropSuggestedColour - 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 + - OfxPropType + - OfxPropName + - OfxPropChangeReason + - OfxPropTime + - OfxImageEffectPropRenderScale outArgs: - OfxActionBeginInstanceChanged: inArgs: - OfxPropChangeReason outArgs: [] - OfxActionEndInstanceChanged: inArgs: - - OfxPropChangeReason - outArgs: - - OfxActionDestroyInstance: - 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 - + # - OfxImageEffectClipPropRoI_ # with clip name OfxImageEffectActionGetTimeDomain: inArgs: outArgs: - OfxImageEffectPropFrameRange - OfxImageEffectActionGetFramesNeeded: inArgs: - OfxPropTime outArgs: - OfxImageEffectPropFrameRange - OfxImageEffectActionGetClipPreferences: inArgs: outArgs: @@ -406,14 +356,12 @@ propertySets: # - OfxImageClipPropDepth_ # - OfxImageClipPropPreferredColourspaces_ # - OfxImageClipPropPAR_ - OfxImageEffectActionIsIdentity: inArgs: - OfxPropTime - OfxImageEffectPropFieldToRender - OfxImageEffectPropRenderWindow - OfxImageEffectPropRenderScale - OfxImageEffectActionRender: inArgs: - OfxPropTime @@ -436,7 +384,6 @@ propertySets: - OfxImageEffectPropOpenGLTextureIndex - OfxImageEffectPropOpenGLTextureTarget - OfxImageEffectPropInteractiveRenderStatus - OfxImageEffectActionBeginSequenceRender: inArgs: - OfxImageEffectPropFrameRange @@ -462,7 +409,6 @@ propertySets: - OfxImageEffectPropOpenGLTextureTarget - OfxImageEffectPropInteractiveRenderStatus outArgs: - OfxImageEffectActionEndSequenceRender: inArgs: - OfxImageEffectPropFrameRange @@ -488,12 +434,10 @@ propertySets: - OfxImageEffectPropOpenGLTextureTarget - OfxImageEffectPropInteractiveRenderStatus outArgs: - OfxImageEffectActionDescribeInContext: inArgs: - OfxImageEffectPropContext outArgs: - OfxActionDescribeInteract: inArgs: outArgs: @@ -505,95 +449,86 @@ propertySets: outArgs: OfxInteractActionDraw: inArgs: - - OfxPropEffectInstance - - OfxInteractPropDrawContext - - OfxInteractPropPixelScale - - OfxInteractPropBackgroundColour - - OfxPropTime - - OfxImageEffectPropRenderScale + - OfxPropEffectInstance + - OfxInteractPropDrawContext + - OfxInteractPropPixelScale + - OfxInteractPropBackgroundColour + - OfxPropTime + - OfxImageEffectPropRenderScale outArgs: - OfxInteractActionPenMotion: inArgs: - - OfxPropEffectInstance - - OfxInteractPropPixelScale - - OfxInteractPropBackgroundColour - - OfxPropTime - - OfxImageEffectPropRenderScale - - OfxInteractPropPenPosition - - OfxInteractPropPenViewportPosition - - OfxInteractPropPenPressure + - OfxPropEffectInstance + - OfxInteractPropPixelScale + - OfxInteractPropBackgroundColour + - OfxPropTime + - OfxImageEffectPropRenderScale + - OfxInteractPropPenPosition + - OfxInteractPropPenViewportPosition + - OfxInteractPropPenPressure outArgs: - OfxInteractActionPenDown: inArgs: - - OfxPropEffectInstance - - OfxInteractPropPixelScale - - OfxInteractPropBackgroundColour - - OfxPropTime - - OfxImageEffectPropRenderScale - - OfxInteractPropPenPosition - - OfxInteractPropPenViewportPosition - - OfxInteractPropPenPressure + - OfxPropEffectInstance + - OfxInteractPropPixelScale + - OfxInteractPropBackgroundColour + - OfxPropTime + - OfxImageEffectPropRenderScale + - OfxInteractPropPenPosition + - OfxInteractPropPenViewportPosition + - OfxInteractPropPenPressure outArgs: - OfxInteractActionPenUp: inArgs: - - OfxPropEffectInstance - - OfxInteractPropPixelScale - - OfxInteractPropBackgroundColour - - OfxPropTime - - OfxImageEffectPropRenderScale - - OfxInteractPropPenPosition - - OfxInteractPropPenViewportPosition - - OfxInteractPropPenPressure + - OfxPropEffectInstance + - OfxInteractPropPixelScale + - OfxInteractPropBackgroundColour + - OfxPropTime + - OfxImageEffectPropRenderScale + - OfxInteractPropPenPosition + - OfxInteractPropPenViewportPosition + - OfxInteractPropPenPressure outArgs: - OfxInteractActionKeyDown: inArgs: - - OfxPropEffectInstance - - OfxPropKeySym - - OfxPropKeyString - - OfxPropTime - - OfxImageEffectPropRenderScale + - OfxPropEffectInstance + - kOfxPropKeySym + - kOfxPropKeyString + - OfxPropTime + - OfxImageEffectPropRenderScale outArgs: - OfxInteractActionKeyUp: inArgs: - - OfxPropEffectInstance - - OfxPropKeySym - - OfxPropKeyString - - OfxPropTime - - OfxImageEffectPropRenderScale + - OfxPropEffectInstance + - kOfxPropKeySym + - kOfxPropKeyString + - OfxPropTime + - OfxImageEffectPropRenderScale outArgs: - OfxInteractActionKeyRepeat: inArgs: - - OfxPropEffectInstance - - OfxPropKeySym - - OfxPropKeyString - - OfxPropTime - - OfxImageEffectPropRenderScale + - OfxPropEffectInstance + - kOfxPropKeySym + - kOfxPropKeyString + - OfxPropTime + - OfxImageEffectPropRenderScale outArgs: - OfxInteractActionGainFocus: inArgs: - - OfxPropEffectInstance - - OfxInteractPropPixelScale - - OfxInteractPropBackgroundColour - - OfxPropTime - - OfxImageEffectPropRenderScale + - OfxPropEffectInstance + - OfxInteractPropPixelScale + - OfxInteractPropBackgroundColour + - OfxPropTime + - OfxImageEffectPropRenderScale outArgs: - OfxInteractActionLoseFocus: inArgs: - - OfxPropEffectInstance - - OfxInteractPropPixelScale - - OfxInteractPropBackgroundColour - - OfxPropTime - - OfxImageEffectPropRenderScale + - OfxPropEffectInstance + - OfxInteractPropPixelScale + - OfxInteractPropBackgroundColour + - OfxPropTime + - OfxImageEffectPropRenderScale outArgs: - CustomParamInterpFunc: inArgs: - OfxParamPropCustomValue @@ -602,8 +537,6 @@ propertySets: outArgs: - OfxParamPropCustomValue - OfxParamPropInterpolationTime - - # Properties by name. # Notes: # type=bool means an int property with value 1 or 0 for true or false. @@ -622,7 +555,6 @@ properties: OfxPropTime: type: double dimension: 1 - # Param props OfxParamPropSecret: type: bool @@ -661,21 +593,16 @@ properties: type: string dimension: 2 hostOptional: true - # host props OfxPropAPIVersion: type: int dimension: 0 - OfxPropLabel: - type: string - dimension: 1 OfxPropVersion: type: int dimension: 0 OfxPropVersionLabel: type: string dimension: 1 - # ImageEffect props: OfxPropPluginDescription: type: string @@ -695,9 +622,6 @@ properties: OfxImageEffectPluginPropHostFrameThreading: type: int dimension: 1 - OfxImageEffectPluginPropOverlayInteractV1: - type: pointer - dimension: 1 OfxImageEffectPropSupportsMultiResolution: type: int dimension: 1 @@ -713,7 +637,8 @@ properties: OfxImageEffectPluginPropFieldRenderTwiceAlways: type: int dimension: 1 - OfxImageEffectPropSupportsMultipleClipDepths: + OfxImageEffectPropMultipleClipDepths: + cname: kOfxImageEffectPropSupportsMultipleClipDepths type: int dimension: 1 OfxImageEffectPropSupportsMultipleClipPARs: @@ -749,7 +674,6 @@ properties: type: enum dimension: 1 values: ['false', 'true', 'needed'] - # Clip props OfxImageClipPropColourspace: type: string @@ -763,18 +687,11 @@ properties: OfxImageClipPropFieldExtraction: type: enum dimension: 1 - values: ['OfxImageFieldNone', - 'OfxImageFieldLower', - 'OfxImageFieldUpper', - 'OfxImageFieldBoth', - 'OfxImageFieldSingle', - 'OfxImageFieldDoubled'] + values: ['OfxImageFieldNone', 'OfxImageFieldLower', 'OfxImageFieldUpper', 'OfxImageFieldBoth', 'OfxImageFieldSingle', 'OfxImageFieldDoubled'] OfxImageClipPropFieldOrder: type: enum dimension: 1 - values: ['OfxImageFieldNone', - 'OfxImageFieldLower', - 'OfxImageFieldUpper'] + values: ['OfxImageFieldNone', 'OfxImageFieldLower', 'OfxImageFieldUpper'] OfxImageClipPropIsMask: type: bool dimension: 1 @@ -828,7 +745,7 @@ properties: # OfxImageClipPropRoI_: # type: int # dimension: 4 - + # Image Effect OfxImageEffectFrameVarying: type: bool @@ -840,9 +757,9 @@ properties: type: enum dimension: 1 values: - - OfxImageEffectHostPropNativeOriginBottomLeft - - OfxImageEffectHostPropNativeOriginTopLeft - - OfxImageEffectHostPropNativeOriginCenter + - OfxImageEffectHostPropNativeOriginBottomLeft + - OfxImageEffectHostPropNativeOriginTopLeft + - OfxImageEffectHostPropNativeOriginCenter OfxImageEffectInstancePropEffectDuration: type: double dimension: 1 @@ -859,19 +776,19 @@ properties: type: enum dimension: 1 values: - - OfxImageEffectPropColourManagementNone - - OfxImageEffectPropColourManagementBasic - - OfxImageEffectPropColourManagementCore - - OfxImageEffectPropColourManagementFull - - OfxImageEffectPropColourManagementOCIO + - OfxImageEffectPropColourManagementNone + - OfxImageEffectPropColourManagementBasic + - OfxImageEffectPropColourManagementCore + - OfxImageEffectPropColourManagementFull + - OfxImageEffectPropColourManagementOCIO OfxImageEffectPropComponents: type: enum dimension: 1 values: - - OfxImageComponentNone - - OfxImageComponentRGBA - - OfxImageComponentRGB - - OfxImageComponentAlpha + - OfxImageComponentNone + - OfxImageComponentRGBA + - OfxImageComponentRGB + - OfxImageComponentAlpha OfxImageEffectPropContext: type: enum dimension: 1 @@ -958,11 +875,11 @@ properties: type: enum dimension: 1 values: - - OfxBitDepthNone - - OfxBitDepthByte - - OfxBitDepthShort - - OfxBitDepthHalf - - OfxBitDepthFloat + - OfxBitDepthNone + - OfxBitDepthByte + - OfxBitDepthShort + - OfxBitDepthHalf + - OfxBitDepthFloat OfxImageEffectPropPluginHandle: type: pointer dimension: 1 @@ -979,7 +896,8 @@ properties: OfxImageEffectPropProjectOffset: type: double dimension: 2 - OfxImageEffectPropProjectPixelAspectRatio: + OfxImageEffectPropPixelAspectRatio: + cname: kOfxImageEffectPropProjectPixelAspectRatio type: double dimension: 1 OfxImageEffectPropProjectSize: @@ -1013,10 +931,10 @@ properties: type: enum dimension: 0 values: - - OfxImageComponentNone - - OfxImageComponentRGBA - - OfxImageComponentRGB - - OfxImageComponentAlpha + - OfxImageComponentNone + - OfxImageComponentRGBA + - OfxImageComponentRGB + - OfxImageComponentAlpha OfxImageEffectPropSupportsOverlays: type: bool dimension: 1 @@ -1055,7 +973,6 @@ properties: OfxImagePropUniqueIdentifier: type: string dimension: 1 - # Interact/Drawing OfxInteractPropBackgroundColour: type: double @@ -1087,20 +1004,20 @@ properties: OfxInteractPropSuggestedColour: type: double dimension: 3 - OfxInteractPropViewportSize: + OfxInteractPropViewport: + cname: kOfxInteractPropViewportSize type: int dimension: 2 deprecated: "1.3" - OfxOpenGLPropPixelDepth: type: enum dimension: 0 values: - - OfxBitDepthNone - - OfxBitDepthByte - - OfxBitDepthShort - - OfxBitDepthHalf - - OfxBitDepthFloat + - OfxBitDepthNone + - OfxBitDepthByte + - OfxBitDepthShort + - OfxBitDepthHalf + - OfxBitDepthFloat OfxParamHostPropMaxPages: type: int dimension: 1 @@ -1134,8 +1051,6 @@ properties: OfxParamHostPropSupportsStringAnimation: type: bool dimension: 1 - - # Param OfxParamPropAnimates: type: bool @@ -1144,9 +1059,9 @@ properties: type: enum dimension: 1 values: - - OfxParamInvalidateValueChange - - OfxParamInvalidateValueChangeToEnd - - OfxParamInvalidateAll + - OfxParamInvalidateValueChange + - OfxParamInvalidateValueChangeToEnd + - OfxParamInvalidateAll OfxParamPropCanUndo: type: bool dimension: 1 @@ -1160,7 +1075,8 @@ properties: OfxParamPropChoiceOrder: type: int dimension: 0 - OfxParamPropCustomInterpCallbackV1: + OfxParamPropCustomCallbackV1: + cname: kOfxParamPropCustomInterpCallbackV1 type: pointer dimension: 1 OfxParamPropCustomValue: @@ -1277,13 +1193,14 @@ properties: type: enum dimension: 1 values: - - OfxParamStringIsSingleLine - - OfxParamStringIsMultiLine - - OfxParamStringIsFilePath - - OfxParamStringIsDirectoryPath - - OfxParamStringIsLabel - - OfxParamStringIsRichTextFormat - OfxParamPropUseHostOverlayHandle: + - OfxParamStringIsSingleLine + - OfxParamStringIsMultiLine + - OfxParamStringIsFilePath + - OfxParamStringIsDirectoryPath + - OfxParamStringIsLabel + - OfxParamStringIsRichTextFormat + kOfxParamPropUseHostOverlayHandle: + cname: kOfxParamPropUseHostOverlayHandle type: bool dimension: 1 OfxParamPropStringFilePathExists: @@ -1296,9 +1213,9 @@ properties: type: enum dimension: 1 values: - - OfxChangeUserEdited - - OfxChangePluginEdited - - OfxChangeTime + - OfxChangeUserEdited + - OfxChangePluginEdited + - OfxChangeTime OfxPropEffectInstance: type: pointer dimension: 1 @@ -1311,10 +1228,12 @@ properties: OfxPropIsInteractive: type: bool dimension: 1 - OfxPropKeyString: + kOfxPropKeyString: + cname: kOfxPropKeyString type: string dimension: 1 - OfxPropKeySym: + kOfxPropKeySym: + cname: kOfxPropKeySym type: int dimension: 1 OfxPropParamSetNeedsSyncing: diff --git a/scripts/gen-props.py b/scripts/gen-props.py index a51a12840..7e2d343b1 100644 --- a/scripts/gen-props.py +++ b/scripts/gen-props.py @@ -115,6 +115,25 @@ def expand_set_props(props_by_set): 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. @@ -122,14 +141,14 @@ def find_missing(all_props, props_metadata): Returns 0 if no errors. """ errs = 0 - for p in sorted(all_props): # constants, with "k" prefix - assert(p.startswith("k")) - stringval = p[1:] + 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): - if "k"+p not in all_props: + 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: @@ -249,11 +268,13 @@ def gen_props_metadata(props_metadata, outfile_path: Path): except Exception as e: logging.error(f"Error: {p} is missing metadata? {e}") raise(e) - outfile.write("};\n") + 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): - outfile.write(f"static_assert(std::string_view(\"{p}\") == std::string_view(k{p}));\n") + 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") From 46c92869e65abeefaad3a1f0edba8c28c8c73db3 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 3 Sep 2024 14:31:57 -0400 Subject: [PATCH 10/14] Make all generated objects static inline, clean up Replaced a vector with a std::array for reduced memory & startup time. Also add static_assert checks for all action names vs. their #defines. Signed-off-by: Gary Oberbrunner --- Support/include/ofxPropsBySet.h | 42 +++++++++++++++++++++++++----- Support/include/ofxPropsMetadata.h | 4 +-- include/ofx-props.yml | 20 +++++++------- scripts/gen-props.py | 24 ++++++++++++----- 4 files changed, 66 insertions(+), 24 deletions(-) diff --git a/Support/include/ofxPropsBySet.h b/Support/include/ofxPropsBySet.h index c5fdc32b6..ea4e68364 100644 --- a/Support/include/ofxPropsBySet.h +++ b/Support/include/ofxPropsBySet.h @@ -18,7 +18,7 @@ namespace OpenFX { // Properties for property sets -const std::map> prop_sets { +static inline const std::map> prop_sets { { "ClipDescriptor", { "OfxImageClipPropFieldExtraction", "OfxImageClipPropIsMask", "OfxImageClipPropOptional", @@ -538,16 +538,13 @@ const std::map> prop_sets { }; // Actions -const std::array actions { +static inline const std::array actions { "CustomParamInterpFunc", "OfxActionBeginInstanceChanged", "OfxActionBeginInstanceEdit", "OfxActionCreateInstance", - "OfxActionCreateInstanceInteract", "OfxActionDescribe", - "OfxActionDescribeInteract", "OfxActionDestroyInstance", - "OfxActionDestroyInstanceInteract", "OfxActionEndInstanceChanged", "OfxActionEndInstanceEdit", "OfxActionInstanceChanged", @@ -577,7 +574,7 @@ const std::array actions { }; // Properties for action args -const std::map, std::vector> action_props { +static inline const std::map, std::vector> action_props { { { "CustomParamInterpFunc", "inArgs" }, { "OfxParamPropCustomValue", "OfxParamPropInterpolationAmount", "OfxParamPropInterpolationTime" } }, @@ -729,4 +726,37 @@ const std::map, std::vector> action_pro "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("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 index 0dbd32cda..55d4a07fe 100644 --- a/Support/include/ofxPropsMetadata.h +++ b/Support/include/ofxPropsMetadata.h @@ -32,7 +32,7 @@ struct PropsMetadata { std::vector values; // for enums }; -const std::vector props_metadata { +static inline const std::array props_metadata { { { "OfxImageClipPropColourspace", {PropType::String}, 1, {} }, { "OfxImageClipPropConnected", {PropType::Bool}, 1, {} }, { "OfxImageClipPropContinuousSamples", {PropType::Bool}, 1, {} }, @@ -212,7 +212,7 @@ const std::vector props_metadata { { "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)); diff --git a/include/ofx-props.yml b/include/ofx-props.yml index d0492226f..9f40f8d9f 100644 --- a/include/ofx-props.yml +++ b/include/ofx-props.yml @@ -438,15 +438,17 @@ propertySets: inArgs: - OfxImageEffectPropContext outArgs: - OfxActionDescribeInteract: - inArgs: - outArgs: - OfxActionCreateInstanceInteract: - inArgs: - outArgs: - OfxActionDestroyInstanceInteract: - inArgs: - 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 diff --git a/scripts/gen-props.py b/scripts/gen-props.py index 7e2d343b1..014db2bde 100644 --- a/scripts/gen-props.py +++ b/scripts/gen-props.py @@ -245,7 +245,8 @@ def gen_props_metadata(props_metadata, outfile_path: Path): }; """) - outfile.write("const std::vector props_metadata {\n") + 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] @@ -268,7 +269,7 @@ def gen_props_metadata(props_metadata, outfile_path: Path): except Exception as e: logging.error(f"Error: {p} is missing metadata? {e}") raise(e) - outfile.write("};\n\n") + 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") @@ -302,7 +303,7 @@ def gen_props_by_set(props_by_set, outfile_path: Path): namespace OpenFX { """) outfile.write("// Properties for property sets\n") - outfile.write("const std::map> prop_sets {\n") + outfile.write("static inline const std::map> prop_sets {\n") for pset in sorted(props_by_set.keys()): if isinstance(props_by_set[pset], dict): continue @@ -314,15 +315,15 @@ def gen_props_by_set(props_by_set, outfile_path: Path): if isinstance(props_by_set[pset], dict)]) outfile.write("// Actions\n") - outfile.write(f"const std::array 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") # use string constant + outfile.write(f" {pset},\n") outfile.write("};\n\n") outfile.write("// Properties for action args\n") - outfile.write("const std::map, std::vector> action_props {\n") + outfile.write("static inline const std::map, std::vector> action_props {\n") for pset in actions: for subset in props_by_set[pset]: if not props_by_set[pset][subset]: @@ -334,7 +335,16 @@ def gen_props_by_set(props_by_set, outfile_path: Path): psetname = pset outfile.write(f"{{ {{ {psetname}, \"{subset}\" }}, {{ {propnames} }} }},\n") - outfile.write("};\n} // namespace OpenFX\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__)) From 2dd1eb75b5ba64023d45f08bfcdfa1ff4cb779ae Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 3 Sep 2024 14:39:15 -0400 Subject: [PATCH 11/14] Add "introduced" for new props in 1.5 Signed-off-by: Gary Oberbrunner --- include/ofx-props.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/include/ofx-props.yml b/include/ofx-props.yml index 9f40f8d9f..f6491457a 100644 --- a/include/ofx-props.yml +++ b/include/ofx-props.yml @@ -672,14 +672,17 @@ properties: 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 @@ -703,6 +706,7 @@ properties: OfxImageClipPropPreferredColourspaces: type: string dimension: 0 + introduced: "1.5" OfxImageClipPropUnmappedComponents: type: enum dimension: 1 @@ -774,6 +778,7 @@ properties: OfxImageEffectPropColourManagementAvailableConfigs: type: string dimension: 0 + introduced: "1.5" OfxImageEffectPropColourManagementStyle: type: enum dimension: 1 @@ -783,6 +788,7 @@ properties: - OfxImageEffectPropColourManagementCore - OfxImageEffectPropColourManagementFull - OfxImageEffectPropColourManagementOCIO + introduced: "1.5" OfxImageEffectPropComponents: type: enum dimension: 1 @@ -810,6 +816,7 @@ properties: OfxImageEffectPropDisplayColourspace: type: string dimension: 1 + introduced: "1.5" OfxImageEffectPropFieldToRender: type: enum dimension: 1 @@ -837,33 +844,42 @@ properties: 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 @@ -949,6 +965,7 @@ properties: OfxImageEffectPropColourManagementConfig: type: string dimension: 1 + introduced: "1.5" OfxImagePropBounds: type: int dimension: 4 @@ -1047,9 +1064,11 @@ properties: OfxParamHostPropSupportsStrChoice: type: bool dimension: 1 + introduced: "1.5" OfxParamHostPropSupportsStrChoiceAnimation: type: bool dimension: 1 + introduced: "1.5" OfxParamHostPropSupportsStringAnimation: type: bool dimension: 1 From 2da20f63586faf9ed7f5566f8e9b744edfef694e Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 3 Sep 2024 17:37:58 -0400 Subject: [PATCH 12/14] Add support for host/plugin write status in props_by_set Also separate out Actions from prop sets in ofx-props.yml, for cleanliness. Signed-off-by: Gary Oberbrunner --- Support/include/ofxPropsBySet.h | 1042 ++++++++++++++-------------- Support/include/ofxPropsMetadata.h | 26 +- include/ofx-props.yml | 524 ++++++++------ scripts/gen-props.py | 134 ++-- 4 files changed, 924 insertions(+), 802 deletions(-) diff --git a/Support/include/ofxPropsBySet.h b/Support/include/ofxPropsBySet.h index ea4e68364..c692e39c4 100644 --- a/Support/include/ofxPropsBySet.h +++ b/Support/include/ofxPropsBySet.h @@ -17,524 +17,532 @@ // #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", { "OfxImageClipPropFieldExtraction", - "OfxImageClipPropIsMask", - "OfxImageClipPropOptional", - "OfxImageEffectPropSupportedComponents", - "OfxImageEffectPropSupportsTiles", - "OfxImageEffectPropTemporalClipAccess", - "OfxPropLabel", - "OfxPropLongLabel", - "OfxPropName", - "OfxPropShortLabel", - "OfxPropType" } }, -{ "ClipInstance", { "OfxImageClipPropColourspace", - "OfxImageClipPropConnected", - "OfxImageClipPropContinuousSamples", - "OfxImageClipPropFieldExtraction", - "OfxImageClipPropFieldOrder", - "OfxImageClipPropIsMask", - "OfxImageClipPropOptional", - "OfxImageClipPropPreferredColourspaces", - "OfxImageClipPropUnmappedComponents", - "OfxImageClipPropUnmappedPixelDepth", - "OfxImageEffectPropComponents", - "OfxImageEffectPropFrameRange", - "OfxImageEffectPropFrameRate", - "OfxImageEffectPropPixelDepth", - "OfxImageEffectPropPreMultiplication", - "OfxImageEffectPropSupportedComponents", - "OfxImageEffectPropSupportsTiles", - "OfxImageEffectPropTemporalClipAccess", - "OfxImageEffectPropUnmappedFrameRange", - "OfxImageEffectPropUnmappedFrameRate", - "OfxImagePropPixelAspectRatio", - "OfxPropLabel", - "OfxPropLongLabel", - "OfxPropName", - "OfxPropShortLabel", - "OfxPropType" } }, -{ "EffectDescriptor", { "OfxImageEffectPluginPropFieldRenderTwiceAlways", - "OfxImageEffectPluginPropGrouping", - "OfxImageEffectPluginPropHostFrameThreading", - "OfxImageEffectPluginPropOverlayInteractV1", - "OfxImageEffectPluginPropOverlayInteractV2", - "OfxImageEffectPluginPropSingleInstance", - "OfxImageEffectPluginRenderThreadSafety", - "OfxImageEffectPluginRenderThreadSafety", - "OfxImageEffectPropClipPreferencesSlaveParam", - "OfxImageEffectPropColourManagementAvailableConfigs", - "OfxImageEffectPropColourManagementStyle", - "OfxImageEffectPropMultipleClipDepths", - "OfxImageEffectPropOpenGLRenderSupported", - "OfxImageEffectPropSupportedContexts", - "OfxImageEffectPropSupportedPixelDepths", - "OfxImageEffectPropSupportsMultiResolution", - "OfxImageEffectPropSupportsMultipleClipPARs", - "OfxImageEffectPropSupportsTiles", - "OfxImageEffectPropTemporalClipAccess", - "OfxOpenGLPropPixelDepth", - "OfxPluginPropFilePath", - "OfxPropLabel", - "OfxPropLongLabel", - "OfxPropPluginDescription", - "OfxPropShortLabel", - "OfxPropType", - "OfxPropVersion", - "OfxPropVersionLabel" } }, -{ "EffectInstance", { "OfxImageEffectInstancePropEffectDuration", - "OfxImageEffectInstancePropSequentialRender", - "OfxImageEffectPropColourManagementConfig", - "OfxImageEffectPropColourManagementStyle", - "OfxImageEffectPropContext", - "OfxImageEffectPropDisplayColourspace", - "OfxImageEffectPropFrameRate", - "OfxImageEffectPropOCIOConfig", - "OfxImageEffectPropOCIODisplay", - "OfxImageEffectPropOCIOView", - "OfxImageEffectPropOpenGLRenderSupported", - "OfxImageEffectPropPixelAspectRatio", - "OfxImageEffectPropPluginHandle", - "OfxImageEffectPropProjectExtent", - "OfxImageEffectPropProjectOffset", - "OfxImageEffectPropProjectSize", - "OfxImageEffectPropSupportsTiles", - "OfxPropInstanceData", - "OfxPropIsInteractive", - "OfxPropType" } }, -{ "Image", { "OfxImageEffectPropComponents", - "OfxImageEffectPropPixelDepth", - "OfxImageEffectPropPreMultiplication", - "OfxImageEffectPropRenderScale", - "OfxImagePropBounds", - "OfxImagePropData", - "OfxImagePropField", - "OfxImagePropPixelAspectRatio", - "OfxImagePropRegionOfDefinition", - "OfxImagePropRowBytes", - "OfxImagePropUniqueIdentifier", - "OfxPropType" } }, -{ "ImageEffectHost", { "OfxImageEffectHostPropIsBackground", - "OfxImageEffectHostPropNativeOrigin", - "OfxImageEffectInstancePropSequentialRender", - "OfxImageEffectPropColourManagementAvailableConfigs", - "OfxImageEffectPropColourManagementStyle", - "OfxImageEffectPropMultipleClipDepths", - "OfxImageEffectPropOpenGLRenderSupported", - "OfxImageEffectPropRenderQualityDraft", - "OfxImageEffectPropSetableFielding", - "OfxImageEffectPropSetableFrameRate", - "OfxImageEffectPropSupportedComponents", - "OfxImageEffectPropSupportedContexts", - "OfxImageEffectPropSupportsMultiResolution", - "OfxImageEffectPropSupportsMultipleClipPARs", - "OfxImageEffectPropSupportsOverlays", - "OfxImageEffectPropSupportsTiles", - "OfxImageEffectPropTemporalClipAccess", - "OfxParamHostPropMaxPages", - "OfxParamHostPropMaxParameters", - "OfxParamHostPropPageRowColumnCount", - "OfxParamHostPropSupportsBooleanAnimation", - "OfxParamHostPropSupportsChoiceAnimation", - "OfxParamHostPropSupportsCustomAnimation", - "OfxParamHostPropSupportsCustomInteract", - "OfxParamHostPropSupportsParametricAnimation", - "OfxParamHostPropSupportsStrChoice", - "OfxParamHostPropSupportsStrChoiceAnimation", - "OfxParamHostPropSupportsStringAnimation", - "OfxPropAPIVersion", - "OfxPropHostOSHandle", - "OfxPropLabel", - "OfxPropName", - "OfxPropType", - "OfxPropVersion", - "OfxPropVersionLabel" } }, -{ "InteractDescriptor", { "OfxInteractPropBitDepth", - "OfxInteractPropHasAlpha" } }, -{ "InteractInstance", { "OfxInteractPropBackgroundColour", - "OfxInteractPropBitDepth", - "OfxInteractPropHasAlpha", - "OfxInteractPropPixelScale", - "OfxInteractPropSlaveToParam", - "OfxInteractPropSuggestedColour", - "OfxPropEffectInstance", - "OfxPropInstanceData" } }, -{ "ParamDouble1D", { "OfxParamPropAnimates", - "OfxParamPropCacheInvalidation", - "OfxParamPropCanUndo", - "OfxParamPropDataPtr", - "OfxParamPropDefault", - "OfxParamPropDigits", - "OfxParamPropDisplayMax", - "OfxParamPropDisplayMin", - "OfxParamPropDoubleType", - "OfxParamPropEnabled", - "OfxParamPropEvaluateOnChange", - "OfxParamPropHasHostOverlayHandle", - "OfxParamPropHint", - "OfxParamPropIncrement", - "OfxParamPropInteractMinimumSize", - "OfxParamPropInteractPreferedSize", - "OfxParamPropInteractSize", - "OfxParamPropInteractSizeAspect", - "OfxParamPropInteractV1", - "OfxParamPropIsAnimating", - "OfxParamPropIsAutoKeying", - "OfxParamPropMax", - "OfxParamPropMin", - "OfxParamPropParent", - "OfxParamPropPersistant", - "OfxParamPropPluginMayWrite", - "OfxParamPropScriptName", - "OfxParamPropSecret", - "OfxParamPropShowTimeMarker", - "OfxParamPropType", - "OfxPropIcon", - "OfxPropLabel", - "OfxPropLongLabel", - "OfxPropName", - "OfxPropShortLabel", - "OfxPropType", - "kOfxParamPropUseHostOverlayHandle" } }, -{ "ParameterSet", { "OfxPluginPropParamPageOrder", - "OfxPropParamSetNeedsSyncing" } }, -{ "ParamsByte", { "OfxParamPropAnimates", - "OfxParamPropCacheInvalidation", - "OfxParamPropCanUndo", - "OfxParamPropDataPtr", - "OfxParamPropDefault", - "OfxParamPropDisplayMax", - "OfxParamPropDisplayMin", - "OfxParamPropEnabled", - "OfxParamPropEvaluateOnChange", - "OfxParamPropHasHostOverlayHandle", - "OfxParamPropHint", - "OfxParamPropInteractMinimumSize", - "OfxParamPropInteractPreferedSize", - "OfxParamPropInteractSize", - "OfxParamPropInteractSizeAspect", - "OfxParamPropInteractV1", - "OfxParamPropIsAnimating", - "OfxParamPropIsAutoKeying", - "OfxParamPropMax", - "OfxParamPropMin", - "OfxParamPropParent", - "OfxParamPropPersistant", - "OfxParamPropPluginMayWrite", - "OfxParamPropScriptName", - "OfxParamPropSecret", - "OfxParamPropType", - "OfxPropIcon", - "OfxPropLabel", - "OfxPropLongLabel", - "OfxPropName", - "OfxPropShortLabel", - "OfxPropType", - "kOfxParamPropUseHostOverlayHandle" } }, -{ "ParamsChoice", { "OfxParamPropAnimates", - "OfxParamPropCacheInvalidation", - "OfxParamPropCanUndo", - "OfxParamPropChoiceOption", - "OfxParamPropChoiceOrder", - "OfxParamPropDataPtr", - "OfxParamPropDefault", - "OfxParamPropEnabled", - "OfxParamPropEvaluateOnChange", - "OfxParamPropHasHostOverlayHandle", - "OfxParamPropHint", - "OfxParamPropInteractMinimumSize", - "OfxParamPropInteractPreferedSize", - "OfxParamPropInteractSize", - "OfxParamPropInteractSizeAspect", - "OfxParamPropInteractV1", - "OfxParamPropIsAnimating", - "OfxParamPropIsAutoKeying", - "OfxParamPropParent", - "OfxParamPropPersistant", - "OfxParamPropPluginMayWrite", - "OfxParamPropScriptName", - "OfxParamPropSecret", - "OfxParamPropType", - "OfxPropIcon", - "OfxPropLabel", - "OfxPropLongLabel", - "OfxPropName", - "OfxPropShortLabel", - "OfxPropType", - "kOfxParamPropUseHostOverlayHandle" } }, -{ "ParamsCustom", { "OfxParamPropAnimates", - "OfxParamPropCacheInvalidation", - "OfxParamPropCanUndo", - "OfxParamPropCustomCallbackV1", - "OfxParamPropDataPtr", - "OfxParamPropDefault", - "OfxParamPropEnabled", - "OfxParamPropEvaluateOnChange", - "OfxParamPropHasHostOverlayHandle", - "OfxParamPropHint", - "OfxParamPropInteractMinimumSize", - "OfxParamPropInteractPreferedSize", - "OfxParamPropInteractSize", - "OfxParamPropInteractSizeAspect", - "OfxParamPropInteractV1", - "OfxParamPropIsAnimating", - "OfxParamPropIsAutoKeying", - "OfxParamPropParent", - "OfxParamPropPersistant", - "OfxParamPropPluginMayWrite", - "OfxParamPropScriptName", - "OfxParamPropSecret", - "OfxParamPropType", - "OfxPropIcon", - "OfxPropLabel", - "OfxPropLongLabel", - "OfxPropName", - "OfxPropShortLabel", - "OfxPropType", - "kOfxParamPropUseHostOverlayHandle" } }, -{ "ParamsDouble2D3D", { "OfxParamPropAnimates", - "OfxParamPropCacheInvalidation", - "OfxParamPropCanUndo", - "OfxParamPropDataPtr", - "OfxParamPropDefault", - "OfxParamPropDigits", - "OfxParamPropDisplayMax", - "OfxParamPropDisplayMin", - "OfxParamPropDoubleType", - "OfxParamPropEnabled", - "OfxParamPropEvaluateOnChange", - "OfxParamPropHasHostOverlayHandle", - "OfxParamPropHint", - "OfxParamPropIncrement", - "OfxParamPropInteractMinimumSize", - "OfxParamPropInteractPreferedSize", - "OfxParamPropInteractSize", - "OfxParamPropInteractSizeAspect", - "OfxParamPropInteractV1", - "OfxParamPropIsAnimating", - "OfxParamPropIsAutoKeying", - "OfxParamPropMax", - "OfxParamPropMin", - "OfxParamPropParent", - "OfxParamPropPersistant", - "OfxParamPropPluginMayWrite", - "OfxParamPropScriptName", - "OfxParamPropSecret", - "OfxParamPropType", - "OfxPropIcon", - "OfxPropLabel", - "OfxPropLongLabel", - "OfxPropName", - "OfxPropShortLabel", - "OfxPropType", - "kOfxParamPropUseHostOverlayHandle" } }, -{ "ParamsGroup", { "OfxParamPropDataPtr", - "OfxParamPropEnabled", - "OfxParamPropGroupOpen", - "OfxParamPropHint", - "OfxParamPropParent", - "OfxParamPropScriptName", - "OfxParamPropSecret", - "OfxParamPropType", - "OfxPropIcon", - "OfxPropLabel", - "OfxPropLongLabel", - "OfxPropName", - "OfxPropShortLabel", - "OfxPropType" } }, -{ "ParamsInt2D3D", { "OfxParamPropAnimates", - "OfxParamPropCacheInvalidation", - "OfxParamPropCanUndo", - "OfxParamPropDataPtr", - "OfxParamPropDefault", - "OfxParamPropDimensionLabel", - "OfxParamPropDisplayMax", - "OfxParamPropDisplayMin", - "OfxParamPropEnabled", - "OfxParamPropEvaluateOnChange", - "OfxParamPropHasHostOverlayHandle", - "OfxParamPropHint", - "OfxParamPropInteractMinimumSize", - "OfxParamPropInteractPreferedSize", - "OfxParamPropInteractSize", - "OfxParamPropInteractSizeAspect", - "OfxParamPropInteractV1", - "OfxParamPropIsAnimating", - "OfxParamPropIsAutoKeying", - "OfxParamPropMax", - "OfxParamPropMin", - "OfxParamPropParent", - "OfxParamPropPersistant", - "OfxParamPropPluginMayWrite", - "OfxParamPropScriptName", - "OfxParamPropSecret", - "OfxParamPropType", - "OfxPropIcon", - "OfxPropLabel", - "OfxPropLongLabel", - "OfxPropName", - "OfxPropShortLabel", - "OfxPropType", - "kOfxParamPropUseHostOverlayHandle" } }, -{ "ParamsNormalizedSpatial", { "OfxParamPropAnimates", - "OfxParamPropCacheInvalidation", - "OfxParamPropCanUndo", - "OfxParamPropDataPtr", - "OfxParamPropDefault", - "OfxParamPropDefaultCoordinateSystem", - "OfxParamPropDigits", - "OfxParamPropDisplayMax", - "OfxParamPropDisplayMin", - "OfxParamPropEnabled", - "OfxParamPropEvaluateOnChange", - "OfxParamPropHasHostOverlayHandle", - "OfxParamPropHint", - "OfxParamPropIncrement", - "OfxParamPropInteractMinimumSize", - "OfxParamPropInteractPreferedSize", - "OfxParamPropInteractSize", - "OfxParamPropInteractSizeAspect", - "OfxParamPropInteractV1", - "OfxParamPropIsAnimating", - "OfxParamPropIsAutoKeying", - "OfxParamPropMax", - "OfxParamPropMin", - "OfxParamPropParent", - "OfxParamPropPersistant", - "OfxParamPropPluginMayWrite", - "OfxParamPropScriptName", - "OfxParamPropSecret", - "OfxParamPropType", - "OfxPropIcon", - "OfxPropLabel", - "OfxPropLongLabel", - "OfxPropName", - "OfxPropShortLabel", - "OfxPropType", - "kOfxParamPropUseHostOverlayHandle" } }, -{ "ParamsPage", { "OfxParamPropDataPtr", - "OfxParamPropEnabled", - "OfxParamPropHint", - "OfxParamPropPageChild", - "OfxParamPropParent", - "OfxParamPropScriptName", - "OfxParamPropSecret", - "OfxParamPropType", - "OfxPropIcon", - "OfxPropLabel", - "OfxPropLongLabel", - "OfxPropName", - "OfxPropShortLabel", - "OfxPropType" } }, -{ "ParamsParametric", { "OfxParamPropAnimates", - "OfxParamPropAnimates", - "OfxParamPropCacheInvalidation", - "OfxParamPropCacheInvalidation", - "OfxParamPropCanUndo", - "OfxParamPropCanUndo", - "OfxParamPropDataPtr", - "OfxParamPropDefault", - "OfxParamPropEnabled", - "OfxParamPropEvaluateOnChange", - "OfxParamPropEvaluateOnChange", - "OfxParamPropHasHostOverlayHandle", - "OfxParamPropHint", - "OfxParamPropInteractMinimumSize", - "OfxParamPropInteractPreferedSize", - "OfxParamPropInteractSize", - "OfxParamPropInteractSizeAspect", - "OfxParamPropInteractV1", - "OfxParamPropIsAnimating", - "OfxParamPropIsAnimating", - "OfxParamPropIsAutoKeying", - "OfxParamPropIsAutoKeying", - "OfxParamPropParametricDimension", - "OfxParamPropParametricInteractBackground", - "OfxParamPropParametricRange", - "OfxParamPropParametricUIColour", - "OfxParamPropParent", - "OfxParamPropPersistant", - "OfxParamPropPersistant", - "OfxParamPropPluginMayWrite", - "OfxParamPropPluginMayWrite", - "OfxParamPropScriptName", - "OfxParamPropSecret", - "OfxParamPropType", - "OfxPropIcon", - "OfxPropLabel", - "OfxPropLongLabel", - "OfxPropName", - "OfxPropShortLabel", - "OfxPropType", - "kOfxParamPropUseHostOverlayHandle" } }, -{ "ParamsStrChoice", { "OfxParamPropAnimates", - "OfxParamPropCacheInvalidation", - "OfxParamPropCanUndo", - "OfxParamPropChoiceEnum", - "OfxParamPropChoiceOption", - "OfxParamPropDataPtr", - "OfxParamPropDefault", - "OfxParamPropEnabled", - "OfxParamPropEvaluateOnChange", - "OfxParamPropHasHostOverlayHandle", - "OfxParamPropHint", - "OfxParamPropInteractMinimumSize", - "OfxParamPropInteractPreferedSize", - "OfxParamPropInteractSize", - "OfxParamPropInteractSizeAspect", - "OfxParamPropInteractV1", - "OfxParamPropIsAnimating", - "OfxParamPropIsAutoKeying", - "OfxParamPropParent", - "OfxParamPropPersistant", - "OfxParamPropPluginMayWrite", - "OfxParamPropScriptName", - "OfxParamPropSecret", - "OfxParamPropType", - "OfxPropIcon", - "OfxPropLabel", - "OfxPropLongLabel", - "OfxPropName", - "OfxPropShortLabel", - "OfxPropType", - "kOfxParamPropUseHostOverlayHandle" } }, -{ "ParamsString", { "OfxParamPropAnimates", - "OfxParamPropCacheInvalidation", - "OfxParamPropCanUndo", - "OfxParamPropDataPtr", - "OfxParamPropDefault", - "OfxParamPropDisplayMax", - "OfxParamPropDisplayMin", - "OfxParamPropEnabled", - "OfxParamPropEvaluateOnChange", - "OfxParamPropHasHostOverlayHandle", - "OfxParamPropHint", - "OfxParamPropInteractMinimumSize", - "OfxParamPropInteractPreferedSize", - "OfxParamPropInteractSize", - "OfxParamPropInteractSizeAspect", - "OfxParamPropInteractV1", - "OfxParamPropIsAnimating", - "OfxParamPropIsAutoKeying", - "OfxParamPropMax", - "OfxParamPropMin", - "OfxParamPropParent", - "OfxParamPropPersistant", - "OfxParamPropPluginMayWrite", - "OfxParamPropScriptName", - "OfxParamPropSecret", - "OfxParamPropStringFilePathExists", - "OfxParamPropStringMode", - "OfxParamPropType", - "OfxPropIcon", - "OfxPropLabel", - "OfxPropLongLabel", - "OfxPropName", - "OfxPropShortLabel", - "OfxPropType", - "kOfxParamPropUseHostOverlayHandle" } }, +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 diff --git a/Support/include/ofxPropsMetadata.h b/Support/include/ofxPropsMetadata.h index 55d4a07fe..2ac098d66 100644 --- a/Support/include/ofxPropsMetadata.h +++ b/Support/include/ofxPropsMetadata.h @@ -47,14 +47,14 @@ static inline const std::array props_metadata { { { "OfxImageEffectHostPropIsBackground", {PropType::Bool}, 1, {} }, { "OfxImageEffectHostPropNativeOrigin", {PropType::Enum}, 1, {"OfxImageEffectHostPropNativeOriginBottomLeft","OfxImageEffectHostPropNativeOriginTopLeft","OfxImageEffectHostPropNativeOriginCenter"} }, { "OfxImageEffectInstancePropEffectDuration", {PropType::Double}, 1, {} }, -{ "OfxImageEffectInstancePropSequentialRender", {PropType::Int}, 1, {} }, -{ "OfxImageEffectPluginPropFieldRenderTwiceAlways", {PropType::Int}, 1, {} }, +{ "OfxImageEffectInstancePropSequentialRender", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPluginPropFieldRenderTwiceAlways", {PropType::Bool}, 1, {} }, { "OfxImageEffectPluginPropGrouping", {PropType::String}, 1, {} }, -{ "OfxImageEffectPluginPropHostFrameThreading", {PropType::Int}, 1, {} }, +{ "OfxImageEffectPluginPropHostFrameThreading", {PropType::Bool}, 1, {} }, { "OfxImageEffectPluginPropOverlayInteractV1", {PropType::Pointer}, 1, {} }, { "OfxImageEffectPluginPropOverlayInteractV2", {PropType::Pointer}, 1, {} }, -{ "OfxImageEffectPluginPropSingleInstance", {PropType::Int}, 1, {} }, -{ "OfxImageEffectPluginRenderThreadSafety", {PropType::String}, 1, {} }, +{ "OfxImageEffectPluginPropSingleInstance", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPluginRenderThreadSafety", {PropType::Enum}, 1, {"OfxImageEffectRenderUnsafe","OfxImageEffectRenderInstanceSafe","OfxImageEffectRenderFullySafe"} }, { "OfxImageEffectPropClipPreferencesSlaveParam", {PropType::String}, 0, {} }, { "OfxImageEffectPropColourManagementAvailableConfigs", {PropType::String}, 0, {} }, { "OfxImageEffectPropColourManagementConfig", {PropType::String}, 1, {} }, @@ -75,7 +75,7 @@ static inline const std::array props_metadata { { { "OfxImageEffectPropMetalCommandQueue", {PropType::Pointer}, 1, {} }, { "OfxImageEffectPropMetalEnabled", {PropType::Bool}, 1, {} }, { "OfxImageEffectPropMetalRenderSupported", {PropType::Enum}, 1, {"false","true","needed"} }, -{ "OfxImageEffectPropMultipleClipDepths", {PropType::Int}, 1, {} }, +{ "OfxImageEffectPropMultipleClipDepths", {PropType::Bool}, 1, {} }, { "OfxImageEffectPropOCIOConfig", {PropType::String}, 1, {} }, { "OfxImageEffectPropOCIODisplay", {PropType::String}, 1, {} }, { "OfxImageEffectPropOCIOView", {PropType::String}, 1, {} }, @@ -104,13 +104,13 @@ static inline const std::array props_metadata { { { "OfxImageEffectPropSetableFielding", {PropType::Bool}, 1, {} }, { "OfxImageEffectPropSetableFrameRate", {PropType::Bool}, 1, {} }, { "OfxImageEffectPropSupportedComponents", {PropType::Enum}, 0, {"OfxImageComponentNone","OfxImageComponentRGBA","OfxImageComponentRGB","OfxImageComponentAlpha"} }, -{ "OfxImageEffectPropSupportedContexts", {PropType::String}, 0, {} }, +{ "OfxImageEffectPropSupportedContexts", {PropType::Enum}, 0, {"OfxImageEffectContextGenerator","OfxImageEffectContextFilter","OfxImageEffectContextTransition","OfxImageEffectContextPaint","OfxImageEffectContextGeneral","OfxImageEffectContextRetimer"} }, { "OfxImageEffectPropSupportedPixelDepths", {PropType::String}, 0, {} }, -{ "OfxImageEffectPropSupportsMultiResolution", {PropType::Int}, 1, {} }, -{ "OfxImageEffectPropSupportsMultipleClipPARs", {PropType::Int}, 1, {} }, +{ "OfxImageEffectPropSupportsMultiResolution", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPropSupportsMultipleClipPARs", {PropType::Bool}, 1, {} }, { "OfxImageEffectPropSupportsOverlays", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectPropSupportsTiles", {PropType::Int}, 1, {} }, -{ "OfxImageEffectPropTemporalClipAccess", {PropType::Int}, 1, {} }, +{ "OfxImageEffectPropSupportsTiles", {PropType::Bool}, 1, {} }, +{ "OfxImageEffectPropTemporalClipAccess", {PropType::Bool}, 1, {} }, { "OfxImageEffectPropUnmappedFrameRange", {PropType::Double}, 2, {} }, { "OfxImageEffectPropUnmappedFrameRate", {PropType::Double}, 1, {} }, { "OfxImagePropBounds", {PropType::Int}, 4, {} }, @@ -182,8 +182,8 @@ static inline const std::array props_metadata { { { "OfxParamPropParametricRange", {PropType::Double}, 2, {} }, { "OfxParamPropParametricUIColour", {PropType::Double}, 0, {} }, { "OfxParamPropParent", {PropType::String}, 1, {} }, -{ "OfxParamPropPersistant", {PropType::Int}, 1, {} }, -{ "OfxParamPropPluginMayWrite", {PropType::Int}, 1, {} }, +{ "OfxParamPropPersistant", {PropType::Bool}, 1, {} }, +{ "OfxParamPropPluginMayWrite", {PropType::Bool}, 1, {} }, { "OfxParamPropScriptName", {PropType::String}, 1, {} }, { "OfxParamPropSecret", {PropType::Bool}, 1, {} }, { "OfxParamPropShowTimeMarker", {PropType::Bool}, 1, {} }, diff --git a/include/ofx-props.yml b/include/ofx-props.yml index f6491457a..7c50550ac 100644 --- a/include/ofx-props.yml +++ b/include/ofx-props.yml @@ -5,148 +5,173 @@ # 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: - - 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 + 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: - - 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 - - OfxOpenGLPropPixelDepth - - OfxImageEffectPluginPropOverlayInteractV2 - - OfxImageEffectPropColourManagementAvailableConfigs - - OfxImageEffectPropColourManagementStyle + 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: - - OfxPropType - - OfxImageEffectPropContext - - OfxPropInstanceData - - OfxImageEffectPropProjectSize - - OfxImageEffectPropProjectOffset - - OfxImageEffectPropProjectExtent - - OfxImageEffectPropPixelAspectRatio - - OfxImageEffectInstancePropEffectDuration - - OfxImageEffectInstancePropSequentialRender - - OfxImageEffectPropSupportsTiles - - OfxImageEffectPropOpenGLRenderSupported - - OfxImageEffectPropFrameRate - - OfxPropIsInteractive - - OfxImageEffectPropOCIOConfig - - OfxImageEffectPropOCIODisplay - - OfxImageEffectPropOCIOView - - OfxImageEffectPropColourManagementConfig - - OfxImageEffectPropColourManagementStyle - - OfxImageEffectPropDisplayColourspace - - OfxImageEffectPropPluginHandle + write: host + props: + - OfxPropType + - OfxImageEffectPropContext + - OfxPropInstanceData + - OfxImageEffectPropProjectSize + - OfxImageEffectPropProjectOffset + - OfxImageEffectPropProjectExtent + - OfxImageEffectPropPixelAspectRatio + - OfxImageEffectInstancePropEffectDuration + - OfxImageEffectInstancePropSequentialRender + - OfxImageEffectPropSupportsTiles + - OfxImageEffectPropOpenGLRenderSupported + - OfxImageEffectPropFrameRate + - OfxPropIsInteractive + - OfxImageEffectPropOCIOConfig + - OfxImageEffectPropOCIODisplay + - OfxImageEffectPropOCIOView + - OfxImageEffectPropColourManagementConfig + - OfxImageEffectPropColourManagementStyle + - OfxImageEffectPropDisplayColourspace + - OfxImageEffectPropPluginHandle ClipDescriptor: - - OfxPropType - - OfxPropName - - OfxPropLabel - - OfxPropShortLabel - - OfxPropLongLabel - - OfxImageEffectPropSupportedComponents - - OfxImageEffectPropTemporalClipAccess - - OfxImageClipPropOptional - - OfxImageClipPropFieldExtraction - - OfxImageClipPropIsMask - - OfxImageEffectPropSupportsTiles + write: plugin + props: + - OfxPropType + - OfxPropName + - OfxPropLabel + - OfxPropShortLabel + - OfxPropLongLabel + - OfxImageEffectPropSupportedComponents + - OfxImageEffectPropTemporalClipAccess + - OfxImageClipPropOptional + - OfxImageClipPropFieldExtraction + - OfxImageClipPropIsMask + - OfxImageEffectPropSupportsTiles ClipInstance: - - 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 + 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: - - OfxPropType - - OfxImageEffectPropPixelDepth - - OfxImageEffectPropComponents - - OfxImageEffectPropPreMultiplication - - OfxImageEffectPropRenderScale - - OfxImagePropPixelAspectRatio - - OfxImagePropData - - OfxImagePropBounds - - OfxImagePropRegionOfDefinition - - OfxImagePropRowBytes - - OfxImagePropField - - OfxImagePropUniqueIdentifier + write: host + props: + - OfxPropType + - OfxImageEffectPropPixelDepth + - OfxImageEffectPropComponents + - OfxImageEffectPropPreMultiplication + - OfxImageEffectPropRenderScale + - OfxImagePropPixelAspectRatio + - OfxImagePropData + - OfxImagePropBounds + - OfxImagePropRegionOfDefinition + - OfxImagePropRowBytes + - OfxImagePropField + - OfxImagePropUniqueIdentifier ParameterSet: - - OfxPropParamSetNeedsSyncing - - OfxPluginPropParamPageOrder + write: plugin + props: + - OfxPropParamSetNeedsSyncing + - OfxPluginPropParamPageOrder ParamsCommon_DEF: - OfxPropType - OfxPropName @@ -172,8 +197,8 @@ propertySets: ParamsValue_DEF: - OfxParamPropDefault - OfxParamPropAnimates - - OfxParamPropIsAnimating - - OfxParamPropIsAutoKeying + - OfxParamPropIsAnimating | write=host + - OfxParamPropIsAutoKeying | write=host - OfxParamPropPersistant - OfxParamPropEvaluateOnChange - OfxParamPropPluginMayWrite @@ -188,96 +213,126 @@ propertySets: - OfxParamPropIncrement - OfxParamPropDigits ParamsGroup: - - OfxParamPropGroupOpen - - ParamsCommon_REF + write: plugin + props: + - OfxParamPropGroupOpen + - ParamsCommon_REF ParamDouble1D: - - OfxParamPropShowTimeMarker - - OfxParamPropDoubleType - - ParamsCommon_REF - - ParamsAllButGroupPage_REF - - ParamsValue_REF - - ParamsNumeric_REF - - ParamsDouble_REF + write: plugin + props: + - OfxParamPropShowTimeMarker + - OfxParamPropDoubleType + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + - ParamsNumeric_REF + - ParamsDouble_REF ParamsDouble2D3D: - - OfxParamPropDoubleType - - ParamsCommon_REF - - ParamsAllButGroupPage_REF - - ParamsValue_REF - - ParamsNumeric_REF - - ParamsDouble_REF + write: plugin + props: + - OfxParamPropDoubleType + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + - ParamsNumeric_REF + - ParamsDouble_REF ParamsNormalizedSpatial: - - OfxParamPropDefaultCoordinateSystem - - ParamsCommon_REF - - ParamsAllButGroupPage_REF - - ParamsValue_REF - - ParamsNumeric_REF - - ParamsDouble_REF + write: plugin + props: + - OfxParamPropDefaultCoordinateSystem + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + - ParamsNumeric_REF + - ParamsDouble_REF ParamsInt2D3D: - - OfxParamPropDimensionLabel - - ParamsCommon_REF - - ParamsAllButGroupPage_REF - - ParamsValue_REF - - ParamsNumeric_REF + write: plugin + props: + - OfxParamPropDimensionLabel + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + - ParamsNumeric_REF ParamsString: - - OfxParamPropStringMode - - OfxParamPropStringFilePathExists - - ParamsCommon_REF - - ParamsAllButGroupPage_REF - - ParamsValue_REF - - ParamsNumeric_REF + write: plugin + props: + - OfxParamPropStringMode + - OfxParamPropStringFilePathExists + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + - ParamsNumeric_REF ParamsByte: - - ParamsCommon_REF - - ParamsAllButGroupPage_REF - - ParamsValue_REF - - ParamsNumeric_REF + write: plugin + props: + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF + - ParamsNumeric_REF ParamsChoice: - - OfxParamPropChoiceOption - - OfxParamPropChoiceOrder - - ParamsCommon_REF - - ParamsAllButGroupPage_REF - - ParamsValue_REF + write: plugin + props: + - OfxParamPropChoiceOption + - OfxParamPropChoiceOrder + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF ParamsStrChoice: - - OfxParamPropChoiceOption - - OfxParamPropChoiceEnum - - ParamsCommon_REF - - ParamsAllButGroupPage_REF - - ParamsValue_REF + write: plugin + props: + - OfxParamPropChoiceOption + - OfxParamPropChoiceEnum + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF ParamsCustom: - - OfxParamPropCustomCallbackV1 - - ParamsCommon_REF - - ParamsAllButGroupPage_REF - - ParamsValue_REF + write: plugin + props: + - OfxParamPropCustomCallbackV1 + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF ParamsPage: - - OfxParamPropPageChild - - ParamsCommon_REF + write: plugin + props: + - OfxParamPropPageChild + - ParamsCommon_REF ParamsParametric: - - OfxParamPropAnimates - - OfxParamPropIsAnimating - - OfxParamPropIsAutoKeying - - OfxParamPropPersistant - - OfxParamPropEvaluateOnChange - - OfxParamPropPluginMayWrite - - OfxParamPropCacheInvalidation - - OfxParamPropCanUndo - - OfxParamPropParametricDimension - - OfxParamPropParametricUIColour - - OfxParamPropParametricInteractBackground - - OfxParamPropParametricRange - - ParamsCommon_REF - - ParamsAllButGroupPage_REF - - ParamsValue_REF + write: plugin + props: + - OfxParamPropAnimates + - OfxParamPropIsAnimating + - OfxParamPropIsAutoKeying + - OfxParamPropPersistant + - OfxParamPropEvaluateOnChange + - OfxParamPropPluginMayWrite + - OfxParamPropCacheInvalidation + - OfxParamPropCanUndo + - OfxParamPropParametricDimension + - OfxParamPropParametricUIColour + - OfxParamPropParametricInteractBackground + - OfxParamPropParametricRange + - ParamsCommon_REF + - ParamsAllButGroupPage_REF + - ParamsValue_REF InteractDescriptor: - - OfxInteractPropHasAlpha - - OfxInteractPropBitDepth + write: host + props: + - OfxInteractPropHasAlpha + - OfxInteractPropBitDepth InteractInstance: - - OfxPropEffectInstance - - OfxPropInstanceData - - OfxInteractPropPixelScale - - OfxInteractPropBackgroundColour - - OfxInteractPropHasAlpha - - OfxInteractPropBitDepth - - OfxInteractPropSlaveToParam - - OfxInteractPropSuggestedColour + write: host + props: + - OfxPropEffectInstance + - OfxPropInstanceData + - OfxInteractPropPixelScale + - OfxInteractPropBackgroundColour + - OfxInteractPropHasAlpha + - OfxInteractPropBitDepth + - OfxInteractPropSlaveToParam + - OfxInteractPropSuggestedColour + +Actions: OfxActionLoad: inArgs: outArgs: @@ -610,47 +665,64 @@ properties: type: string dimension: 1 OfxImageEffectPropSupportedContexts: - type: string + type: enum dimension: 0 + values: + - OfxImageEffectContextGenerator + - OfxImageEffectContextFilter + - OfxImageEffectContextTransition + - OfxImageEffectContextPaint + - OfxImageEffectContextGeneral + - OfxImageEffectContextRetimer OfxImageEffectPluginPropGrouping: type: string dimension: 1 OfxImageEffectPluginPropSingleInstance: - type: int + type: bool dimension: 1 OfxImageEffectPluginRenderThreadSafety: - type: string + type: enum dimension: 1 + values: + - OfxImageEffectRenderUnsafe + - OfxImageEffectRenderInstanceSafe + - OfxImageEffectRenderFullySafe OfxImageEffectPluginPropHostFrameThreading: - type: int + type: bool dimension: 1 OfxImageEffectPropSupportsMultiResolution: - type: int + type: bool dimension: 1 OfxImageEffectPropSupportsTiles: - type: int + type: bool dimension: 1 OfxImageEffectPropTemporalClipAccess: - type: int + type: bool dimension: 1 OfxImageEffectPropSupportedPixelDepths: type: string dimension: 0 + values: + - OfxBitDepthNone + - OfxBitDepthByte + - OfxBitDepthShort + - OfxBitDepthHalf + - OfxBitDepthFloat OfxImageEffectPluginPropFieldRenderTwiceAlways: - type: int + type: bool dimension: 1 OfxImageEffectPropMultipleClipDepths: cname: kOfxImageEffectPropSupportsMultipleClipDepths - type: int + type: bool dimension: 1 OfxImageEffectPropSupportsMultipleClipPARs: - type: int + type: bool dimension: 1 OfxImageEffectPropClipPreferencesSlaveParam: type: string dimension: 0 OfxImageEffectInstancePropSequentialRender: - type: int + type: bool dimension: 1 OfxPluginPropFilePath: type: enum @@ -1201,10 +1273,10 @@ properties: type: double dimension: 0 OfxParamPropPersistant: - type: int + type: bool dimension: 1 OfxParamPropPluginMayWrite: - type: int + type: bool dimension: 1 deprecated: "1.4" OfxParamPropShowTimeMarker: diff --git a/scripts/gen-props.py b/scripts/gen-props.py index 014db2bde..46ad62fd4 100644 --- a/scripts/gen-props.py +++ b/scripts/gen-props.py @@ -2,6 +2,8 @@ # SPDX-License-Identifier: BSD-3-Clause import os +import re +import sys import difflib import argparse import yaml @@ -108,10 +110,10 @@ def expand_set_props(props_by_set): else: sets[key] = value for key in sets: - if isinstance(sets[key], dict): + if not sets[key].get('props'): pass # do nothing, no expansion needed in inArgs/outArgs for now else: - sets[key] = [item for element in sets[key] \ + sets[key]['props'] = [item for element in sets[key]['props'] \ for item in get_def(element, defs)] return sets @@ -156,7 +158,40 @@ def find_missing(all_props, props_metadata): errs += 1 return errs -def check_props_by_set(props_by_set, props_metadata): +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 @@ -165,25 +200,23 @@ def check_props_by_set(props_by_set, props_metadata): """ 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 - # regular property sets, the value is a list of props. - if isinstance(props_by_set[pset], dict): - for subset in sorted(props_by_set[pset]): - if not props_by_set[pset][subset]: - continue - for p in props_by_set[pset][subset]: - if not props_metadata.get(p): - logging.error(f"No props metadata found for {pset}.{subset}.{p}") - errs += 1 - else: - for p in props_by_set[pset]: - if not props_metadata.get(p): - logging.error(f"No props metadata found for {pset}.{p}") - errs += 1 + # (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_metadata): +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. @@ -193,16 +226,15 @@ def check_props_used_by_set(props_by_set, props_metadata): for prop in props_metadata: found = 0 for pset in props_by_set: - if isinstance(props_by_set[pset], dict): - # inArgs/outArgs - for subset in sorted(props_by_set[pset]): - if not props_by_set[pset][subset]: - continue - for set_prop in props_by_set[pset][subset]: - if set_prop == prop: - found += 1 - else: - for set_prop in props_by_set[pset]: + 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'): @@ -281,7 +313,7 @@ def gen_props_metadata(props_metadata, outfile_path: Path): -def gen_props_by_set(props_by_set, outfile_path: Path): +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) @@ -301,18 +333,29 @@ def gen_props_by_set(props_by_set, outfile_path: Path): // #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") + outfile.write("static inline const std::map> prop_sets {\n") + for pset in sorted(props_by_set.keys()): - if isinstance(props_by_set[pset], dict): - continue - propnames = ",\n ".join(sorted([f'"{p}"' for p in props_by_set[pset]])) - outfile.write(f"{{ \"{pset}\", {{ {propnames} }} }},\n") + 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([pset for pset in props_by_set.keys() - if isinstance(props_by_set[pset], dict)]) + actions = sorted(props_by_action.keys()) outfile.write("// Actions\n") outfile.write(f"static inline const std::array actions {{\n") @@ -325,10 +368,10 @@ def gen_props_by_set(props_by_set, outfile_path: Path): 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_set[pset]: - if not props_by_set[pset][subset]: + 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_set[pset][subset]])) + 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: @@ -345,7 +388,6 @@ def gen_props_by_set(props_by_set, outfile_path: Path): outfile.write("} // namespace OpenFX\n") - def main(args): script_dir = os.path.dirname(os.path.abspath(__file__)) include_dir = Path(script_dir).parent / 'include' @@ -354,8 +396,8 @@ def main(args): with open(include_dir / 'ofx-props.yml', 'r') as props_file: props_data = yaml.safe_load(props_file) - props_by_set = props_data['propertySets'] - props_by_set = expand_set_props(props_by_set) + props_by_set = expand_set_props(props_data['propertySets']) + props_by_action = props_data['Actions'] props_metadata = props_data['properties'] if args.verbose: @@ -366,13 +408,13 @@ def main(args): 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_metadata) + 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_metadata) + errs = check_props_used_by_set(props_by_set, props_by_action, props_metadata) if not errs and args.verbose: print(" ✔️ ALL OK") @@ -386,7 +428,7 @@ def main(args): if args.verbose: print(f"=== Generating props by set header {args.props_by_set}") - gen_props_by_set(props_by_set, support_include_dir / 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__)) From 4f995577677f3b48d6b4cbad36fd2a201ad7275f Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 3 Sep 2024 17:49:42 -0400 Subject: [PATCH 13/14] Use string_view instead of strings or char* in generated files Signed-off-by: Gary Oberbrunner --- Support/include/ofxPropsBySet.h | 2 +- Support/include/ofxPropsMetadata.h | 2 +- scripts/gen-props.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Support/include/ofxPropsBySet.h b/Support/include/ofxPropsBySet.h index c692e39c4..c60d6b0ca 100644 --- a/Support/include/ofxPropsBySet.h +++ b/Support/include/ofxPropsBySet.h @@ -582,7 +582,7 @@ static inline const std::array actions { }; // Properties for action args -static inline const std::map, std::vector> action_props { +static inline const std::map, std::vector> action_props { { { "CustomParamInterpFunc", "inArgs" }, { "OfxParamPropCustomValue", "OfxParamPropInterpolationAmount", "OfxParamPropInterpolationTime" } }, diff --git a/Support/include/ofxPropsMetadata.h b/Support/include/ofxPropsMetadata.h index 2ac098d66..b52d206eb 100644 --- a/Support/include/ofxPropsMetadata.h +++ b/Support/include/ofxPropsMetadata.h @@ -26,7 +26,7 @@ enum class PropType { }; struct PropsMetadata { - std::string name; + std::string_view name; std::vector types; int dimension; std::vector values; // for enums diff --git a/scripts/gen-props.py b/scripts/gen-props.py index 46ad62fd4..3caf9cbe9 100644 --- a/scripts/gen-props.py +++ b/scripts/gen-props.py @@ -270,7 +270,7 @@ def gen_props_metadata(props_metadata, outfile_path: Path): }; struct PropsMetadata { - std::string name; + std::string_view name; std::vector types; int dimension; std::vector values; // for enums @@ -366,7 +366,7 @@ def gen_props_by_set(props_by_set, props_by_action, outfile_path: Path): outfile.write("};\n\n") outfile.write("// Properties for action args\n") - outfile.write("static inline const std::map, std::vector> action_props {\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]: From eb16a8b701d7e583e10b98f17f750df718226cbb Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 1 Oct 2024 12:42:33 -0400 Subject: [PATCH 14/14] ofx-props.yml: Add GetOutputColourspace action Signed-off-by: Gary Oberbrunner --- Support/include/ofxPropsBySet.h | 6 +++++- include/ofx-props.yml | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Support/include/ofxPropsBySet.h b/Support/include/ofxPropsBySet.h index c60d6b0ca..d543d2535 100644 --- a/Support/include/ofxPropsBySet.h +++ b/Support/include/ofxPropsBySet.h @@ -546,7 +546,7 @@ static inline const std::map> prop_sets { }; // Actions -static inline const std::array actions { +static inline const std::array actions { "CustomParamInterpFunc", "OfxActionBeginInstanceChanged", "OfxActionBeginInstanceEdit", @@ -565,6 +565,7 @@ static inline const std::array actions { "OfxImageEffectActionEndSequenceRender", "OfxImageEffectActionGetClipPreferences", "OfxImageEffectActionGetFramesNeeded", + "OfxImageEffectActionGetOutputColourspace", "OfxImageEffectActionGetRegionOfDefinition", "OfxImageEffectActionGetRegionsOfInterest", "OfxImageEffectActionGetTimeDomain", @@ -647,6 +648,8 @@ static inline const std::map, std::vector