From bd5d282dd3b492fc812ae529145786ef92079f07 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 27 Aug 2024 17:34:16 -0400 Subject: [PATCH 01/33] 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 | 8 + include/ofx-props.yml | 1225 +++++++++++++++++ include/ofxInteract.h | 2 +- include/ofxKeySyms.h | 2 +- include/ofxParam.h | 2 +- scripts/gen-props.py | 292 ++++ 8 files changed, 1587 insertions(+), 43 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 08740692..9cfe889e 100755 --- a/Documentation/build.sh +++ b/Documentation/build.sh @@ -41,7 +41,7 @@ $UV_RUN python genPropertiesReference.py \ > /tmp/ofx-doc-build.out 2>&1 grep -v -E "$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 7c1dce05..be0dd781 100755 --- a/Documentation/genPropertiesReference.py +++ b/Documentation/genPropertiesReference.py @@ -4,67 +4,86 @@ badlyNamedProperties = ["kOfxImageEffectFrameVarying", "kOfxImageEffectPluginRenderThreadSafety"] -def getPropertiesFromDir(sourcePath, recursive, props): +def getPropertiesFromFile(path): + """Get all OpenFX property definitions from C header file. - if os.path.isdir(sourcePath): - files=sorted(os.listdir(sourcePath)) - for f in files: - absF = sourcePath + '/' + f - if not recursive and os.path.isdir(absF): + Uses a heuristic to identify property #define lines: + anything starting with '#define' and containing 'Prop' in the name. + """ + props = set() + with open(path) as f: + try: + lines = f.readlines() + except UnicodeDecodeError as e: + logging.error(f'error reading {path}: {e}') + raise e + for l in lines: + # Detect lines that correspond to a property definition, e.g: + # #define kOfxPropLala "OfxPropLala" + splits=l.split() + if len(splits) < 3: continue - else: - getPropertiesFromDir(absF,recursive,props) - elif os.path.isfile(sourcePath): - ext = os.path.splitext(sourcePath)[1] - if ext.lower() in ('.c', '.cxx', '.cpp', '.h', '.hxx', '.hpp'): - with open(sourcePath) as f: - try: - lines = f.readlines() - except UnicodeDecodeError as e: - print('WARNING: error in', sourcePath, ':') - raise e - for l in lines: - # Detect lines that correspond to a property definition, e.g: - # #define kOfxPropLala "OfxPropLala" - splits=l.split(' ') - if len(splits) != 3: - continue - if splits[0] != '#define': - continue - if 'Prop' in splits[1] and splits[1] != 'kOfxPropertySuite': - #if l.startswith('#define kOfx') and 'Prop' in l: - props.append(splits[1]) - else: - raise ValueError('No such file or directory: %s' % sourcePath) + if splits[0] != '#define': + continue + # ignore these + nonProperties = ('kOfxPropertySuite', + # prop values, not props + 'kOfxImageEffectPropColourManagementNone', + 'kOfxImageEffectPropColourManagementBasic', + 'kOfxImageEffectPropColourManagementCore', + 'kOfxImageEffectPropColourManagementFull', + 'kOfxImageEffectPropColourManagementOCIO', + ) + if splits[1] in nonProperties: + continue + # these are props, as well as anything with Prop in the name + badlyNamedProperties = ("kOfxImageEffectFrameVarying", + "kOfxImageEffectPluginRenderThreadSafety") + if 'Prop' in splits[1] \ + or any(s in splits[1] for s in badlyNamedProperties): + props.add(splits[1]) + return props + +def getPropertiesFromDir(dir): + """ + Recursively get all property definitions from source files in a dir. + """ + + extensions = {'.c', '.h', '.cxx', '.hxx', '.cpp', '.hpp'} + + props = set() + for root, _dirs, files in os.walk(dir): + for file in files: + # Get the file extension + file_extension = os.path.splitext(file)[1] + + if file_extension in extensions: + file_path = os.path.join(root, file) + props |= getPropertiesFromFile(file_path) + return list(props) def main(argv): - recursive=False sourcePath='' outputFile='' try: - opts, args = getopt.getopt(argv,"i:o:r",["sourcePath=","outputFile","recursive"]) + opts, args = getopt.getopt(argv,"i:o:r",["sourcePath=","outputFile"]) for opt,value in opts: if opt == "-i": sourcePath = value elif opt == "-o": outputFile = value - elif opt == "-r": - recursive=True except getopt.GetoptError: sys.exit(1) - props=badlyNamedProperties - getPropertiesFromDir(sourcePath, recursive, props) + props = getPropertiesFromDir(sourcePath) - re='/^#define k[\w_]*Ofx[\w_]*Prop/' with open(outputFile, 'w') as f: f.write('.. _propertiesReference:\n') f.write('Properties Reference\n') f.write('=====================\n') - props.sort() - for p in props: + for p in sorted(props): f.write('.. doxygendefine:: ' + p + '\n\n') if __name__ == "__main__": diff --git a/Documentation/sources/Reference/ofxPropertiesReference.rst b/Documentation/sources/Reference/ofxPropertiesReference.rst index cbd93af1..532f08ac 100644 --- a/Documentation/sources/Reference/ofxPropertiesReference.rst +++ b/Documentation/sources/Reference/ofxPropertiesReference.rst @@ -25,6 +25,8 @@ Properties Reference .. doxygendefine:: kOfxImageEffectHostPropIsBackground +.. doxygendefine:: kOfxImageEffectHostPropNativeOrigin + .. doxygendefine:: kOfxImageEffectInstancePropEffectDuration .. doxygendefine:: kOfxImageEffectInstancePropSequentialRender @@ -95,8 +97,12 @@ Properties Reference .. doxygendefine:: kOfxImageEffectPropOpenCLEnabled +.. doxygendefine:: kOfxImageEffectPropOpenCLImage + .. doxygendefine:: kOfxImageEffectPropOpenCLRenderSupported +.. doxygendefine:: kOfxImageEffectPropOpenCLSupported + .. doxygendefine:: kOfxImageEffectPropOpenGLEnabled .. doxygendefine:: kOfxImageEffectPropOpenGLRenderSupported @@ -305,6 +311,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 00000000..34b06b9d --- /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 b9f9de1a..05356959 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 9ef59dbb..fe5d2fd5 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 6e0afb8d..16f542e2 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/scripts/gen-props.py b/scripts/gen-props.py new file mode 100644 index 00000000..940bc902 --- /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 5b162c33b1f43b116fe5f72f76905ba01b2b6015 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Wed, 28 Aug 2024 18:10:05 -0400 Subject: [PATCH 02/33] 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 34b06b9d..6edf6e70 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 940bc902..9c4ba19e 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 0ea7bdd86de1a7a9e51f27430402955c9a68fb26 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Sun, 1 Sep 2024 22:06:50 -0400 Subject: [PATCH 03/33] 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 6edf6e70..6f472856 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 9c4ba19e..1d50e94e 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 2e26f3c9fe2bf24ece7771e333cf7515a43e65a5 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Mon, 2 Sep 2024 06:10:07 -0400 Subject: [PATCH 04/33] 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 6f472856..4f45327c 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 1d50e94e..5b4a404a 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 5545400204bf5794e23cabf72eca833e1d7d0e21 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Mon, 2 Sep 2024 06:30:57 -0400 Subject: [PATCH 05/33] 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 d30808c7..b3fdbf4b 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 00000000..1d43c40b --- /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 00000000..9bb94140 --- /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 5b4a404a..07a7619f 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 2b408d882d5877f83c1d79c026c867d28c6ba2a3 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Mon, 2 Sep 2024 06:47:32 -0400 Subject: [PATCH 06/33] 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 1d43c40b..84faf158 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 07a7619f..a5a679f8 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 b06e72561cd5c94b1f78f408cc73ed1843a8d70d Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 3 Sep 2024 12:35:42 -0400 Subject: [PATCH 07/33] 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 4f45327c..9e7697cb 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 d6bb901c22f224974be79e784ecb7da48e75b611 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 3 Sep 2024 13:19:12 -0400 Subject: [PATCH 08/33] 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 b3fdbf4b..d30808c7 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 1cf901dc..399a4e96 100644 --- a/Support/Plugins/Tester/Tester.cpp +++ b/Support/Plugins/Tester/Tester.cpp @@ -16,6 +16,9 @@ #include "ofxsMultiThread.h" #include "ofxsInteract.h" +#include "ofxPropsBySet.h" +#include "ofxPropsMetadata.h" + #include "../include/ofxsProcessing.H" static const OfxPointD kBoxSize = {5, 5}; diff --git a/Support/include/ofxPropsBySet.h b/Support/include/ofxPropsBySet.h new file mode 100644 index 00000000..4b803767 --- /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 00000000..fdb69ecf --- /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 9e7697cb..f750b24b 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 84faf158..00000000 --- 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 9bb94140..00000000 --- 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 a5a679f8..a51a1284 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 e740bb9af5d803209de33bb1f7f247c4743b2c8d Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 3 Sep 2024 13:57:46 -0400 Subject: [PATCH 09/33] 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 4b803767..c5fdc32b 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 fdb69ecf..0dbd32cd 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 f750b24b..d0492226 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 a51a1284..7e2d343b 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 262846051277823010c67c58b4c999d7ab4a34bf Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 3 Sep 2024 14:31:57 -0400 Subject: [PATCH 10/33] 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 c5fdc32b..ea4e6836 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 0dbd32cd..55d4a07f 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 d0492226..9f40f8d9 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 7e2d343b..014db2bd 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 ad597e1eea26a5951324ce817a7d48d792dd7f32 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 3 Sep 2024 14:39:15 -0400 Subject: [PATCH 11/33] 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 9f40f8d9..f6491457 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 f131d3ed93bfe691f1c0831d59810b25b734f0ac Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 3 Sep 2024 17:37:58 -0400 Subject: [PATCH 12/33] 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 ea4e6836..c692e39c 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 55d4a07f..2ac098d6 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 f6491457..7c50550a 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 014db2bd..46ad62fd 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 f25d6fc59b38fc7a312a3d8bf7a048bca552fbd8 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 3 Sep 2024 17:49:42 -0400 Subject: [PATCH 13/33] 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 c692e39c..c60d6b0c 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 2ac098d6..b52d206e 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 46ad62fd..3caf9cbe 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 785d4965461b3040f076679fcbd69ebbff599c1c Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 1 Oct 2024 12:42:33 -0400 Subject: [PATCH 14/33] 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 c60d6b0c..d543d253 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 Date: Tue, 26 Nov 2024 12:15:40 -0500 Subject: [PATCH 15/33] Add TestProps using new props metadata, WIP Signed-off-by: Gary Oberbrunner --- Examples/CMakeLists.txt | 2 + Examples/TestProps/Info.plist | 20 + Examples/TestProps/testProperties.cpp | 1636 +++++++++++++++++++++++++ 3 files changed, 1658 insertions(+) create mode 100644 Examples/TestProps/Info.plist create mode 100644 Examples/TestProps/testProperties.cpp diff --git a/Examples/CMakeLists.txt b/Examples/CMakeLists.txt index e6790fcc..cab346e2 100644 --- a/Examples/CMakeLists.txt +++ b/Examples/CMakeLists.txt @@ -10,6 +10,7 @@ set(PLUGINS OpenGL Rectangle Test + TestProps DrawSuite ) @@ -30,3 +31,4 @@ target_link_libraries(example-OpenGL PRIVATE opengl::opengl) target_link_libraries(example-Custom PRIVATE opengl::opengl) target_link_libraries(example-ColourSpace PRIVATE cimg::cimg) target_link_libraries(example-ColourSpace PRIVATE spdlog::spdlog_header_only) +target_link_libraries(example-TestProps PRIVATE spdlog::spdlog_header_only) diff --git a/Examples/TestProps/Info.plist b/Examples/TestProps/Info.plist new file mode 100644 index 00000000..a8a87943 --- /dev/null +++ b/Examples/TestProps/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + testProperties.ofx + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleSignature + ???? + CFBundleVersion + 0.0.1d1 + CSResourcesFileMapped + + + diff --git a/Examples/TestProps/testProperties.cpp b/Examples/TestProps/testProperties.cpp new file mode 100644 index 00000000..8e20b7a2 --- /dev/null +++ b/Examples/TestProps/testProperties.cpp @@ -0,0 +1,1636 @@ +// Copyright OpenFX and contributors to the OpenFX project. +// SPDX-License-Identifier: BSD-3-Clause + +/** @file testProperties.cpp OFX test plugin which logs all properties + in various actions. + + Uses spdlog and fmt to log all the info. +*/ +#include "ofxImageEffect.h" +#include "ofxMemory.h" +#include "ofxMessage.h" +#include "ofxMultiThread.h" +#include "ofxPropsBySet.h" // in Support/include +#include "ofxPropsMetadata.h" +#include "spdlog/spdlog.h" +#include // stl maps +#include // stl strings +#include + +#if defined __APPLE__ || defined __linux__ || defined __FreeBSD__ +#define EXPORT __attribute__((visibility("default"))) +#elif defined _WIN32 +#define EXPORT OfxExport +#else +#error Not building on your operating system quite yet +#endif + +static OfxHost *gHost; +static OfxImageEffectSuiteV1 *gEffectSuite; +static OfxPropertySuiteV1 *gPropSuite; +static OfxInteractSuiteV1 *gInteractSuite; +static OfxParameterSuiteV1 *gParamSuite; +static OfxMemorySuiteV1 *gMemorySuite; +static OfxMultiThreadSuiteV1 *gThreadSuite; +static OfxMessageSuiteV1 *gMessageSuite; + +//////////////////////////////////////////////////////////////////////////////// +// fetch a suite +static const void *fetchSuite(const char *suiteName, int suiteVersion, + bool optional = false) { + const void *suite = gHost->fetchSuite(gHost->host, suiteName, suiteVersion); + if (optional) { + if (suite == 0) + spdlog::warn("Could not fetch the optional suite '%s' version %d;", + suiteName, suiteVersion); + } else { + if (suite == 0) + spdlog::error("Could not fetch the mandatory suite '%s' version %d;", + suiteName, suiteVersion); + } + if (!optional && suite == 0) + throw kOfxStatErrMissingHostFeature; + return suite; +} + +//////////////////////////////////////////////////////////////////////////////// +// maps status to a string +static const char *mapStatus(OfxStatus stat) { + switch (stat) { + case kOfxStatOK: + return "kOfxStatOK"; + case kOfxStatFailed: + return "kOfxStatFailed"; + case kOfxStatErrFatal: + return "kOfxStatErrFatal"; + case kOfxStatErrUnknown: + return "kOfxStatErrUnknown"; + case kOfxStatErrMissingHostFeature: + return "kOfxStatErrMissingHostFeature"; + case kOfxStatErrUnsupported: + return "kOfxStatErrUnsupported"; + case kOfxStatErrExists: + return "kOfxStatErrExists"; + case kOfxStatErrFormat: + return "kOfxStatErrFormat"; + case kOfxStatErrMemory: + return "kOfxStatErrMemory"; + case kOfxStatErrBadHandle: + return "kOfxStatErrBadHandle"; + case kOfxStatErrBadIndex: + return "kOfxStatErrBadIndex"; + case kOfxStatErrValue: + return "kOfxStatErrValue"; + case kOfxStatReplyYes: + return "kOfxStatReplyYes"; + case kOfxStatReplyNo: + return "kOfxStatReplyNo"; + case kOfxStatReplyDefault: + return "kOfxStatReplyDefault"; + case kOfxStatErrImageFormat: + return "kOfxStatErrImageFormat"; + } + return "UNKNOWN STATUS CODE"; +} + + +/*************************************************************************/ + +/* PropertyValue usage (using enum because it's most complex): + std::vector colors = {"red", "green", "blue"}; + PropertyValue enumProp(3, "red", colors); + enumProp.set(1, "green"); // throws exception if not allowed + auto values = enumProp.get(); + std::cout << enumProp.toString() << std::endl; + + PropertyValue intProp(5, 0); + intProp.set({1, 2, 3, 4, 5}); + intProp.set(2, 10); // Changes the third element to 10 + std::vector values = intProp.get(); + int value = intProp.get(2); // Retrieves the value 10 + intProp.size(); // returns 5 +*/ + +class PropertyValue { +public: + enum class Type { Int, Double, Bool, String, Pointer, Enum }; + + using value_type = std::variant; + +private: + std::vector data; + Type type_; + std::vector enum_values; // Only used if type_ == Type::Enum + + template + static constexpr bool is_supported_type = + std::is_same_v || std::is_same_v || + std::is_same_v || std::is_same_v || + std::is_same_v; + + template static std::string type_name() { + if constexpr (std::is_same_v) + return "int"; + else if constexpr (std::is_same_v) + return "double"; + else if constexpr (std::is_same_v) + return "bool"; + else if constexpr (std::is_same_v) + return "string"; + else if constexpr (std::is_same_v) + return "pointer"; + else + return "unknown"; + } + + static std::string type_to_string(Type t) { + switch (t) { + case Type::Int: + return "int"; + case Type::Double: + return "double"; + case Type::Bool: + return "bool"; + case Type::String: + return "string"; + case Type::Pointer: + return "pointer"; + case Type::Enum: + return "enum"; + default: + return "unknown"; + } + } + + static std::string format_value(const value_type &v) { + return std::visit( + [](const auto &x) { + using T = std::decay_t; + if constexpr (std::is_same_v) { + return std::string(x ? "true" : "false"); + } else if constexpr (std::is_same_v) { + return fmt::format("\"{}\"", x); + } else if constexpr (std::is_same_v) { + return fmt::format("{:p}", x); + } else { + return fmt::format("{}", x); + } + }, + v); + } + + void check_enum_value(const std::string &value) const { + if (std::find(enum_values.begin(), enum_values.end(), value) == + enum_values.end()) { + throw std::invalid_argument( + fmt::format("Invalid enum value '{}'. Allowed values are: {}", value, + enum_values_list())); + } + } + + std::string enum_values_list() const { + std::string list; + for (size_t i = 0; i < enum_values.size(); ++i) { + if (i > 0) + list += ", "; + list += enum_values[i]; + } + return list; + } + +public: + // Constructor for basic types + template + PropertyValue(std::size_t size, const T &initial_value = T{}) + : data(size, initial_value) { + static_assert(is_supported_type, "Unsupported type"); + + if constexpr (std::is_same_v) + type_ = Type::Int; + else if constexpr (std::is_same_v) + type_ = Type::Double; + else if constexpr (std::is_same_v) + type_ = Type::Bool; + else if constexpr (std::is_same_v) + type_ = Type::String; + else if constexpr (std::is_same_v) + type_ = Type::Pointer; + } + + // Constructor for enum type + PropertyValue(std::size_t size, const std::string &initial_value, + const std::vector &allowed_values) + : data(size, initial_value), type_(Type::Enum), + enum_values(allowed_values) { + check_enum_value(initial_value); // Validate initial value + } + + // Set values from a vector + template void set(const std::vector &values) { + static_assert(is_supported_type, "Unsupported type"); + if (values.size() != data.size()) { + throw std::length_error( + fmt::format("Size mismatch: container size is {}, input size is {}", + data.size(), values.size())); + } + if (type_ != get_type()) { + throw std::runtime_error( + fmt::format("Type mismatch: container type is {}, input type is {}", + type_to_string(type_), type_name())); + } + if (type_ == Type::Enum) { + for (const auto &val : values) { + check_enum_value(val); + } + } + for (size_t i = 0; i < values.size(); ++i) { + data[i] = values[i]; + } + } + + // Set value at a specific index + template void set(std::size_t index, const T &value) { + static_assert(is_supported_type, "Unsupported type"); + if (index >= data.size()) { + throw std::out_of_range( + fmt::format("Index {} out of range. Size is {}", index, data.size())); + } + if (type_ != get_type()) { + throw std::runtime_error( + fmt::format("Type mismatch: container type is {}, input type is {}", + type_to_string(type_), type_name())); + } + if (type_ == Type::Enum) { + check_enum_value(value); + } + data[index] = value; + } + + // Get all values as a vector + template std::vector get() const { + static_assert(is_supported_type, "Unsupported type"); + if (type_ != get_type()) { + throw std::runtime_error(fmt::format( + "Type mismatch: container type is {}, requested type is {}", + type_to_string(type_), type_name())); + } + std::vector result; + result.reserve(data.size()); + for (const auto &v : data) { + result.push_back(std::get(v)); + } + return result; + } + + // Get value at a specific index + template T get(std::size_t index) const { + static_assert(is_supported_type, "Unsupported type"); + if (index >= data.size()) { + throw std::out_of_range( + fmt::format("Index {} out of range. Size is {}", index, data.size())); + } + if (type_ != get_type()) { + throw std::runtime_error(fmt::format( + "Type mismatch: container type is {}, requested type is {}", + type_to_string(type_), type_name())); + } + return std::get(data[index]); + } + + std::string toString() const { + if (data.empty()) + return ""; + std::string values; + for (size_t i = 0; i < data.size(); ++i) { + if (i > 0) + values += ", "; + values += format_value(data[i]); + } + std::string type_str = type_to_string(type_); + if (type_ == Type::Enum) { + type_str += "{" + enum_values_list() + "}"; + } + return fmt::format("<{}>[{}]", type_str, values); + } + + std::size_t size() const { return data.size(); } + Type type() const { return type_; } + void resize(std::size_t new_size) { data.resize(new_size); } + void reserve(std::size_t new_capacity) { data.reserve(new_capacity); } + void clear() { data.clear(); } + bool empty() const { return data.empty(); } + +private: + // Helper to get Type enum from a template type + template static constexpr Type get_type() { + if constexpr (std::is_same_v) + return Type::Int; + else if constexpr (std::is_same_v) + return Type::Double; + else if constexpr (std::is_same_v) + return Type::Bool; + else if constexpr (std::is_same_v) + return Type::String; + else if constexpr (std::is_same_v) + return Type::Pointer; + else + return Type::Enum; // For enum type + } +}; + +// Use this as comparator to simplify maps on strings +struct StringCompare { + using is_transparent = void; // Enables heterogeneous lookup + bool operator()(std::string_view a, std::string_view b) const { + return a < b; + } +}; + +/** @brief wraps up a set of properties + auto ps = PropertySet::create(name, handle); // returns std::optional (false if no such name) + ps->add(propname); // adds from props_metadata + auto data = ps->get(propname); + ps->set(propname, {...values...}); + */ +class PropertySet { +protected: + std::string name; + std::map properties; + int _propLogMessages; // if more than 0, don't log ordinary messages + OfxPropertySetHandle _propHandle; + + std::vector prop_defs; + +private: + PropertySet(); + +public: + static std::optional create(const std::string &name, + OfxPropertySetHandle h = 0) { + PropertySet ps; + ps.name = name; + ps._propHandle = h; + + auto it = OpenFX::prop_sets.find(name.c_str()); + if (it == OpenFX::prop_sets.end()) + return std::nullopt; + ps.prop_defs = it->second; + return ps; + } + + virtual ~PropertySet(); + void propSetHandle(OfxPropertySetHandle h) { _propHandle = h; } + + std::optional + find_prop(std::string_view propname) { + auto it = std::find_if( + OpenFX::props_metadata.begin(), OpenFX::props_metadata.end(), + [&](const OpenFX::PropsMetadata &pm) { return pm.name == propname; }); + if (it == OpenFX::props_metadata.end()) + return std::nullopt; + return &(*it); + } + + void add(const std::string_view& propname) { + if (properties.find(propname) != properties.end()) { + // already in the map; do nothing + return; + } + + if (auto meta = find_prop(propname)) { + auto &metadata = *(*meta); + int n = metadata.dimension > 0 ? metadata.dimension : 4; // XXX + PropertyValue v(0, 0); + switch (metadata.types[0]) { + case OpenFX::PropType::Int: + v = PropertyValue(n, 0); + break; + case OpenFX::PropType::Double: + v = PropertyValue(n, 0.0); + break; + case OpenFX::PropType::Bool: + v = PropertyValue(n, true); + break; + case OpenFX::PropType::String: + v = PropertyValue(n, ""); + break; + case OpenFX::PropType::Bytes: + v = PropertyValue(n, ""); + break; + case OpenFX::PropType::Pointer: + v = PropertyValue(n, (void *)0); + break; + default: + throw std::runtime_error(fmt::format("{}: Invalid type for {} in props_metadata", name, propname)); + } + properties[std::string(propname)] = v; + spdlog::info("Propset {}: added property {}, value {}", name, propname, v); + } + else { + throw std::runtime_error(fmt::format("{}: No such propname {} found in props_metadata", name, propname)); + } + } + + template + const std::vector &get_current(std::string_view propname) { + return properties.find(propname)->second.get(); + }; + template const T get_current(std::string_view propname, int index) { + return properties.find(propname)->second.get(index); + } + template + void set_current(std::string_view propname, int n, const T *values) { + properties.find(propname)->second.set(values); + }; + + // Get values from the host, saving locally + void get(std::string_view propname) { + const int max_n = 128; + auto& prop = properties.find(propname)->second; + switch (prop.type()) { + case PropertyValue::Type::Bool: + [[fallthrough]]; + case PropertyValue::Type::Int: { + int values[max_n]; + int dim; + OfxStatus stat; + stat = gPropSuite->propGetDimension(_propHandle, propname.data(), &dim); + if (stat != kOfxStatOK) + throw new std::runtime_error( + fmt::format("Error getting dims for prop {} in suite {}: {}", + propname, name, mapStatus(stat))); + stat = + gPropSuite->propGetIntN(_propHandle, propname.data(), dim, values); + if (stat != kOfxStatOK) + throw new std::runtime_error( + fmt::format("Error getting values for {}-d prop {} in suite {}: {}", + dim, propname, name, mapStatus(stat))); + // Save locally, checking dim & type + prop.set(std::vector(dim, values)); + break; + } + case PropertyValue::Type::Double: { + double values[max_n]; + int dim; + OfxStatus stat; + stat = gPropSuite->propGetDimension(_propHandle, propname.data(), &dim); + if (stat != kOfxStatOK) + throw new std::runtime_error( + fmt::format("Error getting dims for prop {} in suite {}: {}", + propname, name, mapStatus(stat))); + stat = + gPropSuite->propGetDoubleN(_propHandle, propname.data(), dim, values); + if (stat != kOfxStatOK) + throw new std::runtime_error( + fmt::format("Error getting values for {}-d prop {} in suite {}: {}", + dim, propname, name, mapStatus(stat))); + // Save locally, checking dim & type + prop.set(std::vector(dim, values)); + break; + } + case PropertyValue::Type::String: + [[fallthrough]]; + case PropertyValue::Type::Enum: { + char *values[max_n]; + int dim; + OfxStatus stat; + stat = gPropSuite->propGetDimension(_propHandle, propname.data(), &dim); + if (stat != kOfxStatOK) + throw new std::runtime_error( + fmt::format("Error getting dims for prop {} in suite {}: {}", + propname, name, mapStatus(stat))); + stat = + gPropSuite->propGetStringN(_propHandle, propname.data(), dim, values); + if (stat != kOfxStatOK) + throw new std::runtime_error( + fmt::format("Error getting values for {}-d prop {} in suite {}: {}", + dim, propname, name, mapStatus(stat))); + // Save locally, checking dim & type + prop.set(std::vector(dim, values)); + break; + } + case PropertyValue::Type::Pointer: { + void *values[max_n]; + int dim; + OfxStatus stat; + stat = gPropSuite->propGetDimension(_propHandle, propname.data(), &dim); + if (stat != kOfxStatOK) + throw new std::runtime_error( + fmt::format("Error getting dims for prop {} in suite {}: {}", + propname, name, mapStatus(stat))); + stat = + gPropSuite->propGetPointerN(_propHandle, propname.data(), dim, values); + if (stat != kOfxStatOK) + throw new std::runtime_error( + fmt::format("Error getting values for {}-d prop {} in suite {}: {}", + dim, propname, name, mapStatus(stat))); + // Save locally, checking dim & type + prop.set(std::vector(dim, values)); + break; + } + } + } + + // inc/dec the log flag to enable/disable ordinary message logging + void propEnableLog(void) { --_propLogMessages; } + void propDisableLog(void) { ++_propLogMessages; } +}; + + +//////////////////////////////////////////////////////////////////////////////// +// Describes a set of properties +class PropertySetDescription : PropertySet { +protected: + const char *_setName; + PropertyDescription *_descriptions; + int _nDescriptions; + + std::map _descriptionsByName; + +public: + PropertySetDescription(const char *setName, OfxPropertySetHandle handle, + PropertyDescription *v, int nV); + void checkProperties(bool logOrdinaryMessages = + false); // see if they are there in the first place + void checkDefaults(bool logOrdinaryMessages = false); // check default values + void retrieveValues( + bool logOrdinaryMessages = false); // get current values on the host + void setValues( + bool logOrdinaryMessages = false); // set values to the requested ones + PropertyDescription *findDescription( + const std::string &name); // find a property with the given name + + int intPropValue(const std::string &name, int idx = 0); + double doublePropValue(const std::string &name, int idx = 0); + void *pointerPropValue(const std::string &name, int idx = 0); + const std::string &stringPropValue(const std::string &name, int idx = 0); +}; + +//////////////////////////////////////////////////////////////////////////////// +// property set code +PropertySet::~PropertySet() {} + +OfxStatus PropertySet::propSet(const char *property, void *value, int idx) { + OfxStatus stat = + gPropSuite->propSetPointer(_propHandle, property, idx, value); + if (stat != kOfxStatOK) + spdlog::error("Failed on setting pointer property %s[%d] to %p, host " + "returned status %s;", + property, idx, value, mapStatus(stat)); + if (stat == kOfxStatOK && _propLogMessages <= 0) + spdlog::info("Set pointer property %s[%d] = %p;", property, idx, value); + return stat; +} + +OfxStatus PropertySet::propSet(const char *property, const std::string &value, + int idx) { + OfxStatus stat = + gPropSuite->propSetString(_propHandle, property, idx, value.c_str()); + if (stat != kOfxStatOK) + spdlog::error("Failed on setting string property %s[%d] to '%s', host " + "returned status %s;", + property, idx, value.c_str(), mapStatus(stat)); + if (stat == kOfxStatOK && _propLogMessages <= 0) + spdlog::info("Set string property %s[%d] = '%s';", property, idx, + value.c_str()); + return stat; +} + +OfxStatus PropertySet::propSet(const char *property, double value, int idx) { + OfxStatus stat = gPropSuite->propSetDouble(_propHandle, property, idx, value); + if (stat != kOfxStatOK) + spdlog::error("Failed on setting double property %s[%d] to %g, host " + "returned status %s;", + property, idx, value, mapStatus(stat)); + if (stat == kOfxStatOK && _propLogMessages <= 0) + spdlog::info("Set double property %s[%d] = %g;", property, idx, value); + return stat; +} + +OfxStatus PropertySet::propSet(const char *property, int value, int idx) { + OfxStatus stat = gPropSuite->propSetInt(_propHandle, property, idx, value); + if (stat != kOfxStatOK) + spdlog::error("Failed on setting int property %s[%d] to %d, host returned " + "status '%s';", + property, idx, value, mapStatus(stat)); + if (stat == kOfxStatOK && _propLogMessages <= 0) + spdlog::info("Set int property %s[%d] = %d;", property, idx, value); + return stat; +} + +OfxStatus PropertySet::propGet(const char *property, void *&value, + int idx) const { + OfxStatus stat = + gPropSuite->propGetPointer(_propHandle, property, idx, &value); + if (stat != kOfxStatOK) + spdlog::error( + "Failed on fetching pointer property %s[%d], host returned status %s;", + property, idx, mapStatus(stat)); + if (stat == kOfxStatOK && _propLogMessages <= 0) + spdlog::info("Fetched pointer property %s[%d] = %p;", property, idx, value); + return stat; +} + +OfxStatus PropertySet::propGet(const char *property, double &value, + int idx) const { + OfxStatus stat = + gPropSuite->propGetDouble(_propHandle, property, idx, &value); + if (stat != kOfxStatOK) + spdlog::error( + "Failed on fetching double property %s[%d], host returned status %s;", + property, idx, mapStatus(stat)); + if (stat == kOfxStatOK && _propLogMessages <= 0) + spdlog::info("Fetched double property %s[%d] = %g;", property, idx, value); + return stat; +} + +OfxStatus PropertySet::propGetN(const char *property, double *values, + int N) const { + OfxStatus stat = gPropSuite->propGetDoubleN(_propHandle, property, N, values); + if (stat != kOfxStatOK) + spdlog::error("Failed on fetching multiple double property %s X %d, host " + "returned status %s;", + property, N, mapStatus(stat)); + if (stat == kOfxStatOK && _propLogMessages <= 0) { + spdlog::info("Fetched multiple double property %s X %d;", property, N); + for (int i = 0; i < N; i++) { + spdlog::info(" %s[%d] = %g;", property, i, values[i]); + } + } + return stat; +} + +OfxStatus PropertySet::propGetN(const char *property, int *values, + int N) const { + OfxStatus stat = gPropSuite->propGetIntN(_propHandle, property, N, values); + if (stat != kOfxStatOK) + spdlog::error("Failed on fetching multiple int property %s X %d, host " + "returned status %s;", + property, N, mapStatus(stat)); + if (stat == kOfxStatOK && _propLogMessages <= 0) { + spdlog::info("Fetched multiple int property %s X %d;", property, N); + for (int i = 0; i < N; i++) { + spdlog::info(" %s[%d] = %d;", property, i, values[i]); + } + } + return stat; +} + +OfxStatus PropertySet::propGet(const char *property, int &value, + int idx) const { + OfxStatus stat = gPropSuite->propGetInt(_propHandle, property, idx, &value); + if (stat != kOfxStatOK) + spdlog::error( + "Failed on fetching int property %s[%d], host returned status %s;", + property, idx, mapStatus(stat)); + if (stat == kOfxStatOK && _propLogMessages <= 0) + spdlog::info("Fetched int property %s[%d] = %d;", property, idx, value); + return stat; +} + +OfxStatus PropertySet::propGet(const char *property, std::string &value, + int idx) const { + char *str; + OfxStatus stat = gPropSuite->propGetString(_propHandle, property, idx, &str); + if (stat != kOfxStatOK) + spdlog::error( + "Failed on fetching string property %s[%d], host returned status %s;", + property, idx, mapStatus(stat)); + if (kOfxStatOK == stat) { + value = str; + if (_propLogMessages <= 0) + spdlog::info("Fetched string property %s[%d] = '%s';", property, idx, + value.c_str()); + } else { + value = ""; + } + return stat; +} + +OfxStatus PropertySet::propGetN(const char *property, std::string *values, + int N) const { + char **strs = new char *[N]; + + OfxStatus stat = gPropSuite->propGetStringN(_propHandle, property, N, strs); + + if (stat != kOfxStatOK) + spdlog::error("Failed on fetching multiple string property %s X %d, host " + "returned status %s;", + property, N, mapStatus(stat)); + + if (kOfxStatOK == stat) { + if (_propLogMessages <= 0) + spdlog::info("Fetched multiple string property %s X %d;", property, N); + for (int i = 0; i < N; i++) { + values[i] = strs[i]; + if (_propLogMessages <= 0) + spdlog::info(" %s[%d] = '%s';", property, i, strs[i]); + } + } else { + for (int i = 0; i < N; i++) { + values[i] = ""; + } + } + + delete[] strs; + + return stat; +} + +OfxStatus PropertySet::propGetDimension(const char *property, int &size) const { + OfxStatus stat = gPropSuite->propGetDimension(_propHandle, property, &size); + if (stat != kOfxStatOK) + spdlog::error("Failed on fetching dimension for property %s, host returned " + "status %s;", + property, mapStatus(stat)); + return stat; +} + +//////////////////////////////////////////////////////////////////////////////// +// PropertyDescription code + +// check to see if this property exists on the host +void PropertyDescription::checkProperty(PropertySet &propSet) { + // see if it exists by fetching the dimension, + int dimension; + OfxStatus stat = propSet.propGetDimension(_name, dimension); + if (stat == kOfxStatOK) { + if (_dimension != -1) + if (dimension != _dimension) + spdlog::error( + "Host reports property '%s' has dimension %d, it should be %d;", + _name, dimension, _dimension); + + // check type by getting the first element, the property getting will print + // failure messages to the log + if (dimension > 0) { + void *vP; + int vI; + double vD; + std::string vS; + + switch (_ilk) { + case PropertyDescription::ePointer: + propSet.propGet(_name, vP); + break; + case PropertyDescription::eInt: + propSet.propGet(_name, vI); + break; + case PropertyDescription::eString: + propSet.propGet(_name, vS); + break; + case PropertyDescription::eDouble: + propSet.propGet(_name, vD); + break; + } + } + } +} + +// see if the default values on the property set agree +void PropertyDescription::checkDefault(PropertySet &propSet) { + if (_nDefs > 0) { + // fetch the dimension on the host + int hostDimension; + OfxStatus stat = propSet.propGetDimension(_name, hostDimension); + (void)stat; + + if (hostDimension != _nDefs) + spdlog::error("Host reports default dimension of '%s' is %d, which is " + "different to the default value %d;", + _name, hostDimension, _nDefs); + + int N = hostDimension < _nDefs ? hostDimension : _nDefs; + + for (int i = 0; i < N; i++) { + void *vP; + int vI; + double vD; + std::string vS; + + switch (_ilk) { + case PropertyDescription::ePointer: + propSet.propGet(_name, vP, i); + if (vP != (void *)_defs[i]) + spdlog::error("Default value of %s[%d] = %p, it should be %p;", _name, + i, vP, (void *)_defs[i]); + break; + case PropertyDescription::eInt: + propSet.propGet(_name, vI, i); + if (vI != (int)_defs[i]) + spdlog::error("Default value of %s[%d] = %d, it should be %d;", _name, + i, vI, (int)_defs[i]); + break; + case PropertyDescription::eString: + propSet.propGet(_name, vS, i); + if (vS != _defs[i].vString) + spdlog::error("Default value of %s[%d] = '%s', it should be '%s';", + _name, i, vS.c_str(), _defs[i].vString.c_str()); + break; + case PropertyDescription::eDouble: + propSet.propGet(_name, vD, i); + if (vD != (double)_defs[i]) + spdlog::error("Default value of %s[%d] = %g, it should be %g;", _name, + i, vD, (double)_defs[i]); + break; + } + } + } +} + +// get the current value from the property set into me +void PropertyDescription::retrieveValue(PropertySet &propSet) { + if (_currentVals) + delete[] _currentVals; + _currentVals = 0; + _nCurrentVals = 0; + + // fetch the dimension on the host + int hostDimension; + OfxStatus stat = propSet.propGetDimension(_name, hostDimension); + if (stat == kOfxStatOK && hostDimension > 0) { + _nCurrentVals = hostDimension; + _currentVals = new PropertyValueOnion[hostDimension]; + + for (int i = 0; i < hostDimension; i++) { + void *vP; + int vI; + double vD; + std::string vS; + + switch (_ilk) { + case PropertyDescription::ePointer: + stat = propSet.propGet(_name, vP, i); + _currentVals[i] = (stat == kOfxStatOK) ? vP : (void *)(0); + break; + case PropertyDescription::eInt: + stat = propSet.propGet(_name, vI, i); + _currentVals[i] = (stat == kOfxStatOK) ? vI : 0; + break; + case PropertyDescription::eString: + stat = propSet.propGet(_name, vS, i); + if (stat == kOfxStatOK) + _currentVals[i] = vS; + else + _currentVals[i] = std::string(""); + break; + case PropertyDescription::eDouble: + stat = propSet.propGet(_name, vD, i); + _currentVals[i] = (stat == kOfxStatOK) ? vD : 0.0; + break; + } + } + } +} + +// set the property from my 'set' property +void PropertyDescription::setValue(PropertySet &propSet) { + // fetch the dimension on the host + if (_nWantedVals > 0) { + int i; + for (i = 0; i < _nWantedVals; i++) { + switch (_ilk) { + case PropertyDescription::ePointer: + propSet.propSet(_name, _wantedVals[i].vPointer, i); + break; + case PropertyDescription::eInt: + propSet.propSet(_name, _wantedVals[i].vInt, i); + break; + case PropertyDescription::eString: + propSet.propSet(_name, _wantedVals[i].vString, i); + break; + case PropertyDescription::eDouble: + propSet.propSet(_name, _wantedVals[i].vDouble, i); + break; + } + } + + // Now fetch the current values back into current. Don't be verbose about + // it. + propSet.propDisableLog(); + retrieveValue(propSet); + propSet.propEnableLog(); + + // and see if they are the same + if (_nWantedVals != _nCurrentVals) + spdlog::error("After setting property %s, the dimension %d is not the " + "same as what was set %d", + _name, _nCurrentVals, _nWantedVals); + int N = _nWantedVals < _nCurrentVals ? _nWantedVals : _nCurrentVals; + for (i = 0; i < N; i++) { + switch (_ilk) { + case PropertyDescription::ePointer: + if (_wantedVals[i].vPointer != _currentVals[i].vPointer) + spdlog::error("After setting pointer value %s[%d] value fetched back " + "%p not same as value set %p", + _name, i, _wantedVals[i].vPointer, + _currentVals[i].vPointer); + break; + case PropertyDescription::eInt: + if (_wantedVals[i].vInt != _currentVals[i].vInt) + spdlog::error("After setting int value %s[%d] value fetched back %d " + "not same as value set %d", + _name, i, _wantedVals[i].vInt, _currentVals[i].vInt); + break; + case PropertyDescription::eString: + if (_wantedVals[i].vString != _currentVals[i].vString) + spdlog::error("After setting string value %s[%d] value fetched back " + "'%s' not same as value set '%s'", + _name, i, _wantedVals[i].vString.c_str(), + _currentVals[i].vString.c_str()); + break; + case PropertyDescription::eDouble: + if (_wantedVals[i].vDouble != _currentVals[i].vDouble) + spdlog::error("After setting double value %s[%d] value fetched back " + "%g not same as value set %g", + _name, i, _wantedVals[i].vDouble, + _currentVals[i].vDouble); + break; + } + } + } +} + +void PropertySetDescription::checkProperties(bool logOrdinaryMessages) { + spdlog::info("PropertySetDescription::checkProperties - start(checking " + "properties on %s);\n{", + _setName); + + // don't print ordinary messages whilst we are checking them + if (!logOrdinaryMessages) + propDisableLog(); + + // check each property in the description + for (int i = 0; i < _nDescriptions; i++) { + _descriptions[i].checkProperty(*this); + } + if (!logOrdinaryMessages) + propEnableLog(); + + spdlog::info("}PropertySetDescription::checkProperties - stop;"); +} + +void PropertySetDescription::checkDefaults(bool logOrdinaryMessages) { + spdlog::info("PropertySetDescription::checkDefaults - start(checking default " + "value of properties on %s);\n{", + _setName); + + // don't print ordinary messages whilst we are checking them + if (!logOrdinaryMessages) + propDisableLog(); + + // check each property in the description + for (int i = 0; i < _nDescriptions; i++) { + _descriptions[i].checkDefault(*this); + } + if (!logOrdinaryMessages) + propEnableLog(); + + spdlog::info("}PropertySetDescription::checkDefaults - stop;"); +} + +void PropertySetDescription::retrieveValues(bool logOrdinaryMessages) { + spdlog::info("PropertySetDescription::retrieveValues - start(retrieving " + "values of properties on %s);\n{", + _setName); + + if (!logOrdinaryMessages) + propDisableLog(); + + // check each property in the description + for (int i = 0; i < _nDescriptions; i++) { + _descriptions[i].retrieveValue(*this); + } + + if (!logOrdinaryMessages) + propEnableLog(); + + spdlog::info("}PropertySetDescription::retrieveValues - stop;"); +} + +void PropertySetDescription::setValues(bool logOrdinaryMessages) { + spdlog::info("PropertySetDescription::setValues - start(retrieving values of " + "properties on %s);\n{", + _setName); + + if (!logOrdinaryMessages) + propDisableLog(); + + // check each property in the description + for (int i = 0; i < _nDescriptions; i++) { + _descriptions[i].setValue(*this); + } + + if (!logOrdinaryMessages) + propEnableLog(); + + spdlog::info("}PropertySetDescription::setValues - stop;"); +} + +// find a property with the given name out of our set of properties +PropertyDescription * +PropertySetDescription::findDescription(const std::string &name) { + std::map::iterator iter; + iter = _descriptionsByName.find(name); + if (iter != _descriptionsByName.end()) { + return iter->second; + } + return 0; +} + +// find value of the named property from the _currentVals array +int PropertySetDescription::intPropValue(const std::string &name, int idx) { + PropertyDescription *desc = 0; + desc = findDescription(name); + if (desc) { + if (idx < desc->_nCurrentVals) { + return int(desc->_currentVals[idx]); + } + } + return 0; +} + +//////////////////////////////////////////////////////////////////////////////// +// host description stuff + +// list of the properties on the host. We can't set any of these, and most don't +// have defaults +static PropertyDescription gHostPropDescription[] = { + PropertyDescription(kOfxPropType, 1, "", false, kOfxTypeImageEffectHost, + true), + PropertyDescription(kOfxPropName, 1, "", false, "", false), + PropertyDescription(kOfxPropLabel, 1, "", false, "", false), + PropertyDescription(kOfxImageEffectHostPropIsBackground, 1, 0, false, 0, + false), + PropertyDescription(kOfxImageEffectPropSupportsOverlays, 1, 0, false, 0, + false), + PropertyDescription(kOfxImageEffectPropSupportsMultiResolution, 1, 0, false, + 0, false), + PropertyDescription(kOfxImageEffectPropSupportsTiles, 1, 0, false, 0, + false), + PropertyDescription(kOfxImageEffectPropTemporalClipAccess, 1, 0, false, 0, + false), + PropertyDescription(kOfxImageEffectPropSupportsMultipleClipDepths, 1, 0, + false, 0, false), + PropertyDescription(kOfxImageEffectPropSupportsMultipleClipPARs, 1, 0, + false, 0, false), + PropertyDescription(kOfxImageEffectPropSetableFrameRate, 1, 0, false, 0, + false), + PropertyDescription(kOfxImageEffectPropSetableFielding, 1, 0, false, 0, + false), + PropertyDescription(kOfxImageEffectPropSupportedComponents, -1, "", false, + "", false), + PropertyDescription(kOfxImageEffectPropSupportedContexts, -1, "", false, "", + false), + PropertyDescription(kOfxParamHostPropSupportsStringAnimation, 1, 0, false, + 0, false), + PropertyDescription(kOfxParamHostPropSupportsCustomInteract, 1, 0, false, 0, + false), + PropertyDescription(kOfxParamHostPropSupportsChoiceAnimation, 1, 0, false, + 0, false), + PropertyDescription(kOfxParamHostPropSupportsBooleanAnimation, 1, 0, false, + 0, false), + PropertyDescription(kOfxParamHostPropSupportsCustomAnimation, 1, 0, false, + 0, false), + PropertyDescription(kOfxParamHostPropMaxParameters, 1, 0, false, 0, false), + PropertyDescription(kOfxParamHostPropMaxPages, 1, 0, false, 0, false), + PropertyDescription(kOfxParamHostPropPageRowColumnCount, 2, 0, false, 0, + false)}; + +// some host property descriptions we may be interested int +class HostDescription : public PropertySet { +public: + int hostIsBackground; + int supportsOverlays; + int supportsMultiResolution; + int supportsTiles; + int temporalClipAccess; + int supportsMultipleClipDepths; + int supportsMultipleClipPARs; + int supportsSetableFrameRate; + int supportsSetableFielding; + int supportsCustomAnimation; + int supportsStringAnimation; + int supportsCustomInteract; + int supportsChoiceAnimation; + int supportsBooleanAnimation; + int maxParameters; + int maxPages; + int pageRowCount; + int pageColumnCount; + + HostDescription(OfxPropertySetHandle handle); +}; +HostDescription *gHostDescription = 0; + +// create a host description, checking properties on the way +HostDescription::HostDescription(OfxPropertySetHandle handle) + : PropertySet(handle), hostIsBackground(false), supportsOverlays(false), + supportsMultiResolution(false), supportsTiles(false), + temporalClipAccess(false), supportsMultipleClipDepths(false), + supportsMultipleClipPARs(false), supportsSetableFrameRate(false), + supportsSetableFielding(false), supportsCustomAnimation(false), + supportsStringAnimation(false), supportsCustomInteract(false), + supportsChoiceAnimation(false), supportsBooleanAnimation(false), + maxParameters(-1), maxPages(-1), pageRowCount(-1), pageColumnCount(-1) { + spdlog::info("HostDescription::HostDescription - start ( fetching host " + "description);\n{"); + + // do basic existence checking with a PropertySetDescription + PropertySetDescription hostPropSet("Host", handle, gHostPropDescription, + sizeof(gHostPropDescription) / + sizeof(PropertyDescription)); + hostPropSet.checkProperties(); + hostPropSet.checkDefaults(); + hostPropSet.retrieveValues(true); + + // now go through and fill in the host description + hostIsBackground = + hostPropSet.intPropValue(kOfxImageEffectHostPropIsBackground); + supportsOverlays = + hostPropSet.intPropValue(kOfxImageEffectPropSupportsOverlays); + supportsMultiResolution = + hostPropSet.intPropValue(kOfxImageEffectPropSupportsMultiResolution); + supportsTiles = hostPropSet.intPropValue(kOfxImageEffectPropSupportsTiles); + temporalClipAccess = + hostPropSet.intPropValue(kOfxImageEffectPropTemporalClipAccess); + supportsMultipleClipDepths = + hostPropSet.intPropValue(kOfxImageEffectPropSupportsMultipleClipDepths); + supportsMultipleClipPARs = + hostPropSet.intPropValue(kOfxImageEffectPropSupportsMultipleClipPARs); + supportsSetableFrameRate = + hostPropSet.intPropValue(kOfxImageEffectPropSetableFrameRate); + supportsSetableFielding = + hostPropSet.intPropValue(kOfxImageEffectPropSetableFielding); + + supportsStringAnimation = + hostPropSet.intPropValue(kOfxParamHostPropSupportsStringAnimation); + supportsCustomInteract = + hostPropSet.intPropValue(kOfxParamHostPropSupportsCustomInteract); + supportsChoiceAnimation = + hostPropSet.intPropValue(kOfxParamHostPropSupportsChoiceAnimation); + supportsBooleanAnimation = + hostPropSet.intPropValue(kOfxParamHostPropSupportsBooleanAnimation); + supportsCustomAnimation = + hostPropSet.intPropValue(kOfxParamHostPropSupportsCustomAnimation); + maxParameters = hostPropSet.intPropValue(kOfxParamHostPropMaxParameters); + maxPages = hostPropSet.intPropValue(kOfxParamHostPropMaxPages); + pageRowCount = + hostPropSet.intPropValue(kOfxParamHostPropPageRowColumnCount, 0); + pageColumnCount = + hostPropSet.intPropValue(kOfxParamHostPropPageRowColumnCount, 1); + + spdlog::info("}HostDescription::HostDescription - stop;"); +} + +//////////////////////////////////////////////////////////////////////////////// +// test the memory suite +static void testMemorySuite(void) { + spdlog::info("testMemorySuite - start();\n{"); + void *oneMeg; + + OfxStatus stat = gMemorySuite->memoryAlloc(NULL, 1024 * 1024, &oneMeg); + if (stat != kOfxStatOK) + spdlog::error( + "OfxMemorySuiteV1::memoryAlloc failed to alloc 1MB, returned %s", + mapStatus(stat)); + + if (stat == kOfxStatOK) { + // touch 'em all to see if it crashes + char *lotsOfChars = (char *)oneMeg; + for (int i = 0; i < 1024 * 1024; i++) { + *lotsOfChars++ = 0; + } + + stat = gMemorySuite->memoryFree(oneMeg); + if (stat != kOfxStatOK) + spdlog::error( + "OfxMemorySuiteV1::memoryFree failed to free 1MB, returned %s", + mapStatus(stat)); + } + + spdlog::info("}HostDescription::HostDescription - stop;"); +} + +//////////////////////////////////////////////////////////////////////////////// +// how many times has actionLoad been called +static int gLoadCount = 0; + +/** @brief Called at load */ +static OfxStatus actionLoad(void) { + spdlog::info("loadAction - start();\n{"); + if (gLoadCount != 0) + spdlog::error( + "Load action called more than once without unload being called;"); + gLoadCount++; + + OfxStatus status = kOfxStatOK; + + try { + // fetch the suites + if (gHost == 0) + spdlog::error("Host pointer has not been set;"); + if (!gHost) + throw kOfxStatErrBadHandle; + + if (gLoadCount == 1) { + gEffectSuite = + (OfxImageEffectSuiteV1 *)fetchSuite(kOfxImageEffectSuite, 1); + gPropSuite = (OfxPropertySuiteV1 *)fetchSuite(kOfxPropertySuite, 1); + gParamSuite = (OfxParameterSuiteV1 *)fetchSuite(kOfxParameterSuite, 1); + gMemorySuite = (OfxMemorySuiteV1 *)fetchSuite(kOfxMemorySuite, 1); + gThreadSuite = + (OfxMultiThreadSuiteV1 *)fetchSuite(kOfxMultiThreadSuite, 1); + gMessageSuite = (OfxMessageSuiteV1 *)fetchSuite(kOfxMessageSuite, 1); + + // OK check and fetch host information + gHostDescription = new HostDescription(gHost->host); + + // fetch the interact suite if the host supports interaction + if (gHostDescription->supportsOverlays || + gHostDescription->supportsCustomInteract) + gInteractSuite = (OfxInteractSuiteV1 *)fetchSuite(kOfxInteractSuite, 1); + + // test the memory suite + testMemorySuite(); + } + } + + catch (int err) { + status = err; + } + + spdlog::info("}loadAction - stop;"); + return status; +} + +/** @brief Called before unload */ +static OfxStatus unLoadAction(void) { + if (gLoadCount <= 0) + spdlog::error("UnLoad action called without a corresponding load action " + "having been called;"); + gLoadCount--; + + // force these to null + gEffectSuite = 0; + gPropSuite = 0; + gParamSuite = 0; + gMemorySuite = 0; + gThreadSuite = 0; + gMessageSuite = 0; + gInteractSuite = 0; + return kOfxStatOK; +} + +// instance construction +static OfxStatus createInstance(OfxImageEffectHandle /*effect*/) { + return kOfxStatOK; +} + +// instance destruction +static OfxStatus destroyInstance(OfxImageEffectHandle /*effect*/) { + return kOfxStatOK; +} + +// tells the host what region we are capable of filling +OfxStatus getSpatialRoD(OfxImageEffectHandle /*effect*/, + OfxPropertySetHandle /*inArgs*/, + OfxPropertySetHandle /*outArgs*/) { + return kOfxStatOK; +} + +// tells the host how much of the input we need to fill the given window +OfxStatus getSpatialRoI(OfxImageEffectHandle /*effect*/, + OfxPropertySetHandle /*inArgs*/, + OfxPropertySetHandle /*outArgs*/) { + return kOfxStatOK; +} + +// Tells the host how many frames we can fill, only called in the general +// context. This is actually redundant as this is the default behaviour, but for +// illustrative purposes. +OfxStatus getTemporalDomain(OfxImageEffectHandle /*effect*/, + OfxPropertySetHandle /*inArgs*/, + OfxPropertySetHandle /*outArgs*/) { + return kOfxStatOK; +} + +// Set our clip preferences +static OfxStatus getClipPreferences(OfxImageEffectHandle /*effect*/, + OfxPropertySetHandle /*inArgs*/, + OfxPropertySetHandle /*outArgs*/) { + return kOfxStatOK; +} + +// are the settings of the effect performing an identity operation +static OfxStatus isIdentity(OfxImageEffectHandle /*effect*/, + OfxPropertySetHandle /*inArgs*/, + OfxPropertySetHandle /*outArgs*/) { + // In this case do the default, which in this case is to render + return kOfxStatReplyDefault; +} + +//////////////////////////////////////////////////////////////////////////////// +// function called when the instance has been changed by anything +static OfxStatus instanceChanged(OfxImageEffectHandle /*effect*/, + OfxPropertySetHandle /*inArgs*/, + OfxPropertySetHandle /*outArgs*/) { + // don't trap any others + return kOfxStatReplyDefault; +} + +// the process code that the host sees +static OfxStatus render(OfxImageEffectHandle /*instance*/, + OfxPropertySetHandle /*inArgs*/, + OfxPropertySetHandle /*outArgs*/) { + return kOfxStatOK; +} + +// describe the plugin in context +static OfxStatus describeInContext(OfxImageEffectHandle /*effect*/, + OfxPropertySetHandle /*inArgs*/) { + return kOfxStatOK; +} + +//////////////////////////////////////////////////////////////////////////////// +// code for the plugin's description routine + +// contexts we can be +static const char *gSupportedContexts[] = { + kOfxImageEffectContextGenerator, kOfxImageEffectContextFilter, + kOfxImageEffectContextTransition, kOfxImageEffectContextPaint, + kOfxImageEffectContextGeneral, kOfxImageEffectContextRetimer}; + +// pixel depths we can be +static const char *gSupportedPixelDepths[] = { + kOfxBitDepthByte, kOfxBitDepthShort, kOfxBitDepthFloat}; + +// the values to set and the defaults to check on the various properties +static PropertyDescription gPluginPropertyDescriptions[] = { + PropertyDescription(kOfxPropType, 1, "", false, kOfxTypeImageEffect, true), + PropertyDescription(kOfxPropLabel, 1, "OFX Test Properties", true, "", + false), + PropertyDescription(kOfxPropShortLabel, 1, "OFX Test Props", true, "", + false), + PropertyDescription(kOfxPropLongLabel, 1, "OFX Test Properties", true, "", + false), + PropertyDescription(kOfxPluginPropFilePath, 1, "", false, "", false), + PropertyDescription(kOfxImageEffectPluginPropGrouping, 1, "OFX Example", + true, "", false), + PropertyDescription(kOfxImageEffectPluginPropSingleInstance, 1, 0, true, 0, + true), + PropertyDescription(kOfxImageEffectPluginRenderThreadSafety, 1, + kOfxImageEffectRenderFullySafe, true, + kOfxImageEffectRenderFullySafe, true), + PropertyDescription(kOfxImageEffectPluginPropHostFrameThreading, 1, 0, true, + 0, true), + PropertyDescription(kOfxImageEffectPluginPropOverlayInteractV1, 1, + (void *)(0), true, (void *)(0), true), + PropertyDescription(kOfxImageEffectPropSupportsMultiResolution, 1, 1, true, + 1, true), + PropertyDescription(kOfxImageEffectPropSupportsTiles, 1, 1, true, 1, true), + PropertyDescription(kOfxImageEffectPropTemporalClipAccess, 1, 0, true, 0, + true), + PropertyDescription(kOfxImageEffectPluginPropFieldRenderTwiceAlways, 1, 1, + true, 1, true), + PropertyDescription(kOfxImageEffectPropSupportsMultipleClipDepths, 1, 0, + true, 0, true), + PropertyDescription(kOfxImageEffectPropSupportsMultipleClipPARs, 1, 0, true, + 0, true), + PropertyDescription( + kOfxImageEffectPropSupportedContexts, -1, gSupportedContexts, + sizeof(gSupportedContexts) / sizeof(char *), gSupportedContexts, 0), + PropertyDescription(kOfxImageEffectPropSupportedPixelDepths, -1, + gSupportedPixelDepths, + sizeof(gSupportedPixelDepths) / sizeof(char *), + gSupportedPixelDepths, 0)}; + +static OfxStatus actionDescribe(OfxImageEffectHandle effect) { + // get the property handle for the plugin + OfxPropertySetHandle effectProps; + gEffectSuite->getPropertySet(effect, &effectProps); + + // check the defaults + PropertySetDescription pluginPropSet( + "Plugin", effectProps, gPluginPropertyDescriptions, + sizeof(gPluginPropertyDescriptions) / sizeof(PropertyDescription)); + pluginPropSet.checkProperties(); + pluginPropSet.checkDefaults(); + pluginPropSet.retrieveValues(true); + pluginPropSet.setValues(); + + return kOfxStatOK; +} + +////////////////////////////////////////////////////////////////////////////////. +// check handles to the main function +static void checkMainHandles(const char *action, const void *handle, + OfxPropertySetHandle inArgsHandle, + OfxPropertySetHandle outArgsHandle, + bool handleCanBeNull, bool inArgsCanBeNull, + bool outArgsCanBeNull) { + if (handleCanBeNull) { + if (handle != 0) { + spdlog::warn("Handle passed to '%s' is not null;", action); + } else if (handle == 0) { + spdlog::error("'Handle passed to '%s' is null;", action); + } + } + + if (inArgsCanBeNull) { + if (inArgsHandle != 0) { + spdlog::warn("'inArgs' Handle passed to '%s' is not null;", action); + } else if (inArgsHandle == 0) { + spdlog::error("'inArgs' handle passed to '%s' is null;", action); + } + } + + if (outArgsCanBeNull) { + if (outArgsHandle != 0) { + spdlog::warn("'outArgs' Handle passed to '%s' is not null;", action); + } else if (outArgsHandle == 0) { + spdlog::error("'outArgs' handle passed to '%s' is null;", action); + } + } + + if (!handleCanBeNull && !handle) + throw kOfxStatErrBadHandle; + if (!inArgsCanBeNull && !inArgsHandle) + throw kOfxStatErrBadHandle; + if (!outArgsCanBeNull && !outArgsHandle) + throw kOfxStatErrBadHandle; +} + +//////////////////////////////////////////////////////////////////////////////// +// The main function +static OfxStatus pluginMain(const char *action, const void *handle, + OfxPropertySetHandle inArgsHandle, + OfxPropertySetHandle outArgsHandle) { + spdlog::info("pluginMain - start();\n{"); + spdlog::info(" action is '%s';", action); + OfxStatus stat = kOfxStatReplyDefault; + + try { + // cast to handle appropriate type + OfxImageEffectHandle effectHandle = (OfxImageEffectHandle)handle; + + // construct two property set wrappers + PropertySet inArgs(inArgsHandle); + PropertySet outArgs(outArgsHandle); + + if (!strcmp(action, kOfxActionLoad)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, true, true, + true); + stat = actionLoad(); + } else if (!strcmp(action, kOfxActionUnload)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, true, true, + true); + stat = unLoadAction(); + } else if (!strcmp(action, kOfxActionDescribe)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, true, + true); + stat = actionDescribe(effectHandle); + } else if (!strcmp(action, kOfxActionPurgeCaches)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, true, + true); + } else if (!strcmp(action, kOfxActionSyncPrivateData)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, true, + true); + } else if (!strcmp(action, kOfxActionCreateInstance)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, true, + true); + stat = createInstance(effectHandle); + } else if (!strcmp(action, kOfxActionDestroyInstance)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, true, + true); + stat = destroyInstance(effectHandle); + } else if (!strcmp(action, kOfxActionInstanceChanged)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, + false, true); + } else if (!strcmp(action, kOfxActionBeginInstanceChanged)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, + false, true); + } else if (!strcmp(action, kOfxActionEndInstanceChanged)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, + false, true); + stat = instanceChanged(effectHandle, inArgsHandle, outArgsHandle); + } else if (!strcmp(action, kOfxActionBeginInstanceEdit)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, true, + true); + } else if (!strcmp(action, kOfxActionEndInstanceEdit)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, true, + true); + } else if (!strcmp(action, kOfxImageEffectActionGetRegionOfDefinition)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, + false, false); + } else if (!strcmp(action, kOfxImageEffectActionGetRegionsOfInterest)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, + false, false); + } else if (!strcmp(action, kOfxImageEffectActionGetTimeDomain)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, true, + false); + } else if (!strcmp(action, kOfxImageEffectActionGetFramesNeeded)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, + false, false); + } else if (!strcmp(action, kOfxImageEffectActionGetClipPreferences)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, + false, false); + stat = getClipPreferences(effectHandle, inArgsHandle, outArgsHandle); + } else if (!strcmp(action, kOfxImageEffectActionIsIdentity)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, + false, false); + stat = isIdentity(effectHandle, inArgsHandle, outArgsHandle); + } else if (!strcmp(action, kOfxImageEffectActionRender)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, + false, true); + stat = render(effectHandle, inArgsHandle, outArgsHandle); + } else if (!strcmp(action, kOfxImageEffectActionBeginSequenceRender)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, + false, true); + } else if (!strcmp(action, kOfxImageEffectActionEndSequenceRender)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, + false, true); + } else if (!strcmp(action, kOfxImageEffectActionDescribeInContext)) { + checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, + false, true); + stat = describeInContext(effectHandle, inArgsHandle); + } else { + spdlog::error("Unknown action '%s';", action); + } + } catch (std::bad_alloc) { + // catch memory + spdlog::error("OFX Plugin Memory error;"); + stat = kOfxStatErrMemory; + } catch (const std::exception &e) { + // standard exceptions + spdlog::error("Plugin exception: '%s';", e.what()); + stat = kOfxStatErrUnknown; + } catch (int err) { + // ho hum, gone wrong somehow + spdlog::error("Misc int plugin exception: '%s';", mapStatus(err)); + stat = err; + } catch (...) { + // everything else + spdlog::error("Uncaught misc plugin exception;"); + stat = kOfxStatErrUnknown; + } + + spdlog::info("}pluginMain - stop;"); + + // other actions to take the default value + return stat; +} + +// function to set the host structure +static void setHostFunc(OfxHost *hostStruct) { + spdlog::info("setHostFunc - start();\n{"); + if (hostStruct == 0) + spdlog::error("host is a null pointer;"); + gHost = hostStruct; + spdlog::info("}setHostFunc - stop;"); +} + +//////////////////////////////////////////////////////////////////////////////// +// the plugin struct +static OfxPlugin basicPlugin = {kOfxImageEffectPluginApi, + 1, + "net.sf.openfx:PropertyTestPlugin", + 1, + 0, + setHostFunc, + pluginMain}; + +// the two mandated functions +EXPORT OfxPlugin *OfxGetPlugin(int nth) { + spdlog::info("OfxGetPlugin - start();\n{"); + spdlog::info(" asking for %dth plugin;", nth); + if (nth != 0) + spdlog::error( + "requested plugin %d is more than the number of plugins in the file;", + nth); + spdlog::info("}OfxGetPlugin - stop;"); + + if (nth == 0) + return &basicPlugin; + return 0; +} + +EXPORT int OfxGetNumberOfPlugins(void) { + spdlog::info("OfxGetNumberOfPlugins - start();\n{"); + spdlog::info("}OfxGetNumberOfPlugins - stop;"); + return 1; +} + +//////////////////////////////////////////////////////////////////////////////// +// globals destructor, the destructor is called when the plugin is unloaded +class GlobalDestructor { +public: + ~GlobalDestructor(); +}; + +GlobalDestructor::~GlobalDestructor() { + if (gHostDescription) + delete gHostDescription; +} + +static GlobalDestructor globalDestructor; From 64bbb8d61ec09538cbec5e71d07c971f96c95ff1 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Wed, 26 Feb 2025 14:56:42 -0500 Subject: [PATCH 16/33] Support: Props accessor using new metadata Update testProperties sample to use it (WIP) Signed-off-by: Gary Oberbrunner --- Examples/TestProps/testProperties.cpp | 1350 +++---------------- Support/include/ofxPropsAccess.h | 627 +++++++++ Support/include/ofxPropsBySet.h | 1037 +++++++-------- Support/include/ofxPropsMetadata.h | 1713 ++++++++++++++++++++++--- Support/include/ofxStatusStrings.h | 56 + include/ofx-props.yml | 4 +- scripts/gen-props.py | 141 +- 7 files changed, 3010 insertions(+), 1918 deletions(-) create mode 100644 Support/include/ofxPropsAccess.h create mode 100644 Support/include/ofxStatusStrings.h diff --git a/Examples/TestProps/testProperties.cpp b/Examples/TestProps/testProperties.cpp index 8e20b7a2..67364a01 100644 --- a/Examples/TestProps/testProperties.cpp +++ b/Examples/TestProps/testProperties.cpp @@ -10,12 +10,14 @@ #include "ofxMemory.h" #include "ofxMessage.h" #include "ofxMultiThread.h" +#include "ofxPropsAccess.h" #include "ofxPropsBySet.h" // in Support/include #include "ofxPropsMetadata.h" #include "spdlog/spdlog.h" #include // stl maps #include // stl strings #include +#include #if defined __APPLE__ || defined __linux__ || defined __FreeBSD__ #define EXPORT __attribute__((visibility("default"))) @@ -25,6 +27,8 @@ #error Not building on your operating system quite yet #endif +using namespace OpenFX; // for props access + static OfxHost *gHost; static OfxImageEffectSuiteV1 *gEffectSuite; static OfxPropertySuiteV1 *gPropSuite; @@ -41,11 +45,11 @@ static const void *fetchSuite(const char *suiteName, int suiteVersion, const void *suite = gHost->fetchSuite(gHost->host, suiteName, suiteVersion); if (optional) { if (suite == 0) - spdlog::warn("Could not fetch the optional suite '%s' version %d;", + spdlog::warn("Could not fetch the optional suite '{}' version {};", suiteName, suiteVersion); } else { if (suite == 0) - spdlog::error("Could not fetch the mandatory suite '%s' version %d;", + spdlog::error("Could not fetch the mandatory suite '{}' version {};", suiteName, suiteVersion); } if (!optional && suite == 0) @@ -93,1124 +97,98 @@ static const char *mapStatus(OfxStatus stat) { return "UNKNOWN STATUS CODE"; } +// ======================================================================== +// Read all props in a prop set +// ======================================================================== -/*************************************************************************/ - -/* PropertyValue usage (using enum because it's most complex): - std::vector colors = {"red", "green", "blue"}; - PropertyValue enumProp(3, "red", colors); - enumProp.set(1, "green"); // throws exception if not allowed - auto values = enumProp.get(); - std::cout << enumProp.toString() << std::endl; - - PropertyValue intProp(5, 0); - intProp.set({1, 2, 3, 4, 5}); - intProp.set(2, 10); // Changes the third element to 10 - std::vector values = intProp.get(); - int value = intProp.get(2); // Retrieves the value 10 - intProp.size(); // returns 5 -*/ - -class PropertyValue { -public: - enum class Type { Int, Double, Bool, String, Pointer, Enum }; - - using value_type = std::variant; - -private: - std::vector data; - Type type_; - std::vector enum_values; // Only used if type_ == Type::Enum - - template - static constexpr bool is_supported_type = - std::is_same_v || std::is_same_v || - std::is_same_v || std::is_same_v || - std::is_same_v; - - template static std::string type_name() { - if constexpr (std::is_same_v) - return "int"; - else if constexpr (std::is_same_v) - return "double"; - else if constexpr (std::is_same_v) - return "bool"; - else if constexpr (std::is_same_v) - return "string"; - else if constexpr (std::is_same_v) - return "pointer"; - else - return "unknown"; - } - - static std::string type_to_string(Type t) { - switch (t) { - case Type::Int: - return "int"; - case Type::Double: - return "double"; - case Type::Bool: - return "bool"; - case Type::String: - return "string"; - case Type::Pointer: - return "pointer"; - case Type::Enum: - return "enum"; - default: - return "unknown"; - } - } - - static std::string format_value(const value_type &v) { - return std::visit( - [](const auto &x) { - using T = std::decay_t; - if constexpr (std::is_same_v) { - return std::string(x ? "true" : "false"); - } else if constexpr (std::is_same_v) { - return fmt::format("\"{}\"", x); - } else if constexpr (std::is_same_v) { - return fmt::format("{:p}", x); - } else { - return fmt::format("{}", x); - } - }, - v); - } - - void check_enum_value(const std::string &value) const { - if (std::find(enum_values.begin(), enum_values.end(), value) == - enum_values.end()) { - throw std::invalid_argument( - fmt::format("Invalid enum value '{}'. Allowed values are: {}", value, - enum_values_list())); - } - } - - std::string enum_values_list() const { - std::string list; - for (size_t i = 0; i < enum_values.size(); ++i) { - if (i > 0) - list += ", "; - list += enum_values[i]; - } - return list; - } +using PropValue = std::variant; -public: - // Constructor for basic types - template - PropertyValue(std::size_t size, const T &initial_value = T{}) - : data(size, initial_value) { - static_assert(is_supported_type, "Unsupported type"); - - if constexpr (std::is_same_v) - type_ = Type::Int; - else if constexpr (std::is_same_v) - type_ = Type::Double; - else if constexpr (std::is_same_v) - type_ = Type::Bool; - else if constexpr (std::is_same_v) - type_ = Type::String; - else if constexpr (std::is_same_v) - type_ = Type::Pointer; - } - - // Constructor for enum type - PropertyValue(std::size_t size, const std::string &initial_value, - const std::vector &allowed_values) - : data(size, initial_value), type_(Type::Enum), - enum_values(allowed_values) { - check_enum_value(initial_value); // Validate initial value - } - - // Set values from a vector - template void set(const std::vector &values) { - static_assert(is_supported_type, "Unsupported type"); - if (values.size() != data.size()) { - throw std::length_error( - fmt::format("Size mismatch: container size is {}, input size is {}", - data.size(), values.size())); - } - if (type_ != get_type()) { - throw std::runtime_error( - fmt::format("Type mismatch: container type is {}, input type is {}", - type_to_string(type_), type_name())); - } - if (type_ == Type::Enum) { - for (const auto &val : values) { - check_enum_value(val); - } - } - for (size_t i = 0; i < values.size(); ++i) { - data[i] = values[i]; - } - } - - // Set value at a specific index - template void set(std::size_t index, const T &value) { - static_assert(is_supported_type, "Unsupported type"); - if (index >= data.size()) { - throw std::out_of_range( - fmt::format("Index {} out of range. Size is {}", index, data.size())); - } - if (type_ != get_type()) { - throw std::runtime_error( - fmt::format("Type mismatch: container type is {}, input type is {}", - type_to_string(type_), type_name())); - } - if (type_ == Type::Enum) { - check_enum_value(value); - } - data[index] = value; - } - - // Get all values as a vector - template std::vector get() const { - static_assert(is_supported_type, "Unsupported type"); - if (type_ != get_type()) { - throw std::runtime_error(fmt::format( - "Type mismatch: container type is {}, requested type is {}", - type_to_string(type_), type_name())); - } - std::vector result; - result.reserve(data.size()); - for (const auto &v : data) { - result.push_back(std::get(v)); - } - return result; - } - - // Get value at a specific index - template T get(std::size_t index) const { - static_assert(is_supported_type, "Unsupported type"); - if (index >= data.size()) { - throw std::out_of_range( - fmt::format("Index {} out of range. Size is {}", index, data.size())); - } - if (type_ != get_type()) { - throw std::runtime_error(fmt::format( - "Type mismatch: container type is {}, requested type is {}", - type_to_string(type_), type_name())); - } - return std::get(data[index]); - } - - std::string toString() const { - if (data.empty()) - return ""; - std::string values; - for (size_t i = 0; i < data.size(); ++i) { - if (i > 0) - values += ", "; - values += format_value(data[i]); - } - std::string type_str = type_to_string(type_); - if (type_ == Type::Enum) { - type_str += "{" + enum_values_list() + "}"; - } - return fmt::format("<{}>[{}]", type_str, values); - } - - std::size_t size() const { return data.size(); } - Type type() const { return type_; } - void resize(std::size_t new_size) { data.resize(new_size); } - void reserve(std::size_t new_capacity) { data.reserve(new_capacity); } - void clear() { data.clear(); } - bool empty() const { return data.empty(); } - -private: - // Helper to get Type enum from a template type - template static constexpr Type get_type() { - if constexpr (std::is_same_v) - return Type::Int; - else if constexpr (std::is_same_v) - return Type::Double; - else if constexpr (std::is_same_v) - return Type::Bool; - else if constexpr (std::is_same_v) - return Type::String; - else if constexpr (std::is_same_v) - return Type::Pointer; - else - return Type::Enum; // For enum type - } -}; - -// Use this as comparator to simplify maps on strings -struct StringCompare { - using is_transparent = void; // Enables heterogeneous lookup - bool operator()(std::string_view a, std::string_view b) const { - return a < b; - } +struct PropRecord { + const PropDef &def; + std::vector values; }; -/** @brief wraps up a set of properties - auto ps = PropertySet::create(name, handle); // returns std::optional (false if no such name) - ps->add(propname); // adds from props_metadata - auto data = ps->get(propname); - ps->set(propname, {...values...}); - */ -class PropertySet { -protected: - std::string name; - std::map properties; - int _propLogMessages; // if more than 0, don't log ordinary messages - OfxPropertySetHandle _propHandle; - - std::vector prop_defs; +void readProperty(PropertyAccessor &accessor, const PropDef &def, + std::vector &values) { + int dimension = accessor.getDimensionRaw(def.name); -private: - PropertySet(); + values.clear(); + values.reserve(dimension); -public: - static std::optional create(const std::string &name, - OfxPropertySetHandle h = 0) { - PropertySet ps; - ps.name = name; - ps._propHandle = h; - - auto it = OpenFX::prop_sets.find(name.c_str()); - if (it == OpenFX::prop_sets.end()) - return std::nullopt; - ps.prop_defs = it->second; - return ps; - } + // Read all values based on the primary type + PropType primaryType = def.supportedTypes[0]; - virtual ~PropertySet(); - void propSetHandle(OfxPropertySetHandle h) { _propHandle = h; } - - std::optional - find_prop(std::string_view propname) { - auto it = std::find_if( - OpenFX::props_metadata.begin(), OpenFX::props_metadata.end(), - [&](const OpenFX::PropsMetadata &pm) { return pm.name == propname; }); - if (it == OpenFX::props_metadata.end()) - return std::nullopt; - return &(*it); - } - - void add(const std::string_view& propname) { - if (properties.find(propname) != properties.end()) { - // already in the map; do nothing - return; - } - - if (auto meta = find_prop(propname)) { - auto &metadata = *(*meta); - int n = metadata.dimension > 0 ? metadata.dimension : 4; // XXX - PropertyValue v(0, 0); - switch (metadata.types[0]) { - case OpenFX::PropType::Int: - v = PropertyValue(n, 0); - break; - case OpenFX::PropType::Double: - v = PropertyValue(n, 0.0); - break; - case OpenFX::PropType::Bool: - v = PropertyValue(n, true); - break; - case OpenFX::PropType::String: - v = PropertyValue(n, ""); - break; - case OpenFX::PropType::Bytes: - v = PropertyValue(n, ""); - break; - case OpenFX::PropType::Pointer: - v = PropertyValue(n, (void *)0); - break; - default: - throw std::runtime_error(fmt::format("{}: Invalid type for {} in props_metadata", name, propname)); - } - properties[std::string(propname)] = v; - spdlog::info("Propset {}: added property {}, value {}", name, propname, v); - } - else { - throw std::runtime_error(fmt::format("{}: No such propname {} found in props_metadata", name, propname)); - } - } - - template - const std::vector &get_current(std::string_view propname) { - return properties.find(propname)->second.get(); - }; - template const T get_current(std::string_view propname, int index) { - return properties.find(propname)->second.get(index); - } - template - void set_current(std::string_view propname, int n, const T *values) { - properties.find(propname)->second.set(values); - }; - - // Get values from the host, saving locally - void get(std::string_view propname) { - const int max_n = 128; - auto& prop = properties.find(propname)->second; - switch (prop.type()) { - case PropertyValue::Type::Bool: - [[fallthrough]]; - case PropertyValue::Type::Int: { - int values[max_n]; - int dim; - OfxStatus stat; - stat = gPropSuite->propGetDimension(_propHandle, propname.data(), &dim); - if (stat != kOfxStatOK) - throw new std::runtime_error( - fmt::format("Error getting dims for prop {} in suite {}: {}", - propname, name, mapStatus(stat))); - stat = - gPropSuite->propGetIntN(_propHandle, propname.data(), dim, values); - if (stat != kOfxStatOK) - throw new std::runtime_error( - fmt::format("Error getting values for {}-d prop {} in suite {}: {}", - dim, propname, name, mapStatus(stat))); - // Save locally, checking dim & type - prop.set(std::vector(dim, values)); - break; - } - case PropertyValue::Type::Double: { - double values[max_n]; - int dim; - OfxStatus stat; - stat = gPropSuite->propGetDimension(_propHandle, propname.data(), &dim); - if (stat != kOfxStatOK) - throw new std::runtime_error( - fmt::format("Error getting dims for prop {} in suite {}: {}", - propname, name, mapStatus(stat))); - stat = - gPropSuite->propGetDoubleN(_propHandle, propname.data(), dim, values); - if (stat != kOfxStatOK) - throw new std::runtime_error( - fmt::format("Error getting values for {}-d prop {} in suite {}: {}", - dim, propname, name, mapStatus(stat))); - // Save locally, checking dim & type - prop.set(std::vector(dim, values)); - break; - } - case PropertyValue::Type::String: - [[fallthrough]]; - case PropertyValue::Type::Enum: { - char *values[max_n]; - int dim; - OfxStatus stat; - stat = gPropSuite->propGetDimension(_propHandle, propname.data(), &dim); - if (stat != kOfxStatOK) - throw new std::runtime_error( - fmt::format("Error getting dims for prop {} in suite {}: {}", - propname, name, mapStatus(stat))); - stat = - gPropSuite->propGetStringN(_propHandle, propname.data(), dim, values); - if (stat != kOfxStatOK) - throw new std::runtime_error( - fmt::format("Error getting values for {}-d prop {} in suite {}: {}", - dim, propname, name, mapStatus(stat))); - // Save locally, checking dim & type - prop.set(std::vector(dim, values)); - break; - } - case PropertyValue::Type::Pointer: { - void *values[max_n]; - int dim; - OfxStatus stat; - stat = gPropSuite->propGetDimension(_propHandle, propname.data(), &dim); - if (stat != kOfxStatOK) - throw new std::runtime_error( - fmt::format("Error getting dims for prop {} in suite {}: {}", - propname, name, mapStatus(stat))); - stat = - gPropSuite->propGetPointerN(_propHandle, propname.data(), dim, values); - if (stat != kOfxStatOK) - throw new std::runtime_error( - fmt::format("Error getting values for {}-d prop {} in suite {}: {}", - dim, propname, name, mapStatus(stat))); - // Save locally, checking dim & type - prop.set(std::vector(dim, values)); - break; - } + for (int i = 0; i < dimension; ++i) { + if (primaryType == PropType::Int || primaryType == PropType::Bool) { + values.push_back(accessor.getRaw(def.name, i)); + } else if (primaryType == PropType::Double) { + values.push_back(accessor.getRaw(def.name, i)); + } else if (primaryType == PropType::String || + primaryType == PropType::Enum) { + values.push_back(accessor.getRaw(def.name, i)); + } else if (primaryType == PropType::Pointer) { + values.push_back(accessor.getRaw(def.name, i)); } } - - // inc/dec the log flag to enable/disable ordinary message logging - void propEnableLog(void) { --_propLogMessages; } - void propDisableLog(void) { ++_propLogMessages; } -}; - - -//////////////////////////////////////////////////////////////////////////////// -// Describes a set of properties -class PropertySetDescription : PropertySet { -protected: - const char *_setName; - PropertyDescription *_descriptions; - int _nDescriptions; - - std::map _descriptionsByName; - -public: - PropertySetDescription(const char *setName, OfxPropertySetHandle handle, - PropertyDescription *v, int nV); - void checkProperties(bool logOrdinaryMessages = - false); // see if they are there in the first place - void checkDefaults(bool logOrdinaryMessages = false); // check default values - void retrieveValues( - bool logOrdinaryMessages = false); // get current values on the host - void setValues( - bool logOrdinaryMessages = false); // set values to the requested ones - PropertyDescription *findDescription( - const std::string &name); // find a property with the given name - - int intPropValue(const std::string &name, int idx = 0); - double doublePropValue(const std::string &name, int idx = 0); - void *pointerPropValue(const std::string &name, int idx = 0); - const std::string &stringPropValue(const std::string &name, int idx = 0); -}; - -//////////////////////////////////////////////////////////////////////////////// -// property set code -PropertySet::~PropertySet() {} - -OfxStatus PropertySet::propSet(const char *property, void *value, int idx) { - OfxStatus stat = - gPropSuite->propSetPointer(_propHandle, property, idx, value); - if (stat != kOfxStatOK) - spdlog::error("Failed on setting pointer property %s[%d] to %p, host " - "returned status %s;", - property, idx, value, mapStatus(stat)); - if (stat == kOfxStatOK && _propLogMessages <= 0) - spdlog::info("Set pointer property %s[%d] = %p;", property, idx, value); - return stat; } -OfxStatus PropertySet::propSet(const char *property, const std::string &value, - int idx) { - OfxStatus stat = - gPropSuite->propSetString(_propHandle, property, idx, value.c_str()); - if (stat != kOfxStatOK) - spdlog::error("Failed on setting string property %s[%d] to '%s', host " - "returned status %s;", - property, idx, value.c_str(), mapStatus(stat)); - if (stat == kOfxStatOK && _propLogMessages <= 0) - spdlog::info("Set string property %s[%d] = '%s';", property, idx, - value.c_str()); - return stat; -} +std::vector getAllPropertiesOfSet(PropertyAccessor &accessor, + const char *propertySetName) { + std::vector result; -OfxStatus PropertySet::propSet(const char *property, double value, int idx) { - OfxStatus stat = gPropSuite->propSetDouble(_propHandle, property, idx, value); - if (stat != kOfxStatOK) - spdlog::error("Failed on setting double property %s[%d] to %g, host " - "returned status %s;", - property, idx, value, mapStatus(stat)); - if (stat == kOfxStatOK && _propLogMessages <= 0) - spdlog::info("Set double property %s[%d] = %g;", property, idx, value); - return stat; -} - -OfxStatus PropertySet::propSet(const char *property, int value, int idx) { - OfxStatus stat = gPropSuite->propSetInt(_propHandle, property, idx, value); - if (stat != kOfxStatOK) - spdlog::error("Failed on setting int property %s[%d] to %d, host returned " - "status '%s';", - property, idx, value, mapStatus(stat)); - if (stat == kOfxStatOK && _propLogMessages <= 0) - spdlog::info("Set int property %s[%d] = %d;", property, idx, value); - return stat; -} - -OfxStatus PropertySet::propGet(const char *property, void *&value, - int idx) const { - OfxStatus stat = - gPropSuite->propGetPointer(_propHandle, property, idx, &value); - if (stat != kOfxStatOK) - spdlog::error( - "Failed on fetching pointer property %s[%d], host returned status %s;", - property, idx, mapStatus(stat)); - if (stat == kOfxStatOK && _propLogMessages <= 0) - spdlog::info("Fetched pointer property %s[%d] = %p;", property, idx, value); - return stat; -} - -OfxStatus PropertySet::propGet(const char *property, double &value, - int idx) const { - OfxStatus stat = - gPropSuite->propGetDouble(_propHandle, property, idx, &value); - if (stat != kOfxStatOK) - spdlog::error( - "Failed on fetching double property %s[%d], host returned status %s;", - property, idx, mapStatus(stat)); - if (stat == kOfxStatOK && _propLogMessages <= 0) - spdlog::info("Fetched double property %s[%d] = %g;", property, idx, value); - return stat; -} - -OfxStatus PropertySet::propGetN(const char *property, double *values, - int N) const { - OfxStatus stat = gPropSuite->propGetDoubleN(_propHandle, property, N, values); - if (stat != kOfxStatOK) - spdlog::error("Failed on fetching multiple double property %s X %d, host " - "returned status %s;", - property, N, mapStatus(stat)); - if (stat == kOfxStatOK && _propLogMessages <= 0) { - spdlog::info("Fetched multiple double property %s X %d;", property, N); - for (int i = 0; i < N; i++) { - spdlog::info(" %s[%d] = %g;", property, i, values[i]); - } + // Find the property set in the map + auto setIt = prop_sets.find(propertySetName); + if (setIt == prop_sets.end()) { + spdlog::error("Property set not found: {}", propertySetName); + return {}; } - return stat; -} -OfxStatus PropertySet::propGetN(const char *property, int *values, - int N) const { - OfxStatus stat = gPropSuite->propGetIntN(_propHandle, property, N, values); - if (stat != kOfxStatOK) - spdlog::error("Failed on fetching multiple int property %s X %d, host " - "returned status %s;", - property, N, mapStatus(stat)); - if (stat == kOfxStatOK && _propLogMessages <= 0) { - spdlog::info("Fetched multiple int property %s X %d;", property, N); - for (int i = 0; i < N; i++) { - spdlog::info(" %s[%d] = %d;", property, i, values[i]); - } + // Read each property and push onto result + for (const auto &prop : setIt->second) { + // Use template dispatch to get property with correct type + std::vector values; + readProperty(accessor, prop.def, values); + result.push_back({prop.def, std::move(values)}); } - return stat; + return result; } -OfxStatus PropertySet::propGet(const char *property, int &value, - int idx) const { - OfxStatus stat = gPropSuite->propGetInt(_propHandle, property, idx, &value); - if (stat != kOfxStatOK) - spdlog::error( - "Failed on fetching int property %s[%d], host returned status %s;", - property, idx, mapStatus(stat)); - if (stat == kOfxStatOK && _propLogMessages <= 0) - spdlog::info("Fetched int property %s[%d] = %d;", property, idx, value); - return stat; -} - -OfxStatus PropertySet::propGet(const char *property, std::string &value, - int idx) const { - char *str; - OfxStatus stat = gPropSuite->propGetString(_propHandle, property, idx, &str); - if (stat != kOfxStatOK) - spdlog::error( - "Failed on fetching string property %s[%d], host returned status %s;", - property, idx, mapStatus(stat)); - if (kOfxStatOK == stat) { - value = str; - if (_propLogMessages <= 0) - spdlog::info("Fetched string property %s[%d] = '%s';", property, idx, - value.c_str()); - } else { - value = ""; - } - return stat; -} - -OfxStatus PropertySet::propGetN(const char *property, std::string *values, - int N) const { - char **strs = new char *[N]; - - OfxStatus stat = gPropSuite->propGetStringN(_propHandle, property, N, strs); - - if (stat != kOfxStatOK) - spdlog::error("Failed on fetching multiple string property %s X %d, host " - "returned status %s;", - property, N, mapStatus(stat)); - - if (kOfxStatOK == stat) { - if (_propLogMessages <= 0) - spdlog::info("Fetched multiple string property %s X %d;", property, N); - for (int i = 0; i < N; i++) { - values[i] = strs[i]; - if (_propLogMessages <= 0) - spdlog::info(" %s[%d] = '%s';", property, i, strs[i]); - } - } else { - for (int i = 0; i < N; i++) { - values[i] = ""; - } - } - - delete[] strs; - - return stat; -} - -OfxStatus PropertySet::propGetDimension(const char *property, int &size) const { - OfxStatus stat = gPropSuite->propGetDimension(_propHandle, property, &size); - if (stat != kOfxStatOK) - spdlog::error("Failed on fetching dimension for property %s, host returned " - "status %s;", - property, mapStatus(stat)); - return stat; -} - -//////////////////////////////////////////////////////////////////////////////// -// PropertyDescription code - -// check to see if this property exists on the host -void PropertyDescription::checkProperty(PropertySet &propSet) { - // see if it exists by fetching the dimension, - int dimension; - OfxStatus stat = propSet.propGetDimension(_name, dimension); - if (stat == kOfxStatOK) { - if (_dimension != -1) - if (dimension != _dimension) - spdlog::error( - "Host reports property '%s' has dimension %d, it should be %d;", - _name, dimension, _dimension); - - // check type by getting the first element, the property getting will print - // failure messages to the log - if (dimension > 0) { - void *vP; - int vI; - double vD; - std::string vS; - - switch (_ilk) { - case PropertyDescription::ePointer: - propSet.propGet(_name, vP); - break; - case PropertyDescription::eInt: - propSet.propGet(_name, vI); - break; - case PropertyDescription::eString: - propSet.propGet(_name, vS); - break; - case PropertyDescription::eDouble: - propSet.propGet(_name, vD); - break; - } - } - } -} - -// see if the default values on the property set agree -void PropertyDescription::checkDefault(PropertySet &propSet) { - if (_nDefs > 0) { - // fetch the dimension on the host - int hostDimension; - OfxStatus stat = propSet.propGetDimension(_name, hostDimension); - (void)stat; - - if (hostDimension != _nDefs) - spdlog::error("Host reports default dimension of '%s' is %d, which is " - "different to the default value %d;", - _name, hostDimension, _nDefs); - - int N = hostDimension < _nDefs ? hostDimension : _nDefs; - - for (int i = 0; i < N; i++) { - void *vP; - int vI; - double vD; - std::string vS; - - switch (_ilk) { - case PropertyDescription::ePointer: - propSet.propGet(_name, vP, i); - if (vP != (void *)_defs[i]) - spdlog::error("Default value of %s[%d] = %p, it should be %p;", _name, - i, vP, (void *)_defs[i]); - break; - case PropertyDescription::eInt: - propSet.propGet(_name, vI, i); - if (vI != (int)_defs[i]) - spdlog::error("Default value of %s[%d] = %d, it should be %d;", _name, - i, vI, (int)_defs[i]); - break; - case PropertyDescription::eString: - propSet.propGet(_name, vS, i); - if (vS != _defs[i].vString) - spdlog::error("Default value of %s[%d] = '%s', it should be '%s';", - _name, i, vS.c_str(), _defs[i].vString.c_str()); - break; - case PropertyDescription::eDouble: - propSet.propGet(_name, vD, i); - if (vD != (double)_defs[i]) - spdlog::error("Default value of %s[%d] = %g, it should be %g;", _name, - i, vD, (double)_defs[i]); - break; - } - } - } -} - -// get the current value from the property set into me -void PropertyDescription::retrieveValue(PropertySet &propSet) { - if (_currentVals) - delete[] _currentVals; - _currentVals = 0; - _nCurrentVals = 0; - - // fetch the dimension on the host - int hostDimension; - OfxStatus stat = propSet.propGetDimension(_name, hostDimension); - if (stat == kOfxStatOK && hostDimension > 0) { - _nCurrentVals = hostDimension; - _currentVals = new PropertyValueOnion[hostDimension]; - - for (int i = 0; i < hostDimension; i++) { - void *vP; - int vI; - double vD; - std::string vS; - - switch (_ilk) { - case PropertyDescription::ePointer: - stat = propSet.propGet(_name, vP, i); - _currentVals[i] = (stat == kOfxStatOK) ? vP : (void *)(0); - break; - case PropertyDescription::eInt: - stat = propSet.propGet(_name, vI, i); - _currentVals[i] = (stat == kOfxStatOK) ? vI : 0; - break; - case PropertyDescription::eString: - stat = propSet.propGet(_name, vS, i); - if (stat == kOfxStatOK) - _currentVals[i] = vS; - else - _currentVals[i] = std::string(""); - break; - case PropertyDescription::eDouble: - stat = propSet.propGet(_name, vD, i); - _currentVals[i] = (stat == kOfxStatOK) ? vD : 0.0; - break; - } - } - } -} - -// set the property from my 'set' property -void PropertyDescription::setValue(PropertySet &propSet) { - // fetch the dimension on the host - if (_nWantedVals > 0) { - int i; - for (i = 0; i < _nWantedVals; i++) { - switch (_ilk) { - case PropertyDescription::ePointer: - propSet.propSet(_name, _wantedVals[i].vPointer, i); - break; - case PropertyDescription::eInt: - propSet.propSet(_name, _wantedVals[i].vInt, i); - break; - case PropertyDescription::eString: - propSet.propSet(_name, _wantedVals[i].vString, i); - break; - case PropertyDescription::eDouble: - propSet.propSet(_name, _wantedVals[i].vDouble, i); - break; - } - } - - // Now fetch the current values back into current. Don't be verbose about - // it. - propSet.propDisableLog(); - retrieveValue(propSet); - propSet.propEnableLog(); - - // and see if they are the same - if (_nWantedVals != _nCurrentVals) - spdlog::error("After setting property %s, the dimension %d is not the " - "same as what was set %d", - _name, _nCurrentVals, _nWantedVals); - int N = _nWantedVals < _nCurrentVals ? _nWantedVals : _nCurrentVals; - for (i = 0; i < N; i++) { - switch (_ilk) { - case PropertyDescription::ePointer: - if (_wantedVals[i].vPointer != _currentVals[i].vPointer) - spdlog::error("After setting pointer value %s[%d] value fetched back " - "%p not same as value set %p", - _name, i, _wantedVals[i].vPointer, - _currentVals[i].vPointer); - break; - case PropertyDescription::eInt: - if (_wantedVals[i].vInt != _currentVals[i].vInt) - spdlog::error("After setting int value %s[%d] value fetched back %d " - "not same as value set %d", - _name, i, _wantedVals[i].vInt, _currentVals[i].vInt); - break; - case PropertyDescription::eString: - if (_wantedVals[i].vString != _currentVals[i].vString) - spdlog::error("After setting string value %s[%d] value fetched back " - "'%s' not same as value set '%s'", - _name, i, _wantedVals[i].vString.c_str(), - _currentVals[i].vString.c_str()); - break; - case PropertyDescription::eDouble: - if (_wantedVals[i].vDouble != _currentVals[i].vDouble) - spdlog::error("After setting double value %s[%d] value fetched back " - "%g not same as value set %g", - _name, i, _wantedVals[i].vDouble, - _currentVals[i].vDouble); - break; - } - } - } -} - -void PropertySetDescription::checkProperties(bool logOrdinaryMessages) { - spdlog::info("PropertySetDescription::checkProperties - start(checking " - "properties on %s);\n{", - _setName); - - // don't print ordinary messages whilst we are checking them - if (!logOrdinaryMessages) - propDisableLog(); - - // check each property in the description - for (int i = 0; i < _nDescriptions; i++) { - _descriptions[i].checkProperty(*this); - } - if (!logOrdinaryMessages) - propEnableLog(); - - spdlog::info("}PropertySetDescription::checkProperties - stop;"); -} - -void PropertySetDescription::checkDefaults(bool logOrdinaryMessages) { - spdlog::info("PropertySetDescription::checkDefaults - start(checking default " - "value of properties on %s);\n{", - _setName); - - // don't print ordinary messages whilst we are checking them - if (!logOrdinaryMessages) - propDisableLog(); - - // check each property in the description - for (int i = 0; i < _nDescriptions; i++) { - _descriptions[i].checkDefault(*this); - } - if (!logOrdinaryMessages) - propEnableLog(); - - spdlog::info("}PropertySetDescription::checkDefaults - stop;"); -} - -void PropertySetDescription::retrieveValues(bool logOrdinaryMessages) { - spdlog::info("PropertySetDescription::retrieveValues - start(retrieving " - "values of properties on %s);\n{", - _setName); - - if (!logOrdinaryMessages) - propDisableLog(); - - // check each property in the description - for (int i = 0; i < _nDescriptions; i++) { - _descriptions[i].retrieveValue(*this); - } - - if (!logOrdinaryMessages) - propEnableLog(); - - spdlog::info("}PropertySetDescription::retrieveValues - stop;"); -} - -void PropertySetDescription::setValues(bool logOrdinaryMessages) { - spdlog::info("PropertySetDescription::setValues - start(retrieving values of " - "properties on %s);\n{", - _setName); - - if (!logOrdinaryMessages) - propDisableLog(); - - // check each property in the description - for (int i = 0; i < _nDescriptions; i++) { - _descriptions[i].setValue(*this); - } - - if (!logOrdinaryMessages) - propEnableLog(); - - spdlog::info("}PropertySetDescription::setValues - stop;"); -} - -// find a property with the given name out of our set of properties -PropertyDescription * -PropertySetDescription::findDescription(const std::string &name) { - std::map::iterator iter; - iter = _descriptionsByName.find(name); - if (iter != _descriptionsByName.end()) { - return iter->second; - } - return 0; -} - -// find value of the named property from the _currentVals array -int PropertySetDescription::intPropValue(const std::string &name, int idx) { - PropertyDescription *desc = 0; - desc = findDescription(name); - if (desc) { - if (idx < desc->_nCurrentVals) { - return int(desc->_currentVals[idx]); - } - } - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// -// host description stuff - -// list of the properties on the host. We can't set any of these, and most don't -// have defaults -static PropertyDescription gHostPropDescription[] = { - PropertyDescription(kOfxPropType, 1, "", false, kOfxTypeImageEffectHost, - true), - PropertyDescription(kOfxPropName, 1, "", false, "", false), - PropertyDescription(kOfxPropLabel, 1, "", false, "", false), - PropertyDescription(kOfxImageEffectHostPropIsBackground, 1, 0, false, 0, - false), - PropertyDescription(kOfxImageEffectPropSupportsOverlays, 1, 0, false, 0, - false), - PropertyDescription(kOfxImageEffectPropSupportsMultiResolution, 1, 0, false, - 0, false), - PropertyDescription(kOfxImageEffectPropSupportsTiles, 1, 0, false, 0, - false), - PropertyDescription(kOfxImageEffectPropTemporalClipAccess, 1, 0, false, 0, - false), - PropertyDescription(kOfxImageEffectPropSupportsMultipleClipDepths, 1, 0, - false, 0, false), - PropertyDescription(kOfxImageEffectPropSupportsMultipleClipPARs, 1, 0, - false, 0, false), - PropertyDescription(kOfxImageEffectPropSetableFrameRate, 1, 0, false, 0, - false), - PropertyDescription(kOfxImageEffectPropSetableFielding, 1, 0, false, 0, - false), - PropertyDescription(kOfxImageEffectPropSupportedComponents, -1, "", false, - "", false), - PropertyDescription(kOfxImageEffectPropSupportedContexts, -1, "", false, "", - false), - PropertyDescription(kOfxParamHostPropSupportsStringAnimation, 1, 0, false, - 0, false), - PropertyDescription(kOfxParamHostPropSupportsCustomInteract, 1, 0, false, 0, - false), - PropertyDescription(kOfxParamHostPropSupportsChoiceAnimation, 1, 0, false, - 0, false), - PropertyDescription(kOfxParamHostPropSupportsBooleanAnimation, 1, 0, false, - 0, false), - PropertyDescription(kOfxParamHostPropSupportsCustomAnimation, 1, 0, false, - 0, false), - PropertyDescription(kOfxParamHostPropMaxParameters, 1, 0, false, 0, false), - PropertyDescription(kOfxParamHostPropMaxPages, 1, 0, false, 0, false), - PropertyDescription(kOfxParamHostPropPageRowColumnCount, 2, 0, false, 0, - false)}; - -// some host property descriptions we may be interested int -class HostDescription : public PropertySet { -public: - int hostIsBackground; - int supportsOverlays; - int supportsMultiResolution; - int supportsTiles; - int temporalClipAccess; - int supportsMultipleClipDepths; - int supportsMultipleClipPARs; - int supportsSetableFrameRate; - int supportsSetableFielding; - int supportsCustomAnimation; - int supportsStringAnimation; - int supportsCustomInteract; - int supportsChoiceAnimation; - int supportsBooleanAnimation; - int maxParameters; - int maxPages; - int pageRowCount; - int pageColumnCount; - - HostDescription(OfxPropertySetHandle handle); -}; -HostDescription *gHostDescription = 0; - -// create a host description, checking properties on the way -HostDescription::HostDescription(OfxPropertySetHandle handle) - : PropertySet(handle), hostIsBackground(false), supportsOverlays(false), - supportsMultiResolution(false), supportsTiles(false), - temporalClipAccess(false), supportsMultipleClipDepths(false), - supportsMultipleClipPARs(false), supportsSetableFrameRate(false), - supportsSetableFielding(false), supportsCustomAnimation(false), - supportsStringAnimation(false), supportsCustomInteract(false), - supportsChoiceAnimation(false), supportsBooleanAnimation(false), - maxParameters(-1), maxPages(-1), pageRowCount(-1), pageColumnCount(-1) { - spdlog::info("HostDescription::HostDescription - start ( fetching host " - "description);\n{"); - - // do basic existence checking with a PropertySetDescription - PropertySetDescription hostPropSet("Host", handle, gHostPropDescription, - sizeof(gHostPropDescription) / - sizeof(PropertyDescription)); - hostPropSet.checkProperties(); - hostPropSet.checkDefaults(); - hostPropSet.retrieveValues(true); - - // now go through and fill in the host description - hostIsBackground = - hostPropSet.intPropValue(kOfxImageEffectHostPropIsBackground); - supportsOverlays = - hostPropSet.intPropValue(kOfxImageEffectPropSupportsOverlays); - supportsMultiResolution = - hostPropSet.intPropValue(kOfxImageEffectPropSupportsMultiResolution); - supportsTiles = hostPropSet.intPropValue(kOfxImageEffectPropSupportsTiles); - temporalClipAccess = - hostPropSet.intPropValue(kOfxImageEffectPropTemporalClipAccess); - supportsMultipleClipDepths = - hostPropSet.intPropValue(kOfxImageEffectPropSupportsMultipleClipDepths); - supportsMultipleClipPARs = - hostPropSet.intPropValue(kOfxImageEffectPropSupportsMultipleClipPARs); - supportsSetableFrameRate = - hostPropSet.intPropValue(kOfxImageEffectPropSetableFrameRate); - supportsSetableFielding = - hostPropSet.intPropValue(kOfxImageEffectPropSetableFielding); - - supportsStringAnimation = - hostPropSet.intPropValue(kOfxParamHostPropSupportsStringAnimation); - supportsCustomInteract = - hostPropSet.intPropValue(kOfxParamHostPropSupportsCustomInteract); - supportsChoiceAnimation = - hostPropSet.intPropValue(kOfxParamHostPropSupportsChoiceAnimation); - supportsBooleanAnimation = - hostPropSet.intPropValue(kOfxParamHostPropSupportsBooleanAnimation); - supportsCustomAnimation = - hostPropSet.intPropValue(kOfxParamHostPropSupportsCustomAnimation); - maxParameters = hostPropSet.intPropValue(kOfxParamHostPropMaxParameters); - maxPages = hostPropSet.intPropValue(kOfxParamHostPropMaxPages); - pageRowCount = - hostPropSet.intPropValue(kOfxParamHostPropPageRowColumnCount, 0); - pageColumnCount = - hostPropSet.intPropValue(kOfxParamHostPropPageRowColumnCount, 1); - - spdlog::info("}HostDescription::HostDescription - stop;"); -} - -//////////////////////////////////////////////////////////////////////////////// -// test the memory suite -static void testMemorySuite(void) { - spdlog::info("testMemorySuite - start();\n{"); - void *oneMeg; - - OfxStatus stat = gMemorySuite->memoryAlloc(NULL, 1024 * 1024, &oneMeg); - if (stat != kOfxStatOK) - spdlog::error( - "OfxMemorySuiteV1::memoryAlloc failed to alloc 1MB, returned %s", - mapStatus(stat)); - - if (stat == kOfxStatOK) { - // touch 'em all to see if it crashes - char *lotsOfChars = (char *)oneMeg; - for (int i = 0; i < 1024 * 1024; i++) { - *lotsOfChars++ = 0; - } - - stat = gMemorySuite->memoryFree(oneMeg); - if (stat != kOfxStatOK) - spdlog::error( - "OfxMemorySuiteV1::memoryFree failed to free 1MB, returned %s", - mapStatus(stat)); - } - - spdlog::info("}HostDescription::HostDescription - stop;"); -} +/** + * Log all property values gotten from getAllPropertiesOfSet() + */ +void logPropValues(const std::string_view setName, + const std::vector &props) { + spdlog::info("Properties for {}:", setName); + for (const auto &[propDef, values] : props) { + // Build up the log string piecemeal + std::string buf; + fmt::format_to(std::back_inserter(buf), " {} ({}d) = [", propDef.name, + values.size()); + for (size_t i = 0; i < values.size(); ++i) { + std::visit( + [&buf](auto &&value) { + using T = std::decay_t; + if constexpr (std::is_same_v) { + fmt::format_to(std::back_inserter(buf), "{}", value); + } else if constexpr (std::is_same_v) { + fmt::format_to(std::back_inserter(buf), "{}", value); + } else if constexpr (std::is_same_v) { + fmt::format_to(std::back_inserter(buf), "{}", value); + } else if constexpr (std::is_same_v) { + fmt::format_to(std::back_inserter(buf), "{:p}", value); + } + }, + values[i]); + if (i < values.size() - 1) + fmt::format_to(std::back_inserter(buf), ","); + } + fmt::format_to(std::back_inserter(buf), "]"); + // log it + spdlog::info("{}", buf); + } +} + +// ======================================================================== //////////////////////////////////////////////////////////////////////////////// // how many times has actionLoad been called @@ -1243,16 +221,12 @@ static OfxStatus actionLoad(void) { (OfxMultiThreadSuiteV1 *)fetchSuite(kOfxMultiThreadSuite, 1); gMessageSuite = (OfxMessageSuiteV1 *)fetchSuite(kOfxMessageSuite, 1); - // OK check and fetch host information - gHostDescription = new HostDescription(gHost->host); - - // fetch the interact suite if the host supports interaction - if (gHostDescription->supportsOverlays || - gHostDescription->supportsCustomInteract) - gInteractSuite = (OfxInteractSuiteV1 *)fetchSuite(kOfxInteractSuite, 1); - - // test the memory suite - testMemorySuite(); + // Get all host props, propset name "ImageEffectHost" + // (too bad prop sets don't know their own name) + PropertyAccessor accessor = PropertyAccessor(gHost->host, gPropSuite); + const auto prop_values = + getAllPropertiesOfSet(accessor, "ImageEffectHost"); + logPropValues("ImageEffectHost", prop_values); } } @@ -1347,77 +321,84 @@ static OfxStatus render(OfxImageEffectHandle /*instance*/, } // describe the plugin in context -static OfxStatus describeInContext(OfxImageEffectHandle /*effect*/, - OfxPropertySetHandle /*inArgs*/) { +static OfxStatus describeInContext(OfxImageEffectHandle effect, + OfxPropertySetHandle inArgs) { + PropertyAccessor accessor = PropertyAccessor(inArgs, gPropSuite); + spdlog::info("describeInContext: inArgs->context = {}", + accessor.get()); + + OfxPropertySetHandle props; + // define the output clip + gEffectSuite->clipDefine(effect, kOfxImageEffectOutputClipName, &props); + accessor = PropertyAccessor(props, gPropSuite); + accessor.setAll( + {kOfxImageComponentRGBA, kOfxImageComponentAlpha}); + + // define the single source clip + gEffectSuite->clipDefine(effect, kOfxImageEffectSimpleSourceClipName, &props); + accessor = PropertyAccessor(props, gPropSuite); + accessor.setAll( + {kOfxImageComponentRGBA, kOfxImageComponentAlpha}); + + // Params + OfxParamSetHandle paramSet; + gEffectSuite->getParamSet(effect, ¶mSet); + + // simple param test + gParamSuite->paramDefine(paramSet, kOfxParamTypeDouble, "scale", &props); + accessor = PropertyAccessor(props, gPropSuite); + accessor.set(0) + .set("Enables scales on individual components") + .set("scale") + .set("Scale Param"); + + // Log all the effect descriptor's props + OfxPropertySetHandle effectProps; + gEffectSuite->getPropertySet(effect, &effectProps); + PropertyAccessor effect_accessor = PropertyAccessor(effectProps, gPropSuite); + const auto prop_values = + getAllPropertiesOfSet(effect_accessor, "EffectDescriptor"); + logPropValues("EffectDescriptor", prop_values); + return kOfxStatOK; } //////////////////////////////////////////////////////////////////////////////// // code for the plugin's description routine -// contexts we can be -static const char *gSupportedContexts[] = { +// contexts we support +static std::vector supportedContexts{ kOfxImageEffectContextGenerator, kOfxImageEffectContextFilter, kOfxImageEffectContextTransition, kOfxImageEffectContextPaint, kOfxImageEffectContextGeneral, kOfxImageEffectContextRetimer}; -// pixel depths we can be -static const char *gSupportedPixelDepths[] = { +// pixel depths we support +static std::vector supportedPixelDepths{ kOfxBitDepthByte, kOfxBitDepthShort, kOfxBitDepthFloat}; -// the values to set and the defaults to check on the various properties -static PropertyDescription gPluginPropertyDescriptions[] = { - PropertyDescription(kOfxPropType, 1, "", false, kOfxTypeImageEffect, true), - PropertyDescription(kOfxPropLabel, 1, "OFX Test Properties", true, "", - false), - PropertyDescription(kOfxPropShortLabel, 1, "OFX Test Props", true, "", - false), - PropertyDescription(kOfxPropLongLabel, 1, "OFX Test Properties", true, "", - false), - PropertyDescription(kOfxPluginPropFilePath, 1, "", false, "", false), - PropertyDescription(kOfxImageEffectPluginPropGrouping, 1, "OFX Example", - true, "", false), - PropertyDescription(kOfxImageEffectPluginPropSingleInstance, 1, 0, true, 0, - true), - PropertyDescription(kOfxImageEffectPluginRenderThreadSafety, 1, - kOfxImageEffectRenderFullySafe, true, - kOfxImageEffectRenderFullySafe, true), - PropertyDescription(kOfxImageEffectPluginPropHostFrameThreading, 1, 0, true, - 0, true), - PropertyDescription(kOfxImageEffectPluginPropOverlayInteractV1, 1, - (void *)(0), true, (void *)(0), true), - PropertyDescription(kOfxImageEffectPropSupportsMultiResolution, 1, 1, true, - 1, true), - PropertyDescription(kOfxImageEffectPropSupportsTiles, 1, 1, true, 1, true), - PropertyDescription(kOfxImageEffectPropTemporalClipAccess, 1, 0, true, 0, - true), - PropertyDescription(kOfxImageEffectPluginPropFieldRenderTwiceAlways, 1, 1, - true, 1, true), - PropertyDescription(kOfxImageEffectPropSupportsMultipleClipDepths, 1, 0, - true, 0, true), - PropertyDescription(kOfxImageEffectPropSupportsMultipleClipPARs, 1, 0, true, - 0, true), - PropertyDescription( - kOfxImageEffectPropSupportedContexts, -1, gSupportedContexts, - sizeof(gSupportedContexts) / sizeof(char *), gSupportedContexts, 0), - PropertyDescription(kOfxImageEffectPropSupportedPixelDepths, -1, - gSupportedPixelDepths, - sizeof(gSupportedPixelDepths) / sizeof(char *), - gSupportedPixelDepths, 0)}; - static OfxStatus actionDescribe(OfxImageEffectHandle effect) { // get the property handle for the plugin OfxPropertySetHandle effectProps; gEffectSuite->getPropertySet(effect, &effectProps); - // check the defaults - PropertySetDescription pluginPropSet( - "Plugin", effectProps, gPluginPropertyDescriptions, - sizeof(gPluginPropertyDescriptions) / sizeof(PropertyDescription)); - pluginPropSet.checkProperties(); - pluginPropSet.checkDefaults(); - pluginPropSet.retrieveValues(true); - pluginPropSet.setValues(); + PropertyAccessor accessor = PropertyAccessor(effectProps, gPropSuite); + + accessor.set("Property Tester") + .set("1.0") + .setAll({1, 0, 0}) + .set( + "Sample plugin which logs all actions and properties") + .set("OFX Examples") + .set(false) + .setAll( + {kOfxImageComponentRGBA, kOfxImageComponentAlpha}) + .setAll(supportedContexts) + .setAll( + supportedPixelDepths); + + // After setting up, log all known props + const auto prop_values = getAllPropertiesOfSet(accessor, "EffectDescriptor"); + logPropValues("EffectDescriptor", prop_values); return kOfxStatOK; } @@ -1431,25 +412,25 @@ static void checkMainHandles(const char *action, const void *handle, bool outArgsCanBeNull) { if (handleCanBeNull) { if (handle != 0) { - spdlog::warn("Handle passed to '%s' is not null;", action); + spdlog::warn("Handle passed to '{}' is not null;", action); } else if (handle == 0) { - spdlog::error("'Handle passed to '%s' is null;", action); + spdlog::error("'Handle passed to '{}' is null;", action); } } if (inArgsCanBeNull) { if (inArgsHandle != 0) { - spdlog::warn("'inArgs' Handle passed to '%s' is not null;", action); + spdlog::warn("'inArgs' Handle passed to '{}' is not null;", action); } else if (inArgsHandle == 0) { - spdlog::error("'inArgs' handle passed to '%s' is null;", action); + spdlog::error("'inArgs' handle passed to '{}' is null;", action); } } if (outArgsCanBeNull) { if (outArgsHandle != 0) { - spdlog::warn("'outArgs' Handle passed to '%s' is not null;", action); + spdlog::warn("'outArgs' Handle passed to '{}' is not null;", action); } else if (outArgsHandle == 0) { - spdlog::error("'outArgs' handle passed to '%s' is null;", action); + spdlog::error("'outArgs' handle passed to '{}' is null;", action); } } @@ -1467,17 +448,13 @@ static OfxStatus pluginMain(const char *action, const void *handle, OfxPropertySetHandle inArgsHandle, OfxPropertySetHandle outArgsHandle) { spdlog::info("pluginMain - start();\n{"); - spdlog::info(" action is '%s';", action); + spdlog::info(" action is '{}';", action); OfxStatus stat = kOfxStatReplyDefault; try { // cast to handle appropriate type OfxImageEffectHandle effectHandle = (OfxImageEffectHandle)handle; - // construct two property set wrappers - PropertySet inArgs(inArgsHandle); - PropertySet outArgs(outArgsHandle); - if (!strcmp(action, kOfxActionLoad)) { checkMainHandles(action, handle, inArgsHandle, outArgsHandle, true, true, true); @@ -1555,7 +532,7 @@ static OfxStatus pluginMain(const char *action, const void *handle, false, true); stat = describeInContext(effectHandle, inArgsHandle); } else { - spdlog::error("Unknown action '%s';", action); + spdlog::error("Unknown action '{}';", action); } } catch (std::bad_alloc) { // catch memory @@ -1563,11 +540,11 @@ static OfxStatus pluginMain(const char *action, const void *handle, stat = kOfxStatErrMemory; } catch (const std::exception &e) { // standard exceptions - spdlog::error("Plugin exception: '%s';", e.what()); + spdlog::error("Plugin exception: '{}';", e.what()); stat = kOfxStatErrUnknown; } catch (int err) { // ho hum, gone wrong somehow - spdlog::error("Misc int plugin exception: '%s';", mapStatus(err)); + spdlog::error("Misc int plugin exception: '{}';", mapStatus(err)); stat = err; } catch (...) { // everything else @@ -1603,10 +580,10 @@ static OfxPlugin basicPlugin = {kOfxImageEffectPluginApi, // the two mandated functions EXPORT OfxPlugin *OfxGetPlugin(int nth) { spdlog::info("OfxGetPlugin - start();\n{"); - spdlog::info(" asking for %dth plugin;", nth); + spdlog::info(" asking for {}th plugin;", nth); if (nth != 0) spdlog::error( - "requested plugin %d is more than the number of plugins in the file;", + "requested plugin {} is more than the number of plugins in the file;", nth); spdlog::info("}OfxGetPlugin - stop;"); @@ -1622,15 +599,12 @@ EXPORT int OfxGetNumberOfPlugins(void) { } //////////////////////////////////////////////////////////////////////////////// -// globals destructor, the destructor is called when the plugin is unloaded +// global destructor, the destructor is called when the plugin is unloaded class GlobalDestructor { public: ~GlobalDestructor(); }; -GlobalDestructor::~GlobalDestructor() { - if (gHostDescription) - delete gHostDescription; -} +GlobalDestructor::~GlobalDestructor() {} static GlobalDestructor globalDestructor; diff --git a/Support/include/ofxPropsAccess.h b/Support/include/ofxPropsAccess.h new file mode 100644 index 00000000..fb3f3813 --- /dev/null +++ b/Support/include/ofxPropsAccess.h @@ -0,0 +1,627 @@ +// Copyright OpenFX and contributors to the OpenFX project. +// SPDX-License-Identifier: BSD-3-Clause + +#pragma once + +#include "ofxCore.h" +#include "ofxPropsMetadata.h" +#include "ofxStatusStrings.h" + +#include +#include +#include +#include +#include +#include +#include + +/** + * OpenFX Property Accessor System - Usage Examples + +// Basic property access with type safety +void basicPropertyAccess(OfxPropertySetHandle handle, OfxPropertySuiteV1* +propHost) { + // Create a property accessor + OpenFX::PropertyAccessor props(handle, propHost); + + // Get a string property - type is deduced from PropTraits + const char* colorspace = props.get(); + + // Get a boolean property - returned as int (0 or 1) + int isConnected = props.get(); + + // Set a property value (type checked at compile time) + props.set(1); + + // Set all of a property's values (type checked at compile time) + // Supports any container with size() and operator[], or initializer-list + props.setAll({1, 0, 0}); + + // Get and set properties by index (for multi-dimensional properties) + const char* fieldMode = props.get(0); + props.set("OfxImageFieldLower", 0); + + // Chaining set operations + props.set(valueA) + .set(valueB) + .set(valueC); + + // Get dimension of a property + int dimension = props.getDimension(); +} + +// Working with multi-type properties +void multiTypePropertyAccess(OfxPropertySetHandle handle, OfxPropertySuiteV1* +propHost) { OpenFX::PropertyAccessor props(handle, propHost); + + // For multi-type properties, explicitly specify the type + double maxValueDouble = props.get(); + + // You can also get the same property as a different type + int maxValueInt = props.get(); + + // Setting values with explicit types + props.set(10.5); + props.set(10); + + // Attempting to use an incompatible type would cause a compile error: + // const char* str = props.get(); +// Error! +} + + +// Using the "escape hatch" for dynamic property access +void dynamicPropertyAccess(OfxPropertySetHandle handle, OfxPropertySuiteV1* +propHost) { OpenFX::PropertyAccessor props(handle, propHost); + + // Get and set properties by name without compile-time checking + const char* pluginDefined = props.getRaw("PluginDefinedProperty"); props.setRaw("DynamicIntProperty", 42); + + // Get dimension of a dynamic property + int dim = props.getDimensionRaw("DynamicArrayProperty"); + + // When property names come from external sources + const char* propName = getPropertyNameFromPlugin(); + double value = props.getRaw(propName); +} + +// Working with enum properties +void enumPropertyHandling(OfxPropertySetHandle handle, OfxPropertySuiteV1* +propHost) { OpenFX::PropertyAccessor props(handle, propHost); + + // Get an enum property value + const char* fieldExtraction = +props.get(); + + // Set an enum property using a valid value + props.set("OfxImageFieldLower"); + + // Access enum values directly using the EnumValue helper + const char* noneField = +OpenFX::EnumValue::get(0); const char* +lowerField = OpenFX::EnumValue::get(1); + + // Check if a value is valid for an enum + bool isValid = +OpenFX::EnumValue::isValid("OfxImageFieldUpper"); + + // Get total number of enum values + size_t enumCount = +OpenFX::EnumValue::size(); +} + +// End of examples +*/ + +namespace OpenFX { + +// Exception class -- move this elsewhere +class PluginException : public std::runtime_error { +public: + PluginException(const std::string &context_msg, OfxStatus status) + : std::runtime_error(createMessage(context_msg, status)), + status_(status) {} + + OfxStatus getStatus() const { return status_; } + +private: + static std::string createMessage(const std::string &context_msg, + OfxStatus status) { + std::string msg = "OpenFX error: " + context_msg + ": "; + msg += ofxStatusToString(status); + return msg; + } + + OfxStatus status_; +}; + +static void handleOfxError(OfxStatus status, std::string file, int line, + std::string msg, std::string expr) { + std::cerr << "ERR: OFX status " << ofxStatusToString(status) << " in " << file + << ":" << line << "\n" + << " on: " << msg << "\n" + << " Expression: " << expr << "\n"; +} + +#define CHECK_OFX_STATUS(msg, expr) \ + do { \ + auto &&_status = (expr); \ + if (_status != kOfxStatOK) { \ + handleOfxError(_status, __FILE__, __LINE__, msg, #expr); \ + } \ + } while (0) + +// Type-mapping helper to infer C++ type from PropType +template struct PropTypeToNative { + using type = void; // Default case, should never be used directly +}; + +// Specializations for each property type +template <> struct PropTypeToNative { + using type = int; +}; +template <> struct PropTypeToNative { + using type = double; +}; +template <> struct PropTypeToNative { + using type = const char *; +}; +template <> struct PropTypeToNative { + using type = int; +}; +template <> struct PropTypeToNative { + using type = const char *; +}; +template <> struct PropTypeToNative { + using type = void *; +}; + +// Helper to check if a type is compatible with a PropType +template struct IsTypeCompatible { + static constexpr bool value = false; +}; + +template <> struct IsTypeCompatible { + static constexpr bool value = true; +}; +template <> struct IsTypeCompatible { + static constexpr bool value = true; +}; +template <> struct IsTypeCompatible { + static constexpr bool value = true; +}; +template <> struct IsTypeCompatible { + static constexpr bool value = true; +}; +template <> struct IsTypeCompatible { + static constexpr bool value = true; +}; +template <> struct IsTypeCompatible { + static constexpr bool value = true; +}; +template <> struct IsTypeCompatible { + static constexpr bool value = true; +}; + +// Helper to create property enum values with strong typing +template struct EnumValue { + static constexpr const char *get(size_t index) { + static_assert(index < properties::PropTraits::def.enumValuesCount, + "Property enum index out of range"); + return properties::PropTraits::enumValues[index]; + } + + static constexpr size_t size() { + return properties::PropTraits::enumValues.size(); + } + + static constexpr bool isValid(const char *value) { + for (int i = 0; i < properties::PropTraits::def.enumValuesCount; i++) { + auto val = properties::PropTraits::def.enumValues[i]; + if (std::strcmp(val, value) == 0) + return true; + } + return false; + } +}; + +// Type-safe property accessor for any props of a given prop set +class PropertyAccessor { +public: + explicit PropertyAccessor(OfxPropertySetHandle handle, + OfxPropertySuiteV1 *propHost) + : handle_(handle), propHost_(propHost) {} + + // Get property value using PropId (compile-time type checking) + template + typename properties::PropTraits::type get(int index = 0) const { + using Traits = properties::PropTraits; + + static_assert( + !Traits::is_multitype, + "This property supports multiple types. Use get() instead."); + + using T = typename Traits::type; + + if constexpr (std::is_same_v || std::is_same_v) { + int value; + CHECK_OFX_STATUS( + Traits::def.name, + propHost_->propGetInt(handle_, Traits::def.name, index, &value)); + return value; + } else if constexpr (std::is_same_v || + std::is_same_v) { + double value; + CHECK_OFX_STATUS( + Traits::def.name, + propHost_->propGetDouble(handle_, Traits::def.name, index, &value)); + return value; + } else if constexpr (std::is_same_v) { + char *value; + CHECK_OFX_STATUS( + Traits::def.name, + propHost_->propGetString(handle_, Traits::def.name, index, &value)); + return value; + } else if constexpr (std::is_same_v) { + void *value; + CHECK_OFX_STATUS( + Traits::def.name, + propHost_->propGetPointer(handle_, Traits::def.name, index, &value)); + return value; + } else { + static_assert(always_false::value, "Unsupported property value type"); + } + } + + // Get multi-type property value (requires explicit type) + template T get(int index = 0) const { + using Traits = properties::PropTraits; + + // Check if T is compatible with any of the supported PropTypes + constexpr bool isValidType = [&]() { + constexpr auto types = std::array(Traits::def.supportedTypes, + Traits::def.supportedTypesCount); + for (const auto &type : types) { + if constexpr (std::is_same_v || std::is_same_v) { + if (type == PropType::Int || type == PropType::Bool || + type == PropType::Enum) + return true; + } else if constexpr (std::is_same_v) { + if (type == PropType::Double) + return true; + } else if constexpr (std::is_same_v) { + if (type == PropType::String || type == PropType::Enum) + return true; + } else if constexpr (std::is_same_v) { + if (type == PropType::Pointer) + return true; + } + } + return false; + }(); + + static_assert(isValidType, + "Requested type is not compatible with this property"); + + if constexpr (std::is_same_v || std::is_same_v) { + int value; + CHECK_OFX_STATUS( + Traits::def.name, + propHost_->propGetInt(handle_, Traits::def.name, index, &value)); + return value; + } else if constexpr (std::is_same_v) { + double value; + CHECK_OFX_STATUS( + Traits::def.name, + propHost_->propGetDouble(handle_, Traits::def.name, index, &value)); + return value; + } else if constexpr (std::is_same_v) { + char *value; + CHECK_OFX_STATUS( + Traits::def.name, + propHost_->propGetString(handle_, Traits::def.name, index, &value)); + return value; + } else if constexpr (std::is_same_v) { + void *value; + CHECK_OFX_STATUS( + Traits::def.name, + propHost_->propGetPointer(handle_, Traits::def.name, index, &value)); + return value; + } else { + static_assert(always_false::value, "Unsupported property value type"); + } + } + + // Set property value using PropId (compile-time type checking) + template + PropertyAccessor &set(typename properties::PropTraits::type value, + int index = 0) { + using Traits = properties::PropTraits; + + static_assert( + !Traits::is_multitype, + "This property supports multiple types. Use set() instead."); + + if constexpr (Traits::def.supportedTypes[0] == PropType::Enum) { + bool isValidEnumValue = OpenFX::EnumValue::isValid(value); + assert(isValidEnumValue); + } + + using T = typename Traits::type; + + if constexpr (std::is_same_v) { // allow bool -> int + CHECK_OFX_STATUS( + Traits::def.name, + propHost_->propSetInt(handle_, Traits::def.name, index, value)); + } else if constexpr (std::is_same_v) { + CHECK_OFX_STATUS( + Traits::def.name, + propHost_->propSetInt(handle_, Traits::def.name, index, value)); + } else if constexpr (std::is_same_v) { // allow float -> double + CHECK_OFX_STATUS( + Traits::def.name, + propHost_->propSetDouble(handle_, Traits::def.name, index, value)); + } else if constexpr (std::is_same_v) { + CHECK_OFX_STATUS( + Traits::def.name, + propHost_->propSetDouble(handle_, Traits::def.name, index, value)); + } else if constexpr (std::is_same_v) { + CHECK_OFX_STATUS( + Traits::def.name, + propHost_->propSetString(handle_, Traits::def.name, index, value)); + } else if constexpr (std::is_same_v) { + CHECK_OFX_STATUS( + Traits::def.name, + propHost_->propSetPointer(handle_, Traits::def.name, index, value)); + } else { + static_assert(always_false::value, + "Invalid value type when setting property"); + } + return *this; + } + + // Set multi-type property value (requires explicit type) + // Should only be used for multitype props (SFINAE) + template < + PropId id, typename T, + typename = std::enable_if_t::is_multitype>> + PropertyAccessor &set(T value, int index = 0) { + using Traits = properties::PropTraits; + + // Check if T is compatible with any of the supported PropTypes + constexpr bool isValidType = [&]() { + for (int i = 0; i < Traits::def.supportedTypesCount; i++) { + auto type = Traits::def.supportedTypes[i]; + if constexpr (std::is_same_v || std::is_same_v) { + if (type == PropType::Int || type == PropType::Bool) + return true; + else if (type == PropType::Enum) + static_assert(always_false::value, + "Integer values cannot be used for enum properties"); + } else if constexpr (std::is_same_v || + std::is_same_v) { + if (type == PropType::Double) + return true; + } else if constexpr (std::is_same_v) { + if (type == PropType::String) // no Enums here -- there shouldn't be + // any multi-type enums + return true; + } else if constexpr (std::is_same_v) { + if (type == PropType::Pointer) + return true; + } + } + return false; + }(); + + static_assert(isValidType, + "Requested type is not compatible with this property"); + + if constexpr (std::is_same_v || std::is_same_v) { + CHECK_OFX_STATUS( + Traits::def.name, + propHost_->propSetInt(handle_, Traits::def.name, index, value)); + } else if constexpr (std::is_same_v || + std::is_same_v) { + CHECK_OFX_STATUS( + Traits::def.name, + propHost_->propSetDouble(handle_, Traits::def.name, index, value)); + } else if constexpr (std::is_same_v) { + CHECK_OFX_STATUS( + Traits::def.name, + propHost_->propSetString(handle_, Traits::def.name, index, value)); + } else if constexpr (std::is_same_v) { + CHECK_OFX_STATUS( + Traits::def.name, + propHost_->propSetPointer(handle_, Traits::def.name, index, value)); + } else { + static_assert(always_false::value, + "Invalid value type when setting property"); + } + return *this; + } + + // Set all values of a prop + + // For single-type properties with any container + template // Container must have size() and operator[] + PropertyAccessor &setAll(const Container &values) { + static_assert(!properties::PropTraits::is_multitype, + "This property supports multiple types. Use setAll(container) instead."); + + for (size_t i = 0; i < values.size(); ++i) { + this->template set(values[i], static_cast(i)); + } + + return *this; + } + + // For single-type properties with initializer lists + template + PropertyAccessor &setAll( + std::initializer_list::type> values) { + static_assert(!properties::PropTraits::is_multitype, + "This property supports multiple types. Use " + "setAllTyped() instead."); + + int index = 0; + for (const auto &value : values) { + this->template set(value, index++); + } + + return *this; + } + + // For multi-type properties - require explicit ElementType + template + PropertyAccessor & + setAllTyped(const std::initializer_list &values) { + static_assert(properties::PropTraits::is_multitype, + "This property does not support multiple types. Use " + "setAll() instead."); + + for (size_t i = 0; i < values.size(); ++i) { + this->template set(values[i], static_cast(i)); + } + + return *this; + } + + // Overload for any container with multi-type properties + template + PropertyAccessor &setAllTyped(const Container &values) { + static_assert(properties::PropTraits::is_multitype, + "This property does not support multiple types. Use " + "setAll() instead."); + + for (size_t i = 0; i < values.size(); ++i) { + this->template set(values[i], static_cast(i)); + } + + return *this; + } + + // Get dimension of a property + template int getDimension() const { + using Traits = properties::PropTraits; + + // If dimension is known at compile time, we can just return it + if constexpr (Traits::dimension > 0) { + return Traits::dimension; + } else { + // Otherwise query at runtime + int dimension = 0; + CHECK_OFX_STATUS( + Traits::def.name, + propHost_->propGetDimension(handle_, Traits::def.name, &dimension)); + return dimension; + } + } + + // "Escape hatch" for unchecked property access - get any property by name + // with explicit type + template T getRaw(const char *name, int index = 0) const { + if constexpr (std::is_same_v) { + int value; + CHECK_OFX_STATUS(name, + propHost_->propGetInt(handle_, name, index, &value)); + return value; + } else if constexpr (std::is_same_v) { + double value; + CHECK_OFX_STATUS(name, + propHost_->propGetDouble(handle_, name, index, &value)); + return value; + } else if constexpr (std::is_same_v) { + char *value; + CHECK_OFX_STATUS(name, + propHost_->propGetString(handle_, name, index, &value)); + return value; + } else if constexpr (std::is_same_v) { + void *value; + CHECK_OFX_STATUS(name, + propHost_->propGetPointer(handle_, name, index, &value)); + return value; + } else { + static_assert(always_false::value, "Unsupported property type"); + } + } + + // "Escape hatch" for unchecked property access - set any property by name + // with explicit type + template + PropertyAccessor &setRaw(const char *name, T value, int index = 0) { + if constexpr (std::is_same_v) { + CHECK_OFX_STATUS(name, + propHost_->propSetInt(handle_, name, index, value)); + } else if constexpr (std::is_same_v) { + CHECK_OFX_STATUS(name, + propHost_->propSetDouble(handle_, name, index, value)); + } else if constexpr (std::is_same_v) { + CHECK_OFX_STATUS(name, + propHost_->propSetString(handle_, name, index, value)); + } else if constexpr (std::is_same_v) { + CHECK_OFX_STATUS(name, + propHost_->propSetPointer(handle_, name, index, value)); + } else { + static_assert(always_false::value, + "Unsupported property type for setting"); + } + return *this; + } + + // Get raw dimension of a property + int getDimensionRaw(const char *name) const { + int dimension = 0; + CHECK_OFX_STATUS(name, + propHost_->propGetDimension(handle_, name, &dimension)); + return dimension; + } + +private: + OfxPropertySetHandle handle_; + OfxPropertySuiteV1 *propHost_; + + // Helper for static_assert to fail compilation for unsupported types + template struct always_false : std::false_type {}; +}; + +// Namespace for property access constants and helpers +namespace prop { +// We'll use the existing defined constants like kOfxImageClipPropColourspace + +// Helper to validate property existence at compile time +template constexpr bool exists() { + return true; // All PropId values are valid by definition +} + +// Helper to check if a property supports a specific C++ type +template constexpr bool supportsType() { + constexpr auto supportedTypes = + properties::PropTraits::def.supportedTypes; + + for (const auto &type : supportedTypes) { + if constexpr (std::is_same_v) { + if (type == PropType::Int || type == PropType::Bool || + type == PropType::Enum) + return true; + } else if constexpr (std::is_same_v) { + if (type == PropType::Double) + return true; + } else if constexpr (std::is_same_v) { + if (type == PropType::String || type == PropType::Enum) + return true; + } else if constexpr (std::is_same_v) { + if (type == PropType::Pointer) + return true; + } + } + return false; +} +} // namespace prop + +// Find a property definition by name + +} // namespace OpenFX diff --git a/Support/include/ofxPropsBySet.h b/Support/include/ofxPropsBySet.h index d543d253..42130e46 100644 --- a/Support/include/ofxPropsBySet.h +++ b/Support/include/ofxPropsBySet.h @@ -14,535 +14,540 @@ #include "ofxDrawSuite.h" #include "ofxParametricParam.h" #include "ofxKeySyms.h" +#include "ofxPropsMetadata.h" // #include "ofxOld.h" namespace OpenFX { struct Prop { const char *name; + const PropDef &def; bool host_write; bool plugin_write; bool host_optional; + + Prop(const char *n, const PropDef &d, bool hw, bool pw, bool ho) + : name(n), def(d), host_write(hw), plugin_write(pw), host_optional(ho) {} }; // Properties for property sets static inline const std::map> prop_sets { -{ "ClipDescriptor", { { "OfxPropType", false , true, false }, - { "OfxPropName", false , true, false }, - { "OfxPropLabel", false , true, false }, - { "OfxPropShortLabel", false , true, false }, - { "OfxPropLongLabel", false , true, false }, - { "OfxImageEffectPropSupportedComponents", false , true, false }, - { "OfxImageEffectPropTemporalClipAccess", false , true, false }, - { "OfxImageClipPropOptional", false , true, false }, - { "OfxImageClipPropFieldExtraction", false , true, false }, - { "OfxImageClipPropIsMask", false , true, false }, - { "OfxImageEffectPropSupportsTiles", false , true, false } } }, -{ "ClipInstance", { { "OfxPropType", true , false, false }, - { "OfxPropName", true , false, false }, - { "OfxPropLabel", true , false, false }, - { "OfxPropShortLabel", true , false, false }, - { "OfxPropLongLabel", true , false, false }, - { "OfxImageEffectPropSupportedComponents", true , false, false }, - { "OfxImageEffectPropTemporalClipAccess", true , false, false }, - { "OfxImageClipPropColourspace", true , false, false }, - { "OfxImageClipPropPreferredColourspaces", true , false, false }, - { "OfxImageClipPropOptional", true , false, false }, - { "OfxImageClipPropFieldExtraction", true , false, false }, - { "OfxImageClipPropIsMask", true , false, false }, - { "OfxImageEffectPropSupportsTiles", true , false, false }, - { "OfxImageEffectPropPixelDepth", true , false, false }, - { "OfxImageEffectPropComponents", true , false, false }, - { "OfxImageClipPropUnmappedPixelDepth", true , false, false }, - { "OfxImageClipPropUnmappedComponents", true , false, false }, - { "OfxImageEffectPropPreMultiplication", true , false, false }, - { "OfxImagePropPixelAspectRatio", true , false, false }, - { "OfxImageEffectPropFrameRate", true , false, false }, - { "OfxImageEffectPropFrameRange", true , false, false }, - { "OfxImageClipPropFieldOrder", true , false, false }, - { "OfxImageClipPropConnected", true , false, false }, - { "OfxImageEffectPropUnmappedFrameRange", true , false, false }, - { "OfxImageEffectPropUnmappedFrameRate", true , false, false }, - { "OfxImageClipPropContinuousSamples", true , false, false } } }, -{ "EffectDescriptor", { { "OfxPropType", false , true, false }, - { "OfxPropLabel", false , true, false }, - { "OfxPropShortLabel", false , true, false }, - { "OfxPropLongLabel", false , true, false }, - { "OfxPropVersion", false , true, false }, - { "OfxPropVersionLabel", false , true, false }, - { "OfxPropPluginDescription", false , true, false }, - { "OfxImageEffectPropSupportedContexts", false , true, false }, - { "OfxImageEffectPluginPropGrouping", false , true, false }, - { "OfxImageEffectPluginPropSingleInstance", false , true, false }, - { "OfxImageEffectPluginRenderThreadSafety", false , true, false }, - { "OfxImageEffectPluginPropHostFrameThreading", false , true, false }, - { "OfxImageEffectPluginPropOverlayInteractV1", false , true, false }, - { "OfxImageEffectPropSupportsMultiResolution", false , true, false }, - { "OfxImageEffectPropSupportsTiles", false , true, false }, - { "OfxImageEffectPropTemporalClipAccess", false , true, false }, - { "OfxImageEffectPropSupportedPixelDepths", false , true, false }, - { "OfxImageEffectPluginPropFieldRenderTwiceAlways", false , true, false }, - { "OfxImageEffectPropMultipleClipDepths", false , true, false }, - { "OfxImageEffectPropSupportsMultipleClipPARs", false , true, false }, - { "OfxImageEffectPluginRenderThreadSafety", false , true, false }, - { "OfxImageEffectPropClipPreferencesSlaveParam", false , true, false }, - { "OfxImageEffectPropOpenGLRenderSupported", false , true, false }, - { "OfxPluginPropFilePath", true , false, false }, - { "OfxOpenGLPropPixelDepth", false , true, false }, - { "OfxImageEffectPluginPropOverlayInteractV2", false , true, false }, - { "OfxImageEffectPropColourManagementAvailableConfigs", false , true, false }, - { "OfxImageEffectPropColourManagementStyle", false , true, false } } }, -{ "EffectInstance", { { "OfxPropType", true , false, false }, - { "OfxImageEffectPropContext", true , false, false }, - { "OfxPropInstanceData", true , false, false }, - { "OfxImageEffectPropProjectSize", true , false, false }, - { "OfxImageEffectPropProjectOffset", true , false, false }, - { "OfxImageEffectPropProjectExtent", true , false, false }, - { "OfxImageEffectPropPixelAspectRatio", true , false, false }, - { "OfxImageEffectInstancePropEffectDuration", true , false, false }, - { "OfxImageEffectInstancePropSequentialRender", true , false, false }, - { "OfxImageEffectPropSupportsTiles", true , false, false }, - { "OfxImageEffectPropOpenGLRenderSupported", true , false, false }, - { "OfxImageEffectPropFrameRate", true , false, false }, - { "OfxPropIsInteractive", true , false, false }, - { "OfxImageEffectPropOCIOConfig", true , false, false }, - { "OfxImageEffectPropOCIODisplay", true , false, false }, - { "OfxImageEffectPropOCIOView", true , false, false }, - { "OfxImageEffectPropColourManagementConfig", true , false, false }, - { "OfxImageEffectPropColourManagementStyle", true , false, false }, - { "OfxImageEffectPropDisplayColourspace", true , false, false }, - { "OfxImageEffectPropPluginHandle", true , false, false } } }, -{ "Image", { { "OfxPropType", true , false, false }, - { "OfxImageEffectPropPixelDepth", true , false, false }, - { "OfxImageEffectPropComponents", true , false, false }, - { "OfxImageEffectPropPreMultiplication", true , false, false }, - { "OfxImageEffectPropRenderScale", true , false, false }, - { "OfxImagePropPixelAspectRatio", true , false, false }, - { "OfxImagePropData", true , false, false }, - { "OfxImagePropBounds", true , false, false }, - { "OfxImagePropRegionOfDefinition", true , false, false }, - { "OfxImagePropRowBytes", true , false, false }, - { "OfxImagePropField", true , false, false }, - { "OfxImagePropUniqueIdentifier", true , false, false } } }, -{ "ImageEffectHost", { { "OfxPropAPIVersion", true , false, false }, - { "OfxPropType", true , false, false }, - { "OfxPropName", true , false, false }, - { "OfxPropLabel", true , false, false }, - { "OfxPropVersion", true , false, false }, - { "OfxPropVersionLabel", true , false, false }, - { "OfxImageEffectHostPropIsBackground", true , false, false }, - { "OfxImageEffectPropSupportsOverlays", true , false, false }, - { "OfxImageEffectPropSupportsMultiResolution", true , false, false }, - { "OfxImageEffectPropSupportsTiles", true , false, false }, - { "OfxImageEffectPropTemporalClipAccess", true , false, false }, - { "OfxImageEffectPropSupportedComponents", true , false, false }, - { "OfxImageEffectPropSupportedContexts", true , false, false }, - { "OfxImageEffectPropMultipleClipDepths", true , false, false }, - { "OfxImageEffectPropSupportsMultipleClipPARs", true , false, false }, - { "OfxImageEffectPropSetableFrameRate", true , false, false }, - { "OfxImageEffectPropSetableFielding", true , false, false }, - { "OfxParamHostPropSupportsCustomInteract", true , false, false }, - { "OfxParamHostPropSupportsStringAnimation", true , false, false }, - { "OfxParamHostPropSupportsChoiceAnimation", true , false, false }, - { "OfxParamHostPropSupportsBooleanAnimation", true , false, false }, - { "OfxParamHostPropSupportsCustomAnimation", true , false, false }, - { "OfxParamHostPropSupportsStrChoice", true , false, false }, - { "OfxParamHostPropSupportsStrChoiceAnimation", true , false, false }, - { "OfxParamHostPropMaxParameters", true , false, false }, - { "OfxParamHostPropMaxPages", true , false, false }, - { "OfxParamHostPropPageRowColumnCount", true , false, false }, - { "OfxPropHostOSHandle", true , false, false }, - { "OfxParamHostPropSupportsParametricAnimation", true , false, false }, - { "OfxImageEffectInstancePropSequentialRender", true , false, false }, - { "OfxImageEffectPropOpenGLRenderSupported", true , false, false }, - { "OfxImageEffectPropRenderQualityDraft", true , false, false }, - { "OfxImageEffectHostPropNativeOrigin", true , false, false }, - { "OfxImageEffectPropColourManagementAvailableConfigs", true , false, false }, - { "OfxImageEffectPropColourManagementStyle", true , false, false } } }, -{ "InteractDescriptor", { { "OfxInteractPropHasAlpha", true , false, false }, - { "OfxInteractPropBitDepth", true , false, false } } }, -{ "InteractInstance", { { "OfxPropEffectInstance", true , false, false }, - { "OfxPropInstanceData", true , false, false }, - { "OfxInteractPropPixelScale", true , false, false }, - { "OfxInteractPropBackgroundColour", true , false, false }, - { "OfxInteractPropHasAlpha", true , false, false }, - { "OfxInteractPropBitDepth", true , false, false }, - { "OfxInteractPropSlaveToParam", true , false, false }, - { "OfxInteractPropSuggestedColour", true , false, false } } }, -{ "ParamDouble1D", { { "OfxParamPropShowTimeMarker", false , true, false }, - { "OfxParamPropDoubleType", false , true, false }, - { "OfxPropType", false , true, false }, - { "OfxPropName", false , true, false }, - { "OfxPropLabel", false , true, false }, - { "OfxPropShortLabel", false , true, false }, - { "OfxPropLongLabel", false , true, false }, - { "OfxParamPropType", false , true, false }, - { "OfxParamPropSecret", false , true, false }, - { "OfxParamPropHint", false , true, false }, - { "OfxParamPropScriptName", false , true, false }, - { "OfxParamPropParent", false , true, false }, - { "OfxParamPropEnabled", false , true, false }, - { "OfxParamPropDataPtr", false , true, false }, - { "OfxPropIcon", false , true, false }, - { "OfxParamPropInteractV1", false , true, false }, - { "OfxParamPropInteractSize", false , true, false }, - { "OfxParamPropInteractSizeAspect", false , true, false }, - { "OfxParamPropInteractMinimumSize", false , true, false }, - { "OfxParamPropInteractPreferedSize", false , true, false }, - { "OfxParamPropHasHostOverlayHandle", false , true, false }, - { "kOfxParamPropUseHostOverlayHandle", false , true, false }, - { "OfxParamPropDefault", false , true, false }, - { "OfxParamPropAnimates", false , true, false }, - { "OfxParamPropIsAnimating", true , false, false }, - { "OfxParamPropIsAutoKeying", true , false, false }, - { "OfxParamPropPersistant", false , true, false }, - { "OfxParamPropEvaluateOnChange", false , true, false }, - { "OfxParamPropPluginMayWrite", false , true, false }, - { "OfxParamPropCacheInvalidation", false , true, false }, - { "OfxParamPropCanUndo", false , true, false }, - { "OfxParamPropMin", false , true, false }, - { "OfxParamPropMax", false , true, false }, - { "OfxParamPropDisplayMin", false , true, false }, - { "OfxParamPropDisplayMax", false , true, false }, - { "OfxParamPropIncrement", false , true, false }, - { "OfxParamPropDigits", false , true, false } } }, -{ "ParameterSet", { { "OfxPropParamSetNeedsSyncing", false , true, false }, - { "OfxPluginPropParamPageOrder", false , true, false } } }, -{ "ParamsByte", { { "OfxPropType", false , true, false }, - { "OfxPropName", false , true, false }, - { "OfxPropLabel", false , true, false }, - { "OfxPropShortLabel", false , true, false }, - { "OfxPropLongLabel", false , true, false }, - { "OfxParamPropType", false , true, false }, - { "OfxParamPropSecret", false , true, false }, - { "OfxParamPropHint", false , true, false }, - { "OfxParamPropScriptName", false , true, false }, - { "OfxParamPropParent", false , true, false }, - { "OfxParamPropEnabled", false , true, false }, - { "OfxParamPropDataPtr", false , true, false }, - { "OfxPropIcon", false , true, false }, - { "OfxParamPropInteractV1", false , true, false }, - { "OfxParamPropInteractSize", false , true, false }, - { "OfxParamPropInteractSizeAspect", false , true, false }, - { "OfxParamPropInteractMinimumSize", false , true, false }, - { "OfxParamPropInteractPreferedSize", false , true, false }, - { "OfxParamPropHasHostOverlayHandle", false , true, false }, - { "kOfxParamPropUseHostOverlayHandle", false , true, false }, - { "OfxParamPropDefault", false , true, false }, - { "OfxParamPropAnimates", false , true, false }, - { "OfxParamPropIsAnimating", true , false, false }, - { "OfxParamPropIsAutoKeying", true , false, false }, - { "OfxParamPropPersistant", false , true, false }, - { "OfxParamPropEvaluateOnChange", false , true, false }, - { "OfxParamPropPluginMayWrite", false , true, false }, - { "OfxParamPropCacheInvalidation", false , true, false }, - { "OfxParamPropCanUndo", false , true, false }, - { "OfxParamPropMin", false , true, false }, - { "OfxParamPropMax", false , true, false }, - { "OfxParamPropDisplayMin", false , true, false }, - { "OfxParamPropDisplayMax", false , true, false } } }, -{ "ParamsChoice", { { "OfxParamPropChoiceOption", false , true, false }, - { "OfxParamPropChoiceOrder", false , true, false }, - { "OfxPropType", false , true, false }, - { "OfxPropName", false , true, false }, - { "OfxPropLabel", false , true, false }, - { "OfxPropShortLabel", false , true, false }, - { "OfxPropLongLabel", false , true, false }, - { "OfxParamPropType", false , true, false }, - { "OfxParamPropSecret", false , true, false }, - { "OfxParamPropHint", false , true, false }, - { "OfxParamPropScriptName", false , true, false }, - { "OfxParamPropParent", false , true, false }, - { "OfxParamPropEnabled", false , true, false }, - { "OfxParamPropDataPtr", false , true, false }, - { "OfxPropIcon", false , true, false }, - { "OfxParamPropInteractV1", false , true, false }, - { "OfxParamPropInteractSize", false , true, false }, - { "OfxParamPropInteractSizeAspect", false , true, false }, - { "OfxParamPropInteractMinimumSize", false , true, false }, - { "OfxParamPropInteractPreferedSize", false , true, false }, - { "OfxParamPropHasHostOverlayHandle", false , true, false }, - { "kOfxParamPropUseHostOverlayHandle", false , true, false }, - { "OfxParamPropDefault", false , true, false }, - { "OfxParamPropAnimates", false , true, false }, - { "OfxParamPropIsAnimating", true , false, false }, - { "OfxParamPropIsAutoKeying", true , false, false }, - { "OfxParamPropPersistant", false , true, false }, - { "OfxParamPropEvaluateOnChange", false , true, false }, - { "OfxParamPropPluginMayWrite", false , true, false }, - { "OfxParamPropCacheInvalidation", false , true, false }, - { "OfxParamPropCanUndo", false , true, false } } }, -{ "ParamsCustom", { { "OfxParamPropCustomCallbackV1", false , true, false }, - { "OfxPropType", false , true, false }, - { "OfxPropName", false , true, false }, - { "OfxPropLabel", false , true, false }, - { "OfxPropShortLabel", false , true, false }, - { "OfxPropLongLabel", false , true, false }, - { "OfxParamPropType", false , true, false }, - { "OfxParamPropSecret", false , true, false }, - { "OfxParamPropHint", false , true, false }, - { "OfxParamPropScriptName", false , true, false }, - { "OfxParamPropParent", false , true, false }, - { "OfxParamPropEnabled", false , true, false }, - { "OfxParamPropDataPtr", false , true, false }, - { "OfxPropIcon", false , true, false }, - { "OfxParamPropInteractV1", false , true, false }, - { "OfxParamPropInteractSize", false , true, false }, - { "OfxParamPropInteractSizeAspect", false , true, false }, - { "OfxParamPropInteractMinimumSize", false , true, false }, - { "OfxParamPropInteractPreferedSize", false , true, false }, - { "OfxParamPropHasHostOverlayHandle", false , true, false }, - { "kOfxParamPropUseHostOverlayHandle", false , true, false }, - { "OfxParamPropDefault", false , true, false }, - { "OfxParamPropAnimates", false , true, false }, - { "OfxParamPropIsAnimating", true , false, false }, - { "OfxParamPropIsAutoKeying", true , false, false }, - { "OfxParamPropPersistant", false , true, false }, - { "OfxParamPropEvaluateOnChange", false , true, false }, - { "OfxParamPropPluginMayWrite", false , true, false }, - { "OfxParamPropCacheInvalidation", false , true, false }, - { "OfxParamPropCanUndo", false , true, false } } }, -{ "ParamsDouble2D3D", { { "OfxParamPropDoubleType", false , true, false }, - { "OfxPropType", false , true, false }, - { "OfxPropName", false , true, false }, - { "OfxPropLabel", false , true, false }, - { "OfxPropShortLabel", false , true, false }, - { "OfxPropLongLabel", false , true, false }, - { "OfxParamPropType", false , true, false }, - { "OfxParamPropSecret", false , true, false }, - { "OfxParamPropHint", false , true, false }, - { "OfxParamPropScriptName", false , true, false }, - { "OfxParamPropParent", false , true, false }, - { "OfxParamPropEnabled", false , true, false }, - { "OfxParamPropDataPtr", false , true, false }, - { "OfxPropIcon", false , true, false }, - { "OfxParamPropInteractV1", false , true, false }, - { "OfxParamPropInteractSize", false , true, false }, - { "OfxParamPropInteractSizeAspect", false , true, false }, - { "OfxParamPropInteractMinimumSize", false , true, false }, - { "OfxParamPropInteractPreferedSize", false , true, false }, - { "OfxParamPropHasHostOverlayHandle", false , true, false }, - { "kOfxParamPropUseHostOverlayHandle", false , true, false }, - { "OfxParamPropDefault", false , true, false }, - { "OfxParamPropAnimates", false , true, false }, - { "OfxParamPropIsAnimating", true , false, false }, - { "OfxParamPropIsAutoKeying", true , false, false }, - { "OfxParamPropPersistant", false , true, false }, - { "OfxParamPropEvaluateOnChange", false , true, false }, - { "OfxParamPropPluginMayWrite", false , true, false }, - { "OfxParamPropCacheInvalidation", false , true, false }, - { "OfxParamPropCanUndo", false , true, false }, - { "OfxParamPropMin", false , true, false }, - { "OfxParamPropMax", false , true, false }, - { "OfxParamPropDisplayMin", false , true, false }, - { "OfxParamPropDisplayMax", false , true, false }, - { "OfxParamPropIncrement", false , true, false }, - { "OfxParamPropDigits", false , true, false } } }, -{ "ParamsGroup", { { "OfxParamPropGroupOpen", false , true, false }, - { "OfxPropType", false , true, false }, - { "OfxPropName", false , true, false }, - { "OfxPropLabel", false , true, false }, - { "OfxPropShortLabel", false , true, false }, - { "OfxPropLongLabel", false , true, false }, - { "OfxParamPropType", false , true, false }, - { "OfxParamPropSecret", false , true, false }, - { "OfxParamPropHint", false , true, false }, - { "OfxParamPropScriptName", false , true, false }, - { "OfxParamPropParent", false , true, false }, - { "OfxParamPropEnabled", false , true, false }, - { "OfxParamPropDataPtr", false , true, false }, - { "OfxPropIcon", false , true, false } } }, -{ "ParamsInt2D3D", { { "OfxParamPropDimensionLabel", false , true, false }, - { "OfxPropType", false , true, false }, - { "OfxPropName", false , true, false }, - { "OfxPropLabel", false , true, false }, - { "OfxPropShortLabel", false , true, false }, - { "OfxPropLongLabel", false , true, false }, - { "OfxParamPropType", false , true, false }, - { "OfxParamPropSecret", false , true, false }, - { "OfxParamPropHint", false , true, false }, - { "OfxParamPropScriptName", false , true, false }, - { "OfxParamPropParent", false , true, false }, - { "OfxParamPropEnabled", false , true, false }, - { "OfxParamPropDataPtr", false , true, false }, - { "OfxPropIcon", false , true, false }, - { "OfxParamPropInteractV1", false , true, false }, - { "OfxParamPropInteractSize", false , true, false }, - { "OfxParamPropInteractSizeAspect", false , true, false }, - { "OfxParamPropInteractMinimumSize", false , true, false }, - { "OfxParamPropInteractPreferedSize", false , true, false }, - { "OfxParamPropHasHostOverlayHandle", false , true, false }, - { "kOfxParamPropUseHostOverlayHandle", false , true, false }, - { "OfxParamPropDefault", false , true, false }, - { "OfxParamPropAnimates", false , true, false }, - { "OfxParamPropIsAnimating", true , false, false }, - { "OfxParamPropIsAutoKeying", true , false, false }, - { "OfxParamPropPersistant", false , true, false }, - { "OfxParamPropEvaluateOnChange", false , true, false }, - { "OfxParamPropPluginMayWrite", false , true, false }, - { "OfxParamPropCacheInvalidation", false , true, false }, - { "OfxParamPropCanUndo", false , true, false }, - { "OfxParamPropMin", false , true, false }, - { "OfxParamPropMax", false , true, false }, - { "OfxParamPropDisplayMin", false , true, false }, - { "OfxParamPropDisplayMax", false , true, false } } }, -{ "ParamsNormalizedSpatial", { { "OfxParamPropDefaultCoordinateSystem", false , true, false }, - { "OfxPropType", false , true, false }, - { "OfxPropName", false , true, false }, - { "OfxPropLabel", false , true, false }, - { "OfxPropShortLabel", false , true, false }, - { "OfxPropLongLabel", false , true, false }, - { "OfxParamPropType", false , true, false }, - { "OfxParamPropSecret", false , true, false }, - { "OfxParamPropHint", false , true, false }, - { "OfxParamPropScriptName", false , true, false }, - { "OfxParamPropParent", false , true, false }, - { "OfxParamPropEnabled", false , true, false }, - { "OfxParamPropDataPtr", false , true, false }, - { "OfxPropIcon", false , true, false }, - { "OfxParamPropInteractV1", false , true, false }, - { "OfxParamPropInteractSize", false , true, false }, - { "OfxParamPropInteractSizeAspect", false , true, false }, - { "OfxParamPropInteractMinimumSize", false , true, false }, - { "OfxParamPropInteractPreferedSize", false , true, false }, - { "OfxParamPropHasHostOverlayHandle", false , true, false }, - { "kOfxParamPropUseHostOverlayHandle", false , true, false }, - { "OfxParamPropDefault", false , true, false }, - { "OfxParamPropAnimates", false , true, false }, - { "OfxParamPropIsAnimating", true , false, false }, - { "OfxParamPropIsAutoKeying", true , false, false }, - { "OfxParamPropPersistant", false , true, false }, - { "OfxParamPropEvaluateOnChange", false , true, false }, - { "OfxParamPropPluginMayWrite", false , true, false }, - { "OfxParamPropCacheInvalidation", false , true, false }, - { "OfxParamPropCanUndo", false , true, false }, - { "OfxParamPropMin", false , true, false }, - { "OfxParamPropMax", false , true, false }, - { "OfxParamPropDisplayMin", false , true, false }, - { "OfxParamPropDisplayMax", false , true, false }, - { "OfxParamPropIncrement", false , true, false }, - { "OfxParamPropDigits", false , true, false } } }, -{ "ParamsPage", { { "OfxParamPropPageChild", false , true, false }, - { "OfxPropType", false , true, false }, - { "OfxPropName", false , true, false }, - { "OfxPropLabel", false , true, false }, - { "OfxPropShortLabel", false , true, false }, - { "OfxPropLongLabel", false , true, false }, - { "OfxParamPropType", false , true, false }, - { "OfxParamPropSecret", false , true, false }, - { "OfxParamPropHint", false , true, false }, - { "OfxParamPropScriptName", false , true, false }, - { "OfxParamPropParent", false , true, false }, - { "OfxParamPropEnabled", false , true, false }, - { "OfxParamPropDataPtr", false , true, false }, - { "OfxPropIcon", false , true, false } } }, -{ "ParamsParametric", { { "OfxParamPropAnimates", false , true, false }, - { "OfxParamPropIsAnimating", false , true, false }, - { "OfxParamPropIsAutoKeying", false , true, false }, - { "OfxParamPropPersistant", false , true, false }, - { "OfxParamPropEvaluateOnChange", false , true, false }, - { "OfxParamPropPluginMayWrite", false , true, false }, - { "OfxParamPropCacheInvalidation", false , true, false }, - { "OfxParamPropCanUndo", false , true, false }, - { "OfxParamPropParametricDimension", false , true, false }, - { "OfxParamPropParametricUIColour", false , true, false }, - { "OfxParamPropParametricInteractBackground", false , true, false }, - { "OfxParamPropParametricRange", false , true, false }, - { "OfxPropType", false , true, false }, - { "OfxPropName", false , true, false }, - { "OfxPropLabel", false , true, false }, - { "OfxPropShortLabel", false , true, false }, - { "OfxPropLongLabel", false , true, false }, - { "OfxParamPropType", false , true, false }, - { "OfxParamPropSecret", false , true, false }, - { "OfxParamPropHint", false , true, false }, - { "OfxParamPropScriptName", false , true, false }, - { "OfxParamPropParent", false , true, false }, - { "OfxParamPropEnabled", false , true, false }, - { "OfxParamPropDataPtr", false , true, false }, - { "OfxPropIcon", false , true, false }, - { "OfxParamPropInteractV1", false , true, false }, - { "OfxParamPropInteractSize", false , true, false }, - { "OfxParamPropInteractSizeAspect", false , true, false }, - { "OfxParamPropInteractMinimumSize", false , true, false }, - { "OfxParamPropInteractPreferedSize", false , true, false }, - { "OfxParamPropHasHostOverlayHandle", false , true, false }, - { "kOfxParamPropUseHostOverlayHandle", false , true, false }, - { "OfxParamPropDefault", false , true, false }, - { "OfxParamPropAnimates", false , true, false }, - { "OfxParamPropIsAnimating", true , false, false }, - { "OfxParamPropIsAutoKeying", true , false, false }, - { "OfxParamPropPersistant", false , true, false }, - { "OfxParamPropEvaluateOnChange", false , true, false }, - { "OfxParamPropPluginMayWrite", false , true, false }, - { "OfxParamPropCacheInvalidation", false , true, false }, - { "OfxParamPropCanUndo", false , true, false } } }, -{ "ParamsStrChoice", { { "OfxParamPropChoiceOption", false , true, false }, - { "OfxParamPropChoiceEnum", false , true, false }, - { "OfxPropType", false , true, false }, - { "OfxPropName", false , true, false }, - { "OfxPropLabel", false , true, false }, - { "OfxPropShortLabel", false , true, false }, - { "OfxPropLongLabel", false , true, false }, - { "OfxParamPropType", false , true, false }, - { "OfxParamPropSecret", false , true, false }, - { "OfxParamPropHint", false , true, false }, - { "OfxParamPropScriptName", false , true, false }, - { "OfxParamPropParent", false , true, false }, - { "OfxParamPropEnabled", false , true, false }, - { "OfxParamPropDataPtr", false , true, false }, - { "OfxPropIcon", false , true, false }, - { "OfxParamPropInteractV1", false , true, false }, - { "OfxParamPropInteractSize", false , true, false }, - { "OfxParamPropInteractSizeAspect", false , true, false }, - { "OfxParamPropInteractMinimumSize", false , true, false }, - { "OfxParamPropInteractPreferedSize", false , true, false }, - { "OfxParamPropHasHostOverlayHandle", false , true, false }, - { "kOfxParamPropUseHostOverlayHandle", false , true, false }, - { "OfxParamPropDefault", false , true, false }, - { "OfxParamPropAnimates", false , true, false }, - { "OfxParamPropIsAnimating", true , false, false }, - { "OfxParamPropIsAutoKeying", true , false, false }, - { "OfxParamPropPersistant", false , true, false }, - { "OfxParamPropEvaluateOnChange", false , true, false }, - { "OfxParamPropPluginMayWrite", false , true, false }, - { "OfxParamPropCacheInvalidation", false , true, false }, - { "OfxParamPropCanUndo", false , true, false } } }, -{ "ParamsString", { { "OfxParamPropStringMode", false , true, false }, - { "OfxParamPropStringFilePathExists", false , true, false }, - { "OfxPropType", false , true, false }, - { "OfxPropName", false , true, false }, - { "OfxPropLabel", false , true, false }, - { "OfxPropShortLabel", false , true, false }, - { "OfxPropLongLabel", false , true, false }, - { "OfxParamPropType", false , true, false }, - { "OfxParamPropSecret", false , true, false }, - { "OfxParamPropHint", false , true, false }, - { "OfxParamPropScriptName", false , true, false }, - { "OfxParamPropParent", false , true, false }, - { "OfxParamPropEnabled", false , true, false }, - { "OfxParamPropDataPtr", false , true, false }, - { "OfxPropIcon", false , true, false }, - { "OfxParamPropInteractV1", false , true, false }, - { "OfxParamPropInteractSize", false , true, false }, - { "OfxParamPropInteractSizeAspect", false , true, false }, - { "OfxParamPropInteractMinimumSize", false , true, false }, - { "OfxParamPropInteractPreferedSize", false , true, false }, - { "OfxParamPropHasHostOverlayHandle", false , true, false }, - { "kOfxParamPropUseHostOverlayHandle", false , true, false }, - { "OfxParamPropDefault", false , true, false }, - { "OfxParamPropAnimates", false , true, false }, - { "OfxParamPropIsAnimating", true , false, false }, - { "OfxParamPropIsAutoKeying", true , false, false }, - { "OfxParamPropPersistant", false , true, false }, - { "OfxParamPropEvaluateOnChange", false , true, false }, - { "OfxParamPropPluginMayWrite", false , true, false }, - { "OfxParamPropCacheInvalidation", false , true, false }, - { "OfxParamPropCanUndo", false , true, false }, - { "OfxParamPropMin", false , true, false }, - { "OfxParamPropMax", false , true, false }, - { "OfxParamPropDisplayMin", false , true, false }, - { "OfxParamPropDisplayMax", false , true, false } } }, +{ "ClipDescriptor", { { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, + { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, + { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, + { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, + { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, + { "OfxImageEffectPropSupportedComponents", prop_defs[static_cast(PropId::OfxImageEffectPropSupportedComponents)], false, true, false }, + { "OfxImageEffectPropTemporalClipAccess", prop_defs[static_cast(PropId::OfxImageEffectPropTemporalClipAccess)], false, true, false }, + { "OfxImageClipPropOptional", prop_defs[static_cast(PropId::OfxImageClipPropOptional)], false, true, false }, + { "OfxImageClipPropFieldExtraction", prop_defs[static_cast(PropId::OfxImageClipPropFieldExtraction)], false, true, false }, + { "OfxImageClipPropIsMask", prop_defs[static_cast(PropId::OfxImageClipPropIsMask)], false, true, false }, + { "OfxImageEffectPropSupportsTiles", prop_defs[static_cast(PropId::OfxImageEffectPropSupportsTiles)], false, true, false } } }, +{ "ClipInstance", { { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], true, false, false }, + { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], true, false, false }, + { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], true, false, false }, + { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], true, false, false }, + { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], true, false, false }, + { "OfxImageEffectPropSupportedComponents", prop_defs[static_cast(PropId::OfxImageEffectPropSupportedComponents)], true, false, false }, + { "OfxImageEffectPropTemporalClipAccess", prop_defs[static_cast(PropId::OfxImageEffectPropTemporalClipAccess)], true, false, false }, + { "OfxImageClipPropColourspace", prop_defs[static_cast(PropId::OfxImageClipPropColourspace)], true, false, false }, + { "OfxImageClipPropPreferredColourspaces", prop_defs[static_cast(PropId::OfxImageClipPropPreferredColourspaces)], true, false, false }, + { "OfxImageClipPropOptional", prop_defs[static_cast(PropId::OfxImageClipPropOptional)], true, false, false }, + { "OfxImageClipPropFieldExtraction", prop_defs[static_cast(PropId::OfxImageClipPropFieldExtraction)], true, false, false }, + { "OfxImageClipPropIsMask", prop_defs[static_cast(PropId::OfxImageClipPropIsMask)], true, false, false }, + { "OfxImageEffectPropSupportsTiles", prop_defs[static_cast(PropId::OfxImageEffectPropSupportsTiles)], true, false, false }, + { "OfxImageEffectPropPixelDepth", prop_defs[static_cast(PropId::OfxImageEffectPropPixelDepth)], true, false, false }, + { "OfxImageEffectPropComponents", prop_defs[static_cast(PropId::OfxImageEffectPropComponents)], true, false, false }, + { "OfxImageClipPropUnmappedPixelDepth", prop_defs[static_cast(PropId::OfxImageClipPropUnmappedPixelDepth)], true, false, false }, + { "OfxImageClipPropUnmappedComponents", prop_defs[static_cast(PropId::OfxImageClipPropUnmappedComponents)], true, false, false }, + { "OfxImageEffectPropPreMultiplication", prop_defs[static_cast(PropId::OfxImageEffectPropPreMultiplication)], true, false, false }, + { "OfxImagePropPixelAspectRatio", prop_defs[static_cast(PropId::OfxImagePropPixelAspectRatio)], true, false, false }, + { "OfxImageEffectPropFrameRate", prop_defs[static_cast(PropId::OfxImageEffectPropFrameRate)], true, false, false }, + { "OfxImageEffectPropFrameRange", prop_defs[static_cast(PropId::OfxImageEffectPropFrameRange)], true, false, false }, + { "OfxImageClipPropFieldOrder", prop_defs[static_cast(PropId::OfxImageClipPropFieldOrder)], true, false, false }, + { "OfxImageClipPropConnected", prop_defs[static_cast(PropId::OfxImageClipPropConnected)], true, false, false }, + { "OfxImageEffectPropUnmappedFrameRange", prop_defs[static_cast(PropId::OfxImageEffectPropUnmappedFrameRange)], true, false, false }, + { "OfxImageEffectPropUnmappedFrameRate", prop_defs[static_cast(PropId::OfxImageEffectPropUnmappedFrameRate)], true, false, false }, + { "OfxImageClipPropContinuousSamples", prop_defs[static_cast(PropId::OfxImageClipPropContinuousSamples)], true, false, false } } }, +{ "EffectDescriptor", { { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, + { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, + { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, + { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, + { "OfxPropVersion", prop_defs[static_cast(PropId::OfxPropVersion)], false, true, false }, + { "OfxPropVersionLabel", prop_defs[static_cast(PropId::OfxPropVersionLabel)], false, true, false }, + { "OfxPropPluginDescription", prop_defs[static_cast(PropId::OfxPropPluginDescription)], false, true, false }, + { "OfxImageEffectPropSupportedContexts", prop_defs[static_cast(PropId::OfxImageEffectPropSupportedContexts)], false, true, false }, + { "OfxImageEffectPluginPropGrouping", prop_defs[static_cast(PropId::OfxImageEffectPluginPropGrouping)], false, true, false }, + { "OfxImageEffectPluginPropSingleInstance", prop_defs[static_cast(PropId::OfxImageEffectPluginPropSingleInstance)], false, true, false }, + { "OfxImageEffectPluginRenderThreadSafety", prop_defs[static_cast(PropId::OfxImageEffectPluginRenderThreadSafety)], false, true, false }, + { "OfxImageEffectPluginPropHostFrameThreading", prop_defs[static_cast(PropId::OfxImageEffectPluginPropHostFrameThreading)], false, true, false }, + { "OfxImageEffectPluginPropOverlayInteractV1", prop_defs[static_cast(PropId::OfxImageEffectPluginPropOverlayInteractV1)], false, true, false }, + { "OfxImageEffectPropSupportsMultiResolution", prop_defs[static_cast(PropId::OfxImageEffectPropSupportsMultiResolution)], false, true, false }, + { "OfxImageEffectPropSupportsTiles", prop_defs[static_cast(PropId::OfxImageEffectPropSupportsTiles)], false, true, false }, + { "OfxImageEffectPropTemporalClipAccess", prop_defs[static_cast(PropId::OfxImageEffectPropTemporalClipAccess)], false, true, false }, + { "OfxImageEffectPropSupportedPixelDepths", prop_defs[static_cast(PropId::OfxImageEffectPropSupportedPixelDepths)], false, true, false }, + { "OfxImageEffectPluginPropFieldRenderTwiceAlways", prop_defs[static_cast(PropId::OfxImageEffectPluginPropFieldRenderTwiceAlways)], false, true, false }, + { "OfxImageEffectPropMultipleClipDepths", prop_defs[static_cast(PropId::OfxImageEffectPropMultipleClipDepths)], false, true, false }, + { "OfxImageEffectPropSupportsMultipleClipPARs", prop_defs[static_cast(PropId::OfxImageEffectPropSupportsMultipleClipPARs)], false, true, false }, + { "OfxImageEffectPluginRenderThreadSafety", prop_defs[static_cast(PropId::OfxImageEffectPluginRenderThreadSafety)], false, true, false }, + { "OfxImageEffectPropClipPreferencesSlaveParam", prop_defs[static_cast(PropId::OfxImageEffectPropClipPreferencesSlaveParam)], false, true, false }, + { "OfxImageEffectPropOpenGLRenderSupported", prop_defs[static_cast(PropId::OfxImageEffectPropOpenGLRenderSupported)], false, true, false }, + { "OfxPluginPropFilePath", prop_defs[static_cast(PropId::OfxPluginPropFilePath)], true, false, false }, + { "OfxOpenGLPropPixelDepth", prop_defs[static_cast(PropId::OfxOpenGLPropPixelDepth)], false, true, false }, + { "OfxImageEffectPluginPropOverlayInteractV2", prop_defs[static_cast(PropId::OfxImageEffectPluginPropOverlayInteractV2)], false, true, false }, + { "OfxImageEffectPropColourManagementAvailableConfigs", prop_defs[static_cast(PropId::OfxImageEffectPropColourManagementAvailableConfigs)], false, true, false }, + { "OfxImageEffectPropColourManagementStyle", prop_defs[static_cast(PropId::OfxImageEffectPropColourManagementStyle)], false, true, false } } }, +{ "EffectInstance", { { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], true, false, false }, + { "OfxImageEffectPropContext", prop_defs[static_cast(PropId::OfxImageEffectPropContext)], true, false, false }, + { "OfxPropInstanceData", prop_defs[static_cast(PropId::OfxPropInstanceData)], true, false, false }, + { "OfxImageEffectPropProjectSize", prop_defs[static_cast(PropId::OfxImageEffectPropProjectSize)], true, false, false }, + { "OfxImageEffectPropProjectOffset", prop_defs[static_cast(PropId::OfxImageEffectPropProjectOffset)], true, false, false }, + { "OfxImageEffectPropProjectExtent", prop_defs[static_cast(PropId::OfxImageEffectPropProjectExtent)], true, false, false }, + { "OfxImageEffectPropPixelAspectRatio", prop_defs[static_cast(PropId::OfxImageEffectPropPixelAspectRatio)], true, false, false }, + { "OfxImageEffectInstancePropEffectDuration", prop_defs[static_cast(PropId::OfxImageEffectInstancePropEffectDuration)], true, false, false }, + { "OfxImageEffectInstancePropSequentialRender", prop_defs[static_cast(PropId::OfxImageEffectInstancePropSequentialRender)], true, false, false }, + { "OfxImageEffectPropSupportsTiles", prop_defs[static_cast(PropId::OfxImageEffectPropSupportsTiles)], true, false, false }, + { "OfxImageEffectPropOpenGLRenderSupported", prop_defs[static_cast(PropId::OfxImageEffectPropOpenGLRenderSupported)], true, false, false }, + { "OfxImageEffectPropFrameRate", prop_defs[static_cast(PropId::OfxImageEffectPropFrameRate)], true, false, false }, + { "OfxPropIsInteractive", prop_defs[static_cast(PropId::OfxPropIsInteractive)], true, false, false }, + { "OfxImageEffectPropOCIOConfig", prop_defs[static_cast(PropId::OfxImageEffectPropOCIOConfig)], true, false, false }, + { "OfxImageEffectPropOCIODisplay", prop_defs[static_cast(PropId::OfxImageEffectPropOCIODisplay)], true, false, false }, + { "OfxImageEffectPropOCIOView", prop_defs[static_cast(PropId::OfxImageEffectPropOCIOView)], true, false, false }, + { "OfxImageEffectPropColourManagementConfig", prop_defs[static_cast(PropId::OfxImageEffectPropColourManagementConfig)], true, false, false }, + { "OfxImageEffectPropColourManagementStyle", prop_defs[static_cast(PropId::OfxImageEffectPropColourManagementStyle)], true, false, false }, + { "OfxImageEffectPropDisplayColourspace", prop_defs[static_cast(PropId::OfxImageEffectPropDisplayColourspace)], true, false, false }, + { "OfxImageEffectPropPluginHandle", prop_defs[static_cast(PropId::OfxImageEffectPropPluginHandle)], true, false, false } } }, +{ "Image", { { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], true, false, false }, + { "OfxImageEffectPropPixelDepth", prop_defs[static_cast(PropId::OfxImageEffectPropPixelDepth)], true, false, false }, + { "OfxImageEffectPropComponents", prop_defs[static_cast(PropId::OfxImageEffectPropComponents)], true, false, false }, + { "OfxImageEffectPropPreMultiplication", prop_defs[static_cast(PropId::OfxImageEffectPropPreMultiplication)], true, false, false }, + { "OfxImageEffectPropRenderScale", prop_defs[static_cast(PropId::OfxImageEffectPropRenderScale)], true, false, false }, + { "OfxImagePropPixelAspectRatio", prop_defs[static_cast(PropId::OfxImagePropPixelAspectRatio)], true, false, false }, + { "OfxImagePropData", prop_defs[static_cast(PropId::OfxImagePropData)], true, false, false }, + { "OfxImagePropBounds", prop_defs[static_cast(PropId::OfxImagePropBounds)], true, false, false }, + { "OfxImagePropRegionOfDefinition", prop_defs[static_cast(PropId::OfxImagePropRegionOfDefinition)], true, false, false }, + { "OfxImagePropRowBytes", prop_defs[static_cast(PropId::OfxImagePropRowBytes)], true, false, false }, + { "OfxImagePropField", prop_defs[static_cast(PropId::OfxImagePropField)], true, false, false }, + { "OfxImagePropUniqueIdentifier", prop_defs[static_cast(PropId::OfxImagePropUniqueIdentifier)], true, false, false } } }, +{ "ImageEffectHost", { { "OfxPropAPIVersion", prop_defs[static_cast(PropId::OfxPropAPIVersion)], true, false, false }, + { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], true, false, false }, + { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], true, false, false }, + { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], true, false, false }, + { "OfxPropVersion", prop_defs[static_cast(PropId::OfxPropVersion)], true, false, false }, + { "OfxPropVersionLabel", prop_defs[static_cast(PropId::OfxPropVersionLabel)], true, false, false }, + { "OfxImageEffectHostPropIsBackground", prop_defs[static_cast(PropId::OfxImageEffectHostPropIsBackground)], true, false, false }, + { "OfxImageEffectPropSupportsOverlays", prop_defs[static_cast(PropId::OfxImageEffectPropSupportsOverlays)], true, false, false }, + { "OfxImageEffectPropSupportsMultiResolution", prop_defs[static_cast(PropId::OfxImageEffectPropSupportsMultiResolution)], true, false, false }, + { "OfxImageEffectPropSupportsTiles", prop_defs[static_cast(PropId::OfxImageEffectPropSupportsTiles)], true, false, false }, + { "OfxImageEffectPropTemporalClipAccess", prop_defs[static_cast(PropId::OfxImageEffectPropTemporalClipAccess)], true, false, false }, + { "OfxImageEffectPropSupportedComponents", prop_defs[static_cast(PropId::OfxImageEffectPropSupportedComponents)], true, false, false }, + { "OfxImageEffectPropSupportedContexts", prop_defs[static_cast(PropId::OfxImageEffectPropSupportedContexts)], true, false, false }, + { "OfxImageEffectPropMultipleClipDepths", prop_defs[static_cast(PropId::OfxImageEffectPropMultipleClipDepths)], true, false, false }, + { "OfxImageEffectPropSupportsMultipleClipPARs", prop_defs[static_cast(PropId::OfxImageEffectPropSupportsMultipleClipPARs)], true, false, false }, + { "OfxImageEffectPropSetableFrameRate", prop_defs[static_cast(PropId::OfxImageEffectPropSetableFrameRate)], true, false, false }, + { "OfxImageEffectPropSetableFielding", prop_defs[static_cast(PropId::OfxImageEffectPropSetableFielding)], true, false, false }, + { "OfxParamHostPropSupportsCustomInteract", prop_defs[static_cast(PropId::OfxParamHostPropSupportsCustomInteract)], true, false, false }, + { "OfxParamHostPropSupportsStringAnimation", prop_defs[static_cast(PropId::OfxParamHostPropSupportsStringAnimation)], true, false, false }, + { "OfxParamHostPropSupportsChoiceAnimation", prop_defs[static_cast(PropId::OfxParamHostPropSupportsChoiceAnimation)], true, false, false }, + { "OfxParamHostPropSupportsBooleanAnimation", prop_defs[static_cast(PropId::OfxParamHostPropSupportsBooleanAnimation)], true, false, false }, + { "OfxParamHostPropSupportsCustomAnimation", prop_defs[static_cast(PropId::OfxParamHostPropSupportsCustomAnimation)], true, false, false }, + { "OfxParamHostPropSupportsStrChoice", prop_defs[static_cast(PropId::OfxParamHostPropSupportsStrChoice)], true, false, false }, + { "OfxParamHostPropSupportsStrChoiceAnimation", prop_defs[static_cast(PropId::OfxParamHostPropSupportsStrChoiceAnimation)], true, false, false }, + { "OfxParamHostPropMaxParameters", prop_defs[static_cast(PropId::OfxParamHostPropMaxParameters)], true, false, false }, + { "OfxParamHostPropMaxPages", prop_defs[static_cast(PropId::OfxParamHostPropMaxPages)], true, false, false }, + { "OfxParamHostPropPageRowColumnCount", prop_defs[static_cast(PropId::OfxParamHostPropPageRowColumnCount)], true, false, false }, + { "OfxPropHostOSHandle", prop_defs[static_cast(PropId::OfxPropHostOSHandle)], true, false, false }, + { "OfxParamHostPropSupportsParametricAnimation", prop_defs[static_cast(PropId::OfxParamHostPropSupportsParametricAnimation)], true, false, false }, + { "OfxImageEffectInstancePropSequentialRender", prop_defs[static_cast(PropId::OfxImageEffectInstancePropSequentialRender)], true, false, false }, + { "OfxImageEffectPropOpenGLRenderSupported", prop_defs[static_cast(PropId::OfxImageEffectPropOpenGLRenderSupported)], true, false, false }, + { "OfxImageEffectPropRenderQualityDraft", prop_defs[static_cast(PropId::OfxImageEffectPropRenderQualityDraft)], true, false, false }, + { "OfxImageEffectHostPropNativeOrigin", prop_defs[static_cast(PropId::OfxImageEffectHostPropNativeOrigin)], true, false, false }, + { "OfxImageEffectPropColourManagementAvailableConfigs", prop_defs[static_cast(PropId::OfxImageEffectPropColourManagementAvailableConfigs)], true, false, false }, + { "OfxImageEffectPropColourManagementStyle", prop_defs[static_cast(PropId::OfxImageEffectPropColourManagementStyle)], true, false, false } } }, +{ "InteractDescriptor", { { "OfxInteractPropHasAlpha", prop_defs[static_cast(PropId::OfxInteractPropHasAlpha)], true, false, false }, + { "OfxInteractPropBitDepth", prop_defs[static_cast(PropId::OfxInteractPropBitDepth)], true, false, false } } }, +{ "InteractInstance", { { "OfxPropEffectInstance", prop_defs[static_cast(PropId::OfxPropEffectInstance)], true, false, false }, + { "OfxPropInstanceData", prop_defs[static_cast(PropId::OfxPropInstanceData)], true, false, false }, + { "OfxInteractPropPixelScale", prop_defs[static_cast(PropId::OfxInteractPropPixelScale)], true, false, false }, + { "OfxInteractPropBackgroundColour", prop_defs[static_cast(PropId::OfxInteractPropBackgroundColour)], true, false, false }, + { "OfxInteractPropHasAlpha", prop_defs[static_cast(PropId::OfxInteractPropHasAlpha)], true, false, false }, + { "OfxInteractPropBitDepth", prop_defs[static_cast(PropId::OfxInteractPropBitDepth)], true, false, false }, + { "OfxInteractPropSlaveToParam", prop_defs[static_cast(PropId::OfxInteractPropSlaveToParam)], true, false, false }, + { "OfxInteractPropSuggestedColour", prop_defs[static_cast(PropId::OfxInteractPropSuggestedColour)], true, false, false } } }, +{ "ParamDouble1D", { { "OfxParamPropShowTimeMarker", prop_defs[static_cast(PropId::OfxParamPropShowTimeMarker)], false, true, false }, + { "OfxParamPropDoubleType", prop_defs[static_cast(PropId::OfxParamPropDoubleType)], false, true, false }, + { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, + { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, + { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, + { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, + { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, + { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, + { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, + { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, + { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, + { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, + { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, + { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false }, + { "OfxParamPropInteractV1", prop_defs[static_cast(PropId::OfxParamPropInteractV1)], false, true, false }, + { "OfxParamPropInteractSize", prop_defs[static_cast(PropId::OfxParamPropInteractSize)], false, true, false }, + { "OfxParamPropInteractSizeAspect", prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)], false, true, false }, + { "OfxParamPropInteractMinimumSize", prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)], false, true, false }, + { "OfxParamPropInteractPreferedSize", prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)], false, true, false }, + { "OfxParamPropHasHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)], false, true, false }, + { "kOfxParamPropUseHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)], false, true, false }, + { "OfxParamPropDefault", prop_defs[static_cast(PropId::OfxParamPropDefault)], false, true, false }, + { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], true, false, false }, + { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], true, false, false }, + { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false }, + { "OfxParamPropMin", prop_defs[static_cast(PropId::OfxParamPropMin)], false, true, false }, + { "OfxParamPropMax", prop_defs[static_cast(PropId::OfxParamPropMax)], false, true, false }, + { "OfxParamPropDisplayMin", prop_defs[static_cast(PropId::OfxParamPropDisplayMin)], false, true, false }, + { "OfxParamPropDisplayMax", prop_defs[static_cast(PropId::OfxParamPropDisplayMax)], false, true, false }, + { "OfxParamPropIncrement", prop_defs[static_cast(PropId::OfxParamPropIncrement)], false, true, false }, + { "OfxParamPropDigits", prop_defs[static_cast(PropId::OfxParamPropDigits)], false, true, false } } }, +{ "ParameterSet", { { "OfxPropParamSetNeedsSyncing", prop_defs[static_cast(PropId::OfxPropParamSetNeedsSyncing)], false, true, false }, + { "OfxPluginPropParamPageOrder", prop_defs[static_cast(PropId::OfxPluginPropParamPageOrder)], false, true, false } } }, +{ "ParamsByte", { { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, + { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, + { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, + { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, + { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, + { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, + { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, + { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, + { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, + { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, + { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, + { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false }, + { "OfxParamPropInteractV1", prop_defs[static_cast(PropId::OfxParamPropInteractV1)], false, true, false }, + { "OfxParamPropInteractSize", prop_defs[static_cast(PropId::OfxParamPropInteractSize)], false, true, false }, + { "OfxParamPropInteractSizeAspect", prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)], false, true, false }, + { "OfxParamPropInteractMinimumSize", prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)], false, true, false }, + { "OfxParamPropInteractPreferedSize", prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)], false, true, false }, + { "OfxParamPropHasHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)], false, true, false }, + { "kOfxParamPropUseHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)], false, true, false }, + { "OfxParamPropDefault", prop_defs[static_cast(PropId::OfxParamPropDefault)], false, true, false }, + { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], true, false, false }, + { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], true, false, false }, + { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false }, + { "OfxParamPropMin", prop_defs[static_cast(PropId::OfxParamPropMin)], false, true, false }, + { "OfxParamPropMax", prop_defs[static_cast(PropId::OfxParamPropMax)], false, true, false }, + { "OfxParamPropDisplayMin", prop_defs[static_cast(PropId::OfxParamPropDisplayMin)], false, true, false }, + { "OfxParamPropDisplayMax", prop_defs[static_cast(PropId::OfxParamPropDisplayMax)], false, true, false } } }, +{ "ParamsChoice", { { "OfxParamPropChoiceOption", prop_defs[static_cast(PropId::OfxParamPropChoiceOption)], false, true, false }, + { "OfxParamPropChoiceOrder", prop_defs[static_cast(PropId::OfxParamPropChoiceOrder)], false, true, false }, + { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, + { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, + { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, + { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, + { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, + { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, + { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, + { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, + { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, + { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, + { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, + { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false }, + { "OfxParamPropInteractV1", prop_defs[static_cast(PropId::OfxParamPropInteractV1)], false, true, false }, + { "OfxParamPropInteractSize", prop_defs[static_cast(PropId::OfxParamPropInteractSize)], false, true, false }, + { "OfxParamPropInteractSizeAspect", prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)], false, true, false }, + { "OfxParamPropInteractMinimumSize", prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)], false, true, false }, + { "OfxParamPropInteractPreferedSize", prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)], false, true, false }, + { "OfxParamPropHasHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)], false, true, false }, + { "kOfxParamPropUseHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)], false, true, false }, + { "OfxParamPropDefault", prop_defs[static_cast(PropId::OfxParamPropDefault)], false, true, false }, + { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], true, false, false }, + { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], true, false, false }, + { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false } } }, +{ "ParamsCustom", { { "OfxParamPropCustomCallbackV1", prop_defs[static_cast(PropId::OfxParamPropCustomCallbackV1)], false, true, false }, + { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, + { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, + { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, + { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, + { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, + { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, + { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, + { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, + { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, + { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, + { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, + { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false }, + { "OfxParamPropInteractV1", prop_defs[static_cast(PropId::OfxParamPropInteractV1)], false, true, false }, + { "OfxParamPropInteractSize", prop_defs[static_cast(PropId::OfxParamPropInteractSize)], false, true, false }, + { "OfxParamPropInteractSizeAspect", prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)], false, true, false }, + { "OfxParamPropInteractMinimumSize", prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)], false, true, false }, + { "OfxParamPropInteractPreferedSize", prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)], false, true, false }, + { "OfxParamPropHasHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)], false, true, false }, + { "kOfxParamPropUseHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)], false, true, false }, + { "OfxParamPropDefault", prop_defs[static_cast(PropId::OfxParamPropDefault)], false, true, false }, + { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], true, false, false }, + { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], true, false, false }, + { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false } } }, +{ "ParamsDouble2D3D", { { "OfxParamPropDoubleType", prop_defs[static_cast(PropId::OfxParamPropDoubleType)], false, true, false }, + { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, + { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, + { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, + { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, + { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, + { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, + { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, + { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, + { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, + { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, + { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, + { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false }, + { "OfxParamPropInteractV1", prop_defs[static_cast(PropId::OfxParamPropInteractV1)], false, true, false }, + { "OfxParamPropInteractSize", prop_defs[static_cast(PropId::OfxParamPropInteractSize)], false, true, false }, + { "OfxParamPropInteractSizeAspect", prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)], false, true, false }, + { "OfxParamPropInteractMinimumSize", prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)], false, true, false }, + { "OfxParamPropInteractPreferedSize", prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)], false, true, false }, + { "OfxParamPropHasHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)], false, true, false }, + { "kOfxParamPropUseHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)], false, true, false }, + { "OfxParamPropDefault", prop_defs[static_cast(PropId::OfxParamPropDefault)], false, true, false }, + { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], true, false, false }, + { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], true, false, false }, + { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false }, + { "OfxParamPropMin", prop_defs[static_cast(PropId::OfxParamPropMin)], false, true, false }, + { "OfxParamPropMax", prop_defs[static_cast(PropId::OfxParamPropMax)], false, true, false }, + { "OfxParamPropDisplayMin", prop_defs[static_cast(PropId::OfxParamPropDisplayMin)], false, true, false }, + { "OfxParamPropDisplayMax", prop_defs[static_cast(PropId::OfxParamPropDisplayMax)], false, true, false }, + { "OfxParamPropIncrement", prop_defs[static_cast(PropId::OfxParamPropIncrement)], false, true, false }, + { "OfxParamPropDigits", prop_defs[static_cast(PropId::OfxParamPropDigits)], false, true, false } } }, +{ "ParamsGroup", { { "OfxParamPropGroupOpen", prop_defs[static_cast(PropId::OfxParamPropGroupOpen)], false, true, false }, + { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, + { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, + { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, + { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, + { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, + { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, + { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, + { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, + { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, + { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, + { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, + { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false } } }, +{ "ParamsInt2D3D", { { "OfxParamPropDimensionLabel", prop_defs[static_cast(PropId::OfxParamPropDimensionLabel)], false, true, false }, + { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, + { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, + { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, + { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, + { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, + { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, + { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, + { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, + { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, + { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, + { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, + { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false }, + { "OfxParamPropInteractV1", prop_defs[static_cast(PropId::OfxParamPropInteractV1)], false, true, false }, + { "OfxParamPropInteractSize", prop_defs[static_cast(PropId::OfxParamPropInteractSize)], false, true, false }, + { "OfxParamPropInteractSizeAspect", prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)], false, true, false }, + { "OfxParamPropInteractMinimumSize", prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)], false, true, false }, + { "OfxParamPropInteractPreferedSize", prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)], false, true, false }, + { "OfxParamPropHasHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)], false, true, false }, + { "kOfxParamPropUseHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)], false, true, false }, + { "OfxParamPropDefault", prop_defs[static_cast(PropId::OfxParamPropDefault)], false, true, false }, + { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], true, false, false }, + { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], true, false, false }, + { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false }, + { "OfxParamPropMin", prop_defs[static_cast(PropId::OfxParamPropMin)], false, true, false }, + { "OfxParamPropMax", prop_defs[static_cast(PropId::OfxParamPropMax)], false, true, false }, + { "OfxParamPropDisplayMin", prop_defs[static_cast(PropId::OfxParamPropDisplayMin)], false, true, false }, + { "OfxParamPropDisplayMax", prop_defs[static_cast(PropId::OfxParamPropDisplayMax)], false, true, false } } }, +{ "ParamsNormalizedSpatial", { { "OfxParamPropDefaultCoordinateSystem", prop_defs[static_cast(PropId::OfxParamPropDefaultCoordinateSystem)], false, true, false }, + { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, + { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, + { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, + { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, + { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, + { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, + { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, + { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, + { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, + { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, + { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, + { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false }, + { "OfxParamPropInteractV1", prop_defs[static_cast(PropId::OfxParamPropInteractV1)], false, true, false }, + { "OfxParamPropInteractSize", prop_defs[static_cast(PropId::OfxParamPropInteractSize)], false, true, false }, + { "OfxParamPropInteractSizeAspect", prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)], false, true, false }, + { "OfxParamPropInteractMinimumSize", prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)], false, true, false }, + { "OfxParamPropInteractPreferedSize", prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)], false, true, false }, + { "OfxParamPropHasHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)], false, true, false }, + { "kOfxParamPropUseHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)], false, true, false }, + { "OfxParamPropDefault", prop_defs[static_cast(PropId::OfxParamPropDefault)], false, true, false }, + { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], true, false, false }, + { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], true, false, false }, + { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false }, + { "OfxParamPropMin", prop_defs[static_cast(PropId::OfxParamPropMin)], false, true, false }, + { "OfxParamPropMax", prop_defs[static_cast(PropId::OfxParamPropMax)], false, true, false }, + { "OfxParamPropDisplayMin", prop_defs[static_cast(PropId::OfxParamPropDisplayMin)], false, true, false }, + { "OfxParamPropDisplayMax", prop_defs[static_cast(PropId::OfxParamPropDisplayMax)], false, true, false }, + { "OfxParamPropIncrement", prop_defs[static_cast(PropId::OfxParamPropIncrement)], false, true, false }, + { "OfxParamPropDigits", prop_defs[static_cast(PropId::OfxParamPropDigits)], false, true, false } } }, +{ "ParamsPage", { { "OfxParamPropPageChild", prop_defs[static_cast(PropId::OfxParamPropPageChild)], false, true, false }, + { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, + { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, + { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, + { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, + { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, + { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, + { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, + { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, + { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, + { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, + { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, + { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false } } }, +{ "ParamsParametric", { { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], false, true, false }, + { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], false, true, false }, + { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false }, + { "OfxParamPropParametricDimension", prop_defs[static_cast(PropId::OfxParamPropParametricDimension)], false, true, false }, + { "OfxParamPropParametricUIColour", prop_defs[static_cast(PropId::OfxParamPropParametricUIColour)], false, true, false }, + { "OfxParamPropParametricInteractBackground", prop_defs[static_cast(PropId::OfxParamPropParametricInteractBackground)], false, true, false }, + { "OfxParamPropParametricRange", prop_defs[static_cast(PropId::OfxParamPropParametricRange)], false, true, false }, + { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, + { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, + { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, + { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, + { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, + { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, + { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, + { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, + { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, + { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, + { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, + { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false }, + { "OfxParamPropInteractV1", prop_defs[static_cast(PropId::OfxParamPropInteractV1)], false, true, false }, + { "OfxParamPropInteractSize", prop_defs[static_cast(PropId::OfxParamPropInteractSize)], false, true, false }, + { "OfxParamPropInteractSizeAspect", prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)], false, true, false }, + { "OfxParamPropInteractMinimumSize", prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)], false, true, false }, + { "OfxParamPropInteractPreferedSize", prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)], false, true, false }, + { "OfxParamPropHasHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)], false, true, false }, + { "kOfxParamPropUseHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)], false, true, false }, + { "OfxParamPropDefault", prop_defs[static_cast(PropId::OfxParamPropDefault)], false, true, false }, + { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], true, false, false }, + { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], true, false, false }, + { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false } } }, +{ "ParamsStrChoice", { { "OfxParamPropChoiceOption", prop_defs[static_cast(PropId::OfxParamPropChoiceOption)], false, true, false }, + { "OfxParamPropChoiceEnum", prop_defs[static_cast(PropId::OfxParamPropChoiceEnum)], false, true, false }, + { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, + { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, + { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, + { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, + { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, + { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, + { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, + { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, + { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, + { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, + { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, + { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false }, + { "OfxParamPropInteractV1", prop_defs[static_cast(PropId::OfxParamPropInteractV1)], false, true, false }, + { "OfxParamPropInteractSize", prop_defs[static_cast(PropId::OfxParamPropInteractSize)], false, true, false }, + { "OfxParamPropInteractSizeAspect", prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)], false, true, false }, + { "OfxParamPropInteractMinimumSize", prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)], false, true, false }, + { "OfxParamPropInteractPreferedSize", prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)], false, true, false }, + { "OfxParamPropHasHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)], false, true, false }, + { "kOfxParamPropUseHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)], false, true, false }, + { "OfxParamPropDefault", prop_defs[static_cast(PropId::OfxParamPropDefault)], false, true, false }, + { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], true, false, false }, + { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], true, false, false }, + { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false } } }, +{ "ParamsString", { { "OfxParamPropStringMode", prop_defs[static_cast(PropId::OfxParamPropStringMode)], false, true, false }, + { "OfxParamPropStringFilePathExists", prop_defs[static_cast(PropId::OfxParamPropStringFilePathExists)], false, true, false }, + { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, + { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, + { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, + { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, + { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, + { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, + { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, + { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, + { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, + { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, + { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, + { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false }, + { "OfxParamPropInteractV1", prop_defs[static_cast(PropId::OfxParamPropInteractV1)], false, true, false }, + { "OfxParamPropInteractSize", prop_defs[static_cast(PropId::OfxParamPropInteractSize)], false, true, false }, + { "OfxParamPropInteractSizeAspect", prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)], false, true, false }, + { "OfxParamPropInteractMinimumSize", prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)], false, true, false }, + { "OfxParamPropInteractPreferedSize", prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)], false, true, false }, + { "OfxParamPropHasHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)], false, true, false }, + { "kOfxParamPropUseHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)], false, true, false }, + { "OfxParamPropDefault", prop_defs[static_cast(PropId::OfxParamPropDefault)], false, true, false }, + { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], true, false, false }, + { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], true, false, false }, + { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false }, + { "OfxParamPropMin", prop_defs[static_cast(PropId::OfxParamPropMin)], false, true, false }, + { "OfxParamPropMax", prop_defs[static_cast(PropId::OfxParamPropMax)], false, true, false }, + { "OfxParamPropDisplayMin", prop_defs[static_cast(PropId::OfxParamPropDisplayMin)], false, true, false }, + { "OfxParamPropDisplayMax", prop_defs[static_cast(PropId::OfxParamPropDisplayMax)], false, true, false } } }, }; // Actions diff --git a/Support/include/ofxPropsMetadata.h b/Support/include/ofxPropsMetadata.h index b52d206e..5e4a2083 100644 --- a/Support/include/ofxPropsMetadata.h +++ b/Support/include/ofxPropsMetadata.h @@ -4,7 +4,6 @@ #pragma once -#include #include #include "ofxImageEffect.h" #include "ofxGPURender.h" @@ -21,198 +20,1536 @@ enum class PropType { Enum, Bool, String, - Bytes, Pointer }; -struct PropsMetadata { - std::string_view name; - std::vector types; - int dimension; - std::vector values; // for enums +// Each prop has a PropId:: enum, a runtime-accessible PropDef struct, and a compile-time PropTraits. +// These can be used by Support/include/PropsAccess.h for type-safe property access. + +//Property ID enum for compile-time lookup and type safety +enum class PropId { + OfxImageClipPropColourspace, // 0 + OfxImageClipPropConnected, // 1 + OfxImageClipPropContinuousSamples, // 2 + OfxImageClipPropFieldExtraction, // 3 + OfxImageClipPropFieldOrder, // 4 + OfxImageClipPropIsMask, // 5 + OfxImageClipPropOptional, // 6 + OfxImageClipPropPreferredColourspaces, // 7 + OfxImageClipPropUnmappedComponents, // 8 + OfxImageClipPropUnmappedPixelDepth, // 9 + OfxImageEffectFrameVarying, // 10 + OfxImageEffectHostPropIsBackground, // 11 + OfxImageEffectHostPropNativeOrigin, // 12 + OfxImageEffectInstancePropEffectDuration, // 13 + OfxImageEffectInstancePropSequentialRender, // 14 + OfxImageEffectPluginPropFieldRenderTwiceAlways, // 15 + OfxImageEffectPluginPropGrouping, // 16 + OfxImageEffectPluginPropHostFrameThreading, // 17 + OfxImageEffectPluginPropOverlayInteractV1, // 18 + OfxImageEffectPluginPropOverlayInteractV2, // 19 + OfxImageEffectPluginPropSingleInstance, // 20 + OfxImageEffectPluginRenderThreadSafety, // 21 + OfxImageEffectPropClipPreferencesSlaveParam, // 22 + OfxImageEffectPropColourManagementAvailableConfigs, // 23 + OfxImageEffectPropColourManagementConfig, // 24 + OfxImageEffectPropColourManagementStyle, // 25 + OfxImageEffectPropComponents, // 26 + OfxImageEffectPropContext, // 27 + OfxImageEffectPropCudaEnabled, // 28 + OfxImageEffectPropCudaRenderSupported, // 29 + OfxImageEffectPropCudaStream, // 30 + OfxImageEffectPropCudaStreamSupported, // 31 + OfxImageEffectPropDisplayColourspace, // 32 + OfxImageEffectPropFieldToRender, // 33 + OfxImageEffectPropFrameRange, // 34 + OfxImageEffectPropFrameRate, // 35 + OfxImageEffectPropFrameStep, // 36 + OfxImageEffectPropInAnalysis, // 37 + OfxImageEffectPropInteractiveRenderStatus, // 38 + OfxImageEffectPropMetalCommandQueue, // 39 + OfxImageEffectPropMetalEnabled, // 40 + OfxImageEffectPropMetalRenderSupported, // 41 + OfxImageEffectPropMultipleClipDepths, // 42 + OfxImageEffectPropOCIOConfig, // 43 + OfxImageEffectPropOCIODisplay, // 44 + OfxImageEffectPropOCIOView, // 45 + OfxImageEffectPropOpenCLCommandQueue, // 46 + OfxImageEffectPropOpenCLEnabled, // 47 + OfxImageEffectPropOpenCLImage, // 48 + OfxImageEffectPropOpenCLRenderSupported, // 49 + OfxImageEffectPropOpenCLSupported, // 50 + OfxImageEffectPropOpenGLEnabled, // 51 + OfxImageEffectPropOpenGLRenderSupported, // 52 + OfxImageEffectPropOpenGLTextureIndex, // 53 + OfxImageEffectPropOpenGLTextureTarget, // 54 + OfxImageEffectPropPixelAspectRatio, // 55 + OfxImageEffectPropPixelDepth, // 56 + OfxImageEffectPropPluginHandle, // 57 + OfxImageEffectPropPreMultiplication, // 58 + OfxImageEffectPropProjectExtent, // 59 + OfxImageEffectPropProjectOffset, // 60 + OfxImageEffectPropProjectSize, // 61 + OfxImageEffectPropRegionOfDefinition, // 62 + OfxImageEffectPropRegionOfInterest, // 63 + OfxImageEffectPropRenderQualityDraft, // 64 + OfxImageEffectPropRenderScale, // 65 + OfxImageEffectPropRenderWindow, // 66 + OfxImageEffectPropSequentialRenderStatus, // 67 + OfxImageEffectPropSetableFielding, // 68 + OfxImageEffectPropSetableFrameRate, // 69 + OfxImageEffectPropSupportedComponents, // 70 + OfxImageEffectPropSupportedContexts, // 71 + OfxImageEffectPropSupportedPixelDepths, // 72 + OfxImageEffectPropSupportsMultiResolution, // 73 + OfxImageEffectPropSupportsMultipleClipPARs, // 74 + OfxImageEffectPropSupportsOverlays, // 75 + OfxImageEffectPropSupportsTiles, // 76 + OfxImageEffectPropTemporalClipAccess, // 77 + OfxImageEffectPropUnmappedFrameRange, // 78 + OfxImageEffectPropUnmappedFrameRate, // 79 + OfxImagePropBounds, // 80 + OfxImagePropData, // 81 + OfxImagePropField, // 82 + OfxImagePropPixelAspectRatio, // 83 + OfxImagePropRegionOfDefinition, // 84 + OfxImagePropRowBytes, // 85 + OfxImagePropUniqueIdentifier, // 86 + OfxInteractPropBackgroundColour, // 87 + OfxInteractPropBitDepth, // 88 + OfxInteractPropDrawContext, // 89 + OfxInteractPropHasAlpha, // 90 + OfxInteractPropPenPosition, // 91 + OfxInteractPropPenPressure, // 92 + OfxInteractPropPenViewportPosition, // 93 + OfxInteractPropPixelScale, // 94 + OfxInteractPropSlaveToParam, // 95 + OfxInteractPropSuggestedColour, // 96 + OfxInteractPropViewport, // 97 + OfxOpenGLPropPixelDepth, // 98 + OfxParamHostPropMaxPages, // 99 + OfxParamHostPropMaxParameters, // 100 + OfxParamHostPropPageRowColumnCount, // 101 + OfxParamHostPropSupportsBooleanAnimation, // 102 + OfxParamHostPropSupportsChoiceAnimation, // 103 + OfxParamHostPropSupportsCustomAnimation, // 104 + OfxParamHostPropSupportsCustomInteract, // 105 + OfxParamHostPropSupportsParametricAnimation, // 106 + OfxParamHostPropSupportsStrChoice, // 107 + OfxParamHostPropSupportsStrChoiceAnimation, // 108 + OfxParamHostPropSupportsStringAnimation, // 109 + OfxParamPropAnimates, // 110 + OfxParamPropCacheInvalidation, // 111 + OfxParamPropCanUndo, // 112 + OfxParamPropChoiceEnum, // 113 + OfxParamPropChoiceOption, // 114 + OfxParamPropChoiceOrder, // 115 + OfxParamPropCustomCallbackV1, // 116 + OfxParamPropCustomValue, // 117 + OfxParamPropDataPtr, // 118 + OfxParamPropDefault, // 119 + OfxParamPropDefaultCoordinateSystem, // 120 + OfxParamPropDigits, // 121 + OfxParamPropDimensionLabel, // 122 + OfxParamPropDisplayMax, // 123 + OfxParamPropDisplayMin, // 124 + OfxParamPropDoubleType, // 125 + OfxParamPropEnabled, // 126 + OfxParamPropEvaluateOnChange, // 127 + OfxParamPropGroupOpen, // 128 + OfxParamPropHasHostOverlayHandle, // 129 + OfxParamPropHint, // 130 + OfxParamPropIncrement, // 131 + OfxParamPropInteractMinimumSize, // 132 + OfxParamPropInteractPreferedSize, // 133 + OfxParamPropInteractSize, // 134 + OfxParamPropInteractSizeAspect, // 135 + OfxParamPropInteractV1, // 136 + OfxParamPropInterpolationAmount, // 137 + OfxParamPropInterpolationTime, // 138 + OfxParamPropIsAnimating, // 139 + OfxParamPropIsAutoKeying, // 140 + OfxParamPropMax, // 141 + OfxParamPropMin, // 142 + OfxParamPropPageChild, // 143 + OfxParamPropParametricDimension, // 144 + OfxParamPropParametricInteractBackground, // 145 + OfxParamPropParametricRange, // 146 + OfxParamPropParametricUIColour, // 147 + OfxParamPropParent, // 148 + OfxParamPropPersistant, // 149 + OfxParamPropPluginMayWrite, // 150 + OfxParamPropScriptName, // 151 + OfxParamPropSecret, // 152 + OfxParamPropShowTimeMarker, // 153 + OfxParamPropStringFilePathExists, // 154 + OfxParamPropStringMode, // 155 + OfxParamPropType, // 156 + OfxPluginPropFilePath, // 157 + OfxPluginPropParamPageOrder, // 158 + OfxPropAPIVersion, // 159 + OfxPropChangeReason, // 160 + OfxPropEffectInstance, // 161 + OfxPropHostOSHandle, // 162 + OfxPropIcon, // 163 + OfxPropInstanceData, // 164 + OfxPropIsInteractive, // 165 + OfxPropLabel, // 166 + OfxPropLongLabel, // 167 + OfxPropName, // 168 + OfxPropParamSetNeedsSyncing, // 169 + OfxPropPluginDescription, // 170 + OfxPropShortLabel, // 171 + OfxPropTime, // 172 + OfxPropType, // 173 + OfxPropVersion, // 174 + OfxPropVersionLabel, // 175 + OfxParamPropUseHostOverlayHandle, // 176 (orig name: OfxParamPropUseHostOverlayHandle) + OfxPropKeyString, // 177 (orig name: OfxPropKeyString) + OfxPropKeySym, // 178 (orig name: OfxPropKeySym) + NProps // 179 +}; // PropId + +// Separate arrays for enum-values for enum props, to keep everything constexpr +namespace prop_enum_values { +constexpr std::array OfxImageClipPropFieldExtraction = + {"OfxImageFieldNone","OfxImageFieldLower","OfxImageFieldUpper","OfxImageFieldBoth","OfxImageFieldSingle","OfxImageFieldDoubled"}; +constexpr std::array OfxImageClipPropFieldOrder = + {"OfxImageFieldNone","OfxImageFieldLower","OfxImageFieldUpper"}; +constexpr std::array OfxImageClipPropUnmappedComponents = + {"OfxImageComponentNone","OfxImageComponentRGBA","OfxImageComponentRGB","OfxImageComponentAlpha"}; +constexpr std::array OfxImageClipPropUnmappedPixelDepth = + {"OfxBitDepthNone","OfxBitDepthByte","OfxBitDepthShort","OfxBitDepthHalf","OfxBitDepthFloat"}; +constexpr std::array OfxImageEffectHostPropNativeOrigin = + {"OfxImageEffectHostPropNativeOriginBottomLeft","OfxImageEffectHostPropNativeOriginTopLeft","OfxImageEffectHostPropNativeOriginCenter"}; +constexpr std::array OfxImageEffectPluginRenderThreadSafety = + {"OfxImageEffectRenderUnsafe","OfxImageEffectRenderInstanceSafe","OfxImageEffectRenderFullySafe"}; +constexpr std::array OfxImageEffectPropColourManagementStyle = + {"OfxImageEffectPropColourManagementNone","OfxImageEffectPropColourManagementBasic","OfxImageEffectPropColourManagementCore","OfxImageEffectPropColourManagementFull","OfxImageEffectPropColourManagementOCIO"}; +constexpr std::array OfxImageEffectPropComponents = + {"OfxImageComponentNone","OfxImageComponentRGBA","OfxImageComponentRGB","OfxImageComponentAlpha"}; +constexpr std::array OfxImageEffectPropContext = + {"OfxImageEffectContextGenerator","OfxImageEffectContextFilter","OfxImageEffectContextTransition","OfxImageEffectContextPaint","OfxImageEffectContextGeneral","OfxImageEffectContextRetimer"}; +constexpr std::array OfxImageEffectPropCudaRenderSupported = + {"false","true","needed"}; +constexpr std::array OfxImageEffectPropCudaStreamSupported = + {"false","true","needed"}; +constexpr std::array OfxImageEffectPropFieldToRender = + {"OfxImageFieldNone","OfxImageFieldBoth","OfxImageFieldLower","OfxImageFieldUpper"}; +constexpr std::array OfxImageEffectPropMetalRenderSupported = + {"false","true","needed"}; +constexpr std::array OfxImageEffectPropOpenCLRenderSupported = + {"false","true","needed"}; +constexpr std::array OfxImageEffectPropOpenCLSupported = + {"false","true"}; +constexpr std::array OfxImageEffectPropOpenGLRenderSupported = + {"false","true","needed"}; +constexpr std::array OfxImageEffectPropPixelDepth = + {"OfxBitDepthNone","OfxBitDepthByte","OfxBitDepthShort","OfxBitDepthHalf","OfxBitDepthFloat"}; +constexpr std::array OfxImageEffectPropPreMultiplication = + {"OfxImageOpaque","OfxImagePreMultiplied","OfxImageUnPreMultiplied"}; +constexpr std::array OfxImageEffectPropSupportedComponents = + {"OfxImageComponentNone","OfxImageComponentRGBA","OfxImageComponentRGB","OfxImageComponentAlpha"}; +constexpr std::array OfxImageEffectPropSupportedContexts = + {"OfxImageEffectContextGenerator","OfxImageEffectContextFilter","OfxImageEffectContextTransition","OfxImageEffectContextPaint","OfxImageEffectContextGeneral","OfxImageEffectContextRetimer"}; +constexpr std::array OfxImageEffectPropSupportedPixelDepths = + {"OfxBitDepthNone","OfxBitDepthByte","OfxBitDepthShort","OfxBitDepthHalf","OfxBitDepthFloat"}; +constexpr std::array OfxImagePropField = + {"OfxImageFieldNone","OfxImageFieldBoth","OfxImageFieldLower","OfxImageFieldUpper"}; +constexpr std::array OfxOpenGLPropPixelDepth = + {"OfxBitDepthNone","OfxBitDepthByte","OfxBitDepthShort","OfxBitDepthHalf","OfxBitDepthFloat"}; +constexpr std::array OfxParamPropCacheInvalidation = + {"OfxParamInvalidateValueChange","OfxParamInvalidateValueChangeToEnd","OfxParamInvalidateAll"}; +constexpr std::array OfxParamPropDefaultCoordinateSystem = + {"OfxParamCoordinatesCanonical","OfxParamCoordinatesNormalised"}; +constexpr std::array OfxParamPropDoubleType = + {"OfxParamDoubleTypePlain","OfxParamDoubleTypeAngle","OfxParamDoubleTypeScale","OfxParamDoubleTypeTime","OfxParamDoubleTypeAbsoluteTime","OfxParamDoubleTypeX","OfxParamDoubleTypeXAbsolute","OfxParamDoubleTypeY","OfxParamDoubleTypeYAbsolute","OfxParamDoubleTypeXY","OfxParamDoubleTypeXYAbsolute"}; +constexpr std::array OfxParamPropStringMode = + {"OfxParamStringIsSingleLine","OfxParamStringIsMultiLine","OfxParamStringIsFilePath","OfxParamStringIsDirectoryPath","OfxParamStringIsLabel","OfxParamStringIsRichTextFormat"}; +constexpr std::array OfxPluginPropFilePath = + {"false","true","needed"}; +constexpr std::array OfxPropChangeReason = + {"OfxChangeUserEdited","OfxChangePluginEdited","OfxChangeTime"}; +} // namespace prop_enum_values + + +#define MAX_PROP_TYPES 4 +struct PropDef { + const char* name; // Property name + PropId id; // ID for known props + PropType supportedTypes[MAX_PROP_TYPES]; // Supported data types + size_t supportedTypesCount; + int dimension; // Property dimension (0 for variable) + const char* const* enumValues; // Valid values for enum properties + size_t enumValuesCount; }; -static inline const std::array props_metadata { { -{ "OfxImageClipPropColourspace", {PropType::String}, 1, {} }, -{ "OfxImageClipPropConnected", {PropType::Bool}, 1, {} }, -{ "OfxImageClipPropContinuousSamples", {PropType::Bool}, 1, {} }, -{ "OfxImageClipPropFieldExtraction", {PropType::Enum}, 1, {"OfxImageFieldNone","OfxImageFieldLower","OfxImageFieldUpper","OfxImageFieldBoth","OfxImageFieldSingle","OfxImageFieldDoubled"} }, -{ "OfxImageClipPropFieldOrder", {PropType::Enum}, 1, {"OfxImageFieldNone","OfxImageFieldLower","OfxImageFieldUpper"} }, -{ "OfxImageClipPropIsMask", {PropType::Bool}, 1, {} }, -{ "OfxImageClipPropOptional", {PropType::Bool}, 1, {} }, -{ "OfxImageClipPropPreferredColourspaces", {PropType::String}, 0, {} }, -{ "OfxImageClipPropUnmappedComponents", {PropType::Enum}, 1, {"OfxImageComponentNone","OfxImageComponentRGBA","OfxImageComponentRGB","OfxImageComponentAlpha"} }, -{ "OfxImageClipPropUnmappedPixelDepth", {PropType::Enum}, 1, {"OfxBitDepthNone","OfxBitDepthByte","OfxBitDepthShort","OfxBitDepthHalf","OfxBitDepthFloat"} }, -{ "OfxImageEffectFrameVarying", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectHostPropIsBackground", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectHostPropNativeOrigin", {PropType::Enum}, 1, {"OfxImageEffectHostPropNativeOriginBottomLeft","OfxImageEffectHostPropNativeOriginTopLeft","OfxImageEffectHostPropNativeOriginCenter"} }, -{ "OfxImageEffectInstancePropEffectDuration", {PropType::Double}, 1, {} }, -{ "OfxImageEffectInstancePropSequentialRender", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectPluginPropFieldRenderTwiceAlways", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectPluginPropGrouping", {PropType::String}, 1, {} }, -{ "OfxImageEffectPluginPropHostFrameThreading", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectPluginPropOverlayInteractV1", {PropType::Pointer}, 1, {} }, -{ "OfxImageEffectPluginPropOverlayInteractV2", {PropType::Pointer}, 1, {} }, -{ "OfxImageEffectPluginPropSingleInstance", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectPluginRenderThreadSafety", {PropType::Enum}, 1, {"OfxImageEffectRenderUnsafe","OfxImageEffectRenderInstanceSafe","OfxImageEffectRenderFullySafe"} }, -{ "OfxImageEffectPropClipPreferencesSlaveParam", {PropType::String}, 0, {} }, -{ "OfxImageEffectPropColourManagementAvailableConfigs", {PropType::String}, 0, {} }, -{ "OfxImageEffectPropColourManagementConfig", {PropType::String}, 1, {} }, -{ "OfxImageEffectPropColourManagementStyle", {PropType::Enum}, 1, {"OfxImageEffectPropColourManagementNone","OfxImageEffectPropColourManagementBasic","OfxImageEffectPropColourManagementCore","OfxImageEffectPropColourManagementFull","OfxImageEffectPropColourManagementOCIO"} }, -{ "OfxImageEffectPropComponents", {PropType::Enum}, 1, {"OfxImageComponentNone","OfxImageComponentRGBA","OfxImageComponentRGB","OfxImageComponentAlpha"} }, -{ "OfxImageEffectPropContext", {PropType::Enum}, 1, {"OfxImageEffectContextGenerator","OfxImageEffectContextFilter","OfxImageEffectContextTransition","OfxImageEffectContextPaint","OfxImageEffectContextGeneral","OfxImageEffectContextRetimer"} }, -{ "OfxImageEffectPropCudaEnabled", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectPropCudaRenderSupported", {PropType::Enum}, 1, {"false","true","needed"} }, -{ "OfxImageEffectPropCudaStream", {PropType::Pointer}, 1, {} }, -{ "OfxImageEffectPropCudaStreamSupported", {PropType::Enum}, 1, {"false","true","needed"} }, -{ "OfxImageEffectPropDisplayColourspace", {PropType::String}, 1, {} }, -{ "OfxImageEffectPropFieldToRender", {PropType::Enum}, 1, {"OfxImageFieldNone","OfxImageFieldBoth","OfxImageFieldLower","OfxImageFieldUpper"} }, -{ "OfxImageEffectPropFrameRange", {PropType::Double}, 2, {} }, -{ "OfxImageEffectPropFrameRate", {PropType::Double}, 1, {} }, -{ "OfxImageEffectPropFrameStep", {PropType::Double}, 1, {} }, -{ "OfxImageEffectPropInAnalysis", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectPropInteractiveRenderStatus", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectPropMetalCommandQueue", {PropType::Pointer}, 1, {} }, -{ "OfxImageEffectPropMetalEnabled", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectPropMetalRenderSupported", {PropType::Enum}, 1, {"false","true","needed"} }, -{ "OfxImageEffectPropMultipleClipDepths", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectPropOCIOConfig", {PropType::String}, 1, {} }, -{ "OfxImageEffectPropOCIODisplay", {PropType::String}, 1, {} }, -{ "OfxImageEffectPropOCIOView", {PropType::String}, 1, {} }, -{ "OfxImageEffectPropOpenCLCommandQueue", {PropType::Pointer}, 1, {} }, -{ "OfxImageEffectPropOpenCLEnabled", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectPropOpenCLImage", {PropType::Int}, 1, {} }, -{ "OfxImageEffectPropOpenCLRenderSupported", {PropType::Enum}, 1, {"false","true","needed"} }, -{ "OfxImageEffectPropOpenCLSupported", {PropType::Enum}, 1, {"false","true"} }, -{ "OfxImageEffectPropOpenGLEnabled", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectPropOpenGLRenderSupported", {PropType::Enum}, 1, {"false","true","needed"} }, -{ "OfxImageEffectPropOpenGLTextureIndex", {PropType::Int}, 1, {} }, -{ "OfxImageEffectPropOpenGLTextureTarget", {PropType::Int}, 1, {} }, -{ "OfxImageEffectPropPixelAspectRatio", {PropType::Double}, 1, {} }, -{ "OfxImageEffectPropPixelDepth", {PropType::Enum}, 1, {"OfxBitDepthNone","OfxBitDepthByte","OfxBitDepthShort","OfxBitDepthHalf","OfxBitDepthFloat"} }, -{ "OfxImageEffectPropPluginHandle", {PropType::Pointer}, 1, {} }, -{ "OfxImageEffectPropPreMultiplication", {PropType::Enum}, 1, {"OfxImageOpaque","OfxImagePreMultiplied","OfxImageUnPreMultiplied"} }, -{ "OfxImageEffectPropProjectExtent", {PropType::Double}, 2, {} }, -{ "OfxImageEffectPropProjectOffset", {PropType::Double}, 2, {} }, -{ "OfxImageEffectPropProjectSize", {PropType::Double}, 2, {} }, -{ "OfxImageEffectPropRegionOfDefinition", {PropType::Int}, 4, {} }, -{ "OfxImageEffectPropRegionOfInterest", {PropType::Int}, 4, {} }, -{ "OfxImageEffectPropRenderQualityDraft", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectPropRenderScale", {PropType::Double}, 2, {} }, -{ "OfxImageEffectPropRenderWindow", {PropType::Int}, 4, {} }, -{ "OfxImageEffectPropSequentialRenderStatus", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectPropSetableFielding", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectPropSetableFrameRate", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectPropSupportedComponents", {PropType::Enum}, 0, {"OfxImageComponentNone","OfxImageComponentRGBA","OfxImageComponentRGB","OfxImageComponentAlpha"} }, -{ "OfxImageEffectPropSupportedContexts", {PropType::Enum}, 0, {"OfxImageEffectContextGenerator","OfxImageEffectContextFilter","OfxImageEffectContextTransition","OfxImageEffectContextPaint","OfxImageEffectContextGeneral","OfxImageEffectContextRetimer"} }, -{ "OfxImageEffectPropSupportedPixelDepths", {PropType::String}, 0, {} }, -{ "OfxImageEffectPropSupportsMultiResolution", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectPropSupportsMultipleClipPARs", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectPropSupportsOverlays", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectPropSupportsTiles", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectPropTemporalClipAccess", {PropType::Bool}, 1, {} }, -{ "OfxImageEffectPropUnmappedFrameRange", {PropType::Double}, 2, {} }, -{ "OfxImageEffectPropUnmappedFrameRate", {PropType::Double}, 1, {} }, -{ "OfxImagePropBounds", {PropType::Int}, 4, {} }, -{ "OfxImagePropData", {PropType::Pointer}, 1, {} }, -{ "OfxImagePropField", {PropType::Enum}, 1, {"OfxImageFieldNone","OfxImageFieldBoth","OfxImageFieldLower","OfxImageFieldUpper"} }, -{ "OfxImagePropPixelAspectRatio", {PropType::Double}, 1, {} }, -{ "OfxImagePropRegionOfDefinition", {PropType::Int}, 4, {} }, -{ "OfxImagePropRowBytes", {PropType::Int}, 1, {} }, -{ "OfxImagePropUniqueIdentifier", {PropType::String}, 1, {} }, -{ "OfxInteractPropBackgroundColour", {PropType::Double}, 3, {} }, -{ "OfxInteractPropBitDepth", {PropType::Int}, 1, {} }, -{ "OfxInteractPropDrawContext", {PropType::Pointer}, 1, {} }, -{ "OfxInteractPropHasAlpha", {PropType::Bool}, 1, {} }, -{ "OfxInteractPropPenPosition", {PropType::Double}, 2, {} }, -{ "OfxInteractPropPenPressure", {PropType::Double}, 1, {} }, -{ "OfxInteractPropPenViewportPosition", {PropType::Int}, 2, {} }, -{ "OfxInteractPropPixelScale", {PropType::Double}, 2, {} }, -{ "OfxInteractPropSlaveToParam", {PropType::String}, 0, {} }, -{ "OfxInteractPropSuggestedColour", {PropType::Double}, 3, {} }, -{ "OfxInteractPropViewport", {PropType::Int}, 2, {} }, -{ "OfxOpenGLPropPixelDepth", {PropType::Enum}, 0, {"OfxBitDepthNone","OfxBitDepthByte","OfxBitDepthShort","OfxBitDepthHalf","OfxBitDepthFloat"} }, -{ "OfxParamHostPropMaxPages", {PropType::Int}, 1, {} }, -{ "OfxParamHostPropMaxParameters", {PropType::Int}, 1, {} }, -{ "OfxParamHostPropPageRowColumnCount", {PropType::Int}, 2, {} }, -{ "OfxParamHostPropSupportsBooleanAnimation", {PropType::Bool}, 1, {} }, -{ "OfxParamHostPropSupportsChoiceAnimation", {PropType::Bool}, 1, {} }, -{ "OfxParamHostPropSupportsCustomAnimation", {PropType::Bool}, 1, {} }, -{ "OfxParamHostPropSupportsCustomInteract", {PropType::Bool}, 1, {} }, -{ "OfxParamHostPropSupportsParametricAnimation", {PropType::Bool}, 1, {} }, -{ "OfxParamHostPropSupportsStrChoice", {PropType::Bool}, 1, {} }, -{ "OfxParamHostPropSupportsStrChoiceAnimation", {PropType::Bool}, 1, {} }, -{ "OfxParamHostPropSupportsStringAnimation", {PropType::Bool}, 1, {} }, -{ "OfxParamPropAnimates", {PropType::Bool}, 1, {} }, -{ "OfxParamPropCacheInvalidation", {PropType::Enum}, 1, {"OfxParamInvalidateValueChange","OfxParamInvalidateValueChangeToEnd","OfxParamInvalidateAll"} }, -{ "OfxParamPropCanUndo", {PropType::Bool}, 1, {} }, -{ "OfxParamPropChoiceEnum", {PropType::Bool}, 1, {} }, -{ "OfxParamPropChoiceOption", {PropType::String}, 0, {} }, -{ "OfxParamPropChoiceOrder", {PropType::Int}, 0, {} }, -{ "OfxParamPropCustomCallbackV1", {PropType::Pointer}, 1, {} }, -{ "OfxParamPropCustomValue", {PropType::String}, 2, {} }, -{ "OfxParamPropDataPtr", {PropType::Pointer}, 1, {} }, -{ "OfxParamPropDefault", {PropType::Int,PropType::Double,PropType::String,PropType::Bytes}, 0, {} }, -{ "OfxParamPropDefaultCoordinateSystem", {PropType::Enum}, 1, {"OfxParamCoordinatesCanonical","OfxParamCoordinatesNormalised"} }, -{ "OfxParamPropDigits", {PropType::Int}, 1, {} }, -{ "OfxParamPropDimensionLabel", {PropType::String}, 1, {} }, -{ "OfxParamPropDisplayMax", {PropType::Int,PropType::Double}, 0, {} }, -{ "OfxParamPropDisplayMin", {PropType::Int,PropType::Double}, 0, {} }, -{ "OfxParamPropDoubleType", {PropType::Enum}, 1, {"OfxParamDoubleTypePlain","OfxParamDoubleTypeAngle","OfxParamDoubleTypeScale","OfxParamDoubleTypeTime","OfxParamDoubleTypeAbsoluteTime","OfxParamDoubleTypeX","OfxParamDoubleTypeXAbsolute","OfxParamDoubleTypeY","OfxParamDoubleTypeYAbsolute","OfxParamDoubleTypeXY","OfxParamDoubleTypeXYAbsolute"} }, -{ "OfxParamPropEnabled", {PropType::Bool}, 1, {} }, -{ "OfxParamPropEvaluateOnChange", {PropType::Bool}, 1, {} }, -{ "OfxParamPropGroupOpen", {PropType::Bool}, 1, {} }, -{ "OfxParamPropHasHostOverlayHandle", {PropType::Bool}, 1, {} }, -{ "OfxParamPropHint", {PropType::String}, 1, {} }, -{ "OfxParamPropIncrement", {PropType::Double}, 1, {} }, -{ "OfxParamPropInteractMinimumSize", {PropType::Double}, 2, {} }, -{ "OfxParamPropInteractPreferedSize", {PropType::Int}, 2, {} }, -{ "OfxParamPropInteractSize", {PropType::Double}, 2, {} }, -{ "OfxParamPropInteractSizeAspect", {PropType::Double}, 1, {} }, -{ "OfxParamPropInteractV1", {PropType::Pointer}, 1, {} }, -{ "OfxParamPropInterpolationAmount", {PropType::Double}, 1, {} }, -{ "OfxParamPropInterpolationTime", {PropType::Double}, 2, {} }, -{ "OfxParamPropIsAnimating", {PropType::Bool}, 1, {} }, -{ "OfxParamPropIsAutoKeying", {PropType::Bool}, 1, {} }, -{ "OfxParamPropMax", {PropType::Int,PropType::Double}, 0, {} }, -{ "OfxParamPropMin", {PropType::Int,PropType::Double}, 0, {} }, -{ "OfxParamPropPageChild", {PropType::String}, 0, {} }, -{ "OfxParamPropParametricDimension", {PropType::Int}, 1, {} }, -{ "OfxParamPropParametricInteractBackground", {PropType::Pointer}, 1, {} }, -{ "OfxParamPropParametricRange", {PropType::Double}, 2, {} }, -{ "OfxParamPropParametricUIColour", {PropType::Double}, 0, {} }, -{ "OfxParamPropParent", {PropType::String}, 1, {} }, -{ "OfxParamPropPersistant", {PropType::Bool}, 1, {} }, -{ "OfxParamPropPluginMayWrite", {PropType::Bool}, 1, {} }, -{ "OfxParamPropScriptName", {PropType::String}, 1, {} }, -{ "OfxParamPropSecret", {PropType::Bool}, 1, {} }, -{ "OfxParamPropShowTimeMarker", {PropType::Bool}, 1, {} }, -{ "OfxParamPropStringFilePathExists", {PropType::Bool}, 1, {} }, -{ "OfxParamPropStringMode", {PropType::Enum}, 1, {"OfxParamStringIsSingleLine","OfxParamStringIsMultiLine","OfxParamStringIsFilePath","OfxParamStringIsDirectoryPath","OfxParamStringIsLabel","OfxParamStringIsRichTextFormat"} }, -{ "OfxParamPropType", {PropType::String}, 1, {} }, -{ "OfxPluginPropFilePath", {PropType::Enum}, 1, {"false","true","needed"} }, -{ "OfxPluginPropParamPageOrder", {PropType::String}, 0, {} }, -{ "OfxPropAPIVersion", {PropType::Int}, 0, {} }, -{ "OfxPropChangeReason", {PropType::Enum}, 1, {"OfxChangeUserEdited","OfxChangePluginEdited","OfxChangeTime"} }, -{ "OfxPropEffectInstance", {PropType::Pointer}, 1, {} }, -{ "OfxPropHostOSHandle", {PropType::Pointer}, 1, {} }, -{ "OfxPropIcon", {PropType::String}, 2, {} }, -{ "OfxPropInstanceData", {PropType::Pointer}, 1, {} }, -{ "OfxPropIsInteractive", {PropType::Bool}, 1, {} }, -{ "OfxPropLabel", {PropType::String}, 1, {} }, -{ "OfxPropLongLabel", {PropType::String}, 1, {} }, -{ "OfxPropName", {PropType::String}, 1, {} }, -{ "OfxPropParamSetNeedsSyncing", {PropType::Bool}, 1, {} }, -{ "OfxPropPluginDescription", {PropType::String}, 1, {} }, -{ "OfxPropShortLabel", {PropType::String}, 1, {} }, -{ "OfxPropTime", {PropType::Double}, 1, {} }, -{ "OfxPropType", {PropType::String}, 1, {} }, -{ "OfxPropVersion", {PropType::Int}, 0, {} }, -{ "OfxPropVersionLabel", {PropType::String}, 1, {} }, -{ "kOfxParamPropUseHostOverlayHandle", {PropType::Bool}, 1, {} }, -{ "kOfxPropKeyString", {PropType::String}, 1, {} }, -{ "kOfxPropKeySym", {PropType::Int}, 1, {} }, -} }; +// Property definitions +static inline constexpr std::array(PropId::NProps)> prop_defs = {{ +{ "OfxImageClipPropColourspace", PropId::OfxImageClipPropColourspace, {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxImageClipPropConnected", PropId::OfxImageClipPropConnected, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageClipPropContinuousSamples", PropId::OfxImageClipPropContinuousSamples, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageClipPropFieldExtraction", PropId::OfxImageClipPropFieldExtraction, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageClipPropFieldExtraction.data(), prop_enum_values::OfxImageClipPropFieldExtraction.size()}, +{ "OfxImageClipPropFieldOrder", PropId::OfxImageClipPropFieldOrder, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageClipPropFieldOrder.data(), prop_enum_values::OfxImageClipPropFieldOrder.size()}, +{ "OfxImageClipPropIsMask", PropId::OfxImageClipPropIsMask, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageClipPropOptional", PropId::OfxImageClipPropOptional, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageClipPropPreferredColourspaces", PropId::OfxImageClipPropPreferredColourspaces, {PropType::String}, 1, 0, nullptr, 0}, +{ "OfxImageClipPropUnmappedComponents", PropId::OfxImageClipPropUnmappedComponents, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageClipPropUnmappedComponents.data(), prop_enum_values::OfxImageClipPropUnmappedComponents.size()}, +{ "OfxImageClipPropUnmappedPixelDepth", PropId::OfxImageClipPropUnmappedPixelDepth, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageClipPropUnmappedPixelDepth.data(), prop_enum_values::OfxImageClipPropUnmappedPixelDepth.size()}, +{ "OfxImageEffectFrameVarying", PropId::OfxImageEffectFrameVarying, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectHostPropIsBackground", PropId::OfxImageEffectHostPropIsBackground, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectHostPropNativeOrigin", PropId::OfxImageEffectHostPropNativeOrigin, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectHostPropNativeOrigin.data(), prop_enum_values::OfxImageEffectHostPropNativeOrigin.size()}, +{ "OfxImageEffectInstancePropEffectDuration", PropId::OfxImageEffectInstancePropEffectDuration, {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxImageEffectInstancePropSequentialRender", PropId::OfxImageEffectInstancePropSequentialRender, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPluginPropFieldRenderTwiceAlways", PropId::OfxImageEffectPluginPropFieldRenderTwiceAlways, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPluginPropGrouping", PropId::OfxImageEffectPluginPropGrouping, {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPluginPropHostFrameThreading", PropId::OfxImageEffectPluginPropHostFrameThreading, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPluginPropOverlayInteractV1", PropId::OfxImageEffectPluginPropOverlayInteractV1, {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPluginPropOverlayInteractV2", PropId::OfxImageEffectPluginPropOverlayInteractV2, {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPluginPropSingleInstance", PropId::OfxImageEffectPluginPropSingleInstance, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPluginRenderThreadSafety", PropId::OfxImageEffectPluginRenderThreadSafety, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPluginRenderThreadSafety.data(), prop_enum_values::OfxImageEffectPluginRenderThreadSafety.size()}, +{ "OfxImageEffectPropClipPreferencesSlaveParam", PropId::OfxImageEffectPropClipPreferencesSlaveParam, {PropType::String}, 1, 0, nullptr, 0}, +{ "OfxImageEffectPropColourManagementAvailableConfigs", PropId::OfxImageEffectPropColourManagementAvailableConfigs, {PropType::String}, 1, 0, nullptr, 0}, +{ "OfxImageEffectPropColourManagementConfig", PropId::OfxImageEffectPropColourManagementConfig, {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropColourManagementStyle", PropId::OfxImageEffectPropColourManagementStyle, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropColourManagementStyle.data(), prop_enum_values::OfxImageEffectPropColourManagementStyle.size()}, +{ "OfxImageEffectPropComponents", PropId::OfxImageEffectPropComponents, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropComponents.data(), prop_enum_values::OfxImageEffectPropComponents.size()}, +{ "OfxImageEffectPropContext", PropId::OfxImageEffectPropContext, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropContext.data(), prop_enum_values::OfxImageEffectPropContext.size()}, +{ "OfxImageEffectPropCudaEnabled", PropId::OfxImageEffectPropCudaEnabled, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropCudaRenderSupported", PropId::OfxImageEffectPropCudaRenderSupported, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropCudaRenderSupported.data(), prop_enum_values::OfxImageEffectPropCudaRenderSupported.size()}, +{ "OfxImageEffectPropCudaStream", PropId::OfxImageEffectPropCudaStream, {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropCudaStreamSupported", PropId::OfxImageEffectPropCudaStreamSupported, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropCudaStreamSupported.data(), prop_enum_values::OfxImageEffectPropCudaStreamSupported.size()}, +{ "OfxImageEffectPropDisplayColourspace", PropId::OfxImageEffectPropDisplayColourspace, {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropFieldToRender", PropId::OfxImageEffectPropFieldToRender, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropFieldToRender.data(), prop_enum_values::OfxImageEffectPropFieldToRender.size()}, +{ "OfxImageEffectPropFrameRange", PropId::OfxImageEffectPropFrameRange, {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxImageEffectPropFrameRate", PropId::OfxImageEffectPropFrameRate, {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropFrameStep", PropId::OfxImageEffectPropFrameStep, {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropInAnalysis", PropId::OfxImageEffectPropInAnalysis, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropInteractiveRenderStatus", PropId::OfxImageEffectPropInteractiveRenderStatus, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropMetalCommandQueue", PropId::OfxImageEffectPropMetalCommandQueue, {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropMetalEnabled", PropId::OfxImageEffectPropMetalEnabled, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropMetalRenderSupported", PropId::OfxImageEffectPropMetalRenderSupported, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropMetalRenderSupported.data(), prop_enum_values::OfxImageEffectPropMetalRenderSupported.size()}, +{ "OfxImageEffectPropMultipleClipDepths", PropId::OfxImageEffectPropMultipleClipDepths, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropOCIOConfig", PropId::OfxImageEffectPropOCIOConfig, {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropOCIODisplay", PropId::OfxImageEffectPropOCIODisplay, {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropOCIOView", PropId::OfxImageEffectPropOCIOView, {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropOpenCLCommandQueue", PropId::OfxImageEffectPropOpenCLCommandQueue, {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropOpenCLEnabled", PropId::OfxImageEffectPropOpenCLEnabled, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropOpenCLImage", PropId::OfxImageEffectPropOpenCLImage, {PropType::Int}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropOpenCLRenderSupported", PropId::OfxImageEffectPropOpenCLRenderSupported, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropOpenCLRenderSupported.data(), prop_enum_values::OfxImageEffectPropOpenCLRenderSupported.size()}, +{ "OfxImageEffectPropOpenCLSupported", PropId::OfxImageEffectPropOpenCLSupported, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropOpenCLSupported.data(), prop_enum_values::OfxImageEffectPropOpenCLSupported.size()}, +{ "OfxImageEffectPropOpenGLEnabled", PropId::OfxImageEffectPropOpenGLEnabled, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropOpenGLRenderSupported", PropId::OfxImageEffectPropOpenGLRenderSupported, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropOpenGLRenderSupported.data(), prop_enum_values::OfxImageEffectPropOpenGLRenderSupported.size()}, +{ "OfxImageEffectPropOpenGLTextureIndex", PropId::OfxImageEffectPropOpenGLTextureIndex, {PropType::Int}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropOpenGLTextureTarget", PropId::OfxImageEffectPropOpenGLTextureTarget, {PropType::Int}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropPixelAspectRatio", PropId::OfxImageEffectPropPixelAspectRatio, {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropPixelDepth", PropId::OfxImageEffectPropPixelDepth, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropPixelDepth.data(), prop_enum_values::OfxImageEffectPropPixelDepth.size()}, +{ "OfxImageEffectPropPluginHandle", PropId::OfxImageEffectPropPluginHandle, {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropPreMultiplication", PropId::OfxImageEffectPropPreMultiplication, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropPreMultiplication.data(), prop_enum_values::OfxImageEffectPropPreMultiplication.size()}, +{ "OfxImageEffectPropProjectExtent", PropId::OfxImageEffectPropProjectExtent, {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxImageEffectPropProjectOffset", PropId::OfxImageEffectPropProjectOffset, {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxImageEffectPropProjectSize", PropId::OfxImageEffectPropProjectSize, {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxImageEffectPropRegionOfDefinition", PropId::OfxImageEffectPropRegionOfDefinition, {PropType::Int}, 1, 4, nullptr, 0}, +{ "OfxImageEffectPropRegionOfInterest", PropId::OfxImageEffectPropRegionOfInterest, {PropType::Int}, 1, 4, nullptr, 0}, +{ "OfxImageEffectPropRenderQualityDraft", PropId::OfxImageEffectPropRenderQualityDraft, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropRenderScale", PropId::OfxImageEffectPropRenderScale, {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxImageEffectPropRenderWindow", PropId::OfxImageEffectPropRenderWindow, {PropType::Int}, 1, 4, nullptr, 0}, +{ "OfxImageEffectPropSequentialRenderStatus", PropId::OfxImageEffectPropSequentialRenderStatus, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropSetableFielding", PropId::OfxImageEffectPropSetableFielding, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropSetableFrameRate", PropId::OfxImageEffectPropSetableFrameRate, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropSupportedComponents", PropId::OfxImageEffectPropSupportedComponents, {PropType::Enum}, 1, 0, prop_enum_values::OfxImageEffectPropSupportedComponents.data(), prop_enum_values::OfxImageEffectPropSupportedComponents.size()}, +{ "OfxImageEffectPropSupportedContexts", PropId::OfxImageEffectPropSupportedContexts, {PropType::Enum}, 1, 0, prop_enum_values::OfxImageEffectPropSupportedContexts.data(), prop_enum_values::OfxImageEffectPropSupportedContexts.size()}, +{ "OfxImageEffectPropSupportedPixelDepths", PropId::OfxImageEffectPropSupportedPixelDepths, {PropType::Enum}, 1, 0, prop_enum_values::OfxImageEffectPropSupportedPixelDepths.data(), prop_enum_values::OfxImageEffectPropSupportedPixelDepths.size()}, +{ "OfxImageEffectPropSupportsMultiResolution", PropId::OfxImageEffectPropSupportsMultiResolution, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropSupportsMultipleClipPARs", PropId::OfxImageEffectPropSupportsMultipleClipPARs, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropSupportsOverlays", PropId::OfxImageEffectPropSupportsOverlays, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropSupportsTiles", PropId::OfxImageEffectPropSupportsTiles, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropTemporalClipAccess", PropId::OfxImageEffectPropTemporalClipAccess, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropUnmappedFrameRange", PropId::OfxImageEffectPropUnmappedFrameRange, {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxImageEffectPropUnmappedFrameRate", PropId::OfxImageEffectPropUnmappedFrameRate, {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxImagePropBounds", PropId::OfxImagePropBounds, {PropType::Int}, 1, 4, nullptr, 0}, +{ "OfxImagePropData", PropId::OfxImagePropData, {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxImagePropField", PropId::OfxImagePropField, {PropType::Enum}, 1, 1, prop_enum_values::OfxImagePropField.data(), prop_enum_values::OfxImagePropField.size()}, +{ "OfxImagePropPixelAspectRatio", PropId::OfxImagePropPixelAspectRatio, {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxImagePropRegionOfDefinition", PropId::OfxImagePropRegionOfDefinition, {PropType::Int}, 1, 4, nullptr, 0}, +{ "OfxImagePropRowBytes", PropId::OfxImagePropRowBytes, {PropType::Int}, 1, 1, nullptr, 0}, +{ "OfxImagePropUniqueIdentifier", PropId::OfxImagePropUniqueIdentifier, {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxInteractPropBackgroundColour", PropId::OfxInteractPropBackgroundColour, {PropType::Double}, 1, 3, nullptr, 0}, +{ "OfxInteractPropBitDepth", PropId::OfxInteractPropBitDepth, {PropType::Int}, 1, 1, nullptr, 0}, +{ "OfxInteractPropDrawContext", PropId::OfxInteractPropDrawContext, {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxInteractPropHasAlpha", PropId::OfxInteractPropHasAlpha, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxInteractPropPenPosition", PropId::OfxInteractPropPenPosition, {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxInteractPropPenPressure", PropId::OfxInteractPropPenPressure, {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxInteractPropPenViewportPosition", PropId::OfxInteractPropPenViewportPosition, {PropType::Int}, 1, 2, nullptr, 0}, +{ "OfxInteractPropPixelScale", PropId::OfxInteractPropPixelScale, {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxInteractPropSlaveToParam", PropId::OfxInteractPropSlaveToParam, {PropType::String}, 1, 0, nullptr, 0}, +{ "OfxInteractPropSuggestedColour", PropId::OfxInteractPropSuggestedColour, {PropType::Double}, 1, 3, nullptr, 0}, +{ "OfxInteractPropViewport", PropId::OfxInteractPropViewport, {PropType::Int}, 1, 2, nullptr, 0}, +{ "OfxOpenGLPropPixelDepth", PropId::OfxOpenGLPropPixelDepth, {PropType::Enum}, 1, 0, prop_enum_values::OfxOpenGLPropPixelDepth.data(), prop_enum_values::OfxOpenGLPropPixelDepth.size()}, +{ "OfxParamHostPropMaxPages", PropId::OfxParamHostPropMaxPages, {PropType::Int}, 1, 1, nullptr, 0}, +{ "OfxParamHostPropMaxParameters", PropId::OfxParamHostPropMaxParameters, {PropType::Int}, 1, 1, nullptr, 0}, +{ "OfxParamHostPropPageRowColumnCount", PropId::OfxParamHostPropPageRowColumnCount, {PropType::Int}, 1, 2, nullptr, 0}, +{ "OfxParamHostPropSupportsBooleanAnimation", PropId::OfxParamHostPropSupportsBooleanAnimation, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamHostPropSupportsChoiceAnimation", PropId::OfxParamHostPropSupportsChoiceAnimation, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamHostPropSupportsCustomAnimation", PropId::OfxParamHostPropSupportsCustomAnimation, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamHostPropSupportsCustomInteract", PropId::OfxParamHostPropSupportsCustomInteract, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamHostPropSupportsParametricAnimation", PropId::OfxParamHostPropSupportsParametricAnimation, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamHostPropSupportsStrChoice", PropId::OfxParamHostPropSupportsStrChoice, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamHostPropSupportsStrChoiceAnimation", PropId::OfxParamHostPropSupportsStrChoiceAnimation, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamHostPropSupportsStringAnimation", PropId::OfxParamHostPropSupportsStringAnimation, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropAnimates", PropId::OfxParamPropAnimates, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropCacheInvalidation", PropId::OfxParamPropCacheInvalidation, {PropType::Enum}, 1, 1, prop_enum_values::OfxParamPropCacheInvalidation.data(), prop_enum_values::OfxParamPropCacheInvalidation.size()}, +{ "OfxParamPropCanUndo", PropId::OfxParamPropCanUndo, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropChoiceEnum", PropId::OfxParamPropChoiceEnum, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropChoiceOption", PropId::OfxParamPropChoiceOption, {PropType::String}, 1, 0, nullptr, 0}, +{ "OfxParamPropChoiceOrder", PropId::OfxParamPropChoiceOrder, {PropType::Int}, 1, 0, nullptr, 0}, +{ "OfxParamPropCustomCallbackV1", PropId::OfxParamPropCustomCallbackV1, {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxParamPropCustomValue", PropId::OfxParamPropCustomValue, {PropType::String}, 1, 2, nullptr, 0}, +{ "OfxParamPropDataPtr", PropId::OfxParamPropDataPtr, {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxParamPropDefault", PropId::OfxParamPropDefault, {PropType::Int,PropType::Double,PropType::String,PropType::Pointer}, 4, 0, nullptr, 0}, +{ "OfxParamPropDefaultCoordinateSystem", PropId::OfxParamPropDefaultCoordinateSystem, {PropType::Enum}, 1, 1, prop_enum_values::OfxParamPropDefaultCoordinateSystem.data(), prop_enum_values::OfxParamPropDefaultCoordinateSystem.size()}, +{ "OfxParamPropDigits", PropId::OfxParamPropDigits, {PropType::Int}, 1, 1, nullptr, 0}, +{ "OfxParamPropDimensionLabel", PropId::OfxParamPropDimensionLabel, {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxParamPropDisplayMax", PropId::OfxParamPropDisplayMax, {PropType::Int,PropType::Double}, 2, 0, nullptr, 0}, +{ "OfxParamPropDisplayMin", PropId::OfxParamPropDisplayMin, {PropType::Int,PropType::Double}, 2, 0, nullptr, 0}, +{ "OfxParamPropDoubleType", PropId::OfxParamPropDoubleType, {PropType::Enum}, 1, 1, prop_enum_values::OfxParamPropDoubleType.data(), prop_enum_values::OfxParamPropDoubleType.size()}, +{ "OfxParamPropEnabled", PropId::OfxParamPropEnabled, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropEvaluateOnChange", PropId::OfxParamPropEvaluateOnChange, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropGroupOpen", PropId::OfxParamPropGroupOpen, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropHasHostOverlayHandle", PropId::OfxParamPropHasHostOverlayHandle, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropHint", PropId::OfxParamPropHint, {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxParamPropIncrement", PropId::OfxParamPropIncrement, {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxParamPropInteractMinimumSize", PropId::OfxParamPropInteractMinimumSize, {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxParamPropInteractPreferedSize", PropId::OfxParamPropInteractPreferedSize, {PropType::Int}, 1, 2, nullptr, 0}, +{ "OfxParamPropInteractSize", PropId::OfxParamPropInteractSize, {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxParamPropInteractSizeAspect", PropId::OfxParamPropInteractSizeAspect, {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxParamPropInteractV1", PropId::OfxParamPropInteractV1, {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxParamPropInterpolationAmount", PropId::OfxParamPropInterpolationAmount, {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxParamPropInterpolationTime", PropId::OfxParamPropInterpolationTime, {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxParamPropIsAnimating", PropId::OfxParamPropIsAnimating, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropIsAutoKeying", PropId::OfxParamPropIsAutoKeying, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropMax", PropId::OfxParamPropMax, {PropType::Int,PropType::Double}, 2, 0, nullptr, 0}, +{ "OfxParamPropMin", PropId::OfxParamPropMin, {PropType::Int,PropType::Double}, 2, 0, nullptr, 0}, +{ "OfxParamPropPageChild", PropId::OfxParamPropPageChild, {PropType::String}, 1, 0, nullptr, 0}, +{ "OfxParamPropParametricDimension", PropId::OfxParamPropParametricDimension, {PropType::Int}, 1, 1, nullptr, 0}, +{ "OfxParamPropParametricInteractBackground", PropId::OfxParamPropParametricInteractBackground, {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxParamPropParametricRange", PropId::OfxParamPropParametricRange, {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxParamPropParametricUIColour", PropId::OfxParamPropParametricUIColour, {PropType::Double}, 1, 0, nullptr, 0}, +{ "OfxParamPropParent", PropId::OfxParamPropParent, {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxParamPropPersistant", PropId::OfxParamPropPersistant, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropPluginMayWrite", PropId::OfxParamPropPluginMayWrite, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropScriptName", PropId::OfxParamPropScriptName, {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxParamPropSecret", PropId::OfxParamPropSecret, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropShowTimeMarker", PropId::OfxParamPropShowTimeMarker, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropStringFilePathExists", PropId::OfxParamPropStringFilePathExists, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropStringMode", PropId::OfxParamPropStringMode, {PropType::Enum}, 1, 1, prop_enum_values::OfxParamPropStringMode.data(), prop_enum_values::OfxParamPropStringMode.size()}, +{ "OfxParamPropType", PropId::OfxParamPropType, {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxPluginPropFilePath", PropId::OfxPluginPropFilePath, {PropType::Enum}, 1, 1, prop_enum_values::OfxPluginPropFilePath.data(), prop_enum_values::OfxPluginPropFilePath.size()}, +{ "OfxPluginPropParamPageOrder", PropId::OfxPluginPropParamPageOrder, {PropType::String}, 1, 0, nullptr, 0}, +{ "OfxPropAPIVersion", PropId::OfxPropAPIVersion, {PropType::Int}, 1, 0, nullptr, 0}, +{ "OfxPropChangeReason", PropId::OfxPropChangeReason, {PropType::Enum}, 1, 1, prop_enum_values::OfxPropChangeReason.data(), prop_enum_values::OfxPropChangeReason.size()}, +{ "OfxPropEffectInstance", PropId::OfxPropEffectInstance, {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxPropHostOSHandle", PropId::OfxPropHostOSHandle, {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxPropIcon", PropId::OfxPropIcon, {PropType::String}, 1, 2, nullptr, 0}, +{ "OfxPropInstanceData", PropId::OfxPropInstanceData, {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxPropIsInteractive", PropId::OfxPropIsInteractive, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxPropLabel", PropId::OfxPropLabel, {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxPropLongLabel", PropId::OfxPropLongLabel, {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxPropName", PropId::OfxPropName, {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxPropParamSetNeedsSyncing", PropId::OfxPropParamSetNeedsSyncing, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxPropPluginDescription", PropId::OfxPropPluginDescription, {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxPropShortLabel", PropId::OfxPropShortLabel, {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxPropTime", PropId::OfxPropTime, {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxPropType", PropId::OfxPropType, {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxPropVersion", PropId::OfxPropVersion, {PropType::Int}, 1, 0, nullptr, 0}, +{ "OfxPropVersionLabel", PropId::OfxPropVersionLabel, {PropType::String}, 1, 1, nullptr, 0}, +{ "kOfxParamPropUseHostOverlayHandle", PropId::OfxParamPropUseHostOverlayHandle, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "kOfxPropKeyString", PropId::OfxPropKeyString, {PropType::String}, 1, 1, nullptr, 0}, +{ "kOfxPropKeySym", PropId::OfxPropKeySym, {PropType::Int}, 1, 1, nullptr, 0}, +}}; + + +//Template specializations for each property +namespace properties { + +// Base template struct for property traits +template +struct PropTraits; + +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageClipPropColourspace)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageClipPropConnected)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageClipPropContinuousSamples)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageClipPropFieldExtraction)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageClipPropFieldOrder)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageClipPropIsMask)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageClipPropOptional)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageClipPropPreferredColourspaces)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageClipPropUnmappedComponents)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageClipPropUnmappedPixelDepth)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectFrameVarying)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectHostPropIsBackground)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectHostPropNativeOrigin)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectInstancePropEffectDuration)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectInstancePropSequentialRender)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPluginPropFieldRenderTwiceAlways)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPluginPropGrouping)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPluginPropHostFrameThreading)]; +}; +template<> +struct PropTraits { + using type = const void *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPluginPropOverlayInteractV1)]; +}; +template<> +struct PropTraits { + using type = const void *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPluginPropOverlayInteractV2)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPluginPropSingleInstance)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPluginRenderThreadSafety)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropClipPreferencesSlaveParam)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropColourManagementAvailableConfigs)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropColourManagementConfig)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropColourManagementStyle)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropComponents)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropContext)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropCudaEnabled)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropCudaRenderSupported)]; +}; +template<> +struct PropTraits { + using type = const void *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropCudaStream)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropCudaStreamSupported)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropDisplayColourspace)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropFieldToRender)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropFrameRange)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropFrameRate)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropFrameStep)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropInAnalysis)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropInteractiveRenderStatus)]; +}; +template<> +struct PropTraits { + using type = const void *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropMetalCommandQueue)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropMetalEnabled)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropMetalRenderSupported)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropMultipleClipDepths)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOCIOConfig)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOCIODisplay)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOCIOView)]; +}; +template<> +struct PropTraits { + using type = const void *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOpenCLCommandQueue)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOpenCLEnabled)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOpenCLImage)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOpenCLRenderSupported)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOpenCLSupported)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOpenGLEnabled)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOpenGLRenderSupported)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOpenGLTextureIndex)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOpenGLTextureTarget)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropPixelAspectRatio)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropPixelDepth)]; +}; +template<> +struct PropTraits { + using type = const void *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropPluginHandle)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropPreMultiplication)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropProjectExtent)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropProjectOffset)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropProjectSize)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropRegionOfDefinition)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropRegionOfInterest)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropRenderQualityDraft)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropRenderScale)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropRenderWindow)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropSequentialRenderStatus)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropSetableFielding)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropSetableFrameRate)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropSupportedComponents)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropSupportedContexts)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropSupportedPixelDepths)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropSupportsMultiResolution)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropSupportsMultipleClipPARs)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropSupportsOverlays)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropSupportsTiles)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropTemporalClipAccess)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropUnmappedFrameRange)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropUnmappedFrameRate)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImagePropBounds)]; +}; +template<> +struct PropTraits { + using type = const void *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImagePropData)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImagePropField)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImagePropPixelAspectRatio)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImagePropRegionOfDefinition)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImagePropRowBytes)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImagePropUniqueIdentifier)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropBackgroundColour)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropBitDepth)]; +}; +template<> +struct PropTraits { + using type = const void *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropDrawContext)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropHasAlpha)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropPenPosition)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropPenPressure)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropPenViewportPosition)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropPixelScale)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropSlaveToParam)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropSuggestedColour)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropViewport)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxOpenGLPropPixelDepth)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropMaxPages)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropMaxParameters)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropPageRowColumnCount)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropSupportsBooleanAnimation)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropSupportsChoiceAnimation)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropSupportsCustomAnimation)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropSupportsCustomInteract)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropSupportsParametricAnimation)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropSupportsStrChoice)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropSupportsStrChoiceAnimation)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropSupportsStringAnimation)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropAnimates)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropCanUndo)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropChoiceEnum)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropChoiceOption)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropChoiceOrder)]; +}; +template<> +struct PropTraits { + using type = const void *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropCustomCallbackV1)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropCustomValue)]; +}; +template<> +struct PropTraits { + using type = const void *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropDataPtr)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = true; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropDefault)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropDefaultCoordinateSystem)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropDigits)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropDimensionLabel)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = true; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropDisplayMax)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = true; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropDisplayMin)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropDoubleType)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropEnabled)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropGroupOpen)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropHint)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropIncrement)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropInteractSize)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)]; +}; +template<> +struct PropTraits { + using type = const void *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropInteractV1)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropInterpolationAmount)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropInterpolationTime)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropIsAnimating)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = true; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropMax)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = true; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropMin)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropPageChild)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropParametricDimension)]; +}; +template<> +struct PropTraits { + using type = const void *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropParametricInteractBackground)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropParametricRange)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropParametricUIColour)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropParent)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropPersistant)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropScriptName)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropSecret)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropShowTimeMarker)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropStringFilePathExists)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropStringMode)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropType)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPluginPropFilePath)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPluginPropParamPageOrder)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropAPIVersion)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropChangeReason)]; +}; +template<> +struct PropTraits { + using type = const void *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropEffectInstance)]; +}; +template<> +struct PropTraits { + using type = const void *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropHostOSHandle)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropIcon)]; +}; +template<> +struct PropTraits { + using type = const void *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropInstanceData)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropIsInteractive)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropLabel)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropLongLabel)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropName)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropParamSetNeedsSyncing)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropPluginDescription)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropShortLabel)]; +}; +template<> +struct PropTraits { + using type = double; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropTime)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropType)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropVersion)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropVersionLabel)]; +}; +template<> +struct PropTraits { + using type = bool; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)]; +}; +template<> +struct PropTraits { + using type = const char *; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropKeyString)]; +}; +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropKeySym)]; +}; +} // namespace properties // Static asserts to check #define names vs. strings static_assert(std::string_view("OfxImageClipPropColourspace") == std::string_view(kOfxImageClipPropColourspace)); diff --git a/Support/include/ofxStatusStrings.h b/Support/include/ofxStatusStrings.h new file mode 100644 index 00000000..e600ed1f --- /dev/null +++ b/Support/include/ofxStatusStrings.h @@ -0,0 +1,56 @@ +/**************************************************************/ +/* */ +/* Copyright 2025 Dark Star Systems, Inc. */ +/* All Rights Reserved. */ +/* */ +/**************************************************************/ + +#pragma once + +#include +#include + +static const char *ofxStatusToString(OfxStatus s) { + switch (s) { + case kOfxStatOK: + return "kOfxStatOK"; + case kOfxStatFailed: + return "kOfxStatFailed"; + case kOfxStatErrFatal: + return "kOfxStatErrFatal"; + case kOfxStatErrUnknown: + return "kOfxStatErrUnknown"; + case kOfxStatErrMissingHostFeature: + return "kOfxStatErrMissingHostFeature"; + case kOfxStatErrUnsupported: + return "kOfxStatErrUnsupported"; + case kOfxStatErrExists: + return "kOfxStatErrExists"; + case kOfxStatErrFormat: + return "kOfxStatErrFormat"; + case kOfxStatErrMemory: + return "kOfxStatErrMemory"; + case kOfxStatErrBadHandle: + return "kOfxStatErrBadHandle"; + case kOfxStatErrBadIndex: + return "kOfxStatErrBadIndex"; + case kOfxStatErrValue: + return "kOfxStatErrValue"; + case kOfxStatReplyYes: + return "kOfxStatReplyYes"; + case kOfxStatReplyNo: + return "kOfxStatReplyNo"; + case kOfxStatReplyDefault: + return "kOfxStatReplyDefault"; + + case kOfxStatErrImageFormat: + return "kOfxStatErrImageFormat"; + + case kOfxStatGPUOutOfMemory: + return "kOfxStatGPUOutOfMemory"; + case kOfxStatGPURenderFailed: + return "kOfxStatGPURenderFailed"; + default: + return "Unknown OFX Status"; + } +} diff --git a/include/ofx-props.yml b/include/ofx-props.yml index d5aa3afc..5dcb344b 100644 --- a/include/ofx-props.yml +++ b/include/ofx-props.yml @@ -706,7 +706,7 @@ properties: type: bool dimension: 1 OfxImageEffectPropSupportedPixelDepths: - type: string + type: enum dimension: 0 values: - OfxBitDepthNone @@ -1183,7 +1183,7 @@ properties: dimension: 2 # This is special because its type and dims vary depending on the param OfxParamPropDefault: - type: [int, double, string, bytes] + type: [int, double, string, pointer] dimension: 0 OfxParamPropDefaultCoordinateSystem: type: enum diff --git a/scripts/gen-props.py b/scripts/gen-props.py index 3caf9cbe..93dc3da2 100644 --- a/scripts/gen-props.py +++ b/scripts/gen-props.py @@ -1,6 +1,13 @@ # Copyright OpenFX and contributors to the OpenFX project. # SPDX-License-Identifier: BSD-3-Clause +# /// script +# requires-python = ">=3.11" +# dependencies = [ +# "pyyaml>=1.0", +# ] +# /// + import os import re import sys @@ -125,6 +132,17 @@ def get_cname(propname, props_metadata): """ return props_metadata[propname].get('cname', "k" + propname) +def get_prop_id(propname): + """HACK ALERT: a few props' names (string values) start with k. + Those are also the #define names. If we use those as PropId enum + values, they'll get expanded into the strings which will lead to + compile errors. This means the names to be looked up always don't + have the "k". We could prefix them or something but this should be + OK. """ + if propname.startswith("k"): + return propname[1:] + return 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 @@ -248,7 +266,6 @@ def gen_props_metadata(props_metadata, outfile_path: Path): outfile.write(""" #pragma once -#include #include #include "ofxImageEffect.h" #include "ofxGPURender.h" @@ -265,44 +282,118 @@ def gen_props_metadata(props_metadata, outfile_path: Path): Enum, Bool, String, - Bytes, Pointer }; -struct PropsMetadata { - std::string_view name; - std::vector types; - int dimension; - std::vector values; // for enums +// Each prop has a PropId:: enum, a runtime-accessible PropDef struct, and a compile-time PropTraits. +// These can be used by Support/include/PropsAccess.h for type-safe property access. + +""") + outfile.write(f"//Property ID enum for compile-time lookup and type safety\n") + outfile.write(f"enum class PropId {{\n") + id = 0 + for p in sorted(props_metadata): + pname = get_prop_id(p) + orig_name_msg = '' + if pname != p: + orig_name_msg = f" (orig name: {pname})" + outfile.write(f" {pname}, // {id}{orig_name_msg}\n") + id += 1 + outfile.write(f" NProps // {id}\n") + outfile.write("}; // PropId\n\n") + + # Property enum values (for enums only) + + outfile.write("// Separate arrays for enum-values for enum props, to keep everything constexpr\n") + outfile.write("namespace prop_enum_values {\n") + for p in sorted(props_metadata): + md = props_metadata[p] + if md['type'] == 'enum': + values = "{" + ",".join(f'\"{v}\"' for v in md['values']) + "}" + outfile.write(f"constexpr std::array {p} =\n {values};\n") + outfile.write("} // namespace prop_enum_values\n"); + + # Property definitions + + outfile.write(""" + +#define MAX_PROP_TYPES 4 +struct PropDef { + const char* name; // Property name + PropId id; // ID for known props + PropType supportedTypes[MAX_PROP_TYPES]; // Supported data types + size_t supportedTypesCount; + int dimension; // Property dimension (0 for variable) + const char* const* enumValues; // Valid values for enum properties + size_t enumValuesCount; }; +// Property definitions +static inline constexpr std::array(PropId::NProps)> prop_defs = {{ """) - n_props = len(props_metadata) - outfile.write(f"static inline const std::array props_metadata {{ {{\n") + for p in sorted(props_metadata): try: + # name and id + prop_def = f"{{ \"{p}\", PropId::{get_prop_id(p)}, " md = props_metadata[p] types = md.get('type') if isinstance(types, str): # make it always a list types = (types,) + # types prop_type_defs = "{" + ",".join(f'PropType::{t.capitalize()}' for t in types) + "}" - host_opt = md.get('hostOptional', 'false') - if host_opt in ('True', 'true', 1): - host_opt = 'true' - if host_opt in ('False', 'false', 0): - host_opt = 'false' + prop_def += prop_type_defs + f', {len(types)}, ' + # dimension + prop_def += f"{md['dimension']}, " + # enum values if md['type'] == 'enum': assert isinstance(md['values'], list) - values = "{" + ",".join(f'\"{v}\"' for v in md['values']) + "}" + prop_def += f"prop_enum_values::{p}.data(), prop_enum_values::{p}.size()" else: - values = "{}" - outfile.write(f"{{ \"{p}\", {prop_type_defs}, {md['dimension']}, " - f"{values} }},\n") + prop_def += "nullptr, 0" + prop_def += "},\n" + outfile.write(prop_def) except Exception as e: logging.error(f"Error: {p} is missing metadata? {e}") raise(e) - outfile.write("} };\n\n") + outfile.write("}};\n\n") + + outfile.write(""" +//Template specializations for each property +namespace properties { + +// Base template struct for property traits +template +struct PropTraits; + +""") + for p in sorted(props_metadata): + try: + outfile.write(f"template<>\n") + outfile.write(f"struct PropTraits {{\n") + md = props_metadata[p] + types = md.get('type') + if isinstance(types, str): # make it always a list + types = (types,) + ctypes = { + "string": "const char *", + "enum": "const char *", + "int": "int", + "bool": "bool", + "double": "double", + "pointer": "const void *", + } + outfile.write(f" using type = {ctypes[types[0]]};\n") + is_multitype_bool = "true" if len(types) > 1 else "false" + outfile.write(f" static constexpr bool is_multitype = {is_multitype_bool};\n") + outfile.write(f" static constexpr const PropDef& def = prop_defs[static_cast(PropId::{get_prop_id(p)})];\n") + outfile.write("};\n") # end of prop traits + except Exception as e: + logging.error(f"Error: {p} is missing metadata? {e}") + raise(e) + + outfile.write("} // namespace properties\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): @@ -330,15 +421,20 @@ def gen_props_by_set(props_by_set, props_by_action, outfile_path: Path): #include "ofxDrawSuite.h" #include "ofxParametricParam.h" #include "ofxKeySyms.h" +#include "ofxPropsMetadata.h" // #include "ofxOld.h" namespace OpenFX { struct Prop { const char *name; + const PropDef &def; bool host_write; bool plugin_write; bool host_optional; + + Prop(const char *n, const PropDef &d, bool hw, bool pw, bool ho) + : name(n), def(d), host_write(hw), plugin_write(pw), host_optional(ho) {} }; """) @@ -350,7 +446,7 @@ def gen_props_by_set(props_by_set, props_by_action, outfile_path: Path): 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.append(f"{{ \"{p['name']}\", prop_defs[static_cast(PropId::{get_prop_id(p['name'])})], {host_write}, {plugin_write}, false }}") propdefs_str = ",\n ".join(propdefs) outfile.write(f"{{ \"{pset}\", {{ {propdefs_str} }} }},\n") outfile.write("};\n\n") @@ -388,6 +484,7 @@ def gen_props_by_set(props_by_set, props_by_action, 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' @@ -422,10 +519,6 @@ def main(args): print(f"=== Generating {args.props_metadata}") gen_props_metadata(props_metadata, support_include_dir / args.props_metadata) - if args.verbose: - print(f"=== Generating {args.props_metadata}") - gen_props_metadata(props_metadata, support_include_dir / args.props_metadata) - if args.verbose: print(f"=== Generating props by set header {args.props_by_set}") gen_props_by_set(props_by_set, props_by_action, support_include_dir / args.props_by_set) From 8697d1b10f4c39b5053c07dfeb424f3e107927ce Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Sun, 2 Mar 2025 13:07:51 -0500 Subject: [PATCH 17/33] WIP: start of openfx-cpp C++ bindings Signed-off-by: Gary Oberbrunner --- Examples/CMakeLists.txt | 5 +- Examples/TestProps/testProperties.cpp | 12 +- Support/CMakeLists.txt | 1 + Support/Plugins/CMakeLists.txt | 2 +- Support/Plugins/Tester/Tester.cpp | 4 +- Support/include/ofxPropsAccess.h | 627 ------------- Support/include/ofxPropsBySet.h | 779 ---------------- conanfile.py | 10 +- include/ofx-props.yml | 1 - openfx-cpp/include/openfx/README-logging.md | 132 +++ openfx-cpp/include/openfx/README.md | 3 + openfx-cpp/include/openfx/ofxExceptions.h | 69 ++ openfx-cpp/include/openfx/ofxImage.h | 88 ++ openfx-cpp/include/openfx/ofxLog.h | 252 +++++ openfx-cpp/include/openfx/ofxMisc.h | 44 + openfx-cpp/include/openfx/ofxPropsAccess.h | 676 ++++++++++++++ openfx-cpp/include/openfx/ofxPropsBySet.h | 876 ++++++++++++++++++ .../include/openfx}/ofxPropsMetadata.h | 416 +++++---- .../include/openfx}/ofxStatusStrings.h | 0 scripts/build-cmake.sh | 6 +- scripts/gen-props.py | 54 +- test_package/CMakeLists.txt | 20 +- test_package/conanfile.py | 6 +- test_package/src/invert.cpp | 288 ++++++ test_package/src/test_package.cpp | 114 --- 25 files changed, 2721 insertions(+), 1764 deletions(-) delete mode 100644 Support/include/ofxPropsAccess.h delete mode 100644 Support/include/ofxPropsBySet.h create mode 100644 openfx-cpp/include/openfx/README-logging.md create mode 100644 openfx-cpp/include/openfx/README.md create mode 100644 openfx-cpp/include/openfx/ofxExceptions.h create mode 100644 openfx-cpp/include/openfx/ofxImage.h create mode 100644 openfx-cpp/include/openfx/ofxLog.h create mode 100644 openfx-cpp/include/openfx/ofxMisc.h create mode 100644 openfx-cpp/include/openfx/ofxPropsAccess.h create mode 100644 openfx-cpp/include/openfx/ofxPropsBySet.h rename {Support/include => openfx-cpp/include/openfx}/ofxPropsMetadata.h (80%) rename {Support/include => openfx-cpp/include/openfx}/ofxStatusStrings.h (100%) create mode 100644 test_package/src/invert.cpp delete mode 100644 test_package/src/test_package.cpp diff --git a/Examples/CMakeLists.txt b/Examples/CMakeLists.txt index cab346e2..7c8841cd 100644 --- a/Examples/CMakeLists.txt +++ b/Examples/CMakeLists.txt @@ -1,4 +1,5 @@ set(OFX_SUPPORT_HEADER_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../Support/include") +set(OFX_CPP_BINDINGS_HEADER_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../openfx-cpp/include") set(PLUGINS Basic @@ -21,7 +22,8 @@ foreach(PLUGIN IN LISTS PLUGINS) add_ofx_plugin(${TGT} ${PLUGIN}) target_sources(${TGT} PUBLIC ${PLUGIN_SOURCES}) target_link_libraries(${TGT} ${CONAN_LIBS}) - target_include_directories(${TGT} PUBLIC ${OFX_HEADER_DIR} ${OFX_SUPPORT_HEADER_DIR}) + target_include_directories(${TGT} PUBLIC ${OFX_HEADER_DIR}) + if (OFX_SUPPORTS_OPENCLRENDER) target_link_libraries(${TGT} PRIVATE OpenCL::Headers OpenCL::OpenCL) endif() @@ -32,3 +34,4 @@ target_link_libraries(example-Custom PRIVATE opengl::opengl) target_link_libraries(example-ColourSpace PRIVATE cimg::cimg) target_link_libraries(example-ColourSpace PRIVATE spdlog::spdlog_header_only) target_link_libraries(example-TestProps PRIVATE spdlog::spdlog_header_only) +target_include_directories(example-TestProps PUBLIC ${OFX_CPP_BINDINGS_HEADER_DIR}) diff --git a/Examples/TestProps/testProperties.cpp b/Examples/TestProps/testProperties.cpp index 67364a01..86af4790 100644 --- a/Examples/TestProps/testProperties.cpp +++ b/Examples/TestProps/testProperties.cpp @@ -10,9 +10,9 @@ #include "ofxMemory.h" #include "ofxMessage.h" #include "ofxMultiThread.h" -#include "ofxPropsAccess.h" -#include "ofxPropsBySet.h" // in Support/include -#include "ofxPropsMetadata.h" +#include "openfx/ofxPropsAccess.h" +#include "openfx/ofxPropsBySet.h" +#include "openfx/ofxPropsMetadata.h" #include "spdlog/spdlog.h" #include // stl maps #include // stl strings @@ -27,7 +27,7 @@ #error Not building on your operating system quite yet #endif -using namespace OpenFX; // for props access +using namespace openfx; // for props access static OfxHost *gHost; static OfxImageEffectSuiteV1 *gEffectSuite; @@ -389,8 +389,8 @@ static OfxStatus actionDescribe(OfxImageEffectHandle effect) { .set( "Sample plugin which logs all actions and properties") .set("OFX Examples") - .set(false) - .setAll( + .set(false) + .setAll( {kOfxImageComponentRGBA, kOfxImageComponentAlpha}) .setAll(supportedContexts) .setAll( diff --git a/Support/CMakeLists.txt b/Support/CMakeLists.txt index 6d075799..7285679f 100644 --- a/Support/CMakeLists.txt +++ b/Support/CMakeLists.txt @@ -1,4 +1,5 @@ set(OFX_SUPPORT_HEADER_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include") +set(OFX_CPP_BINDINGS_HEADER_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../openfx-cpp/include") file(GLOB_RECURSE OFX_SUPPORT_HEADER_FILES "${OFX_SUPPORT_HEADER_DIR}/*.h") add_subdirectory(Library) diff --git a/Support/Plugins/CMakeLists.txt b/Support/Plugins/CMakeLists.txt index 413795d5..e50e01a8 100644 --- a/Support/Plugins/CMakeLists.txt +++ b/Support/Plugins/CMakeLists.txt @@ -32,7 +32,7 @@ foreach(PLUGIN IN LISTS PLUGINS) add_ofx_plugin(${TGT} ${PLUGIN}) target_sources(${TGT} PUBLIC ${PLUGIN_SOURCES}) target_link_libraries(${TGT} ${CONAN_LIBS} OfxSupport opengl::opengl) - target_include_directories(${TGT} PUBLIC ${OFX_HEADER_DIR} ${OFX_SUPPORT_HEADER_DIR}) + target_include_directories(${TGT} PUBLIC ${OFX_HEADER_DIR} ${OFX_SUPPORT_HEADER_DIR} ${OFX_CPP_BINDINGS_HEADER_DIR}) if(APPLE) target_link_libraries(${TGT} "-framework Metal" "-framework Foundation" "-framework QuartzCore") if (OFX_SUPPORTS_OPENCLRENDER) diff --git a/Support/Plugins/Tester/Tester.cpp b/Support/Plugins/Tester/Tester.cpp index 399a4e96..11f980f9 100644 --- a/Support/Plugins/Tester/Tester.cpp +++ b/Support/Plugins/Tester/Tester.cpp @@ -16,8 +16,8 @@ #include "ofxsMultiThread.h" #include "ofxsInteract.h" -#include "ofxPropsBySet.h" -#include "ofxPropsMetadata.h" +#include "openfx/ofxPropsBySet.h" +#include "openfx/ofxPropsMetadata.h" #include "../include/ofxsProcessing.H" diff --git a/Support/include/ofxPropsAccess.h b/Support/include/ofxPropsAccess.h deleted file mode 100644 index fb3f3813..00000000 --- a/Support/include/ofxPropsAccess.h +++ /dev/null @@ -1,627 +0,0 @@ -// Copyright OpenFX and contributors to the OpenFX project. -// SPDX-License-Identifier: BSD-3-Clause - -#pragma once - -#include "ofxCore.h" -#include "ofxPropsMetadata.h" -#include "ofxStatusStrings.h" - -#include -#include -#include -#include -#include -#include -#include - -/** - * OpenFX Property Accessor System - Usage Examples - -// Basic property access with type safety -void basicPropertyAccess(OfxPropertySetHandle handle, OfxPropertySuiteV1* -propHost) { - // Create a property accessor - OpenFX::PropertyAccessor props(handle, propHost); - - // Get a string property - type is deduced from PropTraits - const char* colorspace = props.get(); - - // Get a boolean property - returned as int (0 or 1) - int isConnected = props.get(); - - // Set a property value (type checked at compile time) - props.set(1); - - // Set all of a property's values (type checked at compile time) - // Supports any container with size() and operator[], or initializer-list - props.setAll({1, 0, 0}); - - // Get and set properties by index (for multi-dimensional properties) - const char* fieldMode = props.get(0); - props.set("OfxImageFieldLower", 0); - - // Chaining set operations - props.set(valueA) - .set(valueB) - .set(valueC); - - // Get dimension of a property - int dimension = props.getDimension(); -} - -// Working with multi-type properties -void multiTypePropertyAccess(OfxPropertySetHandle handle, OfxPropertySuiteV1* -propHost) { OpenFX::PropertyAccessor props(handle, propHost); - - // For multi-type properties, explicitly specify the type - double maxValueDouble = props.get(); - - // You can also get the same property as a different type - int maxValueInt = props.get(); - - // Setting values with explicit types - props.set(10.5); - props.set(10); - - // Attempting to use an incompatible type would cause a compile error: - // const char* str = props.get(); -// Error! -} - - -// Using the "escape hatch" for dynamic property access -void dynamicPropertyAccess(OfxPropertySetHandle handle, OfxPropertySuiteV1* -propHost) { OpenFX::PropertyAccessor props(handle, propHost); - - // Get and set properties by name without compile-time checking - const char* pluginDefined = props.getRaw("PluginDefinedProperty"); props.setRaw("DynamicIntProperty", 42); - - // Get dimension of a dynamic property - int dim = props.getDimensionRaw("DynamicArrayProperty"); - - // When property names come from external sources - const char* propName = getPropertyNameFromPlugin(); - double value = props.getRaw(propName); -} - -// Working with enum properties -void enumPropertyHandling(OfxPropertySetHandle handle, OfxPropertySuiteV1* -propHost) { OpenFX::PropertyAccessor props(handle, propHost); - - // Get an enum property value - const char* fieldExtraction = -props.get(); - - // Set an enum property using a valid value - props.set("OfxImageFieldLower"); - - // Access enum values directly using the EnumValue helper - const char* noneField = -OpenFX::EnumValue::get(0); const char* -lowerField = OpenFX::EnumValue::get(1); - - // Check if a value is valid for an enum - bool isValid = -OpenFX::EnumValue::isValid("OfxImageFieldUpper"); - - // Get total number of enum values - size_t enumCount = -OpenFX::EnumValue::size(); -} - -// End of examples -*/ - -namespace OpenFX { - -// Exception class -- move this elsewhere -class PluginException : public std::runtime_error { -public: - PluginException(const std::string &context_msg, OfxStatus status) - : std::runtime_error(createMessage(context_msg, status)), - status_(status) {} - - OfxStatus getStatus() const { return status_; } - -private: - static std::string createMessage(const std::string &context_msg, - OfxStatus status) { - std::string msg = "OpenFX error: " + context_msg + ": "; - msg += ofxStatusToString(status); - return msg; - } - - OfxStatus status_; -}; - -static void handleOfxError(OfxStatus status, std::string file, int line, - std::string msg, std::string expr) { - std::cerr << "ERR: OFX status " << ofxStatusToString(status) << " in " << file - << ":" << line << "\n" - << " on: " << msg << "\n" - << " Expression: " << expr << "\n"; -} - -#define CHECK_OFX_STATUS(msg, expr) \ - do { \ - auto &&_status = (expr); \ - if (_status != kOfxStatOK) { \ - handleOfxError(_status, __FILE__, __LINE__, msg, #expr); \ - } \ - } while (0) - -// Type-mapping helper to infer C++ type from PropType -template struct PropTypeToNative { - using type = void; // Default case, should never be used directly -}; - -// Specializations for each property type -template <> struct PropTypeToNative { - using type = int; -}; -template <> struct PropTypeToNative { - using type = double; -}; -template <> struct PropTypeToNative { - using type = const char *; -}; -template <> struct PropTypeToNative { - using type = int; -}; -template <> struct PropTypeToNative { - using type = const char *; -}; -template <> struct PropTypeToNative { - using type = void *; -}; - -// Helper to check if a type is compatible with a PropType -template struct IsTypeCompatible { - static constexpr bool value = false; -}; - -template <> struct IsTypeCompatible { - static constexpr bool value = true; -}; -template <> struct IsTypeCompatible { - static constexpr bool value = true; -}; -template <> struct IsTypeCompatible { - static constexpr bool value = true; -}; -template <> struct IsTypeCompatible { - static constexpr bool value = true; -}; -template <> struct IsTypeCompatible { - static constexpr bool value = true; -}; -template <> struct IsTypeCompatible { - static constexpr bool value = true; -}; -template <> struct IsTypeCompatible { - static constexpr bool value = true; -}; - -// Helper to create property enum values with strong typing -template struct EnumValue { - static constexpr const char *get(size_t index) { - static_assert(index < properties::PropTraits::def.enumValuesCount, - "Property enum index out of range"); - return properties::PropTraits::enumValues[index]; - } - - static constexpr size_t size() { - return properties::PropTraits::enumValues.size(); - } - - static constexpr bool isValid(const char *value) { - for (int i = 0; i < properties::PropTraits::def.enumValuesCount; i++) { - auto val = properties::PropTraits::def.enumValues[i]; - if (std::strcmp(val, value) == 0) - return true; - } - return false; - } -}; - -// Type-safe property accessor for any props of a given prop set -class PropertyAccessor { -public: - explicit PropertyAccessor(OfxPropertySetHandle handle, - OfxPropertySuiteV1 *propHost) - : handle_(handle), propHost_(propHost) {} - - // Get property value using PropId (compile-time type checking) - template - typename properties::PropTraits::type get(int index = 0) const { - using Traits = properties::PropTraits; - - static_assert( - !Traits::is_multitype, - "This property supports multiple types. Use get() instead."); - - using T = typename Traits::type; - - if constexpr (std::is_same_v || std::is_same_v) { - int value; - CHECK_OFX_STATUS( - Traits::def.name, - propHost_->propGetInt(handle_, Traits::def.name, index, &value)); - return value; - } else if constexpr (std::is_same_v || - std::is_same_v) { - double value; - CHECK_OFX_STATUS( - Traits::def.name, - propHost_->propGetDouble(handle_, Traits::def.name, index, &value)); - return value; - } else if constexpr (std::is_same_v) { - char *value; - CHECK_OFX_STATUS( - Traits::def.name, - propHost_->propGetString(handle_, Traits::def.name, index, &value)); - return value; - } else if constexpr (std::is_same_v) { - void *value; - CHECK_OFX_STATUS( - Traits::def.name, - propHost_->propGetPointer(handle_, Traits::def.name, index, &value)); - return value; - } else { - static_assert(always_false::value, "Unsupported property value type"); - } - } - - // Get multi-type property value (requires explicit type) - template T get(int index = 0) const { - using Traits = properties::PropTraits; - - // Check if T is compatible with any of the supported PropTypes - constexpr bool isValidType = [&]() { - constexpr auto types = std::array(Traits::def.supportedTypes, - Traits::def.supportedTypesCount); - for (const auto &type : types) { - if constexpr (std::is_same_v || std::is_same_v) { - if (type == PropType::Int || type == PropType::Bool || - type == PropType::Enum) - return true; - } else if constexpr (std::is_same_v) { - if (type == PropType::Double) - return true; - } else if constexpr (std::is_same_v) { - if (type == PropType::String || type == PropType::Enum) - return true; - } else if constexpr (std::is_same_v) { - if (type == PropType::Pointer) - return true; - } - } - return false; - }(); - - static_assert(isValidType, - "Requested type is not compatible with this property"); - - if constexpr (std::is_same_v || std::is_same_v) { - int value; - CHECK_OFX_STATUS( - Traits::def.name, - propHost_->propGetInt(handle_, Traits::def.name, index, &value)); - return value; - } else if constexpr (std::is_same_v) { - double value; - CHECK_OFX_STATUS( - Traits::def.name, - propHost_->propGetDouble(handle_, Traits::def.name, index, &value)); - return value; - } else if constexpr (std::is_same_v) { - char *value; - CHECK_OFX_STATUS( - Traits::def.name, - propHost_->propGetString(handle_, Traits::def.name, index, &value)); - return value; - } else if constexpr (std::is_same_v) { - void *value; - CHECK_OFX_STATUS( - Traits::def.name, - propHost_->propGetPointer(handle_, Traits::def.name, index, &value)); - return value; - } else { - static_assert(always_false::value, "Unsupported property value type"); - } - } - - // Set property value using PropId (compile-time type checking) - template - PropertyAccessor &set(typename properties::PropTraits::type value, - int index = 0) { - using Traits = properties::PropTraits; - - static_assert( - !Traits::is_multitype, - "This property supports multiple types. Use set() instead."); - - if constexpr (Traits::def.supportedTypes[0] == PropType::Enum) { - bool isValidEnumValue = OpenFX::EnumValue::isValid(value); - assert(isValidEnumValue); - } - - using T = typename Traits::type; - - if constexpr (std::is_same_v) { // allow bool -> int - CHECK_OFX_STATUS( - Traits::def.name, - propHost_->propSetInt(handle_, Traits::def.name, index, value)); - } else if constexpr (std::is_same_v) { - CHECK_OFX_STATUS( - Traits::def.name, - propHost_->propSetInt(handle_, Traits::def.name, index, value)); - } else if constexpr (std::is_same_v) { // allow float -> double - CHECK_OFX_STATUS( - Traits::def.name, - propHost_->propSetDouble(handle_, Traits::def.name, index, value)); - } else if constexpr (std::is_same_v) { - CHECK_OFX_STATUS( - Traits::def.name, - propHost_->propSetDouble(handle_, Traits::def.name, index, value)); - } else if constexpr (std::is_same_v) { - CHECK_OFX_STATUS( - Traits::def.name, - propHost_->propSetString(handle_, Traits::def.name, index, value)); - } else if constexpr (std::is_same_v) { - CHECK_OFX_STATUS( - Traits::def.name, - propHost_->propSetPointer(handle_, Traits::def.name, index, value)); - } else { - static_assert(always_false::value, - "Invalid value type when setting property"); - } - return *this; - } - - // Set multi-type property value (requires explicit type) - // Should only be used for multitype props (SFINAE) - template < - PropId id, typename T, - typename = std::enable_if_t::is_multitype>> - PropertyAccessor &set(T value, int index = 0) { - using Traits = properties::PropTraits; - - // Check if T is compatible with any of the supported PropTypes - constexpr bool isValidType = [&]() { - for (int i = 0; i < Traits::def.supportedTypesCount; i++) { - auto type = Traits::def.supportedTypes[i]; - if constexpr (std::is_same_v || std::is_same_v) { - if (type == PropType::Int || type == PropType::Bool) - return true; - else if (type == PropType::Enum) - static_assert(always_false::value, - "Integer values cannot be used for enum properties"); - } else if constexpr (std::is_same_v || - std::is_same_v) { - if (type == PropType::Double) - return true; - } else if constexpr (std::is_same_v) { - if (type == PropType::String) // no Enums here -- there shouldn't be - // any multi-type enums - return true; - } else if constexpr (std::is_same_v) { - if (type == PropType::Pointer) - return true; - } - } - return false; - }(); - - static_assert(isValidType, - "Requested type is not compatible with this property"); - - if constexpr (std::is_same_v || std::is_same_v) { - CHECK_OFX_STATUS( - Traits::def.name, - propHost_->propSetInt(handle_, Traits::def.name, index, value)); - } else if constexpr (std::is_same_v || - std::is_same_v) { - CHECK_OFX_STATUS( - Traits::def.name, - propHost_->propSetDouble(handle_, Traits::def.name, index, value)); - } else if constexpr (std::is_same_v) { - CHECK_OFX_STATUS( - Traits::def.name, - propHost_->propSetString(handle_, Traits::def.name, index, value)); - } else if constexpr (std::is_same_v) { - CHECK_OFX_STATUS( - Traits::def.name, - propHost_->propSetPointer(handle_, Traits::def.name, index, value)); - } else { - static_assert(always_false::value, - "Invalid value type when setting property"); - } - return *this; - } - - // Set all values of a prop - - // For single-type properties with any container - template // Container must have size() and operator[] - PropertyAccessor &setAll(const Container &values) { - static_assert(!properties::PropTraits::is_multitype, - "This property supports multiple types. Use setAll(container) instead."); - - for (size_t i = 0; i < values.size(); ++i) { - this->template set(values[i], static_cast(i)); - } - - return *this; - } - - // For single-type properties with initializer lists - template - PropertyAccessor &setAll( - std::initializer_list::type> values) { - static_assert(!properties::PropTraits::is_multitype, - "This property supports multiple types. Use " - "setAllTyped() instead."); - - int index = 0; - for (const auto &value : values) { - this->template set(value, index++); - } - - return *this; - } - - // For multi-type properties - require explicit ElementType - template - PropertyAccessor & - setAllTyped(const std::initializer_list &values) { - static_assert(properties::PropTraits::is_multitype, - "This property does not support multiple types. Use " - "setAll() instead."); - - for (size_t i = 0; i < values.size(); ++i) { - this->template set(values[i], static_cast(i)); - } - - return *this; - } - - // Overload for any container with multi-type properties - template - PropertyAccessor &setAllTyped(const Container &values) { - static_assert(properties::PropTraits::is_multitype, - "This property does not support multiple types. Use " - "setAll() instead."); - - for (size_t i = 0; i < values.size(); ++i) { - this->template set(values[i], static_cast(i)); - } - - return *this; - } - - // Get dimension of a property - template int getDimension() const { - using Traits = properties::PropTraits; - - // If dimension is known at compile time, we can just return it - if constexpr (Traits::dimension > 0) { - return Traits::dimension; - } else { - // Otherwise query at runtime - int dimension = 0; - CHECK_OFX_STATUS( - Traits::def.name, - propHost_->propGetDimension(handle_, Traits::def.name, &dimension)); - return dimension; - } - } - - // "Escape hatch" for unchecked property access - get any property by name - // with explicit type - template T getRaw(const char *name, int index = 0) const { - if constexpr (std::is_same_v) { - int value; - CHECK_OFX_STATUS(name, - propHost_->propGetInt(handle_, name, index, &value)); - return value; - } else if constexpr (std::is_same_v) { - double value; - CHECK_OFX_STATUS(name, - propHost_->propGetDouble(handle_, name, index, &value)); - return value; - } else if constexpr (std::is_same_v) { - char *value; - CHECK_OFX_STATUS(name, - propHost_->propGetString(handle_, name, index, &value)); - return value; - } else if constexpr (std::is_same_v) { - void *value; - CHECK_OFX_STATUS(name, - propHost_->propGetPointer(handle_, name, index, &value)); - return value; - } else { - static_assert(always_false::value, "Unsupported property type"); - } - } - - // "Escape hatch" for unchecked property access - set any property by name - // with explicit type - template - PropertyAccessor &setRaw(const char *name, T value, int index = 0) { - if constexpr (std::is_same_v) { - CHECK_OFX_STATUS(name, - propHost_->propSetInt(handle_, name, index, value)); - } else if constexpr (std::is_same_v) { - CHECK_OFX_STATUS(name, - propHost_->propSetDouble(handle_, name, index, value)); - } else if constexpr (std::is_same_v) { - CHECK_OFX_STATUS(name, - propHost_->propSetString(handle_, name, index, value)); - } else if constexpr (std::is_same_v) { - CHECK_OFX_STATUS(name, - propHost_->propSetPointer(handle_, name, index, value)); - } else { - static_assert(always_false::value, - "Unsupported property type for setting"); - } - return *this; - } - - // Get raw dimension of a property - int getDimensionRaw(const char *name) const { - int dimension = 0; - CHECK_OFX_STATUS(name, - propHost_->propGetDimension(handle_, name, &dimension)); - return dimension; - } - -private: - OfxPropertySetHandle handle_; - OfxPropertySuiteV1 *propHost_; - - // Helper for static_assert to fail compilation for unsupported types - template struct always_false : std::false_type {}; -}; - -// Namespace for property access constants and helpers -namespace prop { -// We'll use the existing defined constants like kOfxImageClipPropColourspace - -// Helper to validate property existence at compile time -template constexpr bool exists() { - return true; // All PropId values are valid by definition -} - -// Helper to check if a property supports a specific C++ type -template constexpr bool supportsType() { - constexpr auto supportedTypes = - properties::PropTraits::def.supportedTypes; - - for (const auto &type : supportedTypes) { - if constexpr (std::is_same_v) { - if (type == PropType::Int || type == PropType::Bool || - type == PropType::Enum) - return true; - } else if constexpr (std::is_same_v) { - if (type == PropType::Double) - return true; - } else if constexpr (std::is_same_v) { - if (type == PropType::String || type == PropType::Enum) - return true; - } else if constexpr (std::is_same_v) { - if (type == PropType::Pointer) - return true; - } - } - return false; -} -} // namespace prop - -// Find a property definition by name - -} // namespace OpenFX diff --git a/Support/include/ofxPropsBySet.h b/Support/include/ofxPropsBySet.h deleted file mode 100644 index 42130e46..00000000 --- a/Support/include/ofxPropsBySet.h +++ /dev/null @@ -1,779 +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 "ofxPropsMetadata.h" -// #include "ofxOld.h" - -namespace OpenFX { - -struct Prop { - const char *name; - const PropDef &def; - bool host_write; - bool plugin_write; - bool host_optional; - - Prop(const char *n, const PropDef &d, bool hw, bool pw, bool ho) - : name(n), def(d), host_write(hw), plugin_write(pw), host_optional(ho) {} -}; - -// Properties for property sets -static inline const std::map> prop_sets { -{ "ClipDescriptor", { { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, - { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, - { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, - { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, - { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, - { "OfxImageEffectPropSupportedComponents", prop_defs[static_cast(PropId::OfxImageEffectPropSupportedComponents)], false, true, false }, - { "OfxImageEffectPropTemporalClipAccess", prop_defs[static_cast(PropId::OfxImageEffectPropTemporalClipAccess)], false, true, false }, - { "OfxImageClipPropOptional", prop_defs[static_cast(PropId::OfxImageClipPropOptional)], false, true, false }, - { "OfxImageClipPropFieldExtraction", prop_defs[static_cast(PropId::OfxImageClipPropFieldExtraction)], false, true, false }, - { "OfxImageClipPropIsMask", prop_defs[static_cast(PropId::OfxImageClipPropIsMask)], false, true, false }, - { "OfxImageEffectPropSupportsTiles", prop_defs[static_cast(PropId::OfxImageEffectPropSupportsTiles)], false, true, false } } }, -{ "ClipInstance", { { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], true, false, false }, - { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], true, false, false }, - { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], true, false, false }, - { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], true, false, false }, - { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], true, false, false }, - { "OfxImageEffectPropSupportedComponents", prop_defs[static_cast(PropId::OfxImageEffectPropSupportedComponents)], true, false, false }, - { "OfxImageEffectPropTemporalClipAccess", prop_defs[static_cast(PropId::OfxImageEffectPropTemporalClipAccess)], true, false, false }, - { "OfxImageClipPropColourspace", prop_defs[static_cast(PropId::OfxImageClipPropColourspace)], true, false, false }, - { "OfxImageClipPropPreferredColourspaces", prop_defs[static_cast(PropId::OfxImageClipPropPreferredColourspaces)], true, false, false }, - { "OfxImageClipPropOptional", prop_defs[static_cast(PropId::OfxImageClipPropOptional)], true, false, false }, - { "OfxImageClipPropFieldExtraction", prop_defs[static_cast(PropId::OfxImageClipPropFieldExtraction)], true, false, false }, - { "OfxImageClipPropIsMask", prop_defs[static_cast(PropId::OfxImageClipPropIsMask)], true, false, false }, - { "OfxImageEffectPropSupportsTiles", prop_defs[static_cast(PropId::OfxImageEffectPropSupportsTiles)], true, false, false }, - { "OfxImageEffectPropPixelDepth", prop_defs[static_cast(PropId::OfxImageEffectPropPixelDepth)], true, false, false }, - { "OfxImageEffectPropComponents", prop_defs[static_cast(PropId::OfxImageEffectPropComponents)], true, false, false }, - { "OfxImageClipPropUnmappedPixelDepth", prop_defs[static_cast(PropId::OfxImageClipPropUnmappedPixelDepth)], true, false, false }, - { "OfxImageClipPropUnmappedComponents", prop_defs[static_cast(PropId::OfxImageClipPropUnmappedComponents)], true, false, false }, - { "OfxImageEffectPropPreMultiplication", prop_defs[static_cast(PropId::OfxImageEffectPropPreMultiplication)], true, false, false }, - { "OfxImagePropPixelAspectRatio", prop_defs[static_cast(PropId::OfxImagePropPixelAspectRatio)], true, false, false }, - { "OfxImageEffectPropFrameRate", prop_defs[static_cast(PropId::OfxImageEffectPropFrameRate)], true, false, false }, - { "OfxImageEffectPropFrameRange", prop_defs[static_cast(PropId::OfxImageEffectPropFrameRange)], true, false, false }, - { "OfxImageClipPropFieldOrder", prop_defs[static_cast(PropId::OfxImageClipPropFieldOrder)], true, false, false }, - { "OfxImageClipPropConnected", prop_defs[static_cast(PropId::OfxImageClipPropConnected)], true, false, false }, - { "OfxImageEffectPropUnmappedFrameRange", prop_defs[static_cast(PropId::OfxImageEffectPropUnmappedFrameRange)], true, false, false }, - { "OfxImageEffectPropUnmappedFrameRate", prop_defs[static_cast(PropId::OfxImageEffectPropUnmappedFrameRate)], true, false, false }, - { "OfxImageClipPropContinuousSamples", prop_defs[static_cast(PropId::OfxImageClipPropContinuousSamples)], true, false, false } } }, -{ "EffectDescriptor", { { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, - { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, - { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, - { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, - { "OfxPropVersion", prop_defs[static_cast(PropId::OfxPropVersion)], false, true, false }, - { "OfxPropVersionLabel", prop_defs[static_cast(PropId::OfxPropVersionLabel)], false, true, false }, - { "OfxPropPluginDescription", prop_defs[static_cast(PropId::OfxPropPluginDescription)], false, true, false }, - { "OfxImageEffectPropSupportedContexts", prop_defs[static_cast(PropId::OfxImageEffectPropSupportedContexts)], false, true, false }, - { "OfxImageEffectPluginPropGrouping", prop_defs[static_cast(PropId::OfxImageEffectPluginPropGrouping)], false, true, false }, - { "OfxImageEffectPluginPropSingleInstance", prop_defs[static_cast(PropId::OfxImageEffectPluginPropSingleInstance)], false, true, false }, - { "OfxImageEffectPluginRenderThreadSafety", prop_defs[static_cast(PropId::OfxImageEffectPluginRenderThreadSafety)], false, true, false }, - { "OfxImageEffectPluginPropHostFrameThreading", prop_defs[static_cast(PropId::OfxImageEffectPluginPropHostFrameThreading)], false, true, false }, - { "OfxImageEffectPluginPropOverlayInteractV1", prop_defs[static_cast(PropId::OfxImageEffectPluginPropOverlayInteractV1)], false, true, false }, - { "OfxImageEffectPropSupportsMultiResolution", prop_defs[static_cast(PropId::OfxImageEffectPropSupportsMultiResolution)], false, true, false }, - { "OfxImageEffectPropSupportsTiles", prop_defs[static_cast(PropId::OfxImageEffectPropSupportsTiles)], false, true, false }, - { "OfxImageEffectPropTemporalClipAccess", prop_defs[static_cast(PropId::OfxImageEffectPropTemporalClipAccess)], false, true, false }, - { "OfxImageEffectPropSupportedPixelDepths", prop_defs[static_cast(PropId::OfxImageEffectPropSupportedPixelDepths)], false, true, false }, - { "OfxImageEffectPluginPropFieldRenderTwiceAlways", prop_defs[static_cast(PropId::OfxImageEffectPluginPropFieldRenderTwiceAlways)], false, true, false }, - { "OfxImageEffectPropMultipleClipDepths", prop_defs[static_cast(PropId::OfxImageEffectPropMultipleClipDepths)], false, true, false }, - { "OfxImageEffectPropSupportsMultipleClipPARs", prop_defs[static_cast(PropId::OfxImageEffectPropSupportsMultipleClipPARs)], false, true, false }, - { "OfxImageEffectPluginRenderThreadSafety", prop_defs[static_cast(PropId::OfxImageEffectPluginRenderThreadSafety)], false, true, false }, - { "OfxImageEffectPropClipPreferencesSlaveParam", prop_defs[static_cast(PropId::OfxImageEffectPropClipPreferencesSlaveParam)], false, true, false }, - { "OfxImageEffectPropOpenGLRenderSupported", prop_defs[static_cast(PropId::OfxImageEffectPropOpenGLRenderSupported)], false, true, false }, - { "OfxPluginPropFilePath", prop_defs[static_cast(PropId::OfxPluginPropFilePath)], true, false, false }, - { "OfxOpenGLPropPixelDepth", prop_defs[static_cast(PropId::OfxOpenGLPropPixelDepth)], false, true, false }, - { "OfxImageEffectPluginPropOverlayInteractV2", prop_defs[static_cast(PropId::OfxImageEffectPluginPropOverlayInteractV2)], false, true, false }, - { "OfxImageEffectPropColourManagementAvailableConfigs", prop_defs[static_cast(PropId::OfxImageEffectPropColourManagementAvailableConfigs)], false, true, false }, - { "OfxImageEffectPropColourManagementStyle", prop_defs[static_cast(PropId::OfxImageEffectPropColourManagementStyle)], false, true, false } } }, -{ "EffectInstance", { { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], true, false, false }, - { "OfxImageEffectPropContext", prop_defs[static_cast(PropId::OfxImageEffectPropContext)], true, false, false }, - { "OfxPropInstanceData", prop_defs[static_cast(PropId::OfxPropInstanceData)], true, false, false }, - { "OfxImageEffectPropProjectSize", prop_defs[static_cast(PropId::OfxImageEffectPropProjectSize)], true, false, false }, - { "OfxImageEffectPropProjectOffset", prop_defs[static_cast(PropId::OfxImageEffectPropProjectOffset)], true, false, false }, - { "OfxImageEffectPropProjectExtent", prop_defs[static_cast(PropId::OfxImageEffectPropProjectExtent)], true, false, false }, - { "OfxImageEffectPropPixelAspectRatio", prop_defs[static_cast(PropId::OfxImageEffectPropPixelAspectRatio)], true, false, false }, - { "OfxImageEffectInstancePropEffectDuration", prop_defs[static_cast(PropId::OfxImageEffectInstancePropEffectDuration)], true, false, false }, - { "OfxImageEffectInstancePropSequentialRender", prop_defs[static_cast(PropId::OfxImageEffectInstancePropSequentialRender)], true, false, false }, - { "OfxImageEffectPropSupportsTiles", prop_defs[static_cast(PropId::OfxImageEffectPropSupportsTiles)], true, false, false }, - { "OfxImageEffectPropOpenGLRenderSupported", prop_defs[static_cast(PropId::OfxImageEffectPropOpenGLRenderSupported)], true, false, false }, - { "OfxImageEffectPropFrameRate", prop_defs[static_cast(PropId::OfxImageEffectPropFrameRate)], true, false, false }, - { "OfxPropIsInteractive", prop_defs[static_cast(PropId::OfxPropIsInteractive)], true, false, false }, - { "OfxImageEffectPropOCIOConfig", prop_defs[static_cast(PropId::OfxImageEffectPropOCIOConfig)], true, false, false }, - { "OfxImageEffectPropOCIODisplay", prop_defs[static_cast(PropId::OfxImageEffectPropOCIODisplay)], true, false, false }, - { "OfxImageEffectPropOCIOView", prop_defs[static_cast(PropId::OfxImageEffectPropOCIOView)], true, false, false }, - { "OfxImageEffectPropColourManagementConfig", prop_defs[static_cast(PropId::OfxImageEffectPropColourManagementConfig)], true, false, false }, - { "OfxImageEffectPropColourManagementStyle", prop_defs[static_cast(PropId::OfxImageEffectPropColourManagementStyle)], true, false, false }, - { "OfxImageEffectPropDisplayColourspace", prop_defs[static_cast(PropId::OfxImageEffectPropDisplayColourspace)], true, false, false }, - { "OfxImageEffectPropPluginHandle", prop_defs[static_cast(PropId::OfxImageEffectPropPluginHandle)], true, false, false } } }, -{ "Image", { { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], true, false, false }, - { "OfxImageEffectPropPixelDepth", prop_defs[static_cast(PropId::OfxImageEffectPropPixelDepth)], true, false, false }, - { "OfxImageEffectPropComponents", prop_defs[static_cast(PropId::OfxImageEffectPropComponents)], true, false, false }, - { "OfxImageEffectPropPreMultiplication", prop_defs[static_cast(PropId::OfxImageEffectPropPreMultiplication)], true, false, false }, - { "OfxImageEffectPropRenderScale", prop_defs[static_cast(PropId::OfxImageEffectPropRenderScale)], true, false, false }, - { "OfxImagePropPixelAspectRatio", prop_defs[static_cast(PropId::OfxImagePropPixelAspectRatio)], true, false, false }, - { "OfxImagePropData", prop_defs[static_cast(PropId::OfxImagePropData)], true, false, false }, - { "OfxImagePropBounds", prop_defs[static_cast(PropId::OfxImagePropBounds)], true, false, false }, - { "OfxImagePropRegionOfDefinition", prop_defs[static_cast(PropId::OfxImagePropRegionOfDefinition)], true, false, false }, - { "OfxImagePropRowBytes", prop_defs[static_cast(PropId::OfxImagePropRowBytes)], true, false, false }, - { "OfxImagePropField", prop_defs[static_cast(PropId::OfxImagePropField)], true, false, false }, - { "OfxImagePropUniqueIdentifier", prop_defs[static_cast(PropId::OfxImagePropUniqueIdentifier)], true, false, false } } }, -{ "ImageEffectHost", { { "OfxPropAPIVersion", prop_defs[static_cast(PropId::OfxPropAPIVersion)], true, false, false }, - { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], true, false, false }, - { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], true, false, false }, - { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], true, false, false }, - { "OfxPropVersion", prop_defs[static_cast(PropId::OfxPropVersion)], true, false, false }, - { "OfxPropVersionLabel", prop_defs[static_cast(PropId::OfxPropVersionLabel)], true, false, false }, - { "OfxImageEffectHostPropIsBackground", prop_defs[static_cast(PropId::OfxImageEffectHostPropIsBackground)], true, false, false }, - { "OfxImageEffectPropSupportsOverlays", prop_defs[static_cast(PropId::OfxImageEffectPropSupportsOverlays)], true, false, false }, - { "OfxImageEffectPropSupportsMultiResolution", prop_defs[static_cast(PropId::OfxImageEffectPropSupportsMultiResolution)], true, false, false }, - { "OfxImageEffectPropSupportsTiles", prop_defs[static_cast(PropId::OfxImageEffectPropSupportsTiles)], true, false, false }, - { "OfxImageEffectPropTemporalClipAccess", prop_defs[static_cast(PropId::OfxImageEffectPropTemporalClipAccess)], true, false, false }, - { "OfxImageEffectPropSupportedComponents", prop_defs[static_cast(PropId::OfxImageEffectPropSupportedComponents)], true, false, false }, - { "OfxImageEffectPropSupportedContexts", prop_defs[static_cast(PropId::OfxImageEffectPropSupportedContexts)], true, false, false }, - { "OfxImageEffectPropMultipleClipDepths", prop_defs[static_cast(PropId::OfxImageEffectPropMultipleClipDepths)], true, false, false }, - { "OfxImageEffectPropSupportsMultipleClipPARs", prop_defs[static_cast(PropId::OfxImageEffectPropSupportsMultipleClipPARs)], true, false, false }, - { "OfxImageEffectPropSetableFrameRate", prop_defs[static_cast(PropId::OfxImageEffectPropSetableFrameRate)], true, false, false }, - { "OfxImageEffectPropSetableFielding", prop_defs[static_cast(PropId::OfxImageEffectPropSetableFielding)], true, false, false }, - { "OfxParamHostPropSupportsCustomInteract", prop_defs[static_cast(PropId::OfxParamHostPropSupportsCustomInteract)], true, false, false }, - { "OfxParamHostPropSupportsStringAnimation", prop_defs[static_cast(PropId::OfxParamHostPropSupportsStringAnimation)], true, false, false }, - { "OfxParamHostPropSupportsChoiceAnimation", prop_defs[static_cast(PropId::OfxParamHostPropSupportsChoiceAnimation)], true, false, false }, - { "OfxParamHostPropSupportsBooleanAnimation", prop_defs[static_cast(PropId::OfxParamHostPropSupportsBooleanAnimation)], true, false, false }, - { "OfxParamHostPropSupportsCustomAnimation", prop_defs[static_cast(PropId::OfxParamHostPropSupportsCustomAnimation)], true, false, false }, - { "OfxParamHostPropSupportsStrChoice", prop_defs[static_cast(PropId::OfxParamHostPropSupportsStrChoice)], true, false, false }, - { "OfxParamHostPropSupportsStrChoiceAnimation", prop_defs[static_cast(PropId::OfxParamHostPropSupportsStrChoiceAnimation)], true, false, false }, - { "OfxParamHostPropMaxParameters", prop_defs[static_cast(PropId::OfxParamHostPropMaxParameters)], true, false, false }, - { "OfxParamHostPropMaxPages", prop_defs[static_cast(PropId::OfxParamHostPropMaxPages)], true, false, false }, - { "OfxParamHostPropPageRowColumnCount", prop_defs[static_cast(PropId::OfxParamHostPropPageRowColumnCount)], true, false, false }, - { "OfxPropHostOSHandle", prop_defs[static_cast(PropId::OfxPropHostOSHandle)], true, false, false }, - { "OfxParamHostPropSupportsParametricAnimation", prop_defs[static_cast(PropId::OfxParamHostPropSupportsParametricAnimation)], true, false, false }, - { "OfxImageEffectInstancePropSequentialRender", prop_defs[static_cast(PropId::OfxImageEffectInstancePropSequentialRender)], true, false, false }, - { "OfxImageEffectPropOpenGLRenderSupported", prop_defs[static_cast(PropId::OfxImageEffectPropOpenGLRenderSupported)], true, false, false }, - { "OfxImageEffectPropRenderQualityDraft", prop_defs[static_cast(PropId::OfxImageEffectPropRenderQualityDraft)], true, false, false }, - { "OfxImageEffectHostPropNativeOrigin", prop_defs[static_cast(PropId::OfxImageEffectHostPropNativeOrigin)], true, false, false }, - { "OfxImageEffectPropColourManagementAvailableConfigs", prop_defs[static_cast(PropId::OfxImageEffectPropColourManagementAvailableConfigs)], true, false, false }, - { "OfxImageEffectPropColourManagementStyle", prop_defs[static_cast(PropId::OfxImageEffectPropColourManagementStyle)], true, false, false } } }, -{ "InteractDescriptor", { { "OfxInteractPropHasAlpha", prop_defs[static_cast(PropId::OfxInteractPropHasAlpha)], true, false, false }, - { "OfxInteractPropBitDepth", prop_defs[static_cast(PropId::OfxInteractPropBitDepth)], true, false, false } } }, -{ "InteractInstance", { { "OfxPropEffectInstance", prop_defs[static_cast(PropId::OfxPropEffectInstance)], true, false, false }, - { "OfxPropInstanceData", prop_defs[static_cast(PropId::OfxPropInstanceData)], true, false, false }, - { "OfxInteractPropPixelScale", prop_defs[static_cast(PropId::OfxInteractPropPixelScale)], true, false, false }, - { "OfxInteractPropBackgroundColour", prop_defs[static_cast(PropId::OfxInteractPropBackgroundColour)], true, false, false }, - { "OfxInteractPropHasAlpha", prop_defs[static_cast(PropId::OfxInteractPropHasAlpha)], true, false, false }, - { "OfxInteractPropBitDepth", prop_defs[static_cast(PropId::OfxInteractPropBitDepth)], true, false, false }, - { "OfxInteractPropSlaveToParam", prop_defs[static_cast(PropId::OfxInteractPropSlaveToParam)], true, false, false }, - { "OfxInteractPropSuggestedColour", prop_defs[static_cast(PropId::OfxInteractPropSuggestedColour)], true, false, false } } }, -{ "ParamDouble1D", { { "OfxParamPropShowTimeMarker", prop_defs[static_cast(PropId::OfxParamPropShowTimeMarker)], false, true, false }, - { "OfxParamPropDoubleType", prop_defs[static_cast(PropId::OfxParamPropDoubleType)], false, true, false }, - { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, - { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, - { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, - { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, - { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, - { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, - { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, - { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, - { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, - { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, - { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, - { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, - { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false }, - { "OfxParamPropInteractV1", prop_defs[static_cast(PropId::OfxParamPropInteractV1)], false, true, false }, - { "OfxParamPropInteractSize", prop_defs[static_cast(PropId::OfxParamPropInteractSize)], false, true, false }, - { "OfxParamPropInteractSizeAspect", prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)], false, true, false }, - { "OfxParamPropInteractMinimumSize", prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)], false, true, false }, - { "OfxParamPropInteractPreferedSize", prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)], false, true, false }, - { "OfxParamPropHasHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)], false, true, false }, - { "kOfxParamPropUseHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)], false, true, false }, - { "OfxParamPropDefault", prop_defs[static_cast(PropId::OfxParamPropDefault)], false, true, false }, - { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, - { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], true, false, false }, - { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], true, false, false }, - { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, - { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, - { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, - { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, - { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false }, - { "OfxParamPropMin", prop_defs[static_cast(PropId::OfxParamPropMin)], false, true, false }, - { "OfxParamPropMax", prop_defs[static_cast(PropId::OfxParamPropMax)], false, true, false }, - { "OfxParamPropDisplayMin", prop_defs[static_cast(PropId::OfxParamPropDisplayMin)], false, true, false }, - { "OfxParamPropDisplayMax", prop_defs[static_cast(PropId::OfxParamPropDisplayMax)], false, true, false }, - { "OfxParamPropIncrement", prop_defs[static_cast(PropId::OfxParamPropIncrement)], false, true, false }, - { "OfxParamPropDigits", prop_defs[static_cast(PropId::OfxParamPropDigits)], false, true, false } } }, -{ "ParameterSet", { { "OfxPropParamSetNeedsSyncing", prop_defs[static_cast(PropId::OfxPropParamSetNeedsSyncing)], false, true, false }, - { "OfxPluginPropParamPageOrder", prop_defs[static_cast(PropId::OfxPluginPropParamPageOrder)], false, true, false } } }, -{ "ParamsByte", { { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, - { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, - { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, - { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, - { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, - { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, - { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, - { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, - { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, - { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, - { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, - { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, - { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false }, - { "OfxParamPropInteractV1", prop_defs[static_cast(PropId::OfxParamPropInteractV1)], false, true, false }, - { "OfxParamPropInteractSize", prop_defs[static_cast(PropId::OfxParamPropInteractSize)], false, true, false }, - { "OfxParamPropInteractSizeAspect", prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)], false, true, false }, - { "OfxParamPropInteractMinimumSize", prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)], false, true, false }, - { "OfxParamPropInteractPreferedSize", prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)], false, true, false }, - { "OfxParamPropHasHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)], false, true, false }, - { "kOfxParamPropUseHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)], false, true, false }, - { "OfxParamPropDefault", prop_defs[static_cast(PropId::OfxParamPropDefault)], false, true, false }, - { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, - { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], true, false, false }, - { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], true, false, false }, - { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, - { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, - { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, - { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, - { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false }, - { "OfxParamPropMin", prop_defs[static_cast(PropId::OfxParamPropMin)], false, true, false }, - { "OfxParamPropMax", prop_defs[static_cast(PropId::OfxParamPropMax)], false, true, false }, - { "OfxParamPropDisplayMin", prop_defs[static_cast(PropId::OfxParamPropDisplayMin)], false, true, false }, - { "OfxParamPropDisplayMax", prop_defs[static_cast(PropId::OfxParamPropDisplayMax)], false, true, false } } }, -{ "ParamsChoice", { { "OfxParamPropChoiceOption", prop_defs[static_cast(PropId::OfxParamPropChoiceOption)], false, true, false }, - { "OfxParamPropChoiceOrder", prop_defs[static_cast(PropId::OfxParamPropChoiceOrder)], false, true, false }, - { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, - { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, - { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, - { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, - { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, - { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, - { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, - { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, - { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, - { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, - { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, - { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, - { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false }, - { "OfxParamPropInteractV1", prop_defs[static_cast(PropId::OfxParamPropInteractV1)], false, true, false }, - { "OfxParamPropInteractSize", prop_defs[static_cast(PropId::OfxParamPropInteractSize)], false, true, false }, - { "OfxParamPropInteractSizeAspect", prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)], false, true, false }, - { "OfxParamPropInteractMinimumSize", prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)], false, true, false }, - { "OfxParamPropInteractPreferedSize", prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)], false, true, false }, - { "OfxParamPropHasHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)], false, true, false }, - { "kOfxParamPropUseHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)], false, true, false }, - { "OfxParamPropDefault", prop_defs[static_cast(PropId::OfxParamPropDefault)], false, true, false }, - { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, - { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], true, false, false }, - { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], true, false, false }, - { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, - { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, - { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, - { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, - { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false } } }, -{ "ParamsCustom", { { "OfxParamPropCustomCallbackV1", prop_defs[static_cast(PropId::OfxParamPropCustomCallbackV1)], false, true, false }, - { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, - { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, - { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, - { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, - { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, - { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, - { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, - { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, - { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, - { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, - { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, - { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, - { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false }, - { "OfxParamPropInteractV1", prop_defs[static_cast(PropId::OfxParamPropInteractV1)], false, true, false }, - { "OfxParamPropInteractSize", prop_defs[static_cast(PropId::OfxParamPropInteractSize)], false, true, false }, - { "OfxParamPropInteractSizeAspect", prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)], false, true, false }, - { "OfxParamPropInteractMinimumSize", prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)], false, true, false }, - { "OfxParamPropInteractPreferedSize", prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)], false, true, false }, - { "OfxParamPropHasHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)], false, true, false }, - { "kOfxParamPropUseHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)], false, true, false }, - { "OfxParamPropDefault", prop_defs[static_cast(PropId::OfxParamPropDefault)], false, true, false }, - { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, - { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], true, false, false }, - { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], true, false, false }, - { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, - { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, - { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, - { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, - { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false } } }, -{ "ParamsDouble2D3D", { { "OfxParamPropDoubleType", prop_defs[static_cast(PropId::OfxParamPropDoubleType)], false, true, false }, - { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, - { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, - { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, - { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, - { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, - { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, - { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, - { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, - { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, - { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, - { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, - { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, - { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false }, - { "OfxParamPropInteractV1", prop_defs[static_cast(PropId::OfxParamPropInteractV1)], false, true, false }, - { "OfxParamPropInteractSize", prop_defs[static_cast(PropId::OfxParamPropInteractSize)], false, true, false }, - { "OfxParamPropInteractSizeAspect", prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)], false, true, false }, - { "OfxParamPropInteractMinimumSize", prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)], false, true, false }, - { "OfxParamPropInteractPreferedSize", prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)], false, true, false }, - { "OfxParamPropHasHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)], false, true, false }, - { "kOfxParamPropUseHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)], false, true, false }, - { "OfxParamPropDefault", prop_defs[static_cast(PropId::OfxParamPropDefault)], false, true, false }, - { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, - { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], true, false, false }, - { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], true, false, false }, - { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, - { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, - { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, - { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, - { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false }, - { "OfxParamPropMin", prop_defs[static_cast(PropId::OfxParamPropMin)], false, true, false }, - { "OfxParamPropMax", prop_defs[static_cast(PropId::OfxParamPropMax)], false, true, false }, - { "OfxParamPropDisplayMin", prop_defs[static_cast(PropId::OfxParamPropDisplayMin)], false, true, false }, - { "OfxParamPropDisplayMax", prop_defs[static_cast(PropId::OfxParamPropDisplayMax)], false, true, false }, - { "OfxParamPropIncrement", prop_defs[static_cast(PropId::OfxParamPropIncrement)], false, true, false }, - { "OfxParamPropDigits", prop_defs[static_cast(PropId::OfxParamPropDigits)], false, true, false } } }, -{ "ParamsGroup", { { "OfxParamPropGroupOpen", prop_defs[static_cast(PropId::OfxParamPropGroupOpen)], false, true, false }, - { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, - { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, - { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, - { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, - { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, - { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, - { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, - { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, - { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, - { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, - { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, - { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, - { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false } } }, -{ "ParamsInt2D3D", { { "OfxParamPropDimensionLabel", prop_defs[static_cast(PropId::OfxParamPropDimensionLabel)], false, true, false }, - { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, - { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, - { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, - { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, - { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, - { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, - { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, - { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, - { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, - { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, - { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, - { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, - { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false }, - { "OfxParamPropInteractV1", prop_defs[static_cast(PropId::OfxParamPropInteractV1)], false, true, false }, - { "OfxParamPropInteractSize", prop_defs[static_cast(PropId::OfxParamPropInteractSize)], false, true, false }, - { "OfxParamPropInteractSizeAspect", prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)], false, true, false }, - { "OfxParamPropInteractMinimumSize", prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)], false, true, false }, - { "OfxParamPropInteractPreferedSize", prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)], false, true, false }, - { "OfxParamPropHasHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)], false, true, false }, - { "kOfxParamPropUseHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)], false, true, false }, - { "OfxParamPropDefault", prop_defs[static_cast(PropId::OfxParamPropDefault)], false, true, false }, - { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, - { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], true, false, false }, - { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], true, false, false }, - { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, - { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, - { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, - { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, - { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false }, - { "OfxParamPropMin", prop_defs[static_cast(PropId::OfxParamPropMin)], false, true, false }, - { "OfxParamPropMax", prop_defs[static_cast(PropId::OfxParamPropMax)], false, true, false }, - { "OfxParamPropDisplayMin", prop_defs[static_cast(PropId::OfxParamPropDisplayMin)], false, true, false }, - { "OfxParamPropDisplayMax", prop_defs[static_cast(PropId::OfxParamPropDisplayMax)], false, true, false } } }, -{ "ParamsNormalizedSpatial", { { "OfxParamPropDefaultCoordinateSystem", prop_defs[static_cast(PropId::OfxParamPropDefaultCoordinateSystem)], false, true, false }, - { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, - { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, - { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, - { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, - { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, - { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, - { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, - { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, - { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, - { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, - { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, - { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, - { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false }, - { "OfxParamPropInteractV1", prop_defs[static_cast(PropId::OfxParamPropInteractV1)], false, true, false }, - { "OfxParamPropInteractSize", prop_defs[static_cast(PropId::OfxParamPropInteractSize)], false, true, false }, - { "OfxParamPropInteractSizeAspect", prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)], false, true, false }, - { "OfxParamPropInteractMinimumSize", prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)], false, true, false }, - { "OfxParamPropInteractPreferedSize", prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)], false, true, false }, - { "OfxParamPropHasHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)], false, true, false }, - { "kOfxParamPropUseHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)], false, true, false }, - { "OfxParamPropDefault", prop_defs[static_cast(PropId::OfxParamPropDefault)], false, true, false }, - { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, - { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], true, false, false }, - { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], true, false, false }, - { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, - { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, - { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, - { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, - { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false }, - { "OfxParamPropMin", prop_defs[static_cast(PropId::OfxParamPropMin)], false, true, false }, - { "OfxParamPropMax", prop_defs[static_cast(PropId::OfxParamPropMax)], false, true, false }, - { "OfxParamPropDisplayMin", prop_defs[static_cast(PropId::OfxParamPropDisplayMin)], false, true, false }, - { "OfxParamPropDisplayMax", prop_defs[static_cast(PropId::OfxParamPropDisplayMax)], false, true, false }, - { "OfxParamPropIncrement", prop_defs[static_cast(PropId::OfxParamPropIncrement)], false, true, false }, - { "OfxParamPropDigits", prop_defs[static_cast(PropId::OfxParamPropDigits)], false, true, false } } }, -{ "ParamsPage", { { "OfxParamPropPageChild", prop_defs[static_cast(PropId::OfxParamPropPageChild)], false, true, false }, - { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, - { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, - { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, - { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, - { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, - { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, - { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, - { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, - { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, - { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, - { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, - { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, - { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false } } }, -{ "ParamsParametric", { { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, - { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], false, true, false }, - { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], false, true, false }, - { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, - { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, - { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, - { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, - { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false }, - { "OfxParamPropParametricDimension", prop_defs[static_cast(PropId::OfxParamPropParametricDimension)], false, true, false }, - { "OfxParamPropParametricUIColour", prop_defs[static_cast(PropId::OfxParamPropParametricUIColour)], false, true, false }, - { "OfxParamPropParametricInteractBackground", prop_defs[static_cast(PropId::OfxParamPropParametricInteractBackground)], false, true, false }, - { "OfxParamPropParametricRange", prop_defs[static_cast(PropId::OfxParamPropParametricRange)], false, true, false }, - { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, - { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, - { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, - { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, - { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, - { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, - { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, - { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, - { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, - { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, - { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, - { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, - { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false }, - { "OfxParamPropInteractV1", prop_defs[static_cast(PropId::OfxParamPropInteractV1)], false, true, false }, - { "OfxParamPropInteractSize", prop_defs[static_cast(PropId::OfxParamPropInteractSize)], false, true, false }, - { "OfxParamPropInteractSizeAspect", prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)], false, true, false }, - { "OfxParamPropInteractMinimumSize", prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)], false, true, false }, - { "OfxParamPropInteractPreferedSize", prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)], false, true, false }, - { "OfxParamPropHasHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)], false, true, false }, - { "kOfxParamPropUseHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)], false, true, false }, - { "OfxParamPropDefault", prop_defs[static_cast(PropId::OfxParamPropDefault)], false, true, false }, - { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, - { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], true, false, false }, - { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], true, false, false }, - { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, - { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, - { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, - { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, - { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false } } }, -{ "ParamsStrChoice", { { "OfxParamPropChoiceOption", prop_defs[static_cast(PropId::OfxParamPropChoiceOption)], false, true, false }, - { "OfxParamPropChoiceEnum", prop_defs[static_cast(PropId::OfxParamPropChoiceEnum)], false, true, false }, - { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, - { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, - { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, - { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, - { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, - { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, - { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, - { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, - { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, - { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, - { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, - { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, - { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false }, - { "OfxParamPropInteractV1", prop_defs[static_cast(PropId::OfxParamPropInteractV1)], false, true, false }, - { "OfxParamPropInteractSize", prop_defs[static_cast(PropId::OfxParamPropInteractSize)], false, true, false }, - { "OfxParamPropInteractSizeAspect", prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)], false, true, false }, - { "OfxParamPropInteractMinimumSize", prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)], false, true, false }, - { "OfxParamPropInteractPreferedSize", prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)], false, true, false }, - { "OfxParamPropHasHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)], false, true, false }, - { "kOfxParamPropUseHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)], false, true, false }, - { "OfxParamPropDefault", prop_defs[static_cast(PropId::OfxParamPropDefault)], false, true, false }, - { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, - { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], true, false, false }, - { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], true, false, false }, - { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, - { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, - { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, - { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, - { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false } } }, -{ "ParamsString", { { "OfxParamPropStringMode", prop_defs[static_cast(PropId::OfxParamPropStringMode)], false, true, false }, - { "OfxParamPropStringFilePathExists", prop_defs[static_cast(PropId::OfxParamPropStringFilePathExists)], false, true, false }, - { "OfxPropType", prop_defs[static_cast(PropId::OfxPropType)], false, true, false }, - { "OfxPropName", prop_defs[static_cast(PropId::OfxPropName)], false, true, false }, - { "OfxPropLabel", prop_defs[static_cast(PropId::OfxPropLabel)], false, true, false }, - { "OfxPropShortLabel", prop_defs[static_cast(PropId::OfxPropShortLabel)], false, true, false }, - { "OfxPropLongLabel", prop_defs[static_cast(PropId::OfxPropLongLabel)], false, true, false }, - { "OfxParamPropType", prop_defs[static_cast(PropId::OfxParamPropType)], false, true, false }, - { "OfxParamPropSecret", prop_defs[static_cast(PropId::OfxParamPropSecret)], false, true, false }, - { "OfxParamPropHint", prop_defs[static_cast(PropId::OfxParamPropHint)], false, true, false }, - { "OfxParamPropScriptName", prop_defs[static_cast(PropId::OfxParamPropScriptName)], false, true, false }, - { "OfxParamPropParent", prop_defs[static_cast(PropId::OfxParamPropParent)], false, true, false }, - { "OfxParamPropEnabled", prop_defs[static_cast(PropId::OfxParamPropEnabled)], false, true, false }, - { "OfxParamPropDataPtr", prop_defs[static_cast(PropId::OfxParamPropDataPtr)], false, true, false }, - { "OfxPropIcon", prop_defs[static_cast(PropId::OfxPropIcon)], false, true, false }, - { "OfxParamPropInteractV1", prop_defs[static_cast(PropId::OfxParamPropInteractV1)], false, true, false }, - { "OfxParamPropInteractSize", prop_defs[static_cast(PropId::OfxParamPropInteractSize)], false, true, false }, - { "OfxParamPropInteractSizeAspect", prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)], false, true, false }, - { "OfxParamPropInteractMinimumSize", prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)], false, true, false }, - { "OfxParamPropInteractPreferedSize", prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)], false, true, false }, - { "OfxParamPropHasHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)], false, true, false }, - { "kOfxParamPropUseHostOverlayHandle", prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)], false, true, false }, - { "OfxParamPropDefault", prop_defs[static_cast(PropId::OfxParamPropDefault)], false, true, false }, - { "OfxParamPropAnimates", prop_defs[static_cast(PropId::OfxParamPropAnimates)], false, true, false }, - { "OfxParamPropIsAnimating", prop_defs[static_cast(PropId::OfxParamPropIsAnimating)], true, false, false }, - { "OfxParamPropIsAutoKeying", prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)], true, false, false }, - { "OfxParamPropPersistant", prop_defs[static_cast(PropId::OfxParamPropPersistant)], false, true, false }, - { "OfxParamPropEvaluateOnChange", prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)], false, true, false }, - { "OfxParamPropPluginMayWrite", prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)], false, true, false }, - { "OfxParamPropCacheInvalidation", prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)], false, true, false }, - { "OfxParamPropCanUndo", prop_defs[static_cast(PropId::OfxParamPropCanUndo)], false, true, false }, - { "OfxParamPropMin", prop_defs[static_cast(PropId::OfxParamPropMin)], false, true, false }, - { "OfxParamPropMax", prop_defs[static_cast(PropId::OfxParamPropMax)], false, true, false }, - { "OfxParamPropDisplayMin", prop_defs[static_cast(PropId::OfxParamPropDisplayMin)], false, true, false }, - { "OfxParamPropDisplayMax", prop_defs[static_cast(PropId::OfxParamPropDisplayMax)], false, true, false } } }, -}; - -// Actions -static inline const std::array actions { - "CustomParamInterpFunc", - "OfxActionBeginInstanceChanged", - "OfxActionBeginInstanceEdit", - "OfxActionCreateInstance", - "OfxActionDescribe", - "OfxActionDestroyInstance", - "OfxActionEndInstanceChanged", - "OfxActionEndInstanceEdit", - "OfxActionInstanceChanged", - "OfxActionLoad", - "OfxActionPurgeCaches", - "OfxActionSyncPrivateData", - "OfxActionUnload", - "OfxImageEffectActionBeginSequenceRender", - "OfxImageEffectActionDescribeInContext", - "OfxImageEffectActionEndSequenceRender", - "OfxImageEffectActionGetClipPreferences", - "OfxImageEffectActionGetFramesNeeded", - "OfxImageEffectActionGetOutputColourspace", - "OfxImageEffectActionGetRegionOfDefinition", - "OfxImageEffectActionGetRegionsOfInterest", - "OfxImageEffectActionGetTimeDomain", - "OfxImageEffectActionIsIdentity", - "OfxImageEffectActionRender", - "OfxInteractActionDraw", - "OfxInteractActionGainFocus", - "OfxInteractActionKeyDown", - "OfxInteractActionKeyRepeat", - "OfxInteractActionKeyUp", - "OfxInteractActionLoseFocus", - "OfxInteractActionPenDown", - "OfxInteractActionPenMotion", - "OfxInteractActionPenUp", -}; - -// Properties for action args -static inline const std::map, std::vector> action_props { -{ { "CustomParamInterpFunc", "inArgs" }, { "OfxParamPropCustomValue", - "OfxParamPropInterpolationAmount", - "OfxParamPropInterpolationTime" } }, -{ { "CustomParamInterpFunc", "outArgs" }, { "OfxParamPropCustomValue", - "OfxParamPropInterpolationTime" } }, -{ { "OfxActionBeginInstanceChanged", "inArgs" }, { "OfxPropChangeReason" } }, -{ { "OfxActionEndInstanceChanged", "inArgs" }, { "OfxPropChangeReason" } }, -{ { "OfxActionInstanceChanged", "inArgs" }, { "OfxImageEffectPropRenderScale", - "OfxPropChangeReason", - "OfxPropName", - "OfxPropTime", - "OfxPropType" } }, -{ { "OfxImageEffectActionBeginSequenceRender", "inArgs" }, { "OfxImageEffectPropCudaEnabled", - "OfxImageEffectPropCudaRenderSupported", - "OfxImageEffectPropCudaStream", - "OfxImageEffectPropCudaStreamSupported", - "OfxImageEffectPropFrameRange", - "OfxImageEffectPropFrameStep", - "OfxImageEffectPropInteractiveRenderStatus", - "OfxImageEffectPropInteractiveRenderStatus", - "OfxImageEffectPropMetalCommandQueue", - "OfxImageEffectPropMetalEnabled", - "OfxImageEffectPropMetalRenderSupported", - "OfxImageEffectPropOpenCLCommandQueue", - "OfxImageEffectPropOpenCLEnabled", - "OfxImageEffectPropOpenCLImage", - "OfxImageEffectPropOpenCLRenderSupported", - "OfxImageEffectPropOpenCLSupported", - "OfxImageEffectPropOpenGLEnabled", - "OfxImageEffectPropOpenGLTextureIndex", - "OfxImageEffectPropOpenGLTextureTarget", - "OfxImageEffectPropRenderScale", - "OfxImageEffectPropSequentialRenderStatus", - "OfxPropIsInteractive" } }, -{ { "OfxImageEffectActionDescribeInContext", "inArgs" }, { "OfxImageEffectPropContext" } }, -{ { "OfxImageEffectActionEndSequenceRender", "inArgs" }, { "OfxImageEffectPropCudaEnabled", - "OfxImageEffectPropCudaRenderSupported", - "OfxImageEffectPropCudaStream", - "OfxImageEffectPropCudaStreamSupported", - "OfxImageEffectPropFrameRange", - "OfxImageEffectPropFrameStep", - "OfxImageEffectPropInteractiveRenderStatus", - "OfxImageEffectPropInteractiveRenderStatus", - "OfxImageEffectPropMetalCommandQueue", - "OfxImageEffectPropMetalEnabled", - "OfxImageEffectPropMetalRenderSupported", - "OfxImageEffectPropOpenCLCommandQueue", - "OfxImageEffectPropOpenCLEnabled", - "OfxImageEffectPropOpenCLImage", - "OfxImageEffectPropOpenCLRenderSupported", - "OfxImageEffectPropOpenCLSupported", - "OfxImageEffectPropOpenGLEnabled", - "OfxImageEffectPropOpenGLTextureIndex", - "OfxImageEffectPropOpenGLTextureTarget", - "OfxImageEffectPropRenderScale", - "OfxImageEffectPropSequentialRenderStatus", - "OfxPropIsInteractive" } }, -{ { "OfxImageEffectActionGetClipPreferences", "outArgs" }, { "OfxImageClipPropContinuousSamples", - "OfxImageClipPropFieldOrder", - "OfxImageEffectFrameVarying", - "OfxImageEffectPropFrameRate", - "OfxImageEffectPropPreMultiplication" } }, -{ { "OfxImageEffectActionGetFramesNeeded", "inArgs" }, { "OfxPropTime" } }, -{ { "OfxImageEffectActionGetFramesNeeded", "outArgs" }, { "OfxImageEffectPropFrameRange" } }, -{ { "OfxImageEffectActionGetOutputColourspace", "inArgs" }, { "OfxImageClipPropPreferredColourspaces" } }, -{ { "OfxImageEffectActionGetOutputColourspace", "outArgs" }, { "OfxImageClipPropColourspace" } }, -{ { "OfxImageEffectActionGetRegionOfDefinition", "inArgs" }, { "OfxImageEffectPropRenderScale", - "OfxPropTime" } }, -{ { "OfxImageEffectActionGetRegionOfDefinition", "outArgs" }, { "OfxImageEffectPropRegionOfDefinition" } }, -{ { "OfxImageEffectActionGetRegionsOfInterest", "inArgs" }, { "OfxImageEffectPropRegionOfInterest", - "OfxImageEffectPropRenderScale", - "OfxPropTime" } }, -{ { "OfxImageEffectActionGetTimeDomain", "outArgs" }, { "OfxImageEffectPropFrameRange" } }, -{ { "OfxImageEffectActionIsIdentity", "inArgs" }, { "OfxImageEffectPropFieldToRender", - "OfxImageEffectPropRenderScale", - "OfxImageEffectPropRenderWindow", - "OfxPropTime" } }, -{ { "OfxImageEffectActionRender", "inArgs" }, { "OfxImageEffectPropCudaEnabled", - "OfxImageEffectPropCudaRenderSupported", - "OfxImageEffectPropCudaStream", - "OfxImageEffectPropCudaStreamSupported", - "OfxImageEffectPropInteractiveRenderStatus", - "OfxImageEffectPropInteractiveRenderStatus", - "OfxImageEffectPropMetalCommandQueue", - "OfxImageEffectPropMetalEnabled", - "OfxImageEffectPropMetalRenderSupported", - "OfxImageEffectPropOpenCLCommandQueue", - "OfxImageEffectPropOpenCLEnabled", - "OfxImageEffectPropOpenCLImage", - "OfxImageEffectPropOpenCLRenderSupported", - "OfxImageEffectPropOpenCLSupported", - "OfxImageEffectPropOpenGLEnabled", - "OfxImageEffectPropOpenGLTextureIndex", - "OfxImageEffectPropOpenGLTextureTarget", - "OfxImageEffectPropRenderQualityDraft", - "OfxImageEffectPropSequentialRenderStatus", - "OfxPropTime" } }, -{ { "OfxInteractActionDraw", "inArgs" }, { "OfxImageEffectPropRenderScale", - "OfxInteractPropBackgroundColour", - "OfxInteractPropDrawContext", - "OfxInteractPropPixelScale", - "OfxPropEffectInstance", - "OfxPropTime" } }, -{ { "OfxInteractActionGainFocus", "inArgs" }, { "OfxImageEffectPropRenderScale", - "OfxInteractPropBackgroundColour", - "OfxInteractPropPixelScale", - "OfxPropEffectInstance", - "OfxPropTime" } }, -{ { "OfxInteractActionKeyDown", "inArgs" }, { "OfxImageEffectPropRenderScale", - "OfxPropEffectInstance", - "OfxPropTime", - "kOfxPropKeyString", - "kOfxPropKeySym" } }, -{ { "OfxInteractActionKeyRepeat", "inArgs" }, { "OfxImageEffectPropRenderScale", - "OfxPropEffectInstance", - "OfxPropTime", - "kOfxPropKeyString", - "kOfxPropKeySym" } }, -{ { "OfxInteractActionKeyUp", "inArgs" }, { "OfxImageEffectPropRenderScale", - "OfxPropEffectInstance", - "OfxPropTime", - "kOfxPropKeyString", - "kOfxPropKeySym" } }, -{ { "OfxInteractActionLoseFocus", "inArgs" }, { "OfxImageEffectPropRenderScale", - "OfxInteractPropBackgroundColour", - "OfxInteractPropPixelScale", - "OfxPropEffectInstance", - "OfxPropTime" } }, -{ { "OfxInteractActionPenDown", "inArgs" }, { "OfxImageEffectPropRenderScale", - "OfxInteractPropBackgroundColour", - "OfxInteractPropPenPosition", - "OfxInteractPropPenPressure", - "OfxInteractPropPenViewportPosition", - "OfxInteractPropPixelScale", - "OfxPropEffectInstance", - "OfxPropTime" } }, -{ { "OfxInteractActionPenMotion", "inArgs" }, { "OfxImageEffectPropRenderScale", - "OfxInteractPropBackgroundColour", - "OfxInteractPropPenPosition", - "OfxInteractPropPenPressure", - "OfxInteractPropPenViewportPosition", - "OfxInteractPropPixelScale", - "OfxPropEffectInstance", - "OfxPropTime" } }, -{ { "OfxInteractActionPenUp", "inArgs" }, { "OfxImageEffectPropRenderScale", - "OfxInteractPropBackgroundColour", - "OfxInteractPropPenPosition", - "OfxInteractPropPenPressure", - "OfxInteractPropPenViewportPosition", - "OfxInteractPropPixelScale", - "OfxPropEffectInstance", - "OfxPropTime" } }, -}; - -// Static asserts for standard action names -static_assert(std::string_view("OfxActionBeginInstanceChanged") == std::string_view(kOfxActionBeginInstanceChanged)); -static_assert(std::string_view("OfxActionBeginInstanceEdit") == std::string_view(kOfxActionBeginInstanceEdit)); -static_assert(std::string_view("OfxActionCreateInstance") == std::string_view(kOfxActionCreateInstance)); -static_assert(std::string_view("OfxActionDescribe") == std::string_view(kOfxActionDescribe)); -static_assert(std::string_view("OfxActionDestroyInstance") == std::string_view(kOfxActionDestroyInstance)); -static_assert(std::string_view("OfxActionEndInstanceChanged") == std::string_view(kOfxActionEndInstanceChanged)); -static_assert(std::string_view("OfxActionEndInstanceEdit") == std::string_view(kOfxActionEndInstanceEdit)); -static_assert(std::string_view("OfxActionInstanceChanged") == std::string_view(kOfxActionInstanceChanged)); -static_assert(std::string_view("OfxActionLoad") == std::string_view(kOfxActionLoad)); -static_assert(std::string_view("OfxActionPurgeCaches") == std::string_view(kOfxActionPurgeCaches)); -static_assert(std::string_view("OfxActionSyncPrivateData") == std::string_view(kOfxActionSyncPrivateData)); -static_assert(std::string_view("OfxActionUnload") == std::string_view(kOfxActionUnload)); -static_assert(std::string_view("OfxImageEffectActionBeginSequenceRender") == std::string_view(kOfxImageEffectActionBeginSequenceRender)); -static_assert(std::string_view("OfxImageEffectActionDescribeInContext") == std::string_view(kOfxImageEffectActionDescribeInContext)); -static_assert(std::string_view("OfxImageEffectActionEndSequenceRender") == std::string_view(kOfxImageEffectActionEndSequenceRender)); -static_assert(std::string_view("OfxImageEffectActionGetClipPreferences") == std::string_view(kOfxImageEffectActionGetClipPreferences)); -static_assert(std::string_view("OfxImageEffectActionGetFramesNeeded") == std::string_view(kOfxImageEffectActionGetFramesNeeded)); -static_assert(std::string_view("OfxImageEffectActionGetOutputColourspace") == std::string_view(kOfxImageEffectActionGetOutputColourspace)); -static_assert(std::string_view("OfxImageEffectActionGetRegionOfDefinition") == std::string_view(kOfxImageEffectActionGetRegionOfDefinition)); -static_assert(std::string_view("OfxImageEffectActionGetRegionsOfInterest") == std::string_view(kOfxImageEffectActionGetRegionsOfInterest)); -static_assert(std::string_view("OfxImageEffectActionGetTimeDomain") == std::string_view(kOfxImageEffectActionGetTimeDomain)); -static_assert(std::string_view("OfxImageEffectActionIsIdentity") == std::string_view(kOfxImageEffectActionIsIdentity)); -static_assert(std::string_view("OfxImageEffectActionRender") == std::string_view(kOfxImageEffectActionRender)); -static_assert(std::string_view("OfxInteractActionDraw") == std::string_view(kOfxInteractActionDraw)); -static_assert(std::string_view("OfxInteractActionGainFocus") == std::string_view(kOfxInteractActionGainFocus)); -static_assert(std::string_view("OfxInteractActionKeyDown") == std::string_view(kOfxInteractActionKeyDown)); -static_assert(std::string_view("OfxInteractActionKeyRepeat") == std::string_view(kOfxInteractActionKeyRepeat)); -static_assert(std::string_view("OfxInteractActionKeyUp") == std::string_view(kOfxInteractActionKeyUp)); -static_assert(std::string_view("OfxInteractActionLoseFocus") == std::string_view(kOfxInteractActionLoseFocus)); -static_assert(std::string_view("OfxInteractActionPenDown") == std::string_view(kOfxInteractActionPenDown)); -static_assert(std::string_view("OfxInteractActionPenMotion") == std::string_view(kOfxInteractActionPenMotion)); -static_assert(std::string_view("OfxInteractActionPenUp") == std::string_view(kOfxInteractActionPenUp)); -} // namespace OpenFX diff --git a/conanfile.py b/conanfile.py index a721d315..56a33ed5 100644 --- a/conanfile.py +++ b/conanfile.py @@ -3,15 +3,17 @@ from conan.tools.files import copy, collect_libs import os.path -required_conan_version = ">=1.59.0" +required_conan_version = ">=2.12.0" class openfx(ConanFile): name = "openfx" - version = "1.4.0" + version = "1.5.0" license = "BSD-3-Clause" url = "https://github.com/AcademySoftwareFoundation/openfx" description = "OpenFX image processing plug-in standard" - + homepage = "https://openeffects.org/" + topics = ["graphics", "vfx", "image-processing", "plugins"] + exports_sources = ( "cmake/*", "Examples/*", @@ -84,7 +86,7 @@ def package_info(self): self.cpp_info.components["HostSupport"].requires = ["expat::expat"] self.cpp_info.components["Support"].libs = [i for i in libs if "OfxSupport" in i] self.cpp_info.components["Support"].includedirs = ["Support/include"] - self.cpp_info.components["Support"].requires = ["opengl::opengl"] + self.cpp_info.components["Support"].requires = ["opengl::opengl", "cimg::cimg", "spdlog::spdlog"] if self.settings.os == "Windows": win_defines = ["WINDOWS", "NOMINMAX"] diff --git a/include/ofx-props.yml b/include/ofx-props.yml index 5dcb344b..1f2336e9 100644 --- a/include/ofx-props.yml +++ b/include/ofx-props.yml @@ -438,7 +438,6 @@ Actions: - OfxImageEffectPropOpenGLEnabled - OfxImageEffectPropOpenGLTextureIndex - OfxImageEffectPropOpenGLTextureTarget - - OfxImageEffectPropInteractiveRenderStatus OfxImageEffectActionBeginSequenceRender: inArgs: - OfxImageEffectPropFrameRange diff --git a/openfx-cpp/include/openfx/README-logging.md b/openfx-cpp/include/openfx/README-logging.md new file mode 100644 index 00000000..ff73c842 --- /dev/null +++ b/openfx-cpp/include/openfx/README-logging.md @@ -0,0 +1,132 @@ +# OFX API Wrapper Logging System + + +## Overview + +The OFX API Wrapper provides a lightweight, thread-safe customizable logging system. It supports very simple `fmt`-style formatting. + +## Basic Usage + +```cpp +#include "ofxLog.h" + +// Log simple messages +openfx::Logger::info("Application started"); +openfx::Logger::warn("Resource usage is high"); +openfx::Logger::error("Operation failed"); + +// Log with formatting (similar to std::format) +openfx::Logger::info("Processing resource: {}", resource_id); +openfx::Logger::warn("Memory usage: {}MB", memory_usage); +openfx::Logger::error("Failed to process item {} in category {}", item_id, category); +``` + +## Log Levels + +The logging system supports three log levels: + +- **Info**: General information messages +- **Warning**: Warning messages that don't prevent operation +- **Error**: Error messages indicating failures + +## Custom Log Handlers + +You can customize where and how log messages are processed by providing your own log handler: + +```cpp +// Create a custom log handler that writes to a file +std::shared_ptr logfile = + std::make_shared("application.log", std::ios::app); + +openfx::Logger::setLogHandler( + [logfile](openfx::Logger::Level level, + std::chrono::system_clock::time_point timestamp, + const std::string& message) { + // Convert timestamp to local time + std::time_t time = std::chrono::system_clock::to_time_t(timestamp); + std::tm local_tm = *std::localtime(&time); + + // Level to string + const char* levelStr = ""; + switch (level) { + case openfx::Logger::Level::Info: levelStr = "INFO"; break; + case openfx::Logger::Level::Warning: levelStr = "WARN"; break; + case openfx::Logger::Level::Error: levelStr = "ERROR"; break; + } + + // Write to file + *logfile << "[" + << std::put_time(&local_tm, "%Y-%m-%d %H:%M:%S") + << "][" + << levelStr + << "] " + << message + << std::endl; + } +); +``` + +## String Formatting + +The logging system includes a simple string formatting utility that uses `{}` placeholders, similar to `std::format`: + +```cpp +// Single placeholder +openfx::Logger::info("Processing file: {}", filename); + +// Multiple placeholders +openfx::Logger::info("Transfer completed: {} bytes in {} seconds", bytes, seconds); + +// You can also use the formatter directly +std::string msg = openfx::format("User {} logged in from {}", username, ip_address); +``` + +## Default Log Format + +The default log handler formats messages as: + +``` +[YYYY-MM-DD HH:MM:SS][LEVEL] Message +``` + +For example: +``` +[2025-02-28 14:30:45][INFO] Application started +[2025-02-28 14:30:46][WARN] Memory usage above threshold: 85% +[2025-02-28 14:30:47][ERROR] Failed to connect to database +``` + +## Thread Safety + +The logging system is thread-safe and can be used from multiple threads simultaneously. A mutex protects the log handler to ensure that log messages are not interleaved. + +## Performance Considerations + +- The logging system is designed to be lightweight, but frequent logging can impact performance +- When using custom log handlers, consider implementing buffering for high-volume logging +- String formatting occurs even if the log message is filtered out, so consider adding level checks for verbose logging: + +```cpp +if (is_debug_mode) { + openfx::Logger::info("Detailed debug info: {}", expensive_to_compute_string()); +} +``` + +## Integration with Error Handling + +The logging system is designed to work well with the OFX API Wrapper's exception system: + +```cpp +try { + // Some operation +} catch (const openfx::ApiException& e) { + openfx::Logger::error("API error occurred: {} (code: {})", e.what(), e.code()); + // Handle the exception +} +``` + +------------- +Copyright OpenFX and contributors to the OpenFX project. + +`SPDX-License-Identifier: BSD-3-Clause` + diff --git a/openfx-cpp/include/openfx/README.md b/openfx-cpp/include/openfx/README.md new file mode 100644 index 00000000..80261773 --- /dev/null +++ b/openfx-cpp/include/openfx/README.md @@ -0,0 +1,3 @@ +# OpenFX C++ Bindings + +This is an early attempt at modern C++17 bindings for OpenFX. diff --git a/openfx-cpp/include/openfx/ofxExceptions.h b/openfx-cpp/include/openfx/ofxExceptions.h new file mode 100644 index 00000000..b2b0a077 --- /dev/null +++ b/openfx-cpp/include/openfx/ofxExceptions.h @@ -0,0 +1,69 @@ +// Copyright OpenFX and contributors to the OpenFX project. +// SPDX-License-Identifier: BSD-3-Clause + +#pragma once + +#include +#include "ofxStatusStrings.h" + +#include +#include +#include + +namespace openfx { + +/** + * @brief Base exception class for the OpenFX API wrapper + */ +class OfxException : public std::runtime_error { + public: + /** + * @brief Construct a new API exception + * @param code Error code from the C API + * @param message Error message + */ + OfxException(OfxStatus status, const std::string &msg) + : std::runtime_error(createMessage(msg, status)), error_code_(status) {} + + /** + * @brief Get the error code + * @return The error code from the C API + */ + int code() const noexcept { return error_code_; } + + private: + OfxStatus error_code_; + static std::string createMessage(const std::string &msg, OfxStatus status) { + std::ostringstream oss; + oss << "OpenFX error: " << msg << ": " << ofxStatusToString(status) << "\n"; + return oss.str(); + } +}; + +/** + * @brief Exception thrown when a required property isn't found + */ +class PropertyNotFoundException : public OfxException { + public: + explicit PropertyNotFoundException(int code, const std::string &msg = "") + : OfxException(code, msg) {} +}; + +/** + * @brief Exception thrown when an clip isn't found + */ +class ClipNotFoundException : public OfxException { + public: + explicit ClipNotFoundException(int code, const std::string &msg = "") : OfxException(code, msg) {} +}; + +/** + * @brief Exception thrown when an image isn't found + */ +class ImageNotFoundException : public OfxException { + public: + explicit ImageNotFoundException(int code, const std::string &msg = "") + : OfxException(code, msg) {} +}; + +} // namespace openfx diff --git a/openfx-cpp/include/openfx/ofxImage.h b/openfx-cpp/include/openfx/ofxImage.h new file mode 100644 index 00000000..69cc3457 --- /dev/null +++ b/openfx-cpp/include/openfx/ofxImage.h @@ -0,0 +1,88 @@ +// Copyright OpenFX and contributors to the OpenFX project. +// SPDX-License-Identifier: BSD-3-Clause + +#pragma once + +#include +#include +#include + +#include // For std::unique_ptr + +#include "ofxExceptions.h" + +namespace openfx { + +class Image { + private: + // The image property set handle + const OfxImageEffectSuiteV1* mEffectSuite; + OfxPropertySetHandle mImg{}; + std::unique_ptr mImgProps; // Use a pointer to defer construction + + public: + // Constructor acquires the resource + Image(const OfxImageEffectSuiteV1* effect_suite, const OfxPropertySuiteV1* prop_suite, + OfxImageClipHandle clip, OfxTime time, OfxRectD* rect = nullptr) + : mEffectSuite(effect_suite), mImgProps(nullptr) { + if (clip != nullptr) { + OfxStatus status = mEffectSuite->clipGetImage(clip, time, rect, &mImg); + if (status != kOfxStatOK) + throw ImageNotFoundException(status); + if (mImg) { + mImgProps = std::make_unique(mImg, prop_suite); + } + } + } + + // Default constructor: empty image + Image() : mEffectSuite(nullptr), mImgProps(nullptr) {} + + // Destructor releases the resource + ~Image() { + if (mImg) { + mEffectSuite->clipReleaseImage(mImg); + mImg = nullptr; + } + } + + // Disable copying + Image(const Image&) = delete; + Image& operator=(const Image&) = delete; + + // Enable moving + Image(Image&& other) noexcept + : mEffectSuite(other.mEffectSuite), mImg(other.mImg), mImgProps(std::move(other.mImgProps)) { + other.mImg = nullptr; + } + + Image& operator=(Image&& other) noexcept { + if (this != &other) { + // Release any existing resource + if (mImg) { + mEffectSuite->clipReleaseImage(mImg); + } + + // Acquire the other's resource + mEffectSuite = other.mEffectSuite; + mImg = other.mImg; + mImgProps = std::move(other.mImgProps); + other.mImg = nullptr; + } + return *this; + } + + // Accessor to get the underlying handle + OfxPropertySetHandle get() const { return mImg; } + + // Accessor for PropertyAccessor + PropertyAccessor* props() { return mImgProps.get(); } + const PropertyAccessor* props() const { return mImgProps.get(); } + + // Implicit conversion to the handle type + explicit operator OfxPropertySetHandle() const { return mImg; } + + bool empty() const { return mImg == nullptr; } +}; + +} // namespace openfx diff --git a/openfx-cpp/include/openfx/ofxLog.h b/openfx-cpp/include/openfx/ofxLog.h new file mode 100644 index 00000000..b285d3e2 --- /dev/null +++ b/openfx-cpp/include/openfx/ofxLog.h @@ -0,0 +1,252 @@ +// Copyright OpenFX and contributors to the OpenFX project. +// SPDX-License-Identifier: BSD-3-Clause + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace openfx { + +// String formatter: forward decls +template +std::string format(const std::string& fmt, Args&&... args); + +inline void format_impl(std::ostringstream& oss, const char* fmt); + +template +void format_impl(std::ostringstream& oss, const char* fmt, T&& value, Args&&... args); + +/** + * @brief Simple, customizable logging facility for the OpenFX API wrapper + */ +class Logger { + public: + /** + * @brief Log levels + */ + enum class Level { + Info, ///< Informational messages + Warning, ///< Warning messages + Error ///< Error messages + }; + + /** + * @brief Log handler function type + * + * @param level The log level + * @param timestamp Timestamp when log was created + * @param message The log message + */ + using LogHandler = std::function; + + /** + * @brief Set a custom log handler + * + * @param handler The log handler function + */ + static void setLogHandler(LogHandler handler); + + /** + * @brief Log an informational message + * + * @param message The message to log + */ + static void info(const std::string& message); + + /** + * @brief Log an informational message with formatting + * + * @param format Format string with {} placeholders + * @param args Arguments to format + */ + template + static void info(const std::string& format, Args&&... args) { + log(Level::Info, format_message(format, std::forward(args)...)); + } + + /** + * @brief Log a warning message + * + * @param message The message to log + */ + static void warn(const std::string& message); + + /** + * @brief Log a warning message with formatting + * + * @param format Format string with {} placeholders + * @param args Arguments to format + */ + template + static void warn(const std::string& format, Args&&... args) { + log(Level::Warning, format_message(format, std::forward(args)...)); + } + + /** + * @brief Log an error message + * + * @param message The message to log + */ + static void error(const std::string& message); + + /** + * @brief Log an error message with formatting + * + * @param format Format string with {} placeholders + * @param args Arguments to format + */ + template + static void error(const std::string& format, Args&&... args) { + log(Level::Error, format_message(format, std::forward(args)...)); + } + + private: + /** + * @brief Log a message with the specified level + * + * @param level The log level + * @param message The message to log + */ + static void log(Level level, const std::string& message); + + /** + * @brief Default log handler implementation + * + * @param level The log level + * @param timestamp Timestamp when log was created + * @param message The message to log + */ + static void defaultLogHandler(Level level, std::chrono::system_clock::time_point timestamp, + const std::string& message); + + /** + * @brief Format a message using the simple formatter + * + * @param format Format string with {} placeholders + * @param args Arguments to format + * @return Formatted string + */ + template + static std::string format_message(const std::string& format, Args&&... args) { + if constexpr (sizeof...(args) == 0) { + return format; + } else { + return ::openfx::format(format, std::forward(args)...); + } + } + + // Static member variables (inline in C++17) + static inline LogHandler g_logHandler = defaultLogHandler; + static inline std::mutex g_logMutex; +}; + +// Inline implementations for non-template methods + +inline void Logger::setLogHandler(LogHandler handler) { + if (handler) { + std::lock_guard lock(g_logMutex); + g_logHandler = std::move(handler); + } else { + std::lock_guard lock(g_logMutex); + g_logHandler = defaultLogHandler; + } +} + +inline void Logger::info(const std::string& message) { log(Level::Info, message); } + +inline void Logger::warn(const std::string& message) { log(Level::Warning, message); } + +inline void Logger::error(const std::string& message) { log(Level::Error, message); } + +inline void Logger::log(Level level, const std::string& message) { + auto timestamp = std::chrono::system_clock::now(); + + std::lock_guard lock(g_logMutex); + g_logHandler(level, timestamp, message); +} + +inline void Logger::defaultLogHandler(Level level, std::chrono::system_clock::time_point timestamp, + const std::string& message) { + // Convert timestamp to local time + std::time_t time = std::chrono::system_clock::to_time_t(timestamp); + std::tm local_tm = *std::localtime(&time); + + // Stream to write log message + std::ostream& os = (level == Level::Error) ? std::cerr : std::cout; + + // Level prefix + const char* levelStr = ""; + switch (level) { + case Level::Info: + levelStr = "INFO"; + break; + case Level::Warning: + levelStr = "WARN"; + break; + case Level::Error: + levelStr = "ERROR"; + break; + } + + // Write formatted log message + os << "[" << std::put_time(&local_tm, "%Y-%m-%d %H:%M:%S") << "][" << levelStr << "] " << message + << std::endl; +} + +/** + * @brief String formatter with {} placeholders (similar to std::format) + * + * @param fmt Format string with {} placeholders + * @param args Arguments to format + * @return Formatted string + */ +template +std::string format(const std::string& fmt, Args&&... args) { + std::ostringstream oss; + format_impl(oss, fmt.c_str(), std::forward(args)...); + return oss.str(); +} + +/** + * @brief Implementation detail for the string formatter + * + * @param oss Output string stream + * @param fmt Format string + */ +inline void format_impl(std::ostringstream& oss, const char* fmt) { oss << fmt; } + +/** + * @brief Implementation detail for the string formatter + * + * @param oss Output string stream + * @param fmt Format string + * @param value Value to format + * @param args Remaining arguments + */ +template +void format_impl(std::ostringstream& oss, const char* fmt, T&& value, Args&&... args) { + const char* pos = std::strchr(fmt, '{'); + + // Check if we have a valid placeholder with closing } + if (pos && pos[1] == '}') { + // Write everything up to the placeholder + oss.write(fmt, pos - fmt); + // Write the value + oss << value; + // Continue with the rest of the format string + format_impl(oss, pos + 2, std::forward(args)...); + } else { + // No valid placeholder, just write the rest of the format string + oss << fmt; + } +} + +} // namespace openfx diff --git a/openfx-cpp/include/openfx/ofxMisc.h b/openfx-cpp/include/openfx/ofxMisc.h new file mode 100644 index 00000000..f11da9a6 --- /dev/null +++ b/openfx-cpp/include/openfx/ofxMisc.h @@ -0,0 +1,44 @@ +// Copyright OpenFX and contributors to the OpenFX project. +// SPDX-License-Identifier: BSD-3-Clause + +#pragma once + +#include +#include + +namespace openfx { + +// Generic conversion function for any container to OfxRectI +// Works with std::array, std::vector, C-style arrays, and any container supporting operator[] +template +OfxRectI toOfxRectI(const Container& container) { + // Check container size at runtime for dynamic containers + if (container.size() < 4) { + throw OfxException(kOfxStatErrValue, + "Container has fewer than 4 elements required for OfxRectI"); + } + + OfxRectI rect; + rect.x1 = container[0]; + rect.y1 = container[1]; + rect.x2 = container[2]; + rect.y2 = container[3]; + + return rect; +} + +// Specialization for fixed-size arrays where we can use static_assert +template +OfxRectI toOfxRectI(const std::array& arr) { + static_assert(N >= 4, "Array must have at least 4 elements to convert to OfxRectI"); + + OfxRectI rect; + rect.x1 = arr[0]; + rect.y1 = arr[1]; + rect.x2 = arr[2]; + rect.y2 = arr[3]; + + return rect; +} + +} // namespace openfx diff --git a/openfx-cpp/include/openfx/ofxPropsAccess.h b/openfx-cpp/include/openfx/ofxPropsAccess.h new file mode 100644 index 00000000..9fafc5e4 --- /dev/null +++ b/openfx-cpp/include/openfx/ofxPropsAccess.h @@ -0,0 +1,676 @@ +// Copyright OpenFX and contributors to the OpenFX project. +// SPDX-License-Identifier: BSD-3-Clause + +#pragma once + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "ofxCore.h" +#include "ofxExceptions.h" +#include "ofxLog.h" +#include "ofxPropsMetadata.h" + +/** + * OpenFX Property Accessor System - Usage Examples + +// Basic property access with type safety +void basicPropertyAccess(OfxPropertySetHandle handle, OfxPropertySuiteV1* +propHost) { + // Create a property accessor + openfx::PropertyAccessor props(handle, propHost); + + // Get a string property - type is deduced from PropTraits + const char* colorspace = props.get(); + + // Get a boolean property - returned as int (0 or 1) + int isConnected = props.get(); + + // Set a property value (type checked at compile time) + props.set(1); + + // Set all of a property's values (type checked at compile time) + // Supports any container with size() and operator[], or initializer-list + props.setAll({1, 0, 0}); + + // Get and set properties by index (for multi-dimensional properties) + const char* fieldMode = props.get(0); + props.set("OfxImageFieldLower", 0); + + // Chaining set operations + props.set(valueA) + .set(valueB) + .set(valueC); + + // Get dimension of a property + int dimension = props.getDimension(); +} + +// Working with multi-type properties +void multiTypePropertyAccess(OfxPropertySetHandle handle, OfxPropertySuiteV1* +propHost) { openfx::PropertyAccessor props(handle, propHost); + + // For multi-type properties, explicitly specify the type + double maxValueDouble = props.get(); + + // You can also get the same property as a different type + int maxValueInt = props.get(); + + // Setting values with explicit types + props.set(10.5); + props.set(10); + + // Attempting to use an incompatible type would cause a compile error: + // const char* str = props.get(); +// Error! +} + + +// Using the "escape hatch" for dynamic property access +void dynamicPropertyAccess(OfxPropertySetHandle handle, OfxPropertySuiteV1* +propHost) { openfx::PropertyAccessor props(handle, propHost); + + // Get and set properties by name without compile-time checking + const char* pluginDefined = props.getRaw("PluginDefinedProperty"); props.setRaw("DynamicIntProperty", 42); + + // Get dimension of a dynamic property + int dim = props.getDimensionRaw("DynamicArrayProperty"); + + // When property names come from external sources + const char* propName = getPropertyNameFromPlugin(); + double value = props.getRaw(propName); +} + +// Working with enum properties +void enumPropertyHandling(OfxPropertySetHandle handle, OfxPropertySuiteV1* +propHost) { openfx::PropertyAccessor props(handle, propHost); + + // Get an enum property value + const char* fieldExtraction = +props.get(); + + // Set an enum property using a valid value + props.set("OfxImageFieldLower"); + + // Access enum values directly using the EnumValue helper + const char* noneField = +openfx::EnumValue::get(0); const char* +lowerField = openfx::EnumValue::get(1); + + // Check if a value is valid for an enum + bool isValid = +openfx::EnumValue::isValid("OfxImageFieldUpper"); + + // Get total number of enum values + size_t enumCount = +openfx::EnumValue::size(); +} + +// End of examples +*/ + +namespace openfx { + +#define OFXCHECK_THROW(expr, msg) \ + do { \ + auto &&_status = (expr); \ + if (_status != kOfxStatOK) { \ + openfx::Logger::error("{} in {}:{}: {}", ofxStatusToString(_status), __FILE__, __LINE__, \ + msg); \ + throw openfx::PropertyNotFoundException(_status); \ + } \ + } while (0) + +#define OFXCHECK_WARN(expr, msg) \ + do { \ + auto &&_status = (expr); \ + if (_status != kOfxStatOK) { \ + openfx::Logger::warn("{} in {}:{}: {}", ofxStatusToString(_status), __FILE__, __LINE__, \ + msg); \ + } \ + } while (0) + +#define OFXCHECK(expr, msg, error_if_fail) \ + do { \ + if (error_if_fail) { \ + OFXCHECK_THROW(expr, msg); \ + } else { \ + OFXCHECK_WARN(expr, msg); \ + } \ + } while (0) + +// Type-mapping helper to infer C++ type from PropType +template +struct PropTypeToNative { + using type = void; // Default case, should never be used directly +}; + +// Specializations for each property type +template <> +struct PropTypeToNative { + using type = int; +}; +template <> +struct PropTypeToNative { + using type = double; +}; +template <> +struct PropTypeToNative { + using type = const char *; +}; +template <> +struct PropTypeToNative { + using type = int; +}; +template <> +struct PropTypeToNative { + using type = const char *; +}; +template <> +struct PropTypeToNative { + using type = void *; +}; + +// Helper to check if a type is compatible with a PropType +template +struct IsTypeCompatible { + static constexpr bool value = false; +}; + +template <> +struct IsTypeCompatible { + static constexpr bool value = true; +}; +template <> +struct IsTypeCompatible { + static constexpr bool value = true; +}; +template <> +struct IsTypeCompatible { + static constexpr bool value = true; +}; +template <> +struct IsTypeCompatible { + static constexpr bool value = true; +}; +template <> +struct IsTypeCompatible { + static constexpr bool value = true; +}; +template <> +struct IsTypeCompatible { + static constexpr bool value = true; +}; +template <> +struct IsTypeCompatible { + static constexpr bool value = true; +}; + +// Helper to create property enum values with strong typing +template +struct EnumValue { + static constexpr const char *get(size_t index) { + static_assert(index < properties::PropTraits::def.enumValuesCount, + "Property enum index out of range"); + return properties::PropTraits::enumValues[index]; + } + + static constexpr size_t size() { return properties::PropTraits::enumValues.size(); } + + static constexpr bool isValid(const char *value) { + for (int i = 0; i < properties::PropTraits::def.enumValuesCount; i++) { + auto val = properties::PropTraits::def.enumValues[i]; + if (std::strcmp(val, value) == 0) + return true; + } + return false; + } +}; + +// Type-safe property accessor for any props of a given prop set +class PropertyAccessor { + public: + explicit PropertyAccessor(OfxPropertySetHandle propset, const OfxPropertySuiteV1 *propSuite) + : propset_(propset), propSuite_(propSuite) {} + + // Get property value using PropId (compile-time type checking) + template ::is_multitype>> + typename properties::PropTraits::type get(int index = 0, bool error_if_missing = true) const { + using Traits = properties::PropTraits; + + static_assert(!Traits::is_multitype, + "This property supports multiple types. Use get() instead."); + + using T = typename Traits::type; + + assert(propset_ != nullptr); + if constexpr (std::is_same_v || std::is_same_v) { + int value = 0; + OFXCHECK(propSuite_->propGetInt(propset_, Traits::def.name, index, &value), Traits::def.name, + error_if_missing); + return value; + } else if constexpr (std::is_same_v || std::is_same_v) { + double value = 0; + OFXCHECK(propSuite_->propGetDouble(propset_, Traits::def.name, index, &value), + Traits::def.name, error_if_missing); + return value; + } else if constexpr (std::is_same_v) { + char *value = nullptr; + OFXCHECK(propSuite_->propGetString(propset_, Traits::def.name, index, &value), + Traits::def.name, error_if_missing); + return value; + } else if constexpr (std::is_same_v) { + void *value = nullptr; + OFXCHECK(propSuite_->propGetPointer(propset_, Traits::def.name, index, &value), + Traits::def.name, error_if_missing); + return value; + } else { + static_assert(always_false::value, "Unsupported property value type"); + } + } + + // Get multi-type property value (requires explicit type) + template ::is_multitype>> + T get(int index = 0, bool error_if_missing = true) const { + using Traits = properties::PropTraits; + + // Check if T is compatible with any of the supported PropTypes + constexpr bool isValidType = [&]() { + constexpr auto types = + std::array(Traits::def.supportedTypes, Traits::def.supportedTypesCount); + for (const auto &type : types) { + if constexpr (std::is_same_v || std::is_same_v) { + if (type == PropType::Int || type == PropType::Bool || type == PropType::Enum) + return true; + } else if constexpr (std::is_same_v) { + if (type == PropType::Double) + return true; + } else if constexpr (std::is_same_v) { + if (type == PropType::String || type == PropType::Enum) + return true; + } else if constexpr (std::is_same_v) { + if (type == PropType::Pointer) + return true; + } + } + return false; + }(); + + static_assert(isValidType, "Requested type is not compatible with this property"); + assert(propset_ != nullptr); + + if constexpr (std::is_same_v || std::is_same_v) { + int value = 0; + OFXCHECK(propSuite_->propGetInt(propset_, Traits::def.name, index, &value), Traits::def.name, + error_if_missing); + return value; + } else if constexpr (std::is_same_v) { + double value = NAN; + OFXCHECK(propSuite_->propGetDouble(propset_, Traits::def.name, index, &value), + Traits::def.name, error_if_missing); + return value; + } else if constexpr (std::is_same_v) { + char *value = nullptr; + OFXCHECK(propSuite_->propGetString(propset_, Traits::def.name, index, &value), + Traits::def.name, error_if_missing); + return value; + } else if constexpr (std::is_same_v) { + void *value = nullptr; + OFXCHECK(propSuite_->propGetPointer(propset_, Traits::def.name, index, &value), + Traits::def.name, error_if_missing); + return value; + } else { + static_assert(always_false::value, "Unsupported property value type"); + } + } + + // Set property value using PropId (compile-time type checking) + template + PropertyAccessor &set(typename properties::PropTraits::type value, int index = 0, + bool error_if_missing = true) { + using Traits = properties::PropTraits; + + static_assert(!Traits::is_multitype, + "This property supports multiple types. Use set() instead."); + + if constexpr (Traits::def.supportedTypes[0] == PropType::Enum) { + bool isValidEnumValue = openfx::EnumValue::isValid(value); + assert(isValidEnumValue); + } + assert(propset_ != nullptr); + + using T = typename Traits::type; + + if constexpr (std::is_same_v) { // allow bool -> int + OFXCHECK(propSuite_->propSetInt(propset_, Traits::def.name, index, value), Traits::def.name, + error_if_missing); + } else if constexpr (std::is_same_v) { + OFXCHECK(propSuite_->propSetInt(propset_, Traits::def.name, index, value), Traits::def.name, + error_if_missing); + } else if constexpr (std::is_same_v) { // allow float -> double + OFXCHECK(propSuite_->propSetDouble(propset_, Traits::def.name, index, value), + Traits::def.name, error_if_missing); + } else if constexpr (std::is_same_v) { + OFXCHECK(propSuite_->propSetDouble(propset_, Traits::def.name, index, value), + Traits::def.name, error_if_missing); + } else if constexpr (std::is_same_v) { + OFXCHECK(propSuite_->propSetString(propset_, Traits::def.name, index, value), + openfx::format("{}={}", Traits::def.name, value), error_if_missing); + } else if constexpr (std::is_same_v) { + OFXCHECK(propSuite_->propSetPointer(propset_, Traits::def.name, index, value), + Traits::def.name, error_if_missing); + } else { + static_assert(always_false::value, "Invalid value type when setting property"); + } + return *this; + } + + // Set multi-type property value (requires explicit type) + // Should only be used for multitype props (SFINAE) + template ::is_multitype>> + PropertyAccessor &set(T value, int index = 0, bool error_if_missing = true) { + using Traits = properties::PropTraits; + + // Check if T is compatible with any of the supported PropTypes + constexpr bool isValidType = [&]() { + for (int i = 0; i < Traits::def.supportedTypesCount; i++) { + auto type = Traits::def.supportedTypes[i]; + if constexpr (std::is_same_v || std::is_same_v) { + if (type == PropType::Int || type == PropType::Bool) + return true; + } else if constexpr (std::is_same_v || std::is_same_v) { + if (type == PropType::Double) + return true; + } else if constexpr (std::is_same_v) { + if (type == PropType::String) // no Enums here -- there shouldn't be + // any multi-type enums + return true; + } else if constexpr (std::is_same_v) { + if (type == PropType::Pointer) + return true; + } + } + return false; + }(); + + static_assert(isValidType, "Requested type is not compatible with this property"); + assert(propset_ != nullptr); + + if constexpr (std::is_same_v || std::is_same_v) { + OFXCHECK(propSuite_->propSetInt(propset_, Traits::def.name, index, value), Traits::def.name, + error_if_missing); + } else if constexpr (std::is_same_v || std::is_same_v) { + OFXCHECK(propSuite_->propSetDouble(propset_, Traits::def.name, index, value), + Traits::def.name, error_if_missing); + } else if constexpr (std::is_same_v) { + OFXCHECK(propSuite_->propSetString(propset_, Traits::def.name, index, value), + Traits::def.name, error_if_missing); + } else if constexpr (std::is_same_v) { + OFXCHECK(propSuite_->propSetPointer(propset_, Traits::def.name, index, value), + Traits::def.name, error_if_missing); + } else { + static_assert(always_false::value, "Invalid value type when setting property"); + } + return *this; + } + + // Get all values of a property (for single-type properties) + template + auto getAll(bool error_if_missing = true) const { + static_assert( + !properties::PropTraits::is_multitype, + "This property supports multiple types. Use getAllTyped() instead."); + assert(propset_ != nullptr); + + using ValueType = typename properties::PropTraits::type; + + // If dimension is known at compile time, use std::array for stack allocation + if constexpr (properties::PropTraits::def.dimension > 0) { + constexpr int dim = properties::PropTraits::def.dimension; + std::array values; + + for (int i = 0; i < dim; ++i) { + values[i] = get(i, error_if_missing); + } + + return values; + } else { + // Otherwise use std::vector for dynamic sizing + int dimension = getDimension(); + std::vector values; + values.reserve(dimension); + + for (int i = 0; i < dimension; ++i) { + values.push_back(get(i, error_if_missing)); + } + + return values; + } + } + + // Get all values of a multi-type property - require explicit ElementType + template + auto getAllTyped(bool error_if_missing = true) const { + static_assert(properties::PropTraits::is_multitype, + "This property does not support multiple types. Use getAll() instead."); + assert(propset_ != nullptr); + + // If dimension is known at compile time, use std::array for stack allocation + if constexpr (properties::PropTraits::def.dimension > 0) { + constexpr int dim = properties::PropTraits::def.dimension; + std::array values; + + for (int i = 0; i < dim; ++i) { + values[i] = get(i, error_if_missing); + } + + return values; + } else { + // Otherwise use std::vector for dynamic sizing + int dimension = getDimension(); + std::vector values; + values.reserve(dimension); + + for (int i = 0; i < dimension; ++i) { + values.push_back(get(i, error_if_missing)); + } + + return values; + } + } + + // Set all values of a prop + + // For single-type properties with any container + template // Container must have size() and operator[] + PropertyAccessor &setAll(const Container &values, bool error_if_missing = true) { + static_assert(!properties::PropTraits::is_multitype, + "This property supports multiple types. Use setAll(container) instead."); + assert(propset_ != nullptr); + + for (size_t i = 0; i < values.size(); ++i) { + this->template set(values[i], static_cast(i), error_if_missing); + } + + return *this; + } + + // For single-type properties with initializer lists + template + PropertyAccessor &setAll(std::initializer_list::type> values, + bool error_if_missing = true) { + static_assert(!properties::PropTraits::is_multitype, + "This property supports multiple types. Use " + "setAllTyped() instead."); + assert(propset_ != nullptr); + + int index = 0; + for (const auto &value : values) { + this->template set(value, index++, error_if_missing); + } + + return *this; + } + + // For multi-type properties - require explicit ElementType + template + PropertyAccessor &setAllTyped(const std::initializer_list &values, + bool error_if_missing = true) { + static_assert(properties::PropTraits::is_multitype, + "This property does not support multiple types. Use " + "setAll() instead."); + assert(propset_ != nullptr); + + for (size_t i = 0; i < values.size(); ++i) { + this->template set(values[i], static_cast(i), error_if_missing); + } + + return *this; + } + + // Overload for any container with multi-type properties + template + PropertyAccessor &setAllTyped(const Container &values, bool error_if_missing = true) { + static_assert(properties::PropTraits::is_multitype, + "This property does not support multiple types. Use " + "setAll() instead."); + assert(propset_ != nullptr); + + for (size_t i = 0; i < values.size(); ++i) { + this->template set(values[i], static_cast(i), error_if_missing); + } + + return *this; + } + + // Get dimension of a property + template + int getDimension(bool error_if_missing = true) const { + using Traits = properties::PropTraits; + assert(propset_ != nullptr); + + // If dimension is known at compile time, we can just return it + if constexpr (Traits::dimension > 0) { + return Traits::dimension; + } else { + // Otherwise query at runtime + int dimension = 0; + OFXCHECK(propSuite_->propGetDimension(propset_, Traits::def.name, &dimension), + Traits::def.name, error_if_missing); + return dimension; + } + } + + // "Escape hatch" for unchecked property access - get any property by name + // with explicit type + template + T getRaw(const char *name, int index = 0, bool error_if_missing = true) const { + assert(propset_ != nullptr); + if constexpr (std::is_same_v) { + int value = 0; + OFXCHECK(propSuite_->propGetInt(propset_, name, index, &value), name, error_if_missing); + return value; + } else if constexpr (std::is_same_v) { + double value = NAN; + OFXCHECK(propSuite_->propGetDouble(propset_, name, index, &value), name, error_if_missing); + return value; + } else if constexpr (std::is_same_v) { + char *value = nullptr; + OFXCHECK(propSuite_->propGetString(propset_, name, index, &value), name, error_if_missing); + return value; + } else if constexpr (std::is_same_v) { + void *value = nullptr; + OFXCHECK(propSuite_->propGetPointer(propset_, name, index, &value), name, error_if_missing); + return value; + } else { + static_assert(always_false::value, "Unsupported property type"); + } + } + + // "Escape hatch" for unchecked property access - set any property by name + // with explicit type + template + PropertyAccessor &setRaw(const char *name, T value, int index = 0, bool error_if_missing = true) { + assert(propset_ != nullptr); + if constexpr (std::is_same_v) { + OFXCHECK(propSuite_->propSetInt(propset_, name, index, value), name, error_if_missing); + } else if constexpr (std::is_same_v) { + OFXCHECK(propSuite_->propSetDouble(propset_, name, index, value), name, error_if_missing); + } else if constexpr (std::is_same_v) { + OFXCHECK(propSuite_->propSetString(propset_, name, index, value), name, error_if_missing); + } else if constexpr (std::is_same_v) { + OFXCHECK(propSuite_->propSetPointer(propset_, name, index, value), name, error_if_missing); + } else { + static_assert(always_false::value, "Unsupported property type for setting"); + } + return *this; + } + + // Get raw dimension of a property + int getDimensionRaw(const char *name, bool error_if_missing = true) const { + assert(propset_ != nullptr); + int dimension = 0; + OFXCHECK(propSuite_->propGetDimension(propset_, name, &dimension), name, error_if_missing); + return dimension; + } + + private: + OfxPropertySetHandle propset_; + const OfxPropertySuiteV1 *propSuite_; + + // Helper for static_assert to fail compilation for unsupported types + template + struct always_false : std::false_type {}; +}; + +// Namespace for property access constants and helpers +namespace prop { +// We'll use the existing defined constants like kOfxImageClipPropColourspace + +// Helper to validate property existence at compile time +template +constexpr bool exists() { + return true; // All PropId values are valid by definition +} + +// Helper to check if a property supports a specific C++ type +template +constexpr bool supportsType() { + constexpr auto supportedTypes = properties::PropTraits::def.supportedTypes; + + for (const auto &type : supportedTypes) { + if constexpr (std::is_same_v) { + if (type == PropType::Int || type == PropType::Bool || type == PropType::Enum) + return true; + } else if constexpr (std::is_same_v) { + if (type == PropType::Double) + return true; + } else if constexpr (std::is_same_v) { + if (type == PropType::String || type == PropType::Enum) + return true; + } else if constexpr (std::is_same_v) { + if (type == PropType::Pointer) + return true; + } + } + return false; +} +} // namespace prop + +#undef OFXCHECK +#undef OFXCHECK_THROW +#undef OFXCHECK_WARN + +} // namespace openfx diff --git a/openfx-cpp/include/openfx/ofxPropsBySet.h b/openfx-cpp/include/openfx/ofxPropsBySet.h new file mode 100644 index 00000000..aae684ee --- /dev/null +++ b/openfx-cpp/include/openfx/ofxPropsBySet.h @@ -0,0 +1,876 @@ +// 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 "ofxPropsMetadata.h" +// #include "ofxOld.h" + +namespace openfx { + +struct Prop { + const char *name; + const PropDef &def; + bool host_write; + bool plugin_write; + bool host_optional; + + Prop(const char *n, const PropDef &d, bool hw, bool pw, bool ho) + : name(n), def(d), host_write(hw), plugin_write(pw), host_optional(ho) {} +}; + +// Properties for property sets +static inline const std::map> prop_sets { +// ClipDescriptor +{ "ClipDescriptor", { + { "OfxPropType", prop_defs[PropId::OfxPropType], false, true, false }, + { "OfxPropName", prop_defs[PropId::OfxPropName], false, true, false }, + { "OfxPropLabel", prop_defs[PropId::OfxPropLabel], false, true, false }, + { "OfxPropShortLabel", prop_defs[PropId::OfxPropShortLabel], false, true, false }, + { "OfxPropLongLabel", prop_defs[PropId::OfxPropLongLabel], false, true, false }, + { "OfxImageEffectPropSupportedComponents", prop_defs[PropId::OfxImageEffectPropSupportedComponents], false, true, false }, + { "OfxImageEffectPropTemporalClipAccess", prop_defs[PropId::OfxImageEffectPropTemporalClipAccess], false, true, false }, + { "OfxImageClipPropOptional", prop_defs[PropId::OfxImageClipPropOptional], false, true, false }, + { "OfxImageClipPropFieldExtraction", prop_defs[PropId::OfxImageClipPropFieldExtraction], false, true, false }, + { "OfxImageClipPropIsMask", prop_defs[PropId::OfxImageClipPropIsMask], false, true, false }, + { "OfxImageEffectPropSupportsTiles", prop_defs[PropId::OfxImageEffectPropSupportsTiles], false, true, false } } }, +// ClipInstance +{ "ClipInstance", { + { "OfxPropType", prop_defs[PropId::OfxPropType], true, false, false }, + { "OfxPropName", prop_defs[PropId::OfxPropName], true, false, false }, + { "OfxPropLabel", prop_defs[PropId::OfxPropLabel], true, false, false }, + { "OfxPropShortLabel", prop_defs[PropId::OfxPropShortLabel], true, false, false }, + { "OfxPropLongLabel", prop_defs[PropId::OfxPropLongLabel], true, false, false }, + { "OfxImageEffectPropSupportedComponents", prop_defs[PropId::OfxImageEffectPropSupportedComponents], true, false, false }, + { "OfxImageEffectPropTemporalClipAccess", prop_defs[PropId::OfxImageEffectPropTemporalClipAccess], true, false, false }, + { "OfxImageClipPropColourspace", prop_defs[PropId::OfxImageClipPropColourspace], true, false, false }, + { "OfxImageClipPropPreferredColourspaces", prop_defs[PropId::OfxImageClipPropPreferredColourspaces], true, false, false }, + { "OfxImageClipPropOptional", prop_defs[PropId::OfxImageClipPropOptional], true, false, false }, + { "OfxImageClipPropFieldExtraction", prop_defs[PropId::OfxImageClipPropFieldExtraction], true, false, false }, + { "OfxImageClipPropIsMask", prop_defs[PropId::OfxImageClipPropIsMask], true, false, false }, + { "OfxImageEffectPropSupportsTiles", prop_defs[PropId::OfxImageEffectPropSupportsTiles], true, false, false }, + { "OfxImageEffectPropPixelDepth", prop_defs[PropId::OfxImageEffectPropPixelDepth], true, false, false }, + { "OfxImageEffectPropComponents", prop_defs[PropId::OfxImageEffectPropComponents], true, false, false }, + { "OfxImageClipPropUnmappedPixelDepth", prop_defs[PropId::OfxImageClipPropUnmappedPixelDepth], true, false, false }, + { "OfxImageClipPropUnmappedComponents", prop_defs[PropId::OfxImageClipPropUnmappedComponents], true, false, false }, + { "OfxImageEffectPropPreMultiplication", prop_defs[PropId::OfxImageEffectPropPreMultiplication], true, false, false }, + { "OfxImagePropPixelAspectRatio", prop_defs[PropId::OfxImagePropPixelAspectRatio], true, false, false }, + { "OfxImageEffectPropFrameRate", prop_defs[PropId::OfxImageEffectPropFrameRate], true, false, false }, + { "OfxImageEffectPropFrameRange", prop_defs[PropId::OfxImageEffectPropFrameRange], true, false, false }, + { "OfxImageClipPropFieldOrder", prop_defs[PropId::OfxImageClipPropFieldOrder], true, false, false }, + { "OfxImageClipPropConnected", prop_defs[PropId::OfxImageClipPropConnected], true, false, false }, + { "OfxImageEffectPropUnmappedFrameRange", prop_defs[PropId::OfxImageEffectPropUnmappedFrameRange], true, false, false }, + { "OfxImageEffectPropUnmappedFrameRate", prop_defs[PropId::OfxImageEffectPropUnmappedFrameRate], true, false, false }, + { "OfxImageClipPropContinuousSamples", prop_defs[PropId::OfxImageClipPropContinuousSamples], true, false, false } } }, +// EffectDescriptor +{ "EffectDescriptor", { + { "OfxPropType", prop_defs[PropId::OfxPropType], false, true, false }, + { "OfxPropLabel", prop_defs[PropId::OfxPropLabel], false, true, false }, + { "OfxPropShortLabel", prop_defs[PropId::OfxPropShortLabel], false, true, false }, + { "OfxPropLongLabel", prop_defs[PropId::OfxPropLongLabel], false, true, false }, + { "OfxPropVersion", prop_defs[PropId::OfxPropVersion], false, true, false }, + { "OfxPropVersionLabel", prop_defs[PropId::OfxPropVersionLabel], false, true, false }, + { "OfxPropPluginDescription", prop_defs[PropId::OfxPropPluginDescription], false, true, false }, + { "OfxImageEffectPropSupportedContexts", prop_defs[PropId::OfxImageEffectPropSupportedContexts], false, true, false }, + { "OfxImageEffectPluginPropGrouping", prop_defs[PropId::OfxImageEffectPluginPropGrouping], false, true, false }, + { "OfxImageEffectPluginPropSingleInstance", prop_defs[PropId::OfxImageEffectPluginPropSingleInstance], false, true, false }, + { "OfxImageEffectPluginRenderThreadSafety", prop_defs[PropId::OfxImageEffectPluginRenderThreadSafety], false, true, false }, + { "OfxImageEffectPluginPropHostFrameThreading", prop_defs[PropId::OfxImageEffectPluginPropHostFrameThreading], false, true, false }, + { "OfxImageEffectPluginPropOverlayInteractV1", prop_defs[PropId::OfxImageEffectPluginPropOverlayInteractV1], false, true, false }, + { "OfxImageEffectPropSupportsMultiResolution", prop_defs[PropId::OfxImageEffectPropSupportsMultiResolution], false, true, false }, + { "OfxImageEffectPropSupportsTiles", prop_defs[PropId::OfxImageEffectPropSupportsTiles], false, true, false }, + { "OfxImageEffectPropTemporalClipAccess", prop_defs[PropId::OfxImageEffectPropTemporalClipAccess], false, true, false }, + { "OfxImageEffectPropSupportedPixelDepths", prop_defs[PropId::OfxImageEffectPropSupportedPixelDepths], false, true, false }, + { "OfxImageEffectPluginPropFieldRenderTwiceAlways", prop_defs[PropId::OfxImageEffectPluginPropFieldRenderTwiceAlways], false, true, false }, + { "OfxImageEffectPropMultipleClipDepths", prop_defs[PropId::OfxImageEffectPropMultipleClipDepths], false, true, false }, + { "OfxImageEffectPropSupportsMultipleClipPARs", prop_defs[PropId::OfxImageEffectPropSupportsMultipleClipPARs], false, true, false }, + { "OfxImageEffectPluginRenderThreadSafety", prop_defs[PropId::OfxImageEffectPluginRenderThreadSafety], false, true, false }, + { "OfxImageEffectPropClipPreferencesSlaveParam", prop_defs[PropId::OfxImageEffectPropClipPreferencesSlaveParam], false, true, false }, + { "OfxImageEffectPropOpenGLRenderSupported", prop_defs[PropId::OfxImageEffectPropOpenGLRenderSupported], false, true, false }, + { "OfxPluginPropFilePath", prop_defs[PropId::OfxPluginPropFilePath], true, false, false }, + { "OfxOpenGLPropPixelDepth", prop_defs[PropId::OfxOpenGLPropPixelDepth], false, true, false }, + { "OfxImageEffectPluginPropOverlayInteractV2", prop_defs[PropId::OfxImageEffectPluginPropOverlayInteractV2], false, true, false }, + { "OfxImageEffectPropColourManagementAvailableConfigs", prop_defs[PropId::OfxImageEffectPropColourManagementAvailableConfigs], false, true, false }, + { "OfxImageEffectPropColourManagementStyle", prop_defs[PropId::OfxImageEffectPropColourManagementStyle], false, true, false } } }, +// EffectInstance +{ "EffectInstance", { + { "OfxPropType", prop_defs[PropId::OfxPropType], true, false, false }, + { "OfxImageEffectPropContext", prop_defs[PropId::OfxImageEffectPropContext], true, false, false }, + { "OfxPropInstanceData", prop_defs[PropId::OfxPropInstanceData], true, false, false }, + { "OfxImageEffectPropProjectSize", prop_defs[PropId::OfxImageEffectPropProjectSize], true, false, false }, + { "OfxImageEffectPropProjectOffset", prop_defs[PropId::OfxImageEffectPropProjectOffset], true, false, false }, + { "OfxImageEffectPropProjectExtent", prop_defs[PropId::OfxImageEffectPropProjectExtent], true, false, false }, + { "OfxImageEffectPropPixelAspectRatio", prop_defs[PropId::OfxImageEffectPropPixelAspectRatio], true, false, false }, + { "OfxImageEffectInstancePropEffectDuration", prop_defs[PropId::OfxImageEffectInstancePropEffectDuration], true, false, false }, + { "OfxImageEffectInstancePropSequentialRender", prop_defs[PropId::OfxImageEffectInstancePropSequentialRender], true, false, false }, + { "OfxImageEffectPropSupportsTiles", prop_defs[PropId::OfxImageEffectPropSupportsTiles], true, false, false }, + { "OfxImageEffectPropOpenGLRenderSupported", prop_defs[PropId::OfxImageEffectPropOpenGLRenderSupported], true, false, false }, + { "OfxImageEffectPropFrameRate", prop_defs[PropId::OfxImageEffectPropFrameRate], true, false, false }, + { "OfxPropIsInteractive", prop_defs[PropId::OfxPropIsInteractive], true, false, false }, + { "OfxImageEffectPropOCIOConfig", prop_defs[PropId::OfxImageEffectPropOCIOConfig], true, false, false }, + { "OfxImageEffectPropOCIODisplay", prop_defs[PropId::OfxImageEffectPropOCIODisplay], true, false, false }, + { "OfxImageEffectPropOCIOView", prop_defs[PropId::OfxImageEffectPropOCIOView], true, false, false }, + { "OfxImageEffectPropColourManagementConfig", prop_defs[PropId::OfxImageEffectPropColourManagementConfig], true, false, false }, + { "OfxImageEffectPropColourManagementStyle", prop_defs[PropId::OfxImageEffectPropColourManagementStyle], true, false, false }, + { "OfxImageEffectPropDisplayColourspace", prop_defs[PropId::OfxImageEffectPropDisplayColourspace], true, false, false }, + { "OfxImageEffectPropPluginHandle", prop_defs[PropId::OfxImageEffectPropPluginHandle], true, false, false } } }, +// Image +{ "Image", { + { "OfxPropType", prop_defs[PropId::OfxPropType], true, false, false }, + { "OfxImageEffectPropPixelDepth", prop_defs[PropId::OfxImageEffectPropPixelDepth], true, false, false }, + { "OfxImageEffectPropComponents", prop_defs[PropId::OfxImageEffectPropComponents], true, false, false }, + { "OfxImageEffectPropPreMultiplication", prop_defs[PropId::OfxImageEffectPropPreMultiplication], true, false, false }, + { "OfxImageEffectPropRenderScale", prop_defs[PropId::OfxImageEffectPropRenderScale], true, false, false }, + { "OfxImagePropPixelAspectRatio", prop_defs[PropId::OfxImagePropPixelAspectRatio], true, false, false }, + { "OfxImagePropData", prop_defs[PropId::OfxImagePropData], true, false, false }, + { "OfxImagePropBounds", prop_defs[PropId::OfxImagePropBounds], true, false, false }, + { "OfxImagePropRegionOfDefinition", prop_defs[PropId::OfxImagePropRegionOfDefinition], true, false, false }, + { "OfxImagePropRowBytes", prop_defs[PropId::OfxImagePropRowBytes], true, false, false }, + { "OfxImagePropField", prop_defs[PropId::OfxImagePropField], true, false, false }, + { "OfxImagePropUniqueIdentifier", prop_defs[PropId::OfxImagePropUniqueIdentifier], true, false, false } } }, +// ImageEffectHost +{ "ImageEffectHost", { + { "OfxPropAPIVersion", prop_defs[PropId::OfxPropAPIVersion], true, false, false }, + { "OfxPropType", prop_defs[PropId::OfxPropType], true, false, false }, + { "OfxPropName", prop_defs[PropId::OfxPropName], true, false, false }, + { "OfxPropLabel", prop_defs[PropId::OfxPropLabel], true, false, false }, + { "OfxPropVersion", prop_defs[PropId::OfxPropVersion], true, false, false }, + { "OfxPropVersionLabel", prop_defs[PropId::OfxPropVersionLabel], true, false, false }, + { "OfxImageEffectHostPropIsBackground", prop_defs[PropId::OfxImageEffectHostPropIsBackground], true, false, false }, + { "OfxImageEffectPropSupportsOverlays", prop_defs[PropId::OfxImageEffectPropSupportsOverlays], true, false, false }, + { "OfxImageEffectPropSupportsMultiResolution", prop_defs[PropId::OfxImageEffectPropSupportsMultiResolution], true, false, false }, + { "OfxImageEffectPropSupportsTiles", prop_defs[PropId::OfxImageEffectPropSupportsTiles], true, false, false }, + { "OfxImageEffectPropTemporalClipAccess", prop_defs[PropId::OfxImageEffectPropTemporalClipAccess], true, false, false }, + { "OfxImageEffectPropSupportedComponents", prop_defs[PropId::OfxImageEffectPropSupportedComponents], true, false, false }, + { "OfxImageEffectPropSupportedContexts", prop_defs[PropId::OfxImageEffectPropSupportedContexts], true, false, false }, + { "OfxImageEffectPropMultipleClipDepths", prop_defs[PropId::OfxImageEffectPropMultipleClipDepths], true, false, false }, + { "OfxImageEffectPropSupportsMultipleClipPARs", prop_defs[PropId::OfxImageEffectPropSupportsMultipleClipPARs], true, false, false }, + { "OfxImageEffectPropSetableFrameRate", prop_defs[PropId::OfxImageEffectPropSetableFrameRate], true, false, false }, + { "OfxImageEffectPropSetableFielding", prop_defs[PropId::OfxImageEffectPropSetableFielding], true, false, false }, + { "OfxParamHostPropSupportsCustomInteract", prop_defs[PropId::OfxParamHostPropSupportsCustomInteract], true, false, false }, + { "OfxParamHostPropSupportsStringAnimation", prop_defs[PropId::OfxParamHostPropSupportsStringAnimation], true, false, false }, + { "OfxParamHostPropSupportsChoiceAnimation", prop_defs[PropId::OfxParamHostPropSupportsChoiceAnimation], true, false, false }, + { "OfxParamHostPropSupportsBooleanAnimation", prop_defs[PropId::OfxParamHostPropSupportsBooleanAnimation], true, false, false }, + { "OfxParamHostPropSupportsCustomAnimation", prop_defs[PropId::OfxParamHostPropSupportsCustomAnimation], true, false, false }, + { "OfxParamHostPropSupportsStrChoice", prop_defs[PropId::OfxParamHostPropSupportsStrChoice], true, false, false }, + { "OfxParamHostPropSupportsStrChoiceAnimation", prop_defs[PropId::OfxParamHostPropSupportsStrChoiceAnimation], true, false, false }, + { "OfxParamHostPropMaxParameters", prop_defs[PropId::OfxParamHostPropMaxParameters], true, false, false }, + { "OfxParamHostPropMaxPages", prop_defs[PropId::OfxParamHostPropMaxPages], true, false, false }, + { "OfxParamHostPropPageRowColumnCount", prop_defs[PropId::OfxParamHostPropPageRowColumnCount], true, false, false }, + { "OfxPropHostOSHandle", prop_defs[PropId::OfxPropHostOSHandle], true, false, false }, + { "OfxParamHostPropSupportsParametricAnimation", prop_defs[PropId::OfxParamHostPropSupportsParametricAnimation], true, false, false }, + { "OfxImageEffectInstancePropSequentialRender", prop_defs[PropId::OfxImageEffectInstancePropSequentialRender], true, false, false }, + { "OfxImageEffectPropOpenGLRenderSupported", prop_defs[PropId::OfxImageEffectPropOpenGLRenderSupported], true, false, false }, + { "OfxImageEffectPropRenderQualityDraft", prop_defs[PropId::OfxImageEffectPropRenderQualityDraft], true, false, false }, + { "OfxImageEffectHostPropNativeOrigin", prop_defs[PropId::OfxImageEffectHostPropNativeOrigin], true, false, false }, + { "OfxImageEffectPropColourManagementAvailableConfigs", prop_defs[PropId::OfxImageEffectPropColourManagementAvailableConfigs], true, false, false }, + { "OfxImageEffectPropColourManagementStyle", prop_defs[PropId::OfxImageEffectPropColourManagementStyle], true, false, false } } }, +// InteractDescriptor +{ "InteractDescriptor", { + { "OfxInteractPropHasAlpha", prop_defs[PropId::OfxInteractPropHasAlpha], true, false, false }, + { "OfxInteractPropBitDepth", prop_defs[PropId::OfxInteractPropBitDepth], true, false, false } } }, +// InteractInstance +{ "InteractInstance", { + { "OfxPropEffectInstance", prop_defs[PropId::OfxPropEffectInstance], true, false, false }, + { "OfxPropInstanceData", prop_defs[PropId::OfxPropInstanceData], true, false, false }, + { "OfxInteractPropPixelScale", prop_defs[PropId::OfxInteractPropPixelScale], true, false, false }, + { "OfxInteractPropBackgroundColour", prop_defs[PropId::OfxInteractPropBackgroundColour], true, false, false }, + { "OfxInteractPropHasAlpha", prop_defs[PropId::OfxInteractPropHasAlpha], true, false, false }, + { "OfxInteractPropBitDepth", prop_defs[PropId::OfxInteractPropBitDepth], true, false, false }, + { "OfxInteractPropSlaveToParam", prop_defs[PropId::OfxInteractPropSlaveToParam], true, false, false }, + { "OfxInteractPropSuggestedColour", prop_defs[PropId::OfxInteractPropSuggestedColour], true, false, false } } }, +// ParamDouble1D +{ "ParamDouble1D", { + { "OfxParamPropShowTimeMarker", prop_defs[PropId::OfxParamPropShowTimeMarker], false, true, false }, + { "OfxParamPropDoubleType", prop_defs[PropId::OfxParamPropDoubleType], false, true, false }, + { "OfxPropType", prop_defs[PropId::OfxPropType], false, true, false }, + { "OfxPropName", prop_defs[PropId::OfxPropName], false, true, false }, + { "OfxPropLabel", prop_defs[PropId::OfxPropLabel], false, true, false }, + { "OfxPropShortLabel", prop_defs[PropId::OfxPropShortLabel], false, true, false }, + { "OfxPropLongLabel", prop_defs[PropId::OfxPropLongLabel], false, true, false }, + { "OfxParamPropType", prop_defs[PropId::OfxParamPropType], false, true, false }, + { "OfxParamPropSecret", prop_defs[PropId::OfxParamPropSecret], false, true, false }, + { "OfxParamPropHint", prop_defs[PropId::OfxParamPropHint], false, true, false }, + { "OfxParamPropScriptName", prop_defs[PropId::OfxParamPropScriptName], false, true, false }, + { "OfxParamPropParent", prop_defs[PropId::OfxParamPropParent], false, true, false }, + { "OfxParamPropEnabled", prop_defs[PropId::OfxParamPropEnabled], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[PropId::OfxParamPropDataPtr], false, true, false }, + { "OfxPropIcon", prop_defs[PropId::OfxPropIcon], false, true, false }, + { "OfxParamPropInteractV1", prop_defs[PropId::OfxParamPropInteractV1], false, true, false }, + { "OfxParamPropInteractSize", prop_defs[PropId::OfxParamPropInteractSize], false, true, false }, + { "OfxParamPropInteractSizeAspect", prop_defs[PropId::OfxParamPropInteractSizeAspect], false, true, false }, + { "OfxParamPropInteractMinimumSize", prop_defs[PropId::OfxParamPropInteractMinimumSize], false, true, false }, + { "OfxParamPropInteractPreferedSize", prop_defs[PropId::OfxParamPropInteractPreferedSize], false, true, false }, + { "OfxParamPropHasHostOverlayHandle", prop_defs[PropId::OfxParamPropHasHostOverlayHandle], false, true, false }, + { "kOfxParamPropUseHostOverlayHandle", prop_defs[PropId::OfxParamPropUseHostOverlayHandle], false, true, false }, + { "OfxParamPropDefault", prop_defs[PropId::OfxParamPropDefault], false, true, false }, + { "OfxParamPropAnimates", prop_defs[PropId::OfxParamPropAnimates], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[PropId::OfxParamPropIsAnimating], true, false, false }, + { "OfxParamPropIsAutoKeying", prop_defs[PropId::OfxParamPropIsAutoKeying], true, false, false }, + { "OfxParamPropPersistant", prop_defs[PropId::OfxParamPropPersistant], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[PropId::OfxParamPropEvaluateOnChange], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[PropId::OfxParamPropPluginMayWrite], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[PropId::OfxParamPropCacheInvalidation], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[PropId::OfxParamPropCanUndo], false, true, false }, + { "OfxParamPropMin", prop_defs[PropId::OfxParamPropMin], false, true, false }, + { "OfxParamPropMax", prop_defs[PropId::OfxParamPropMax], false, true, false }, + { "OfxParamPropDisplayMin", prop_defs[PropId::OfxParamPropDisplayMin], false, true, false }, + { "OfxParamPropDisplayMax", prop_defs[PropId::OfxParamPropDisplayMax], false, true, false }, + { "OfxParamPropIncrement", prop_defs[PropId::OfxParamPropIncrement], false, true, false }, + { "OfxParamPropDigits", prop_defs[PropId::OfxParamPropDigits], false, true, false } } }, +// ParameterSet +{ "ParameterSet", { + { "OfxPropParamSetNeedsSyncing", prop_defs[PropId::OfxPropParamSetNeedsSyncing], false, true, false }, + { "OfxPluginPropParamPageOrder", prop_defs[PropId::OfxPluginPropParamPageOrder], false, true, false } } }, +// ParamsByte +{ "ParamsByte", { + { "OfxPropType", prop_defs[PropId::OfxPropType], false, true, false }, + { "OfxPropName", prop_defs[PropId::OfxPropName], false, true, false }, + { "OfxPropLabel", prop_defs[PropId::OfxPropLabel], false, true, false }, + { "OfxPropShortLabel", prop_defs[PropId::OfxPropShortLabel], false, true, false }, + { "OfxPropLongLabel", prop_defs[PropId::OfxPropLongLabel], false, true, false }, + { "OfxParamPropType", prop_defs[PropId::OfxParamPropType], false, true, false }, + { "OfxParamPropSecret", prop_defs[PropId::OfxParamPropSecret], false, true, false }, + { "OfxParamPropHint", prop_defs[PropId::OfxParamPropHint], false, true, false }, + { "OfxParamPropScriptName", prop_defs[PropId::OfxParamPropScriptName], false, true, false }, + { "OfxParamPropParent", prop_defs[PropId::OfxParamPropParent], false, true, false }, + { "OfxParamPropEnabled", prop_defs[PropId::OfxParamPropEnabled], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[PropId::OfxParamPropDataPtr], false, true, false }, + { "OfxPropIcon", prop_defs[PropId::OfxPropIcon], false, true, false }, + { "OfxParamPropInteractV1", prop_defs[PropId::OfxParamPropInteractV1], false, true, false }, + { "OfxParamPropInteractSize", prop_defs[PropId::OfxParamPropInteractSize], false, true, false }, + { "OfxParamPropInteractSizeAspect", prop_defs[PropId::OfxParamPropInteractSizeAspect], false, true, false }, + { "OfxParamPropInteractMinimumSize", prop_defs[PropId::OfxParamPropInteractMinimumSize], false, true, false }, + { "OfxParamPropInteractPreferedSize", prop_defs[PropId::OfxParamPropInteractPreferedSize], false, true, false }, + { "OfxParamPropHasHostOverlayHandle", prop_defs[PropId::OfxParamPropHasHostOverlayHandle], false, true, false }, + { "kOfxParamPropUseHostOverlayHandle", prop_defs[PropId::OfxParamPropUseHostOverlayHandle], false, true, false }, + { "OfxParamPropDefault", prop_defs[PropId::OfxParamPropDefault], false, true, false }, + { "OfxParamPropAnimates", prop_defs[PropId::OfxParamPropAnimates], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[PropId::OfxParamPropIsAnimating], true, false, false }, + { "OfxParamPropIsAutoKeying", prop_defs[PropId::OfxParamPropIsAutoKeying], true, false, false }, + { "OfxParamPropPersistant", prop_defs[PropId::OfxParamPropPersistant], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[PropId::OfxParamPropEvaluateOnChange], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[PropId::OfxParamPropPluginMayWrite], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[PropId::OfxParamPropCacheInvalidation], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[PropId::OfxParamPropCanUndo], false, true, false }, + { "OfxParamPropMin", prop_defs[PropId::OfxParamPropMin], false, true, false }, + { "OfxParamPropMax", prop_defs[PropId::OfxParamPropMax], false, true, false }, + { "OfxParamPropDisplayMin", prop_defs[PropId::OfxParamPropDisplayMin], false, true, false }, + { "OfxParamPropDisplayMax", prop_defs[PropId::OfxParamPropDisplayMax], false, true, false } } }, +// ParamsChoice +{ "ParamsChoice", { + { "OfxParamPropChoiceOption", prop_defs[PropId::OfxParamPropChoiceOption], false, true, false }, + { "OfxParamPropChoiceOrder", prop_defs[PropId::OfxParamPropChoiceOrder], false, true, false }, + { "OfxPropType", prop_defs[PropId::OfxPropType], false, true, false }, + { "OfxPropName", prop_defs[PropId::OfxPropName], false, true, false }, + { "OfxPropLabel", prop_defs[PropId::OfxPropLabel], false, true, false }, + { "OfxPropShortLabel", prop_defs[PropId::OfxPropShortLabel], false, true, false }, + { "OfxPropLongLabel", prop_defs[PropId::OfxPropLongLabel], false, true, false }, + { "OfxParamPropType", prop_defs[PropId::OfxParamPropType], false, true, false }, + { "OfxParamPropSecret", prop_defs[PropId::OfxParamPropSecret], false, true, false }, + { "OfxParamPropHint", prop_defs[PropId::OfxParamPropHint], false, true, false }, + { "OfxParamPropScriptName", prop_defs[PropId::OfxParamPropScriptName], false, true, false }, + { "OfxParamPropParent", prop_defs[PropId::OfxParamPropParent], false, true, false }, + { "OfxParamPropEnabled", prop_defs[PropId::OfxParamPropEnabled], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[PropId::OfxParamPropDataPtr], false, true, false }, + { "OfxPropIcon", prop_defs[PropId::OfxPropIcon], false, true, false }, + { "OfxParamPropInteractV1", prop_defs[PropId::OfxParamPropInteractV1], false, true, false }, + { "OfxParamPropInteractSize", prop_defs[PropId::OfxParamPropInteractSize], false, true, false }, + { "OfxParamPropInteractSizeAspect", prop_defs[PropId::OfxParamPropInteractSizeAspect], false, true, false }, + { "OfxParamPropInteractMinimumSize", prop_defs[PropId::OfxParamPropInteractMinimumSize], false, true, false }, + { "OfxParamPropInteractPreferedSize", prop_defs[PropId::OfxParamPropInteractPreferedSize], false, true, false }, + { "OfxParamPropHasHostOverlayHandle", prop_defs[PropId::OfxParamPropHasHostOverlayHandle], false, true, false }, + { "kOfxParamPropUseHostOverlayHandle", prop_defs[PropId::OfxParamPropUseHostOverlayHandle], false, true, false }, + { "OfxParamPropDefault", prop_defs[PropId::OfxParamPropDefault], false, true, false }, + { "OfxParamPropAnimates", prop_defs[PropId::OfxParamPropAnimates], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[PropId::OfxParamPropIsAnimating], true, false, false }, + { "OfxParamPropIsAutoKeying", prop_defs[PropId::OfxParamPropIsAutoKeying], true, false, false }, + { "OfxParamPropPersistant", prop_defs[PropId::OfxParamPropPersistant], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[PropId::OfxParamPropEvaluateOnChange], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[PropId::OfxParamPropPluginMayWrite], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[PropId::OfxParamPropCacheInvalidation], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[PropId::OfxParamPropCanUndo], false, true, false } } }, +// ParamsCustom +{ "ParamsCustom", { + { "OfxParamPropCustomCallbackV1", prop_defs[PropId::OfxParamPropCustomCallbackV1], false, true, false }, + { "OfxPropType", prop_defs[PropId::OfxPropType], false, true, false }, + { "OfxPropName", prop_defs[PropId::OfxPropName], false, true, false }, + { "OfxPropLabel", prop_defs[PropId::OfxPropLabel], false, true, false }, + { "OfxPropShortLabel", prop_defs[PropId::OfxPropShortLabel], false, true, false }, + { "OfxPropLongLabel", prop_defs[PropId::OfxPropLongLabel], false, true, false }, + { "OfxParamPropType", prop_defs[PropId::OfxParamPropType], false, true, false }, + { "OfxParamPropSecret", prop_defs[PropId::OfxParamPropSecret], false, true, false }, + { "OfxParamPropHint", prop_defs[PropId::OfxParamPropHint], false, true, false }, + { "OfxParamPropScriptName", prop_defs[PropId::OfxParamPropScriptName], false, true, false }, + { "OfxParamPropParent", prop_defs[PropId::OfxParamPropParent], false, true, false }, + { "OfxParamPropEnabled", prop_defs[PropId::OfxParamPropEnabled], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[PropId::OfxParamPropDataPtr], false, true, false }, + { "OfxPropIcon", prop_defs[PropId::OfxPropIcon], false, true, false }, + { "OfxParamPropInteractV1", prop_defs[PropId::OfxParamPropInteractV1], false, true, false }, + { "OfxParamPropInteractSize", prop_defs[PropId::OfxParamPropInteractSize], false, true, false }, + { "OfxParamPropInteractSizeAspect", prop_defs[PropId::OfxParamPropInteractSizeAspect], false, true, false }, + { "OfxParamPropInteractMinimumSize", prop_defs[PropId::OfxParamPropInteractMinimumSize], false, true, false }, + { "OfxParamPropInteractPreferedSize", prop_defs[PropId::OfxParamPropInteractPreferedSize], false, true, false }, + { "OfxParamPropHasHostOverlayHandle", prop_defs[PropId::OfxParamPropHasHostOverlayHandle], false, true, false }, + { "kOfxParamPropUseHostOverlayHandle", prop_defs[PropId::OfxParamPropUseHostOverlayHandle], false, true, false }, + { "OfxParamPropDefault", prop_defs[PropId::OfxParamPropDefault], false, true, false }, + { "OfxParamPropAnimates", prop_defs[PropId::OfxParamPropAnimates], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[PropId::OfxParamPropIsAnimating], true, false, false }, + { "OfxParamPropIsAutoKeying", prop_defs[PropId::OfxParamPropIsAutoKeying], true, false, false }, + { "OfxParamPropPersistant", prop_defs[PropId::OfxParamPropPersistant], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[PropId::OfxParamPropEvaluateOnChange], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[PropId::OfxParamPropPluginMayWrite], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[PropId::OfxParamPropCacheInvalidation], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[PropId::OfxParamPropCanUndo], false, true, false } } }, +// ParamsDouble2D3D +{ "ParamsDouble2D3D", { + { "OfxParamPropDoubleType", prop_defs[PropId::OfxParamPropDoubleType], false, true, false }, + { "OfxPropType", prop_defs[PropId::OfxPropType], false, true, false }, + { "OfxPropName", prop_defs[PropId::OfxPropName], false, true, false }, + { "OfxPropLabel", prop_defs[PropId::OfxPropLabel], false, true, false }, + { "OfxPropShortLabel", prop_defs[PropId::OfxPropShortLabel], false, true, false }, + { "OfxPropLongLabel", prop_defs[PropId::OfxPropLongLabel], false, true, false }, + { "OfxParamPropType", prop_defs[PropId::OfxParamPropType], false, true, false }, + { "OfxParamPropSecret", prop_defs[PropId::OfxParamPropSecret], false, true, false }, + { "OfxParamPropHint", prop_defs[PropId::OfxParamPropHint], false, true, false }, + { "OfxParamPropScriptName", prop_defs[PropId::OfxParamPropScriptName], false, true, false }, + { "OfxParamPropParent", prop_defs[PropId::OfxParamPropParent], false, true, false }, + { "OfxParamPropEnabled", prop_defs[PropId::OfxParamPropEnabled], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[PropId::OfxParamPropDataPtr], false, true, false }, + { "OfxPropIcon", prop_defs[PropId::OfxPropIcon], false, true, false }, + { "OfxParamPropInteractV1", prop_defs[PropId::OfxParamPropInteractV1], false, true, false }, + { "OfxParamPropInteractSize", prop_defs[PropId::OfxParamPropInteractSize], false, true, false }, + { "OfxParamPropInteractSizeAspect", prop_defs[PropId::OfxParamPropInteractSizeAspect], false, true, false }, + { "OfxParamPropInteractMinimumSize", prop_defs[PropId::OfxParamPropInteractMinimumSize], false, true, false }, + { "OfxParamPropInteractPreferedSize", prop_defs[PropId::OfxParamPropInteractPreferedSize], false, true, false }, + { "OfxParamPropHasHostOverlayHandle", prop_defs[PropId::OfxParamPropHasHostOverlayHandle], false, true, false }, + { "kOfxParamPropUseHostOverlayHandle", prop_defs[PropId::OfxParamPropUseHostOverlayHandle], false, true, false }, + { "OfxParamPropDefault", prop_defs[PropId::OfxParamPropDefault], false, true, false }, + { "OfxParamPropAnimates", prop_defs[PropId::OfxParamPropAnimates], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[PropId::OfxParamPropIsAnimating], true, false, false }, + { "OfxParamPropIsAutoKeying", prop_defs[PropId::OfxParamPropIsAutoKeying], true, false, false }, + { "OfxParamPropPersistant", prop_defs[PropId::OfxParamPropPersistant], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[PropId::OfxParamPropEvaluateOnChange], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[PropId::OfxParamPropPluginMayWrite], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[PropId::OfxParamPropCacheInvalidation], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[PropId::OfxParamPropCanUndo], false, true, false }, + { "OfxParamPropMin", prop_defs[PropId::OfxParamPropMin], false, true, false }, + { "OfxParamPropMax", prop_defs[PropId::OfxParamPropMax], false, true, false }, + { "OfxParamPropDisplayMin", prop_defs[PropId::OfxParamPropDisplayMin], false, true, false }, + { "OfxParamPropDisplayMax", prop_defs[PropId::OfxParamPropDisplayMax], false, true, false }, + { "OfxParamPropIncrement", prop_defs[PropId::OfxParamPropIncrement], false, true, false }, + { "OfxParamPropDigits", prop_defs[PropId::OfxParamPropDigits], false, true, false } } }, +// ParamsGroup +{ "ParamsGroup", { + { "OfxParamPropGroupOpen", prop_defs[PropId::OfxParamPropGroupOpen], false, true, false }, + { "OfxPropType", prop_defs[PropId::OfxPropType], false, true, false }, + { "OfxPropName", prop_defs[PropId::OfxPropName], false, true, false }, + { "OfxPropLabel", prop_defs[PropId::OfxPropLabel], false, true, false }, + { "OfxPropShortLabel", prop_defs[PropId::OfxPropShortLabel], false, true, false }, + { "OfxPropLongLabel", prop_defs[PropId::OfxPropLongLabel], false, true, false }, + { "OfxParamPropType", prop_defs[PropId::OfxParamPropType], false, true, false }, + { "OfxParamPropSecret", prop_defs[PropId::OfxParamPropSecret], false, true, false }, + { "OfxParamPropHint", prop_defs[PropId::OfxParamPropHint], false, true, false }, + { "OfxParamPropScriptName", prop_defs[PropId::OfxParamPropScriptName], false, true, false }, + { "OfxParamPropParent", prop_defs[PropId::OfxParamPropParent], false, true, false }, + { "OfxParamPropEnabled", prop_defs[PropId::OfxParamPropEnabled], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[PropId::OfxParamPropDataPtr], false, true, false }, + { "OfxPropIcon", prop_defs[PropId::OfxPropIcon], false, true, false } } }, +// ParamsInt2D3D +{ "ParamsInt2D3D", { + { "OfxParamPropDimensionLabel", prop_defs[PropId::OfxParamPropDimensionLabel], false, true, false }, + { "OfxPropType", prop_defs[PropId::OfxPropType], false, true, false }, + { "OfxPropName", prop_defs[PropId::OfxPropName], false, true, false }, + { "OfxPropLabel", prop_defs[PropId::OfxPropLabel], false, true, false }, + { "OfxPropShortLabel", prop_defs[PropId::OfxPropShortLabel], false, true, false }, + { "OfxPropLongLabel", prop_defs[PropId::OfxPropLongLabel], false, true, false }, + { "OfxParamPropType", prop_defs[PropId::OfxParamPropType], false, true, false }, + { "OfxParamPropSecret", prop_defs[PropId::OfxParamPropSecret], false, true, false }, + { "OfxParamPropHint", prop_defs[PropId::OfxParamPropHint], false, true, false }, + { "OfxParamPropScriptName", prop_defs[PropId::OfxParamPropScriptName], false, true, false }, + { "OfxParamPropParent", prop_defs[PropId::OfxParamPropParent], false, true, false }, + { "OfxParamPropEnabled", prop_defs[PropId::OfxParamPropEnabled], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[PropId::OfxParamPropDataPtr], false, true, false }, + { "OfxPropIcon", prop_defs[PropId::OfxPropIcon], false, true, false }, + { "OfxParamPropInteractV1", prop_defs[PropId::OfxParamPropInteractV1], false, true, false }, + { "OfxParamPropInteractSize", prop_defs[PropId::OfxParamPropInteractSize], false, true, false }, + { "OfxParamPropInteractSizeAspect", prop_defs[PropId::OfxParamPropInteractSizeAspect], false, true, false }, + { "OfxParamPropInteractMinimumSize", prop_defs[PropId::OfxParamPropInteractMinimumSize], false, true, false }, + { "OfxParamPropInteractPreferedSize", prop_defs[PropId::OfxParamPropInteractPreferedSize], false, true, false }, + { "OfxParamPropHasHostOverlayHandle", prop_defs[PropId::OfxParamPropHasHostOverlayHandle], false, true, false }, + { "kOfxParamPropUseHostOverlayHandle", prop_defs[PropId::OfxParamPropUseHostOverlayHandle], false, true, false }, + { "OfxParamPropDefault", prop_defs[PropId::OfxParamPropDefault], false, true, false }, + { "OfxParamPropAnimates", prop_defs[PropId::OfxParamPropAnimates], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[PropId::OfxParamPropIsAnimating], true, false, false }, + { "OfxParamPropIsAutoKeying", prop_defs[PropId::OfxParamPropIsAutoKeying], true, false, false }, + { "OfxParamPropPersistant", prop_defs[PropId::OfxParamPropPersistant], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[PropId::OfxParamPropEvaluateOnChange], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[PropId::OfxParamPropPluginMayWrite], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[PropId::OfxParamPropCacheInvalidation], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[PropId::OfxParamPropCanUndo], false, true, false }, + { "OfxParamPropMin", prop_defs[PropId::OfxParamPropMin], false, true, false }, + { "OfxParamPropMax", prop_defs[PropId::OfxParamPropMax], false, true, false }, + { "OfxParamPropDisplayMin", prop_defs[PropId::OfxParamPropDisplayMin], false, true, false }, + { "OfxParamPropDisplayMax", prop_defs[PropId::OfxParamPropDisplayMax], false, true, false } } }, +// ParamsNormalizedSpatial +{ "ParamsNormalizedSpatial", { + { "OfxParamPropDefaultCoordinateSystem", prop_defs[PropId::OfxParamPropDefaultCoordinateSystem], false, true, false }, + { "OfxPropType", prop_defs[PropId::OfxPropType], false, true, false }, + { "OfxPropName", prop_defs[PropId::OfxPropName], false, true, false }, + { "OfxPropLabel", prop_defs[PropId::OfxPropLabel], false, true, false }, + { "OfxPropShortLabel", prop_defs[PropId::OfxPropShortLabel], false, true, false }, + { "OfxPropLongLabel", prop_defs[PropId::OfxPropLongLabel], false, true, false }, + { "OfxParamPropType", prop_defs[PropId::OfxParamPropType], false, true, false }, + { "OfxParamPropSecret", prop_defs[PropId::OfxParamPropSecret], false, true, false }, + { "OfxParamPropHint", prop_defs[PropId::OfxParamPropHint], false, true, false }, + { "OfxParamPropScriptName", prop_defs[PropId::OfxParamPropScriptName], false, true, false }, + { "OfxParamPropParent", prop_defs[PropId::OfxParamPropParent], false, true, false }, + { "OfxParamPropEnabled", prop_defs[PropId::OfxParamPropEnabled], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[PropId::OfxParamPropDataPtr], false, true, false }, + { "OfxPropIcon", prop_defs[PropId::OfxPropIcon], false, true, false }, + { "OfxParamPropInteractV1", prop_defs[PropId::OfxParamPropInteractV1], false, true, false }, + { "OfxParamPropInteractSize", prop_defs[PropId::OfxParamPropInteractSize], false, true, false }, + { "OfxParamPropInteractSizeAspect", prop_defs[PropId::OfxParamPropInteractSizeAspect], false, true, false }, + { "OfxParamPropInteractMinimumSize", prop_defs[PropId::OfxParamPropInteractMinimumSize], false, true, false }, + { "OfxParamPropInteractPreferedSize", prop_defs[PropId::OfxParamPropInteractPreferedSize], false, true, false }, + { "OfxParamPropHasHostOverlayHandle", prop_defs[PropId::OfxParamPropHasHostOverlayHandle], false, true, false }, + { "kOfxParamPropUseHostOverlayHandle", prop_defs[PropId::OfxParamPropUseHostOverlayHandle], false, true, false }, + { "OfxParamPropDefault", prop_defs[PropId::OfxParamPropDefault], false, true, false }, + { "OfxParamPropAnimates", prop_defs[PropId::OfxParamPropAnimates], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[PropId::OfxParamPropIsAnimating], true, false, false }, + { "OfxParamPropIsAutoKeying", prop_defs[PropId::OfxParamPropIsAutoKeying], true, false, false }, + { "OfxParamPropPersistant", prop_defs[PropId::OfxParamPropPersistant], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[PropId::OfxParamPropEvaluateOnChange], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[PropId::OfxParamPropPluginMayWrite], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[PropId::OfxParamPropCacheInvalidation], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[PropId::OfxParamPropCanUndo], false, true, false }, + { "OfxParamPropMin", prop_defs[PropId::OfxParamPropMin], false, true, false }, + { "OfxParamPropMax", prop_defs[PropId::OfxParamPropMax], false, true, false }, + { "OfxParamPropDisplayMin", prop_defs[PropId::OfxParamPropDisplayMin], false, true, false }, + { "OfxParamPropDisplayMax", prop_defs[PropId::OfxParamPropDisplayMax], false, true, false }, + { "OfxParamPropIncrement", prop_defs[PropId::OfxParamPropIncrement], false, true, false }, + { "OfxParamPropDigits", prop_defs[PropId::OfxParamPropDigits], false, true, false } } }, +// ParamsPage +{ "ParamsPage", { + { "OfxParamPropPageChild", prop_defs[PropId::OfxParamPropPageChild], false, true, false }, + { "OfxPropType", prop_defs[PropId::OfxPropType], false, true, false }, + { "OfxPropName", prop_defs[PropId::OfxPropName], false, true, false }, + { "OfxPropLabel", prop_defs[PropId::OfxPropLabel], false, true, false }, + { "OfxPropShortLabel", prop_defs[PropId::OfxPropShortLabel], false, true, false }, + { "OfxPropLongLabel", prop_defs[PropId::OfxPropLongLabel], false, true, false }, + { "OfxParamPropType", prop_defs[PropId::OfxParamPropType], false, true, false }, + { "OfxParamPropSecret", prop_defs[PropId::OfxParamPropSecret], false, true, false }, + { "OfxParamPropHint", prop_defs[PropId::OfxParamPropHint], false, true, false }, + { "OfxParamPropScriptName", prop_defs[PropId::OfxParamPropScriptName], false, true, false }, + { "OfxParamPropParent", prop_defs[PropId::OfxParamPropParent], false, true, false }, + { "OfxParamPropEnabled", prop_defs[PropId::OfxParamPropEnabled], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[PropId::OfxParamPropDataPtr], false, true, false }, + { "OfxPropIcon", prop_defs[PropId::OfxPropIcon], false, true, false } } }, +// ParamsParametric +{ "ParamsParametric", { + { "OfxParamPropAnimates", prop_defs[PropId::OfxParamPropAnimates], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[PropId::OfxParamPropIsAnimating], false, true, false }, + { "OfxParamPropIsAutoKeying", prop_defs[PropId::OfxParamPropIsAutoKeying], false, true, false }, + { "OfxParamPropPersistant", prop_defs[PropId::OfxParamPropPersistant], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[PropId::OfxParamPropEvaluateOnChange], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[PropId::OfxParamPropPluginMayWrite], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[PropId::OfxParamPropCacheInvalidation], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[PropId::OfxParamPropCanUndo], false, true, false }, + { "OfxParamPropParametricDimension", prop_defs[PropId::OfxParamPropParametricDimension], false, true, false }, + { "OfxParamPropParametricUIColour", prop_defs[PropId::OfxParamPropParametricUIColour], false, true, false }, + { "OfxParamPropParametricInteractBackground", prop_defs[PropId::OfxParamPropParametricInteractBackground], false, true, false }, + { "OfxParamPropParametricRange", prop_defs[PropId::OfxParamPropParametricRange], false, true, false }, + { "OfxPropType", prop_defs[PropId::OfxPropType], false, true, false }, + { "OfxPropName", prop_defs[PropId::OfxPropName], false, true, false }, + { "OfxPropLabel", prop_defs[PropId::OfxPropLabel], false, true, false }, + { "OfxPropShortLabel", prop_defs[PropId::OfxPropShortLabel], false, true, false }, + { "OfxPropLongLabel", prop_defs[PropId::OfxPropLongLabel], false, true, false }, + { "OfxParamPropType", prop_defs[PropId::OfxParamPropType], false, true, false }, + { "OfxParamPropSecret", prop_defs[PropId::OfxParamPropSecret], false, true, false }, + { "OfxParamPropHint", prop_defs[PropId::OfxParamPropHint], false, true, false }, + { "OfxParamPropScriptName", prop_defs[PropId::OfxParamPropScriptName], false, true, false }, + { "OfxParamPropParent", prop_defs[PropId::OfxParamPropParent], false, true, false }, + { "OfxParamPropEnabled", prop_defs[PropId::OfxParamPropEnabled], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[PropId::OfxParamPropDataPtr], false, true, false }, + { "OfxPropIcon", prop_defs[PropId::OfxPropIcon], false, true, false }, + { "OfxParamPropInteractV1", prop_defs[PropId::OfxParamPropInteractV1], false, true, false }, + { "OfxParamPropInteractSize", prop_defs[PropId::OfxParamPropInteractSize], false, true, false }, + { "OfxParamPropInteractSizeAspect", prop_defs[PropId::OfxParamPropInteractSizeAspect], false, true, false }, + { "OfxParamPropInteractMinimumSize", prop_defs[PropId::OfxParamPropInteractMinimumSize], false, true, false }, + { "OfxParamPropInteractPreferedSize", prop_defs[PropId::OfxParamPropInteractPreferedSize], false, true, false }, + { "OfxParamPropHasHostOverlayHandle", prop_defs[PropId::OfxParamPropHasHostOverlayHandle], false, true, false }, + { "kOfxParamPropUseHostOverlayHandle", prop_defs[PropId::OfxParamPropUseHostOverlayHandle], false, true, false }, + { "OfxParamPropDefault", prop_defs[PropId::OfxParamPropDefault], false, true, false }, + { "OfxParamPropAnimates", prop_defs[PropId::OfxParamPropAnimates], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[PropId::OfxParamPropIsAnimating], true, false, false }, + { "OfxParamPropIsAutoKeying", prop_defs[PropId::OfxParamPropIsAutoKeying], true, false, false }, + { "OfxParamPropPersistant", prop_defs[PropId::OfxParamPropPersistant], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[PropId::OfxParamPropEvaluateOnChange], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[PropId::OfxParamPropPluginMayWrite], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[PropId::OfxParamPropCacheInvalidation], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[PropId::OfxParamPropCanUndo], false, true, false } } }, +// ParamsStrChoice +{ "ParamsStrChoice", { + { "OfxParamPropChoiceOption", prop_defs[PropId::OfxParamPropChoiceOption], false, true, false }, + { "OfxParamPropChoiceEnum", prop_defs[PropId::OfxParamPropChoiceEnum], false, true, false }, + { "OfxPropType", prop_defs[PropId::OfxPropType], false, true, false }, + { "OfxPropName", prop_defs[PropId::OfxPropName], false, true, false }, + { "OfxPropLabel", prop_defs[PropId::OfxPropLabel], false, true, false }, + { "OfxPropShortLabel", prop_defs[PropId::OfxPropShortLabel], false, true, false }, + { "OfxPropLongLabel", prop_defs[PropId::OfxPropLongLabel], false, true, false }, + { "OfxParamPropType", prop_defs[PropId::OfxParamPropType], false, true, false }, + { "OfxParamPropSecret", prop_defs[PropId::OfxParamPropSecret], false, true, false }, + { "OfxParamPropHint", prop_defs[PropId::OfxParamPropHint], false, true, false }, + { "OfxParamPropScriptName", prop_defs[PropId::OfxParamPropScriptName], false, true, false }, + { "OfxParamPropParent", prop_defs[PropId::OfxParamPropParent], false, true, false }, + { "OfxParamPropEnabled", prop_defs[PropId::OfxParamPropEnabled], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[PropId::OfxParamPropDataPtr], false, true, false }, + { "OfxPropIcon", prop_defs[PropId::OfxPropIcon], false, true, false }, + { "OfxParamPropInteractV1", prop_defs[PropId::OfxParamPropInteractV1], false, true, false }, + { "OfxParamPropInteractSize", prop_defs[PropId::OfxParamPropInteractSize], false, true, false }, + { "OfxParamPropInteractSizeAspect", prop_defs[PropId::OfxParamPropInteractSizeAspect], false, true, false }, + { "OfxParamPropInteractMinimumSize", prop_defs[PropId::OfxParamPropInteractMinimumSize], false, true, false }, + { "OfxParamPropInteractPreferedSize", prop_defs[PropId::OfxParamPropInteractPreferedSize], false, true, false }, + { "OfxParamPropHasHostOverlayHandle", prop_defs[PropId::OfxParamPropHasHostOverlayHandle], false, true, false }, + { "kOfxParamPropUseHostOverlayHandle", prop_defs[PropId::OfxParamPropUseHostOverlayHandle], false, true, false }, + { "OfxParamPropDefault", prop_defs[PropId::OfxParamPropDefault], false, true, false }, + { "OfxParamPropAnimates", prop_defs[PropId::OfxParamPropAnimates], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[PropId::OfxParamPropIsAnimating], true, false, false }, + { "OfxParamPropIsAutoKeying", prop_defs[PropId::OfxParamPropIsAutoKeying], true, false, false }, + { "OfxParamPropPersistant", prop_defs[PropId::OfxParamPropPersistant], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[PropId::OfxParamPropEvaluateOnChange], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[PropId::OfxParamPropPluginMayWrite], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[PropId::OfxParamPropCacheInvalidation], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[PropId::OfxParamPropCanUndo], false, true, false } } }, +// ParamsString +{ "ParamsString", { + { "OfxParamPropStringMode", prop_defs[PropId::OfxParamPropStringMode], false, true, false }, + { "OfxParamPropStringFilePathExists", prop_defs[PropId::OfxParamPropStringFilePathExists], false, true, false }, + { "OfxPropType", prop_defs[PropId::OfxPropType], false, true, false }, + { "OfxPropName", prop_defs[PropId::OfxPropName], false, true, false }, + { "OfxPropLabel", prop_defs[PropId::OfxPropLabel], false, true, false }, + { "OfxPropShortLabel", prop_defs[PropId::OfxPropShortLabel], false, true, false }, + { "OfxPropLongLabel", prop_defs[PropId::OfxPropLongLabel], false, true, false }, + { "OfxParamPropType", prop_defs[PropId::OfxParamPropType], false, true, false }, + { "OfxParamPropSecret", prop_defs[PropId::OfxParamPropSecret], false, true, false }, + { "OfxParamPropHint", prop_defs[PropId::OfxParamPropHint], false, true, false }, + { "OfxParamPropScriptName", prop_defs[PropId::OfxParamPropScriptName], false, true, false }, + { "OfxParamPropParent", prop_defs[PropId::OfxParamPropParent], false, true, false }, + { "OfxParamPropEnabled", prop_defs[PropId::OfxParamPropEnabled], false, true, false }, + { "OfxParamPropDataPtr", prop_defs[PropId::OfxParamPropDataPtr], false, true, false }, + { "OfxPropIcon", prop_defs[PropId::OfxPropIcon], false, true, false }, + { "OfxParamPropInteractV1", prop_defs[PropId::OfxParamPropInteractV1], false, true, false }, + { "OfxParamPropInteractSize", prop_defs[PropId::OfxParamPropInteractSize], false, true, false }, + { "OfxParamPropInteractSizeAspect", prop_defs[PropId::OfxParamPropInteractSizeAspect], false, true, false }, + { "OfxParamPropInteractMinimumSize", prop_defs[PropId::OfxParamPropInteractMinimumSize], false, true, false }, + { "OfxParamPropInteractPreferedSize", prop_defs[PropId::OfxParamPropInteractPreferedSize], false, true, false }, + { "OfxParamPropHasHostOverlayHandle", prop_defs[PropId::OfxParamPropHasHostOverlayHandle], false, true, false }, + { "kOfxParamPropUseHostOverlayHandle", prop_defs[PropId::OfxParamPropUseHostOverlayHandle], false, true, false }, + { "OfxParamPropDefault", prop_defs[PropId::OfxParamPropDefault], false, true, false }, + { "OfxParamPropAnimates", prop_defs[PropId::OfxParamPropAnimates], false, true, false }, + { "OfxParamPropIsAnimating", prop_defs[PropId::OfxParamPropIsAnimating], true, false, false }, + { "OfxParamPropIsAutoKeying", prop_defs[PropId::OfxParamPropIsAutoKeying], true, false, false }, + { "OfxParamPropPersistant", prop_defs[PropId::OfxParamPropPersistant], false, true, false }, + { "OfxParamPropEvaluateOnChange", prop_defs[PropId::OfxParamPropEvaluateOnChange], false, true, false }, + { "OfxParamPropPluginMayWrite", prop_defs[PropId::OfxParamPropPluginMayWrite], false, true, false }, + { "OfxParamPropCacheInvalidation", prop_defs[PropId::OfxParamPropCacheInvalidation], false, true, false }, + { "OfxParamPropCanUndo", prop_defs[PropId::OfxParamPropCanUndo], false, true, false }, + { "OfxParamPropMin", prop_defs[PropId::OfxParamPropMin], false, true, false }, + { "OfxParamPropMax", prop_defs[PropId::OfxParamPropMax], false, true, false }, + { "OfxParamPropDisplayMin", prop_defs[PropId::OfxParamPropDisplayMin], false, true, false }, + { "OfxParamPropDisplayMax", prop_defs[PropId::OfxParamPropDisplayMax], false, true, false } } }, +}; + +// Actions +static inline const std::array actions { + "CustomParamInterpFunc", + "OfxActionBeginInstanceChanged", + "OfxActionBeginInstanceEdit", + "OfxActionCreateInstance", + "OfxActionDescribe", + "OfxActionDestroyInstance", + "OfxActionEndInstanceChanged", + "OfxActionEndInstanceEdit", + "OfxActionInstanceChanged", + "OfxActionLoad", + "OfxActionPurgeCaches", + "OfxActionSyncPrivateData", + "OfxActionUnload", + "OfxImageEffectActionBeginSequenceRender", + "OfxImageEffectActionDescribeInContext", + "OfxImageEffectActionEndSequenceRender", + "OfxImageEffectActionGetClipPreferences", + "OfxImageEffectActionGetFramesNeeded", + "OfxImageEffectActionGetOutputColourspace", + "OfxImageEffectActionGetRegionOfDefinition", + "OfxImageEffectActionGetRegionsOfInterest", + "OfxImageEffectActionGetTimeDomain", + "OfxImageEffectActionIsIdentity", + "OfxImageEffectActionRender", + "OfxInteractActionDraw", + "OfxInteractActionGainFocus", + "OfxInteractActionKeyDown", + "OfxInteractActionKeyRepeat", + "OfxInteractActionKeyUp", + "OfxInteractActionLoseFocus", + "OfxInteractActionPenDown", + "OfxInteractActionPenMotion", + "OfxInteractActionPenUp", +}; + +// Properties for action args +static inline const std::map, std::vector> action_props { +// CustomParamInterpFunc.inArgs +{ { "CustomParamInterpFunc", "inArgs" }, + { "OfxParamPropCustomValue", + "OfxParamPropInterpolationAmount", + "OfxParamPropInterpolationTime" } }, +// CustomParamInterpFunc.outArgs +{ { "CustomParamInterpFunc", "outArgs" }, + { "OfxParamPropCustomValue", + "OfxParamPropInterpolationTime" } }, +// OfxActionBeginInstanceChanged.inArgs +{ { "OfxActionBeginInstanceChanged", "inArgs" }, + { "OfxPropChangeReason" } }, +// OfxActionEndInstanceChanged.inArgs +{ { "OfxActionEndInstanceChanged", "inArgs" }, + { "OfxPropChangeReason" } }, +// OfxActionInstanceChanged.inArgs +{ { "OfxActionInstanceChanged", "inArgs" }, + { "OfxImageEffectPropRenderScale", + "OfxPropChangeReason", + "OfxPropName", + "OfxPropTime", + "OfxPropType" } }, +// OfxImageEffectActionBeginSequenceRender.inArgs +{ { "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 +{ { "OfxImageEffectActionDescribeInContext", "inArgs" }, + { "OfxImageEffectPropContext" } }, +// OfxImageEffectActionEndSequenceRender.inArgs +{ { "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 +{ { "OfxImageEffectActionGetClipPreferences", "outArgs" }, + { "OfxImageClipPropContinuousSamples", + "OfxImageClipPropFieldOrder", + "OfxImageEffectFrameVarying", + "OfxImageEffectPropFrameRate", + "OfxImageEffectPropPreMultiplication" } }, +// OfxImageEffectActionGetFramesNeeded.inArgs +{ { "OfxImageEffectActionGetFramesNeeded", "inArgs" }, + { "OfxPropTime" } }, +// OfxImageEffectActionGetFramesNeeded.outArgs +{ { "OfxImageEffectActionGetFramesNeeded", "outArgs" }, + { "OfxImageEffectPropFrameRange" } }, +// OfxImageEffectActionGetOutputColourspace.inArgs +{ { "OfxImageEffectActionGetOutputColourspace", "inArgs" }, + { "OfxImageClipPropPreferredColourspaces" } }, +// OfxImageEffectActionGetOutputColourspace.outArgs +{ { "OfxImageEffectActionGetOutputColourspace", "outArgs" }, + { "OfxImageClipPropColourspace" } }, +// OfxImageEffectActionGetRegionOfDefinition.inArgs +{ { "OfxImageEffectActionGetRegionOfDefinition", "inArgs" }, + { "OfxImageEffectPropRenderScale", + "OfxPropTime" } }, +// OfxImageEffectActionGetRegionOfDefinition.outArgs +{ { "OfxImageEffectActionGetRegionOfDefinition", "outArgs" }, + { "OfxImageEffectPropRegionOfDefinition" } }, +// OfxImageEffectActionGetRegionsOfInterest.inArgs +{ { "OfxImageEffectActionGetRegionsOfInterest", "inArgs" }, + { "OfxImageEffectPropRegionOfInterest", + "OfxImageEffectPropRenderScale", + "OfxPropTime" } }, +// OfxImageEffectActionGetTimeDomain.outArgs +{ { "OfxImageEffectActionGetTimeDomain", "outArgs" }, + { "OfxImageEffectPropFrameRange" } }, +// OfxImageEffectActionIsIdentity.inArgs +{ { "OfxImageEffectActionIsIdentity", "inArgs" }, + { "OfxImageEffectPropFieldToRender", + "OfxImageEffectPropRenderScale", + "OfxImageEffectPropRenderWindow", + "OfxPropTime" } }, +// OfxImageEffectActionRender.inArgs +{ { "OfxImageEffectActionRender", "inArgs" }, + { "OfxImageEffectPropCudaEnabled", + "OfxImageEffectPropCudaRenderSupported", + "OfxImageEffectPropCudaStream", + "OfxImageEffectPropCudaStreamSupported", + "OfxImageEffectPropInteractiveRenderStatus", + "OfxImageEffectPropMetalCommandQueue", + "OfxImageEffectPropMetalEnabled", + "OfxImageEffectPropMetalRenderSupported", + "OfxImageEffectPropOpenCLCommandQueue", + "OfxImageEffectPropOpenCLEnabled", + "OfxImageEffectPropOpenCLImage", + "OfxImageEffectPropOpenCLRenderSupported", + "OfxImageEffectPropOpenCLSupported", + "OfxImageEffectPropOpenGLEnabled", + "OfxImageEffectPropOpenGLTextureIndex", + "OfxImageEffectPropOpenGLTextureTarget", + "OfxImageEffectPropRenderQualityDraft", + "OfxImageEffectPropSequentialRenderStatus", + "OfxPropTime" } }, +// OfxInteractActionDraw.inArgs +{ { "OfxInteractActionDraw", "inArgs" }, + { "OfxImageEffectPropRenderScale", + "OfxInteractPropBackgroundColour", + "OfxInteractPropDrawContext", + "OfxInteractPropPixelScale", + "OfxPropEffectInstance", + "OfxPropTime" } }, +// OfxInteractActionGainFocus.inArgs +{ { "OfxInteractActionGainFocus", "inArgs" }, + { "OfxImageEffectPropRenderScale", + "OfxInteractPropBackgroundColour", + "OfxInteractPropPixelScale", + "OfxPropEffectInstance", + "OfxPropTime" } }, +// OfxInteractActionKeyDown.inArgs +{ { "OfxInteractActionKeyDown", "inArgs" }, + { "OfxImageEffectPropRenderScale", + "OfxPropEffectInstance", + "OfxPropTime", + "kOfxPropKeyString", + "kOfxPropKeySym" } }, +// OfxInteractActionKeyRepeat.inArgs +{ { "OfxInteractActionKeyRepeat", "inArgs" }, + { "OfxImageEffectPropRenderScale", + "OfxPropEffectInstance", + "OfxPropTime", + "kOfxPropKeyString", + "kOfxPropKeySym" } }, +// OfxInteractActionKeyUp.inArgs +{ { "OfxInteractActionKeyUp", "inArgs" }, + { "OfxImageEffectPropRenderScale", + "OfxPropEffectInstance", + "OfxPropTime", + "kOfxPropKeyString", + "kOfxPropKeySym" } }, +// OfxInteractActionLoseFocus.inArgs +{ { "OfxInteractActionLoseFocus", "inArgs" }, + { "OfxImageEffectPropRenderScale", + "OfxInteractPropBackgroundColour", + "OfxInteractPropPixelScale", + "OfxPropEffectInstance", + "OfxPropTime" } }, +// OfxInteractActionPenDown.inArgs +{ { "OfxInteractActionPenDown", "inArgs" }, + { "OfxImageEffectPropRenderScale", + "OfxInteractPropBackgroundColour", + "OfxInteractPropPenPosition", + "OfxInteractPropPenPressure", + "OfxInteractPropPenViewportPosition", + "OfxInteractPropPixelScale", + "OfxPropEffectInstance", + "OfxPropTime" } }, +// OfxInteractActionPenMotion.inArgs +{ { "OfxInteractActionPenMotion", "inArgs" }, + { "OfxImageEffectPropRenderScale", + "OfxInteractPropBackgroundColour", + "OfxInteractPropPenPosition", + "OfxInteractPropPenPressure", + "OfxInteractPropPenViewportPosition", + "OfxInteractPropPixelScale", + "OfxPropEffectInstance", + "OfxPropTime" } }, +// OfxInteractActionPenUp.inArgs +{ { "OfxInteractActionPenUp", "inArgs" }, + { "OfxImageEffectPropRenderScale", + "OfxInteractPropBackgroundColour", + "OfxInteractPropPenPosition", + "OfxInteractPropPenPressure", + "OfxInteractPropPenViewportPosition", + "OfxInteractPropPixelScale", + "OfxPropEffectInstance", + "OfxPropTime" } }, +}; + +// Static asserts for standard action names +static_assert(std::string_view("OfxActionBeginInstanceChanged") == std::string_view(kOfxActionBeginInstanceChanged)); +static_assert(std::string_view("OfxActionBeginInstanceEdit") == std::string_view(kOfxActionBeginInstanceEdit)); +static_assert(std::string_view("OfxActionCreateInstance") == std::string_view(kOfxActionCreateInstance)); +static_assert(std::string_view("OfxActionDescribe") == std::string_view(kOfxActionDescribe)); +static_assert(std::string_view("OfxActionDestroyInstance") == std::string_view(kOfxActionDestroyInstance)); +static_assert(std::string_view("OfxActionEndInstanceChanged") == std::string_view(kOfxActionEndInstanceChanged)); +static_assert(std::string_view("OfxActionEndInstanceEdit") == std::string_view(kOfxActionEndInstanceEdit)); +static_assert(std::string_view("OfxActionInstanceChanged") == std::string_view(kOfxActionInstanceChanged)); +static_assert(std::string_view("OfxActionLoad") == std::string_view(kOfxActionLoad)); +static_assert(std::string_view("OfxActionPurgeCaches") == std::string_view(kOfxActionPurgeCaches)); +static_assert(std::string_view("OfxActionSyncPrivateData") == std::string_view(kOfxActionSyncPrivateData)); +static_assert(std::string_view("OfxActionUnload") == std::string_view(kOfxActionUnload)); +static_assert(std::string_view("OfxImageEffectActionBeginSequenceRender") == std::string_view(kOfxImageEffectActionBeginSequenceRender)); +static_assert(std::string_view("OfxImageEffectActionDescribeInContext") == std::string_view(kOfxImageEffectActionDescribeInContext)); +static_assert(std::string_view("OfxImageEffectActionEndSequenceRender") == std::string_view(kOfxImageEffectActionEndSequenceRender)); +static_assert(std::string_view("OfxImageEffectActionGetClipPreferences") == std::string_view(kOfxImageEffectActionGetClipPreferences)); +static_assert(std::string_view("OfxImageEffectActionGetFramesNeeded") == std::string_view(kOfxImageEffectActionGetFramesNeeded)); +static_assert(std::string_view("OfxImageEffectActionGetOutputColourspace") == std::string_view(kOfxImageEffectActionGetOutputColourspace)); +static_assert(std::string_view("OfxImageEffectActionGetRegionOfDefinition") == std::string_view(kOfxImageEffectActionGetRegionOfDefinition)); +static_assert(std::string_view("OfxImageEffectActionGetRegionsOfInterest") == std::string_view(kOfxImageEffectActionGetRegionsOfInterest)); +static_assert(std::string_view("OfxImageEffectActionGetTimeDomain") == std::string_view(kOfxImageEffectActionGetTimeDomain)); +static_assert(std::string_view("OfxImageEffectActionIsIdentity") == std::string_view(kOfxImageEffectActionIsIdentity)); +static_assert(std::string_view("OfxImageEffectActionRender") == std::string_view(kOfxImageEffectActionRender)); +static_assert(std::string_view("OfxInteractActionDraw") == std::string_view(kOfxInteractActionDraw)); +static_assert(std::string_view("OfxInteractActionGainFocus") == std::string_view(kOfxInteractActionGainFocus)); +static_assert(std::string_view("OfxInteractActionKeyDown") == std::string_view(kOfxInteractActionKeyDown)); +static_assert(std::string_view("OfxInteractActionKeyRepeat") == std::string_view(kOfxInteractActionKeyRepeat)); +static_assert(std::string_view("OfxInteractActionKeyUp") == std::string_view(kOfxInteractActionKeyUp)); +static_assert(std::string_view("OfxInteractActionLoseFocus") == std::string_view(kOfxInteractActionLoseFocus)); +static_assert(std::string_view("OfxInteractActionPenDown") == std::string_view(kOfxInteractActionPenDown)); +static_assert(std::string_view("OfxInteractActionPenMotion") == std::string_view(kOfxInteractActionPenMotion)); +static_assert(std::string_view("OfxInteractActionPenUp") == std::string_view(kOfxInteractActionPenUp)); +} // namespace openfx diff --git a/Support/include/ofxPropsMetadata.h b/openfx-cpp/include/openfx/ofxPropsMetadata.h similarity index 80% rename from Support/include/ofxPropsMetadata.h rename to openfx-cpp/include/openfx/ofxPropsMetadata.h index 5e4a2083..7cae19ed 100644 --- a/Support/include/ofxPropsMetadata.h +++ b/openfx-cpp/include/openfx/ofxPropsMetadata.h @@ -13,7 +13,7 @@ #include "ofxKeySyms.h" #include "ofxOld.h" -namespace OpenFX { +namespace openfx { enum class PropType { Int, Double, @@ -284,8 +284,27 @@ struct PropDef { size_t enumValuesCount; }; +// Array type for storing all PropDefs, indexed by PropId for simplicity +template +struct PropDefsArray { + static constexpr size_t Size = static_cast(MaxValue); + std::array data; + + // constexpr T& operator[](PropId index) { + // return data[static_cast(index)]; + // } + + constexpr const T& operator[](PropId index) const { + return data[static_cast(index)]; + } + constexpr const T& operator[](size_t index) const { + return data[index]; + } +}; + // Property definitions -static inline constexpr std::array(PropId::NProps)> prop_defs = {{ +static inline constexpr PropDefsArray prop_defs = { + {{ { "OfxImageClipPropColourspace", PropId::OfxImageClipPropColourspace, {PropType::String}, 1, 1, nullptr, 0}, { "OfxImageClipPropConnected", PropId::OfxImageClipPropConnected, {PropType::Bool}, 1, 1, nullptr, 0}, { "OfxImageClipPropContinuousSamples", PropId::OfxImageClipPropContinuousSamples, {PropType::Bool}, 1, 1, nullptr, 0}, @@ -465,7 +484,8 @@ static inline constexpr std::array(PropId::NProps)> { "kOfxParamPropUseHostOverlayHandle", PropId::OfxParamPropUseHostOverlayHandle, {PropType::Bool}, 1, 1, nullptr, 0}, { "kOfxPropKeyString", PropId::OfxPropKeyString, {PropType::String}, 1, 1, nullptr, 0}, { "kOfxPropKeySym", PropId::OfxPropKeySym, {PropType::Int}, 1, 1, nullptr, 0}, -}}; + }} +}; //Template specializations for each property @@ -479,1075 +499,1075 @@ template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageClipPropColourspace)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageClipPropColourspace]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageClipPropConnected)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageClipPropConnected]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageClipPropContinuousSamples)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageClipPropContinuousSamples]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageClipPropFieldExtraction)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageClipPropFieldExtraction]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageClipPropFieldOrder)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageClipPropFieldOrder]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageClipPropIsMask)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageClipPropIsMask]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageClipPropOptional)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageClipPropOptional]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageClipPropPreferredColourspaces)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageClipPropPreferredColourspaces]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageClipPropUnmappedComponents)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageClipPropUnmappedComponents]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageClipPropUnmappedPixelDepth)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageClipPropUnmappedPixelDepth]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectFrameVarying)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectFrameVarying]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectHostPropIsBackground)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectHostPropIsBackground]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectHostPropNativeOrigin)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectHostPropNativeOrigin]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectInstancePropEffectDuration)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectInstancePropEffectDuration]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectInstancePropSequentialRender)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectInstancePropSequentialRender]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPluginPropFieldRenderTwiceAlways)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPluginPropFieldRenderTwiceAlways]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPluginPropGrouping)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPluginPropGrouping]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPluginPropHostFrameThreading)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPluginPropHostFrameThreading]; }; template<> struct PropTraits { - using type = const void *; + using type = void *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPluginPropOverlayInteractV1)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPluginPropOverlayInteractV1]; }; template<> struct PropTraits { - using type = const void *; + using type = void *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPluginPropOverlayInteractV2)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPluginPropOverlayInteractV2]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPluginPropSingleInstance)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPluginPropSingleInstance]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPluginRenderThreadSafety)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPluginRenderThreadSafety]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropClipPreferencesSlaveParam)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropClipPreferencesSlaveParam]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropColourManagementAvailableConfigs)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropColourManagementAvailableConfigs]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropColourManagementConfig)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropColourManagementConfig]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropColourManagementStyle)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropColourManagementStyle]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropComponents)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropComponents]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropContext)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropContext]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropCudaEnabled)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropCudaEnabled]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropCudaRenderSupported)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropCudaRenderSupported]; }; template<> struct PropTraits { - using type = const void *; + using type = void *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropCudaStream)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropCudaStream]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropCudaStreamSupported)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropCudaStreamSupported]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropDisplayColourspace)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropDisplayColourspace]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropFieldToRender)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropFieldToRender]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropFrameRange)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropFrameRange]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropFrameRate)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropFrameRate]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropFrameStep)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropFrameStep]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropInAnalysis)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropInAnalysis]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropInteractiveRenderStatus)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropInteractiveRenderStatus]; }; template<> struct PropTraits { - using type = const void *; + using type = void *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropMetalCommandQueue)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropMetalCommandQueue]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropMetalEnabled)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropMetalEnabled]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropMetalRenderSupported)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropMetalRenderSupported]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropMultipleClipDepths)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropMultipleClipDepths]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOCIOConfig)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOCIOConfig]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOCIODisplay)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOCIODisplay]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOCIOView)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOCIOView]; }; template<> struct PropTraits { - using type = const void *; + using type = void *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOpenCLCommandQueue)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOpenCLCommandQueue]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOpenCLEnabled)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOpenCLEnabled]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOpenCLImage)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOpenCLImage]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOpenCLRenderSupported)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOpenCLRenderSupported]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOpenCLSupported)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOpenCLSupported]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOpenGLEnabled)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOpenGLEnabled]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOpenGLRenderSupported)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOpenGLRenderSupported]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOpenGLTextureIndex)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOpenGLTextureIndex]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropOpenGLTextureTarget)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOpenGLTextureTarget]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropPixelAspectRatio)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropPixelAspectRatio]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropPixelDepth)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropPixelDepth]; }; template<> struct PropTraits { - using type = const void *; + using type = void *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropPluginHandle)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropPluginHandle]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropPreMultiplication)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropPreMultiplication]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropProjectExtent)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropProjectExtent]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropProjectOffset)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropProjectOffset]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropProjectSize)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropProjectSize]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropRegionOfDefinition)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropRegionOfDefinition]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropRegionOfInterest)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropRegionOfInterest]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropRenderQualityDraft)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropRenderQualityDraft]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropRenderScale)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropRenderScale]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropRenderWindow)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropRenderWindow]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropSequentialRenderStatus)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropSequentialRenderStatus]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropSetableFielding)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropSetableFielding]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropSetableFrameRate)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropSetableFrameRate]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropSupportedComponents)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropSupportedComponents]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropSupportedContexts)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropSupportedContexts]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropSupportedPixelDepths)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropSupportedPixelDepths]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropSupportsMultiResolution)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropSupportsMultiResolution]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropSupportsMultipleClipPARs)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropSupportsMultipleClipPARs]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropSupportsOverlays)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropSupportsOverlays]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropSupportsTiles)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropSupportsTiles]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropTemporalClipAccess)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropTemporalClipAccess]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropUnmappedFrameRange)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropUnmappedFrameRange]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImageEffectPropUnmappedFrameRate)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropUnmappedFrameRate]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImagePropBounds)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImagePropBounds]; }; template<> struct PropTraits { - using type = const void *; + using type = void *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImagePropData)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImagePropData]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImagePropField)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImagePropField]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImagePropPixelAspectRatio)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImagePropPixelAspectRatio]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImagePropRegionOfDefinition)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImagePropRegionOfDefinition]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImagePropRowBytes)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImagePropRowBytes]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxImagePropUniqueIdentifier)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxImagePropUniqueIdentifier]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropBackgroundColour)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropBackgroundColour]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropBitDepth)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropBitDepth]; }; template<> struct PropTraits { - using type = const void *; + using type = void *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropDrawContext)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropDrawContext]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropHasAlpha)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropHasAlpha]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropPenPosition)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropPenPosition]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropPenPressure)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropPenPressure]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropPenViewportPosition)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropPenViewportPosition]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropPixelScale)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropPixelScale]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropSlaveToParam)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropSlaveToParam]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropSuggestedColour)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropSuggestedColour]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxInteractPropViewport)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropViewport]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxOpenGLPropPixelDepth)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxOpenGLPropPixelDepth]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropMaxPages)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropMaxPages]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropMaxParameters)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropMaxParameters]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropPageRowColumnCount)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropPageRowColumnCount]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropSupportsBooleanAnimation)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropSupportsBooleanAnimation]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropSupportsChoiceAnimation)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropSupportsChoiceAnimation]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropSupportsCustomAnimation)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropSupportsCustomAnimation]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropSupportsCustomInteract)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropSupportsCustomInteract]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropSupportsParametricAnimation)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropSupportsParametricAnimation]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropSupportsStrChoice)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropSupportsStrChoice]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropSupportsStrChoiceAnimation)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropSupportsStrChoiceAnimation]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamHostPropSupportsStringAnimation)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropSupportsStringAnimation]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropAnimates)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropAnimates]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropCacheInvalidation)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropCacheInvalidation]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropCanUndo)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropCanUndo]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropChoiceEnum)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropChoiceEnum]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropChoiceOption)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropChoiceOption]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropChoiceOrder)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropChoiceOrder]; }; template<> struct PropTraits { - using type = const void *; + using type = void *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropCustomCallbackV1)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropCustomCallbackV1]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropCustomValue)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropCustomValue]; }; template<> struct PropTraits { - using type = const void *; + using type = void *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropDataPtr)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropDataPtr]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = true; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropDefault)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropDefault]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropDefaultCoordinateSystem)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropDefaultCoordinateSystem]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropDigits)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropDigits]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropDimensionLabel)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropDimensionLabel]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = true; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropDisplayMax)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropDisplayMax]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = true; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropDisplayMin)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropDisplayMin]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropDoubleType)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropDoubleType]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropEnabled)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropEnabled]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropEvaluateOnChange)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropEvaluateOnChange]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropGroupOpen)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropGroupOpen]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropHasHostOverlayHandle)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropHasHostOverlayHandle]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropHint)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropHint]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropIncrement)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropIncrement]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropInteractMinimumSize)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropInteractMinimumSize]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropInteractPreferedSize)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropInteractPreferedSize]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropInteractSize)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropInteractSize]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropInteractSizeAspect)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropInteractSizeAspect]; }; template<> struct PropTraits { - using type = const void *; + using type = void *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropInteractV1)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropInteractV1]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropInterpolationAmount)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropInterpolationAmount]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropInterpolationTime)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropInterpolationTime]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropIsAnimating)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropIsAnimating]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropIsAutoKeying)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropIsAutoKeying]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = true; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropMax)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropMax]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = true; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropMin)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropMin]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropPageChild)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropPageChild]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropParametricDimension)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropParametricDimension]; }; template<> struct PropTraits { - using type = const void *; + using type = void *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropParametricInteractBackground)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropParametricInteractBackground]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropParametricRange)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropParametricRange]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropParametricUIColour)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropParametricUIColour]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropParent)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropParent]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropPersistant)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropPersistant]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropPluginMayWrite)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropPluginMayWrite]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropScriptName)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropScriptName]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropSecret)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropSecret]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropShowTimeMarker)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropShowTimeMarker]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropStringFilePathExists)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropStringFilePathExists]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropStringMode)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropStringMode]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropType)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropType]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPluginPropFilePath)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxPluginPropFilePath]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPluginPropParamPageOrder)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxPluginPropParamPageOrder]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropAPIVersion)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxPropAPIVersion]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropChangeReason)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxPropChangeReason]; }; template<> struct PropTraits { - using type = const void *; + using type = void *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropEffectInstance)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxPropEffectInstance]; }; template<> struct PropTraits { - using type = const void *; + using type = void *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropHostOSHandle)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxPropHostOSHandle]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropIcon)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxPropIcon]; }; template<> struct PropTraits { - using type = const void *; + using type = void *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropInstanceData)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxPropInstanceData]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropIsInteractive)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxPropIsInteractive]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropLabel)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxPropLabel]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropLongLabel)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxPropLongLabel]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropName)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxPropName]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropParamSetNeedsSyncing)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxPropParamSetNeedsSyncing]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropPluginDescription)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxPropPluginDescription]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropShortLabel)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxPropShortLabel]; }; template<> struct PropTraits { using type = double; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropTime)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxPropTime]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropType)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxPropType]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropVersion)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxPropVersion]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropVersionLabel)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxPropVersionLabel]; }; template<> struct PropTraits { using type = bool; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxParamPropUseHostOverlayHandle)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropUseHostOverlayHandle]; }; template<> struct PropTraits { using type = const char *; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropKeyString)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxPropKeyString]; }; template<> struct PropTraits { using type = int; static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[static_cast(PropId::OfxPropKeySym)]; + static constexpr const PropDef& def = prop_defs[PropId::OfxPropKeySym]; }; } // namespace properties @@ -1731,4 +1751,4 @@ static_assert(std::string_view("OfxPropVersionLabel") == std::string_view(kOfxPr 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 +} // namespace openfx diff --git a/Support/include/ofxStatusStrings.h b/openfx-cpp/include/openfx/ofxStatusStrings.h similarity index 100% rename from Support/include/ofxStatusStrings.h rename to openfx-cpp/include/openfx/ofxStatusStrings.h diff --git a/scripts/build-cmake.sh b/scripts/build-cmake.sh index 24fd12e6..03940e87 100755 --- a/scripts/build-cmake.sh +++ b/scripts/build-cmake.sh @@ -123,16 +123,16 @@ fi # Install dependencies, set up build dir, and generate build files. -echo === Running conan to install dependencies +echo '=== Running conan to install dependencies' [[ $USE_OPENCL ]] && conan_opts="$conan_opts -o use_opencl=True" $CONAN install ${GENERATOR_OPTION} -s build_type=$BUILDTYPE -pr:b=default --build=missing . $conan_opts -echo === Running cmake +echo '=== Running cmake' # Generate the build files [[ $USE_OPENCL ]] && cmake_opts="$cmake_opts -DOFX_SUPPORTS_OPENCLRENDER=TRUE" cmake --preset ${PRESET_NAME} -DBUILD_EXAMPLE_PLUGINS=TRUE $cmake_opts $ARGS -echo === Building and installing plugins and support libs +echo '=== Building and installing plugins and support libs' cmake --build ${CMAKE_BUILD_DIR} --target install --config $BUILDTYPE --parallel $VERBOSE set +x diff --git a/scripts/gen-props.py b/scripts/gen-props.py index 93dc3da2..214ab59f 100644 --- a/scripts/gen-props.py +++ b/scripts/gen-props.py @@ -275,7 +275,7 @@ def gen_props_metadata(props_metadata, outfile_path: Path): #include "ofxKeySyms.h" #include "ofxOld.h" -namespace OpenFX { +namespace openfx { enum class PropType { Int, Double, @@ -328,8 +328,27 @@ def gen_props_metadata(props_metadata, outfile_path: Path): size_t enumValuesCount; }; +// Array type for storing all PropDefs, indexed by PropId for simplicity +template +struct PropDefsArray { + static constexpr size_t Size = static_cast(MaxValue); + std::array data; + + // constexpr T& operator[](PropId index) { + // return data[static_cast(index)]; + // } + + constexpr const T& operator[](PropId index) const { + return data[static_cast(index)]; + } + constexpr const T& operator[](size_t index) const { + return data[index]; + } +}; + // Property definitions -static inline constexpr std::array(PropId::NProps)> prop_defs = {{ +static inline constexpr PropDefsArray prop_defs = { + {{ """) for p in sorted(props_metadata): @@ -356,7 +375,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\n") outfile.write(""" //Template specializations for each property @@ -382,12 +401,12 @@ def gen_props_metadata(props_metadata, outfile_path: Path): "int": "int", "bool": "bool", "double": "double", - "pointer": "const void *", + "pointer": "void *", } outfile.write(f" using type = {ctypes[types[0]]};\n") is_multitype_bool = "true" if len(types) > 1 else "false" outfile.write(f" static constexpr bool is_multitype = {is_multitype_bool};\n") - outfile.write(f" static constexpr const PropDef& def = prop_defs[static_cast(PropId::{get_prop_id(p)})];\n") + outfile.write(f" static constexpr const PropDef& def = prop_defs[PropId::{get_prop_id(p)}];\n") outfile.write("};\n") # end of prop traits except Exception as e: logging.error(f"Error: {p} is missing metadata? {e}") @@ -400,7 +419,7 @@ def gen_props_metadata(props_metadata, outfile_path: Path): 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") + outfile.write("} // namespace openfx\n") @@ -424,7 +443,7 @@ def gen_props_by_set(props_by_set, props_by_action, outfile_path: Path): #include "ofxPropsMetadata.h" // #include "ofxOld.h" -namespace OpenFX { +namespace openfx { struct Prop { const char *name; @@ -446,9 +465,9 @@ def gen_props_by_set(props_by_set, props_by_action, outfile_path: Path): 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']}\", prop_defs[static_cast(PropId::{get_prop_id(p['name'])})], {host_write}, {plugin_write}, false }}") + propdefs.append(f"{{ \"{p['name']}\", prop_defs[PropId::{get_prop_id(p['name'])}], {host_write}, {plugin_write}, false }}") propdefs_str = ",\n ".join(propdefs) - outfile.write(f"{{ \"{pset}\", {{ {propdefs_str} }} }},\n") + outfile.write(f"// {pset}\n{{ \"{pset}\", {{\n {propdefs_str} }} }},\n") outfile.write("};\n\n") actions = sorted(props_by_action.keys()) @@ -467,12 +486,13 @@ def gen_props_by_set(props_by_set, props_by_action, outfile_path: Path): for subset in props_by_action[pset]: if not props_by_action[pset][subset]: continue - propnames = ",\n ".join(sorted([f'"{p}"' for p in props_by_action[pset][subset]])) + propnames = ",\n ".join(sorted([f'"{p}"' for p in props_by_action[pset][subset]])) if not pset.startswith("kOfx"): psetname = '"' + pset + '"' # quote if it's not a known constant else: psetname = pset - outfile.write(f"{{ {{ {psetname}, \"{subset}\" }}, {{ {propnames} }} }},\n") + outfile.write(f"// {pset}.{subset}\n") + outfile.write(f"{{ {{ {psetname}, \"{subset}\" }},\n {{ {propnames} }} }},\n") outfile.write("};\n\n") @@ -482,7 +502,7 @@ def gen_props_by_set(props_by_set, props_by_action, outfile_path: Path): continue outfile.write(f"static_assert(std::string_view(\"{pset}\") == std::string_view(k{pset}));\n") - outfile.write("} // namespace OpenFX\n") + outfile.write("} // namespace openfx\n") def main(args): @@ -517,23 +537,23 @@ def main(args): if args.verbose: print(f"=== Generating {args.props_metadata}") - gen_props_metadata(props_metadata, support_include_dir / args.props_metadata) + gen_props_metadata(props_metadata, dest_path / args.props_metadata) if args.verbose: print(f"=== Generating props by set header {args.props_by_set}") - gen_props_by_set(props_by_set, props_by_action, support_include_dir / args.props_by_set) + gen_props_by_set(props_by_set, props_by_action, dest_path / args.props_by_set) if __name__ == "__main__": script_dir = os.path.dirname(os.path.abspath(__file__)) - support_include_dir = Path(script_dir).parent / 'Support/include' + dest_path = Path(script_dir).parent / 'openfx-cpp/include/openfx' parser = argparse.ArgumentParser(description="Check OpenFX properties and generate ancillary data structures", formatter_class=argparse.ArgumentDefaultsHelpFormatter) # Define arguments here parser.add_argument('-v', '--verbose', action='store_true', help='Enable verbose mode') - parser.add_argument('--props-metadata', default=support_include_dir/"ofxPropsMetadata.h", + parser.add_argument('--props-metadata', default=dest_path/"ofxPropsMetadata.h", help="Generate property metadata into this file") - parser.add_argument('--props-by-set', default=support_include_dir/"ofxPropsBySet.h", + parser.add_argument('--props-by-set', default=dest_path/"ofxPropsBySet.h", help="Generate props by set metadata into this file") # Parse the arguments diff --git a/test_package/CMakeLists.txt b/test_package/CMakeLists.txt index 4ba66c09..65cff0e3 100644 --- a/test_package/CMakeLists.txt +++ b/test_package/CMakeLists.txt @@ -5,12 +5,18 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(openfx CONFIG REQUIRED) -add_executable(test_package src/test_package.cpp) +add_library(test_package SHARED src/invert.cpp) target_include_directories(test_package PUBLIC ${openfx_INCLUDE_DIRS}) -target_link_libraries(test_package openfx::HostSupport) +target_link_libraries(test_package openfx::Api) -file(GLOB_RECURSE PLUGIN_SOURCES "../Support/Plugins/Invert/*.cpp") -add_ofx_plugin(invert_plugin ../Support/Plugins/Invert) -target_sources(invert_plugin PUBLIC ${PLUGIN_SOURCES}) -target_include_directories(invert_plugin PUBLIC ${openfx_INCLUDE_DIRS}) -target_link_libraries(invert_plugin openfx::Support) \ No newline at end of file +if(WIN32) + set_target_properties(test_package PROPERTIES SUFFIX ".ofx") +else() + set_target_properties(test_package PROPERTIES PREFIX "" SUFFIX ".ofx") +endif() + +# file(GLOB_RECURSE PLUGIN_SOURCES "../Support/Plugins/Invert/*.cpp") +# add_ofx_plugin(invert_plugin ../Support/Plugins/Invert) +# target_sources(invert_plugin PUBLIC ${PLUGIN_SOURCES}) +# target_include_directories(invert_plugin PUBLIC ${openfx_INCLUDE_DIRS}) +# target_link_libraries(invert_plugin openfx::Support) diff --git a/test_package/conanfile.py b/test_package/conanfile.py index 5ba62a7d..0a252cc4 100644 --- a/test_package/conanfile.py +++ b/test_package/conanfile.py @@ -66,7 +66,5 @@ def layout(self): cmake_layout(self) def test(self): - if can_run(self): - # Run the test_package binary in an environment where the OFX_PLUGIN_PATH environment variable is defined. - cmd = os.path.join(self.build_folder, self.cpp.build.bindir, "test_package") - self.run(cmd, env=["conanrun", "ofx_plugin_dir"]) + # Skip execution -- we only care that the plugin builds + pass diff --git a/test_package/src/invert.cpp b/test_package/src/invert.cpp new file mode 100644 index 00000000..17aeed7f --- /dev/null +++ b/test_package/src/invert.cpp @@ -0,0 +1,288 @@ +// Copyright OpenFX and contributors to the OpenFX project. +// SPDX-License-Identifier: BSD-3-Clause + + +/* + Ofx Example plugin that show a very simple plugin that inverts an image. + + It is meant to illustrate certain features of the API, as opposed to being a perfectly + crafted piece of image processing software. + + The main features are + - basic plugin definition + - basic property usage + - basic image access and rendering + */ +#include +#include +#include +#include "ofxImageEffect.h" +#include "ofxMemory.h" +#include "ofxMultiThread.h" +#include "ofxPixels.h" + +#if defined __APPLE__ || defined __linux__ || defined __FreeBSD__ +# define EXPORT __attribute__((visibility("default"))) +#elif defined _WIN32 +# define EXPORT OfxExport +#else +# error Not building on your operating system quite yet +#endif + +// pointers to various bits of the host +OfxHost *gHost; +OfxImageEffectSuiteV1 *gEffectHost = 0; +OfxPropertySuiteV1 *gPropHost = 0; + +// look up a pixel in the image, does bounds checking to see if it is in the image rectangle +inline OfxRGBAColourB * +pixelAddress(OfxRGBAColourB *img, OfxRectI rect, int x, int y, int bytesPerLine) +{ + if(x < rect.x1 || x >= rect.x2 || y < rect.y1 || y > rect.y2) + return 0; + OfxRGBAColourB *pix = (OfxRGBAColourB *) (((char *) img) + (y - rect.y1) * bytesPerLine); + pix += x - rect.x1; + return pix; +} + +// throws this if it can't fetch an image +class NoImageEx {}; + +// the process code that the host sees +static OfxStatus render(OfxImageEffectHandle instance, + OfxPropertySetHandle inArgs, + OfxPropertySetHandle /*outArgs*/) +{ + // get the render window and the time from the inArgs + OfxTime time; + OfxRectI renderWindow; + OfxStatus status = kOfxStatOK; + + gPropHost->propGetDouble(inArgs, kOfxPropTime, 0, &time); + gPropHost->propGetIntN(inArgs, kOfxImageEffectPropRenderWindow, 4, &renderWindow.x1); + + // fetch output clip + OfxImageClipHandle outputClip; + gEffectHost->clipGetHandle(instance, kOfxImageEffectOutputClipName, &outputClip, 0); + + + OfxPropertySetHandle outputImg = NULL, sourceImg = NULL; + try { + // fetch image to render into from that clip + OfxPropertySetHandle outputImg; + if(gEffectHost->clipGetImage(outputClip, time, NULL, &outputImg) != kOfxStatOK) { + throw NoImageEx(); + } + + // fetch output image info from that handle + int dstRowBytes; + OfxRectI dstRect; + void *dstPtr; + gPropHost->propGetInt(outputImg, kOfxImagePropRowBytes, 0, &dstRowBytes); + gPropHost->propGetIntN(outputImg, kOfxImagePropBounds, 4, &dstRect.x1); + gPropHost->propGetInt(outputImg, kOfxImagePropRowBytes, 0, &dstRowBytes); + gPropHost->propGetPointer(outputImg, kOfxImagePropData, 0, &dstPtr); + + // fetch main input clip + OfxImageClipHandle sourceClip; + gEffectHost->clipGetHandle(instance, kOfxImageEffectSimpleSourceClipName, &sourceClip, 0); + + // fetch image at render time from that clip + if (gEffectHost->clipGetImage(sourceClip, time, NULL, &sourceImg) != kOfxStatOK) { + throw NoImageEx(); + } + + // fetch image info out of that handle + int srcRowBytes; + OfxRectI srcRect; + void *srcPtr; + gPropHost->propGetInt(sourceImg, kOfxImagePropRowBytes, 0, &srcRowBytes); + gPropHost->propGetIntN(sourceImg, kOfxImagePropBounds, 4, &srcRect.x1); + gPropHost->propGetInt(sourceImg, kOfxImagePropRowBytes, 0, &srcRowBytes); + gPropHost->propGetPointer(sourceImg, kOfxImagePropData, 0, &srcPtr); + + // cast data pointers to 8 bit RGBA + OfxRGBAColourB *src = (OfxRGBAColourB *) srcPtr; + OfxRGBAColourB *dst = (OfxRGBAColourB *) dstPtr; + + // and do some inverting + for(int y = renderWindow.y1; y < renderWindow.y2; y++) { + if(gEffectHost->abort(instance)) break; + + OfxRGBAColourB *dstPix = pixelAddress(dst, dstRect, renderWindow.x1, y, dstRowBytes); + + for(int x = renderWindow.x1; x < renderWindow.x2; x++) { + + OfxRGBAColourB *srcPix = pixelAddress(src, srcRect, x, y, srcRowBytes); + + if(srcPix) { + dstPix->r = 255 - srcPix->r; + dstPix->g = 255 - srcPix->g; + dstPix->b = 255 - srcPix->b; + dstPix->a = 255 - srcPix->a; + } + else { + dstPix->r = 0; + dstPix->g = 0; + dstPix->b = 0; + dstPix->a = 0; + } + dstPix++; + } + } + + // we are finished with the source images so release them + } + catch(NoImageEx &) { + // if we were interrupted, the failed fetch is fine, just return kOfxStatOK + // otherwise, something weird happened + if(!gEffectHost->abort(instance)) { + status = kOfxStatFailed; + } + } + + if(sourceImg) + gEffectHost->clipReleaseImage(sourceImg); + if(outputImg) + gEffectHost->clipReleaseImage(outputImg); + + // all was well + return status; +} + +// describe the plugin in context +static OfxStatus +describeInContext( OfxImageEffectHandle effect, OfxPropertySetHandle /*inArgs*/) +{ + OfxPropertySetHandle props; + // define the single output clip in both contexts + gEffectHost->clipDefine(effect, kOfxImageEffectOutputClipName, &props); + + // set the component types we can handle on out output + gPropHost->propSetString(props, kOfxImageEffectPropSupportedComponents, 0, kOfxImageComponentRGBA); + + // define the single source clip in both contexts + gEffectHost->clipDefine(effect, kOfxImageEffectSimpleSourceClipName, &props); + + // set the component types we can handle on our main input + gPropHost->propSetString(props, kOfxImageEffectPropSupportedComponents, 0, kOfxImageComponentRGBA); + + return kOfxStatOK; +} + +//////////////////////////////////////////////////////////////////////////////// +// the plugin's description routine +static OfxStatus +describe(OfxImageEffectHandle effect) +{ + // get the property handle for the plugin + OfxPropertySetHandle effectProps; + gEffectHost->getPropertySet(effect, &effectProps); + + // say we cannot support multiple pixel depths and let the clip preferences action deal with it all. + gPropHost->propSetInt(effectProps, kOfxImageEffectPropSupportsMultipleClipDepths, 0, 0); + + // set the bit depths the plugin can handle + gPropHost->propSetString(effectProps, kOfxImageEffectPropSupportedPixelDepths, 0, kOfxBitDepthByte); + + // set plugin label and the group it belongs to + gPropHost->propSetString(effectProps, kOfxPropLabel, 0, "OFX Invert Example"); + gPropHost->propSetString(effectProps, kOfxImageEffectPluginPropGrouping, 0, "OFX Example"); + + // define the contexts we can be used in + gPropHost->propSetString(effectProps, kOfxImageEffectPropSupportedContexts, 0, kOfxImageEffectContextFilter); + + return kOfxStatOK; +} + +//////////////////////////////////////////////////////////////////////////////// +// Called at load +static OfxStatus +onLoad(void) +{ + // fetch the host suites out of the global host pointer + if(!gHost) return kOfxStatErrMissingHostFeature; + + gEffectHost = (OfxImageEffectSuiteV1 *) gHost->fetchSuite(gHost->host, kOfxImageEffectSuite, 1); + gPropHost = (OfxPropertySuiteV1 *) gHost->fetchSuite(gHost->host, kOfxPropertySuite, 1); + if(!gEffectHost || !gPropHost) + return kOfxStatErrMissingHostFeature; + return kOfxStatOK; +} + +//////////////////////////////////////////////////////////////////////////////// +// The main entry point function +static OfxStatus +pluginMain(const char *action, const void *handle, OfxPropertySetHandle inArgs, OfxPropertySetHandle outArgs) +{ + try { + // cast to appropriate type + OfxImageEffectHandle effect = (OfxImageEffectHandle) handle; + + if(strcmp(action, kOfxActionLoad) == 0) { + return onLoad(); + } + else if(strcmp(action, kOfxActionDescribe) == 0) { + return describe(effect); + } + else if(strcmp(action, kOfxImageEffectActionDescribeInContext) == 0) { + return describeInContext(effect, inArgs); + } + else if(strcmp(action, kOfxImageEffectActionRender) == 0) { + return render(effect, inArgs, outArgs); + } + } catch (std::bad_alloc) { + // catch memory + //std::cout << "OFX Plugin Memory error." << std::endl; + return kOfxStatErrMemory; + } catch ( const std::exception& e ) { + // standard exceptions + //std::cout << "OFX Plugin error: " << e.what() << std::endl; + return kOfxStatErrUnknown; + } catch (int err) { + // ho hum, gone wrong somehow + return err; + } catch ( ... ) { + // everything else + //std::cout << "OFX Plugin error" << std::endl; + return kOfxStatErrUnknown; + } + + // other actions to take the default value + return kOfxStatReplyDefault; +} + +// function to set the host structure +static void +setHostFunc(OfxHost *hostStruct) +{ + gHost = hostStruct; +} + +//////////////////////////////////////////////////////////////////////////////// +// the plugin struct +static OfxPlugin basicPlugin = +{ + kOfxImageEffectPluginApi, + 1, + "uk.co.thefoundry.OfxInvertExample", + 1, + 0, + setHostFunc, + pluginMain +}; + +// the two mandated functions +EXPORT OfxPlugin * +OfxGetPlugin(int nth) +{ + if(nth == 0) + return &basicPlugin; + return 0; +} + +EXPORT int +OfxGetNumberOfPlugins(void) +{ + return 1; +} diff --git a/test_package/src/test_package.cpp b/test_package/src/test_package.cpp deleted file mode 100644 index 80f6376b..00000000 --- a/test_package/src/test_package.cpp +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright OpenFX and contributors to the OpenFX project. -// SPDX-License-Identifier: BSD-3-Clause - -#include - -#include "ofxhPluginCache.h" -#include "ofxhPropertySuite.h" -#include "ofxhImageEffectAPI.h" - -class MyHost : public OFX::Host::ImageEffect::Host -{ -public : - OFX::Host::ImageEffect::Instance* newInstance(void* clientData, - OFX::Host::ImageEffect::ImageEffectPlugin* plugin, - OFX::Host::ImageEffect::Descriptor& desc, - const std::string& context) override - { - return nullptr; - } - - OFX::Host::ImageEffect::Descriptor *makeDescriptor(OFX::Host::ImageEffect::ImageEffectPlugin* plugin) override - { - return new OFX::Host::ImageEffect::Descriptor(plugin); - } - - OFX::Host::ImageEffect::Descriptor *makeDescriptor(const OFX::Host::ImageEffect::Descriptor &rootContext, - OFX::Host::ImageEffect::ImageEffectPlugin *plugin) override - { - return new OFX::Host::ImageEffect::Descriptor(rootContext, plugin); - } - - OFX::Host::ImageEffect::Descriptor *makeDescriptor(const std::string &bundlePath, - OFX::Host::ImageEffect::ImageEffectPlugin *plugin) override - { - return new OFX::Host::ImageEffect::Descriptor(bundlePath, plugin); - } - - /// vmessage - OfxStatus vmessage(const char* type, - const char* id, - const char* format, - va_list args) override - { - OfxStatus status = kOfxStatOK; - - const char *prefix = "Message : "; - if (strcmp(type, kOfxMessageLog) == 0) { - prefix = "Log : "; - } - else if(strcmp(type, kOfxMessageFatal) == 0 || - strcmp(type, kOfxMessageError) == 0) { - prefix = "Error : "; - } - else if(strcmp(type, kOfxMessageQuestion) == 0) { - prefix = "Question : "; - status = kOfxStatReplyYes; - } - - fputs(prefix, stdout); - vprintf(format, args); - printf("\n"); - - return status; - } - - OfxStatus setPersistentMessage(const char* type, - const char* id, - const char* format, - va_list args) override - { - return vmessage(type, id, format, args); - } - - OfxStatus clearPersistentMessage() override - { - return kOfxStatOK; - } - -#ifdef OFX_SUPPORTS_OPENGLRENDER - /// @see OfxImageEffectOpenGLRenderSuiteV1.flushResources() - OfxStatus flushOpenGLResources() const override { return kOfxStatFailed; }; -#endif -}; - -int main(int argc, char **argv) -{ - OFX::Host::PluginCache::getPluginCache()->setCacheVersion("testPackageV1"); - MyHost myHost; - OFX::Host::ImageEffect::PluginCache imageEffectPluginCache(myHost); - imageEffectPluginCache.registerInCache(*OFX::Host::PluginCache::getPluginCache()); - - OFX::Host::PluginCache::getPluginCache()->scanPluginFiles(); - - // Search for the invert plugin to make sure we can successfully load a plugin built with - // this package. - bool found_invert_plugin = false; - for (const auto* plugin : OFX::Host::PluginCache::getPluginCache()->getPlugins()) { - if (plugin->getIdentifier() == "net.sf.openfx.invertPlugin") { - found_invert_plugin = true; - break; - } - } - - imageEffectPluginCache.dumpToStdOut(); - - OFX::Host::PluginCache::clearPluginCache(); - - if (!found_invert_plugin) { - printf("Failed to find plugin.\n"); - return 1; - } - - return 0; -} From 4043ef5a6ed7befab366976e46d2634c41af557c Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Mon, 3 Mar 2025 10:38:22 -0500 Subject: [PATCH 18/33] Clean up generated ofxPropsMetadata Signed-off-by: Gary Oberbrunner --- openfx-cpp/include/openfx/ofxPropsAccess.h | 35 - openfx-cpp/include/openfx/ofxPropsMetadata.h | 2164 ++++++------------ scripts/gen-props.py | 25 +- 3 files changed, 747 insertions(+), 1477 deletions(-) diff --git a/openfx-cpp/include/openfx/ofxPropsAccess.h b/openfx-cpp/include/openfx/ofxPropsAccess.h index 9fafc5e4..9fe7806b 100644 --- a/openfx-cpp/include/openfx/ofxPropsAccess.h +++ b/openfx-cpp/include/openfx/ofxPropsAccess.h @@ -179,41 +179,6 @@ struct PropTypeToNative { using type = void *; }; -// Helper to check if a type is compatible with a PropType -template -struct IsTypeCompatible { - static constexpr bool value = false; -}; - -template <> -struct IsTypeCompatible { - static constexpr bool value = true; -}; -template <> -struct IsTypeCompatible { - static constexpr bool value = true; -}; -template <> -struct IsTypeCompatible { - static constexpr bool value = true; -}; -template <> -struct IsTypeCompatible { - static constexpr bool value = true; -}; -template <> -struct IsTypeCompatible { - static constexpr bool value = true; -}; -template <> -struct IsTypeCompatible { - static constexpr bool value = true; -}; -template <> -struct IsTypeCompatible { - static constexpr bool value = true; -}; - // Helper to create property enum values with strong typing template struct EnumValue { diff --git a/openfx-cpp/include/openfx/ofxPropsMetadata.h b/openfx-cpp/include/openfx/ofxPropsMetadata.h index 7cae19ed..f67d6b07 100644 --- a/openfx-cpp/include/openfx/ofxPropsMetadata.h +++ b/openfx-cpp/include/openfx/ofxPropsMetadata.h @@ -4,7 +4,9 @@ #pragma once -#include +#include +#include + #include "ofxImageEffect.h" #include "ofxGPURender.h" #include "ofxColour.h" @@ -305,185 +307,364 @@ struct PropDefsArray { // Property definitions static inline constexpr PropDefsArray prop_defs = { {{ -{ "OfxImageClipPropColourspace", PropId::OfxImageClipPropColourspace, {PropType::String}, 1, 1, nullptr, 0}, -{ "OfxImageClipPropConnected", PropId::OfxImageClipPropConnected, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageClipPropContinuousSamples", PropId::OfxImageClipPropContinuousSamples, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageClipPropFieldExtraction", PropId::OfxImageClipPropFieldExtraction, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageClipPropFieldExtraction.data(), prop_enum_values::OfxImageClipPropFieldExtraction.size()}, -{ "OfxImageClipPropFieldOrder", PropId::OfxImageClipPropFieldOrder, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageClipPropFieldOrder.data(), prop_enum_values::OfxImageClipPropFieldOrder.size()}, -{ "OfxImageClipPropIsMask", PropId::OfxImageClipPropIsMask, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageClipPropOptional", PropId::OfxImageClipPropOptional, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageClipPropPreferredColourspaces", PropId::OfxImageClipPropPreferredColourspaces, {PropType::String}, 1, 0, nullptr, 0}, -{ "OfxImageClipPropUnmappedComponents", PropId::OfxImageClipPropUnmappedComponents, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageClipPropUnmappedComponents.data(), prop_enum_values::OfxImageClipPropUnmappedComponents.size()}, -{ "OfxImageClipPropUnmappedPixelDepth", PropId::OfxImageClipPropUnmappedPixelDepth, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageClipPropUnmappedPixelDepth.data(), prop_enum_values::OfxImageClipPropUnmappedPixelDepth.size()}, -{ "OfxImageEffectFrameVarying", PropId::OfxImageEffectFrameVarying, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectHostPropIsBackground", PropId::OfxImageEffectHostPropIsBackground, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectHostPropNativeOrigin", PropId::OfxImageEffectHostPropNativeOrigin, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectHostPropNativeOrigin.data(), prop_enum_values::OfxImageEffectHostPropNativeOrigin.size()}, -{ "OfxImageEffectInstancePropEffectDuration", PropId::OfxImageEffectInstancePropEffectDuration, {PropType::Double}, 1, 1, nullptr, 0}, -{ "OfxImageEffectInstancePropSequentialRender", PropId::OfxImageEffectInstancePropSequentialRender, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPluginPropFieldRenderTwiceAlways", PropId::OfxImageEffectPluginPropFieldRenderTwiceAlways, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPluginPropGrouping", PropId::OfxImageEffectPluginPropGrouping, {PropType::String}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPluginPropHostFrameThreading", PropId::OfxImageEffectPluginPropHostFrameThreading, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPluginPropOverlayInteractV1", PropId::OfxImageEffectPluginPropOverlayInteractV1, {PropType::Pointer}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPluginPropOverlayInteractV2", PropId::OfxImageEffectPluginPropOverlayInteractV2, {PropType::Pointer}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPluginPropSingleInstance", PropId::OfxImageEffectPluginPropSingleInstance, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPluginRenderThreadSafety", PropId::OfxImageEffectPluginRenderThreadSafety, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPluginRenderThreadSafety.data(), prop_enum_values::OfxImageEffectPluginRenderThreadSafety.size()}, -{ "OfxImageEffectPropClipPreferencesSlaveParam", PropId::OfxImageEffectPropClipPreferencesSlaveParam, {PropType::String}, 1, 0, nullptr, 0}, -{ "OfxImageEffectPropColourManagementAvailableConfigs", PropId::OfxImageEffectPropColourManagementAvailableConfigs, {PropType::String}, 1, 0, nullptr, 0}, -{ "OfxImageEffectPropColourManagementConfig", PropId::OfxImageEffectPropColourManagementConfig, {PropType::String}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropColourManagementStyle", PropId::OfxImageEffectPropColourManagementStyle, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropColourManagementStyle.data(), prop_enum_values::OfxImageEffectPropColourManagementStyle.size()}, -{ "OfxImageEffectPropComponents", PropId::OfxImageEffectPropComponents, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropComponents.data(), prop_enum_values::OfxImageEffectPropComponents.size()}, -{ "OfxImageEffectPropContext", PropId::OfxImageEffectPropContext, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropContext.data(), prop_enum_values::OfxImageEffectPropContext.size()}, -{ "OfxImageEffectPropCudaEnabled", PropId::OfxImageEffectPropCudaEnabled, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropCudaRenderSupported", PropId::OfxImageEffectPropCudaRenderSupported, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropCudaRenderSupported.data(), prop_enum_values::OfxImageEffectPropCudaRenderSupported.size()}, -{ "OfxImageEffectPropCudaStream", PropId::OfxImageEffectPropCudaStream, {PropType::Pointer}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropCudaStreamSupported", PropId::OfxImageEffectPropCudaStreamSupported, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropCudaStreamSupported.data(), prop_enum_values::OfxImageEffectPropCudaStreamSupported.size()}, -{ "OfxImageEffectPropDisplayColourspace", PropId::OfxImageEffectPropDisplayColourspace, {PropType::String}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropFieldToRender", PropId::OfxImageEffectPropFieldToRender, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropFieldToRender.data(), prop_enum_values::OfxImageEffectPropFieldToRender.size()}, -{ "OfxImageEffectPropFrameRange", PropId::OfxImageEffectPropFrameRange, {PropType::Double}, 1, 2, nullptr, 0}, -{ "OfxImageEffectPropFrameRate", PropId::OfxImageEffectPropFrameRate, {PropType::Double}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropFrameStep", PropId::OfxImageEffectPropFrameStep, {PropType::Double}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropInAnalysis", PropId::OfxImageEffectPropInAnalysis, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropInteractiveRenderStatus", PropId::OfxImageEffectPropInteractiveRenderStatus, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropMetalCommandQueue", PropId::OfxImageEffectPropMetalCommandQueue, {PropType::Pointer}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropMetalEnabled", PropId::OfxImageEffectPropMetalEnabled, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropMetalRenderSupported", PropId::OfxImageEffectPropMetalRenderSupported, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropMetalRenderSupported.data(), prop_enum_values::OfxImageEffectPropMetalRenderSupported.size()}, -{ "OfxImageEffectPropMultipleClipDepths", PropId::OfxImageEffectPropMultipleClipDepths, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropOCIOConfig", PropId::OfxImageEffectPropOCIOConfig, {PropType::String}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropOCIODisplay", PropId::OfxImageEffectPropOCIODisplay, {PropType::String}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropOCIOView", PropId::OfxImageEffectPropOCIOView, {PropType::String}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropOpenCLCommandQueue", PropId::OfxImageEffectPropOpenCLCommandQueue, {PropType::Pointer}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropOpenCLEnabled", PropId::OfxImageEffectPropOpenCLEnabled, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropOpenCLImage", PropId::OfxImageEffectPropOpenCLImage, {PropType::Int}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropOpenCLRenderSupported", PropId::OfxImageEffectPropOpenCLRenderSupported, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropOpenCLRenderSupported.data(), prop_enum_values::OfxImageEffectPropOpenCLRenderSupported.size()}, -{ "OfxImageEffectPropOpenCLSupported", PropId::OfxImageEffectPropOpenCLSupported, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropOpenCLSupported.data(), prop_enum_values::OfxImageEffectPropOpenCLSupported.size()}, -{ "OfxImageEffectPropOpenGLEnabled", PropId::OfxImageEffectPropOpenGLEnabled, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropOpenGLRenderSupported", PropId::OfxImageEffectPropOpenGLRenderSupported, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropOpenGLRenderSupported.data(), prop_enum_values::OfxImageEffectPropOpenGLRenderSupported.size()}, -{ "OfxImageEffectPropOpenGLTextureIndex", PropId::OfxImageEffectPropOpenGLTextureIndex, {PropType::Int}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropOpenGLTextureTarget", PropId::OfxImageEffectPropOpenGLTextureTarget, {PropType::Int}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropPixelAspectRatio", PropId::OfxImageEffectPropPixelAspectRatio, {PropType::Double}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropPixelDepth", PropId::OfxImageEffectPropPixelDepth, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropPixelDepth.data(), prop_enum_values::OfxImageEffectPropPixelDepth.size()}, -{ "OfxImageEffectPropPluginHandle", PropId::OfxImageEffectPropPluginHandle, {PropType::Pointer}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropPreMultiplication", PropId::OfxImageEffectPropPreMultiplication, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropPreMultiplication.data(), prop_enum_values::OfxImageEffectPropPreMultiplication.size()}, -{ "OfxImageEffectPropProjectExtent", PropId::OfxImageEffectPropProjectExtent, {PropType::Double}, 1, 2, nullptr, 0}, -{ "OfxImageEffectPropProjectOffset", PropId::OfxImageEffectPropProjectOffset, {PropType::Double}, 1, 2, nullptr, 0}, -{ "OfxImageEffectPropProjectSize", PropId::OfxImageEffectPropProjectSize, {PropType::Double}, 1, 2, nullptr, 0}, -{ "OfxImageEffectPropRegionOfDefinition", PropId::OfxImageEffectPropRegionOfDefinition, {PropType::Int}, 1, 4, nullptr, 0}, -{ "OfxImageEffectPropRegionOfInterest", PropId::OfxImageEffectPropRegionOfInterest, {PropType::Int}, 1, 4, nullptr, 0}, -{ "OfxImageEffectPropRenderQualityDraft", PropId::OfxImageEffectPropRenderQualityDraft, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropRenderScale", PropId::OfxImageEffectPropRenderScale, {PropType::Double}, 1, 2, nullptr, 0}, -{ "OfxImageEffectPropRenderWindow", PropId::OfxImageEffectPropRenderWindow, {PropType::Int}, 1, 4, nullptr, 0}, -{ "OfxImageEffectPropSequentialRenderStatus", PropId::OfxImageEffectPropSequentialRenderStatus, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropSetableFielding", PropId::OfxImageEffectPropSetableFielding, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropSetableFrameRate", PropId::OfxImageEffectPropSetableFrameRate, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropSupportedComponents", PropId::OfxImageEffectPropSupportedComponents, {PropType::Enum}, 1, 0, prop_enum_values::OfxImageEffectPropSupportedComponents.data(), prop_enum_values::OfxImageEffectPropSupportedComponents.size()}, -{ "OfxImageEffectPropSupportedContexts", PropId::OfxImageEffectPropSupportedContexts, {PropType::Enum}, 1, 0, prop_enum_values::OfxImageEffectPropSupportedContexts.data(), prop_enum_values::OfxImageEffectPropSupportedContexts.size()}, -{ "OfxImageEffectPropSupportedPixelDepths", PropId::OfxImageEffectPropSupportedPixelDepths, {PropType::Enum}, 1, 0, prop_enum_values::OfxImageEffectPropSupportedPixelDepths.data(), prop_enum_values::OfxImageEffectPropSupportedPixelDepths.size()}, -{ "OfxImageEffectPropSupportsMultiResolution", PropId::OfxImageEffectPropSupportsMultiResolution, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropSupportsMultipleClipPARs", PropId::OfxImageEffectPropSupportsMultipleClipPARs, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropSupportsOverlays", PropId::OfxImageEffectPropSupportsOverlays, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropSupportsTiles", PropId::OfxImageEffectPropSupportsTiles, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropTemporalClipAccess", PropId::OfxImageEffectPropTemporalClipAccess, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxImageEffectPropUnmappedFrameRange", PropId::OfxImageEffectPropUnmappedFrameRange, {PropType::Double}, 1, 2, nullptr, 0}, -{ "OfxImageEffectPropUnmappedFrameRate", PropId::OfxImageEffectPropUnmappedFrameRate, {PropType::Double}, 1, 1, nullptr, 0}, -{ "OfxImagePropBounds", PropId::OfxImagePropBounds, {PropType::Int}, 1, 4, nullptr, 0}, -{ "OfxImagePropData", PropId::OfxImagePropData, {PropType::Pointer}, 1, 1, nullptr, 0}, -{ "OfxImagePropField", PropId::OfxImagePropField, {PropType::Enum}, 1, 1, prop_enum_values::OfxImagePropField.data(), prop_enum_values::OfxImagePropField.size()}, -{ "OfxImagePropPixelAspectRatio", PropId::OfxImagePropPixelAspectRatio, {PropType::Double}, 1, 1, nullptr, 0}, -{ "OfxImagePropRegionOfDefinition", PropId::OfxImagePropRegionOfDefinition, {PropType::Int}, 1, 4, nullptr, 0}, -{ "OfxImagePropRowBytes", PropId::OfxImagePropRowBytes, {PropType::Int}, 1, 1, nullptr, 0}, -{ "OfxImagePropUniqueIdentifier", PropId::OfxImagePropUniqueIdentifier, {PropType::String}, 1, 1, nullptr, 0}, -{ "OfxInteractPropBackgroundColour", PropId::OfxInteractPropBackgroundColour, {PropType::Double}, 1, 3, nullptr, 0}, -{ "OfxInteractPropBitDepth", PropId::OfxInteractPropBitDepth, {PropType::Int}, 1, 1, nullptr, 0}, -{ "OfxInteractPropDrawContext", PropId::OfxInteractPropDrawContext, {PropType::Pointer}, 1, 1, nullptr, 0}, -{ "OfxInteractPropHasAlpha", PropId::OfxInteractPropHasAlpha, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxInteractPropPenPosition", PropId::OfxInteractPropPenPosition, {PropType::Double}, 1, 2, nullptr, 0}, -{ "OfxInteractPropPenPressure", PropId::OfxInteractPropPenPressure, {PropType::Double}, 1, 1, nullptr, 0}, -{ "OfxInteractPropPenViewportPosition", PropId::OfxInteractPropPenViewportPosition, {PropType::Int}, 1, 2, nullptr, 0}, -{ "OfxInteractPropPixelScale", PropId::OfxInteractPropPixelScale, {PropType::Double}, 1, 2, nullptr, 0}, -{ "OfxInteractPropSlaveToParam", PropId::OfxInteractPropSlaveToParam, {PropType::String}, 1, 0, nullptr, 0}, -{ "OfxInteractPropSuggestedColour", PropId::OfxInteractPropSuggestedColour, {PropType::Double}, 1, 3, nullptr, 0}, -{ "OfxInteractPropViewport", PropId::OfxInteractPropViewport, {PropType::Int}, 1, 2, nullptr, 0}, -{ "OfxOpenGLPropPixelDepth", PropId::OfxOpenGLPropPixelDepth, {PropType::Enum}, 1, 0, prop_enum_values::OfxOpenGLPropPixelDepth.data(), prop_enum_values::OfxOpenGLPropPixelDepth.size()}, -{ "OfxParamHostPropMaxPages", PropId::OfxParamHostPropMaxPages, {PropType::Int}, 1, 1, nullptr, 0}, -{ "OfxParamHostPropMaxParameters", PropId::OfxParamHostPropMaxParameters, {PropType::Int}, 1, 1, nullptr, 0}, -{ "OfxParamHostPropPageRowColumnCount", PropId::OfxParamHostPropPageRowColumnCount, {PropType::Int}, 1, 2, nullptr, 0}, -{ "OfxParamHostPropSupportsBooleanAnimation", PropId::OfxParamHostPropSupportsBooleanAnimation, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamHostPropSupportsChoiceAnimation", PropId::OfxParamHostPropSupportsChoiceAnimation, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamHostPropSupportsCustomAnimation", PropId::OfxParamHostPropSupportsCustomAnimation, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamHostPropSupportsCustomInteract", PropId::OfxParamHostPropSupportsCustomInteract, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamHostPropSupportsParametricAnimation", PropId::OfxParamHostPropSupportsParametricAnimation, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamHostPropSupportsStrChoice", PropId::OfxParamHostPropSupportsStrChoice, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamHostPropSupportsStrChoiceAnimation", PropId::OfxParamHostPropSupportsStrChoiceAnimation, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamHostPropSupportsStringAnimation", PropId::OfxParamHostPropSupportsStringAnimation, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamPropAnimates", PropId::OfxParamPropAnimates, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamPropCacheInvalidation", PropId::OfxParamPropCacheInvalidation, {PropType::Enum}, 1, 1, prop_enum_values::OfxParamPropCacheInvalidation.data(), prop_enum_values::OfxParamPropCacheInvalidation.size()}, -{ "OfxParamPropCanUndo", PropId::OfxParamPropCanUndo, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamPropChoiceEnum", PropId::OfxParamPropChoiceEnum, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamPropChoiceOption", PropId::OfxParamPropChoiceOption, {PropType::String}, 1, 0, nullptr, 0}, -{ "OfxParamPropChoiceOrder", PropId::OfxParamPropChoiceOrder, {PropType::Int}, 1, 0, nullptr, 0}, -{ "OfxParamPropCustomCallbackV1", PropId::OfxParamPropCustomCallbackV1, {PropType::Pointer}, 1, 1, nullptr, 0}, -{ "OfxParamPropCustomValue", PropId::OfxParamPropCustomValue, {PropType::String}, 1, 2, nullptr, 0}, -{ "OfxParamPropDataPtr", PropId::OfxParamPropDataPtr, {PropType::Pointer}, 1, 1, nullptr, 0}, -{ "OfxParamPropDefault", PropId::OfxParamPropDefault, {PropType::Int,PropType::Double,PropType::String,PropType::Pointer}, 4, 0, nullptr, 0}, -{ "OfxParamPropDefaultCoordinateSystem", PropId::OfxParamPropDefaultCoordinateSystem, {PropType::Enum}, 1, 1, prop_enum_values::OfxParamPropDefaultCoordinateSystem.data(), prop_enum_values::OfxParamPropDefaultCoordinateSystem.size()}, -{ "OfxParamPropDigits", PropId::OfxParamPropDigits, {PropType::Int}, 1, 1, nullptr, 0}, -{ "OfxParamPropDimensionLabel", PropId::OfxParamPropDimensionLabel, {PropType::String}, 1, 1, nullptr, 0}, -{ "OfxParamPropDisplayMax", PropId::OfxParamPropDisplayMax, {PropType::Int,PropType::Double}, 2, 0, nullptr, 0}, -{ "OfxParamPropDisplayMin", PropId::OfxParamPropDisplayMin, {PropType::Int,PropType::Double}, 2, 0, nullptr, 0}, -{ "OfxParamPropDoubleType", PropId::OfxParamPropDoubleType, {PropType::Enum}, 1, 1, prop_enum_values::OfxParamPropDoubleType.data(), prop_enum_values::OfxParamPropDoubleType.size()}, -{ "OfxParamPropEnabled", PropId::OfxParamPropEnabled, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamPropEvaluateOnChange", PropId::OfxParamPropEvaluateOnChange, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamPropGroupOpen", PropId::OfxParamPropGroupOpen, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamPropHasHostOverlayHandle", PropId::OfxParamPropHasHostOverlayHandle, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamPropHint", PropId::OfxParamPropHint, {PropType::String}, 1, 1, nullptr, 0}, -{ "OfxParamPropIncrement", PropId::OfxParamPropIncrement, {PropType::Double}, 1, 1, nullptr, 0}, -{ "OfxParamPropInteractMinimumSize", PropId::OfxParamPropInteractMinimumSize, {PropType::Double}, 1, 2, nullptr, 0}, -{ "OfxParamPropInteractPreferedSize", PropId::OfxParamPropInteractPreferedSize, {PropType::Int}, 1, 2, nullptr, 0}, -{ "OfxParamPropInteractSize", PropId::OfxParamPropInteractSize, {PropType::Double}, 1, 2, nullptr, 0}, -{ "OfxParamPropInteractSizeAspect", PropId::OfxParamPropInteractSizeAspect, {PropType::Double}, 1, 1, nullptr, 0}, -{ "OfxParamPropInteractV1", PropId::OfxParamPropInteractV1, {PropType::Pointer}, 1, 1, nullptr, 0}, -{ "OfxParamPropInterpolationAmount", PropId::OfxParamPropInterpolationAmount, {PropType::Double}, 1, 1, nullptr, 0}, -{ "OfxParamPropInterpolationTime", PropId::OfxParamPropInterpolationTime, {PropType::Double}, 1, 2, nullptr, 0}, -{ "OfxParamPropIsAnimating", PropId::OfxParamPropIsAnimating, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamPropIsAutoKeying", PropId::OfxParamPropIsAutoKeying, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamPropMax", PropId::OfxParamPropMax, {PropType::Int,PropType::Double}, 2, 0, nullptr, 0}, -{ "OfxParamPropMin", PropId::OfxParamPropMin, {PropType::Int,PropType::Double}, 2, 0, nullptr, 0}, -{ "OfxParamPropPageChild", PropId::OfxParamPropPageChild, {PropType::String}, 1, 0, nullptr, 0}, -{ "OfxParamPropParametricDimension", PropId::OfxParamPropParametricDimension, {PropType::Int}, 1, 1, nullptr, 0}, -{ "OfxParamPropParametricInteractBackground", PropId::OfxParamPropParametricInteractBackground, {PropType::Pointer}, 1, 1, nullptr, 0}, -{ "OfxParamPropParametricRange", PropId::OfxParamPropParametricRange, {PropType::Double}, 1, 2, nullptr, 0}, -{ "OfxParamPropParametricUIColour", PropId::OfxParamPropParametricUIColour, {PropType::Double}, 1, 0, nullptr, 0}, -{ "OfxParamPropParent", PropId::OfxParamPropParent, {PropType::String}, 1, 1, nullptr, 0}, -{ "OfxParamPropPersistant", PropId::OfxParamPropPersistant, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamPropPluginMayWrite", PropId::OfxParamPropPluginMayWrite, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamPropScriptName", PropId::OfxParamPropScriptName, {PropType::String}, 1, 1, nullptr, 0}, -{ "OfxParamPropSecret", PropId::OfxParamPropSecret, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamPropShowTimeMarker", PropId::OfxParamPropShowTimeMarker, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamPropStringFilePathExists", PropId::OfxParamPropStringFilePathExists, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxParamPropStringMode", PropId::OfxParamPropStringMode, {PropType::Enum}, 1, 1, prop_enum_values::OfxParamPropStringMode.data(), prop_enum_values::OfxParamPropStringMode.size()}, -{ "OfxParamPropType", PropId::OfxParamPropType, {PropType::String}, 1, 1, nullptr, 0}, -{ "OfxPluginPropFilePath", PropId::OfxPluginPropFilePath, {PropType::Enum}, 1, 1, prop_enum_values::OfxPluginPropFilePath.data(), prop_enum_values::OfxPluginPropFilePath.size()}, -{ "OfxPluginPropParamPageOrder", PropId::OfxPluginPropParamPageOrder, {PropType::String}, 1, 0, nullptr, 0}, -{ "OfxPropAPIVersion", PropId::OfxPropAPIVersion, {PropType::Int}, 1, 0, nullptr, 0}, -{ "OfxPropChangeReason", PropId::OfxPropChangeReason, {PropType::Enum}, 1, 1, prop_enum_values::OfxPropChangeReason.data(), prop_enum_values::OfxPropChangeReason.size()}, -{ "OfxPropEffectInstance", PropId::OfxPropEffectInstance, {PropType::Pointer}, 1, 1, nullptr, 0}, -{ "OfxPropHostOSHandle", PropId::OfxPropHostOSHandle, {PropType::Pointer}, 1, 1, nullptr, 0}, -{ "OfxPropIcon", PropId::OfxPropIcon, {PropType::String}, 1, 2, nullptr, 0}, -{ "OfxPropInstanceData", PropId::OfxPropInstanceData, {PropType::Pointer}, 1, 1, nullptr, 0}, -{ "OfxPropIsInteractive", PropId::OfxPropIsInteractive, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxPropLabel", PropId::OfxPropLabel, {PropType::String}, 1, 1, nullptr, 0}, -{ "OfxPropLongLabel", PropId::OfxPropLongLabel, {PropType::String}, 1, 1, nullptr, 0}, -{ "OfxPropName", PropId::OfxPropName, {PropType::String}, 1, 1, nullptr, 0}, -{ "OfxPropParamSetNeedsSyncing", PropId::OfxPropParamSetNeedsSyncing, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "OfxPropPluginDescription", PropId::OfxPropPluginDescription, {PropType::String}, 1, 1, nullptr, 0}, -{ "OfxPropShortLabel", PropId::OfxPropShortLabel, {PropType::String}, 1, 1, nullptr, 0}, -{ "OfxPropTime", PropId::OfxPropTime, {PropType::Double}, 1, 1, nullptr, 0}, -{ "OfxPropType", PropId::OfxPropType, {PropType::String}, 1, 1, nullptr, 0}, -{ "OfxPropVersion", PropId::OfxPropVersion, {PropType::Int}, 1, 0, nullptr, 0}, -{ "OfxPropVersionLabel", PropId::OfxPropVersionLabel, {PropType::String}, 1, 1, nullptr, 0}, -{ "kOfxParamPropUseHostOverlayHandle", PropId::OfxParamPropUseHostOverlayHandle, {PropType::Bool}, 1, 1, nullptr, 0}, -{ "kOfxPropKeyString", PropId::OfxPropKeyString, {PropType::String}, 1, 1, nullptr, 0}, -{ "kOfxPropKeySym", PropId::OfxPropKeySym, {PropType::Int}, 1, 1, nullptr, 0}, +{ "OfxImageClipPropColourspace", PropId::OfxImageClipPropColourspace, + {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxImageClipPropConnected", PropId::OfxImageClipPropConnected, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageClipPropContinuousSamples", PropId::OfxImageClipPropContinuousSamples, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageClipPropFieldExtraction", PropId::OfxImageClipPropFieldExtraction, + {PropType::Enum}, 1, 1, prop_enum_values::OfxImageClipPropFieldExtraction.data(), prop_enum_values::OfxImageClipPropFieldExtraction.size()}, +{ "OfxImageClipPropFieldOrder", PropId::OfxImageClipPropFieldOrder, + {PropType::Enum}, 1, 1, prop_enum_values::OfxImageClipPropFieldOrder.data(), prop_enum_values::OfxImageClipPropFieldOrder.size()}, +{ "OfxImageClipPropIsMask", PropId::OfxImageClipPropIsMask, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageClipPropOptional", PropId::OfxImageClipPropOptional, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageClipPropPreferredColourspaces", PropId::OfxImageClipPropPreferredColourspaces, + {PropType::String}, 1, 0, nullptr, 0}, +{ "OfxImageClipPropUnmappedComponents", PropId::OfxImageClipPropUnmappedComponents, + {PropType::Enum}, 1, 1, prop_enum_values::OfxImageClipPropUnmappedComponents.data(), prop_enum_values::OfxImageClipPropUnmappedComponents.size()}, +{ "OfxImageClipPropUnmappedPixelDepth", PropId::OfxImageClipPropUnmappedPixelDepth, + {PropType::Enum}, 1, 1, prop_enum_values::OfxImageClipPropUnmappedPixelDepth.data(), prop_enum_values::OfxImageClipPropUnmappedPixelDepth.size()}, +{ "OfxImageEffectFrameVarying", PropId::OfxImageEffectFrameVarying, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectHostPropIsBackground", PropId::OfxImageEffectHostPropIsBackground, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectHostPropNativeOrigin", PropId::OfxImageEffectHostPropNativeOrigin, + {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectHostPropNativeOrigin.data(), prop_enum_values::OfxImageEffectHostPropNativeOrigin.size()}, +{ "OfxImageEffectInstancePropEffectDuration", PropId::OfxImageEffectInstancePropEffectDuration, + {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxImageEffectInstancePropSequentialRender", PropId::OfxImageEffectInstancePropSequentialRender, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPluginPropFieldRenderTwiceAlways", PropId::OfxImageEffectPluginPropFieldRenderTwiceAlways, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPluginPropGrouping", PropId::OfxImageEffectPluginPropGrouping, + {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPluginPropHostFrameThreading", PropId::OfxImageEffectPluginPropHostFrameThreading, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPluginPropOverlayInteractV1", PropId::OfxImageEffectPluginPropOverlayInteractV1, + {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPluginPropOverlayInteractV2", PropId::OfxImageEffectPluginPropOverlayInteractV2, + {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPluginPropSingleInstance", PropId::OfxImageEffectPluginPropSingleInstance, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPluginRenderThreadSafety", PropId::OfxImageEffectPluginRenderThreadSafety, + {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPluginRenderThreadSafety.data(), prop_enum_values::OfxImageEffectPluginRenderThreadSafety.size()}, +{ "OfxImageEffectPropClipPreferencesSlaveParam", PropId::OfxImageEffectPropClipPreferencesSlaveParam, + {PropType::String}, 1, 0, nullptr, 0}, +{ "OfxImageEffectPropColourManagementAvailableConfigs", PropId::OfxImageEffectPropColourManagementAvailableConfigs, + {PropType::String}, 1, 0, nullptr, 0}, +{ "OfxImageEffectPropColourManagementConfig", PropId::OfxImageEffectPropColourManagementConfig, + {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropColourManagementStyle", PropId::OfxImageEffectPropColourManagementStyle, + {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropColourManagementStyle.data(), prop_enum_values::OfxImageEffectPropColourManagementStyle.size()}, +{ "OfxImageEffectPropComponents", PropId::OfxImageEffectPropComponents, + {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropComponents.data(), prop_enum_values::OfxImageEffectPropComponents.size()}, +{ "OfxImageEffectPropContext", PropId::OfxImageEffectPropContext, + {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropContext.data(), prop_enum_values::OfxImageEffectPropContext.size()}, +{ "OfxImageEffectPropCudaEnabled", PropId::OfxImageEffectPropCudaEnabled, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropCudaRenderSupported", PropId::OfxImageEffectPropCudaRenderSupported, + {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropCudaRenderSupported.data(), prop_enum_values::OfxImageEffectPropCudaRenderSupported.size()}, +{ "OfxImageEffectPropCudaStream", PropId::OfxImageEffectPropCudaStream, + {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropCudaStreamSupported", PropId::OfxImageEffectPropCudaStreamSupported, + {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropCudaStreamSupported.data(), prop_enum_values::OfxImageEffectPropCudaStreamSupported.size()}, +{ "OfxImageEffectPropDisplayColourspace", PropId::OfxImageEffectPropDisplayColourspace, + {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropFieldToRender", PropId::OfxImageEffectPropFieldToRender, + {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropFieldToRender.data(), prop_enum_values::OfxImageEffectPropFieldToRender.size()}, +{ "OfxImageEffectPropFrameRange", PropId::OfxImageEffectPropFrameRange, + {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxImageEffectPropFrameRate", PropId::OfxImageEffectPropFrameRate, + {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropFrameStep", PropId::OfxImageEffectPropFrameStep, + {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropInAnalysis", PropId::OfxImageEffectPropInAnalysis, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropInteractiveRenderStatus", PropId::OfxImageEffectPropInteractiveRenderStatus, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropMetalCommandQueue", PropId::OfxImageEffectPropMetalCommandQueue, + {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropMetalEnabled", PropId::OfxImageEffectPropMetalEnabled, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropMetalRenderSupported", PropId::OfxImageEffectPropMetalRenderSupported, + {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropMetalRenderSupported.data(), prop_enum_values::OfxImageEffectPropMetalRenderSupported.size()}, +{ "OfxImageEffectPropMultipleClipDepths", PropId::OfxImageEffectPropMultipleClipDepths, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropOCIOConfig", PropId::OfxImageEffectPropOCIOConfig, + {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropOCIODisplay", PropId::OfxImageEffectPropOCIODisplay, + {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropOCIOView", PropId::OfxImageEffectPropOCIOView, + {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropOpenCLCommandQueue", PropId::OfxImageEffectPropOpenCLCommandQueue, + {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropOpenCLEnabled", PropId::OfxImageEffectPropOpenCLEnabled, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropOpenCLImage", PropId::OfxImageEffectPropOpenCLImage, + {PropType::Int}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropOpenCLRenderSupported", PropId::OfxImageEffectPropOpenCLRenderSupported, + {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropOpenCLRenderSupported.data(), prop_enum_values::OfxImageEffectPropOpenCLRenderSupported.size()}, +{ "OfxImageEffectPropOpenCLSupported", PropId::OfxImageEffectPropOpenCLSupported, + {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropOpenCLSupported.data(), prop_enum_values::OfxImageEffectPropOpenCLSupported.size()}, +{ "OfxImageEffectPropOpenGLEnabled", PropId::OfxImageEffectPropOpenGLEnabled, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropOpenGLRenderSupported", PropId::OfxImageEffectPropOpenGLRenderSupported, + {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropOpenGLRenderSupported.data(), prop_enum_values::OfxImageEffectPropOpenGLRenderSupported.size()}, +{ "OfxImageEffectPropOpenGLTextureIndex", PropId::OfxImageEffectPropOpenGLTextureIndex, + {PropType::Int}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropOpenGLTextureTarget", PropId::OfxImageEffectPropOpenGLTextureTarget, + {PropType::Int}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropPixelAspectRatio", PropId::OfxImageEffectPropPixelAspectRatio, + {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropPixelDepth", PropId::OfxImageEffectPropPixelDepth, + {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropPixelDepth.data(), prop_enum_values::OfxImageEffectPropPixelDepth.size()}, +{ "OfxImageEffectPropPluginHandle", PropId::OfxImageEffectPropPluginHandle, + {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropPreMultiplication", PropId::OfxImageEffectPropPreMultiplication, + {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropPreMultiplication.data(), prop_enum_values::OfxImageEffectPropPreMultiplication.size()}, +{ "OfxImageEffectPropProjectExtent", PropId::OfxImageEffectPropProjectExtent, + {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxImageEffectPropProjectOffset", PropId::OfxImageEffectPropProjectOffset, + {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxImageEffectPropProjectSize", PropId::OfxImageEffectPropProjectSize, + {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxImageEffectPropRegionOfDefinition", PropId::OfxImageEffectPropRegionOfDefinition, + {PropType::Int}, 1, 4, nullptr, 0}, +{ "OfxImageEffectPropRegionOfInterest", PropId::OfxImageEffectPropRegionOfInterest, + {PropType::Int}, 1, 4, nullptr, 0}, +{ "OfxImageEffectPropRenderQualityDraft", PropId::OfxImageEffectPropRenderQualityDraft, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropRenderScale", PropId::OfxImageEffectPropRenderScale, + {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxImageEffectPropRenderWindow", PropId::OfxImageEffectPropRenderWindow, + {PropType::Int}, 1, 4, nullptr, 0}, +{ "OfxImageEffectPropSequentialRenderStatus", PropId::OfxImageEffectPropSequentialRenderStatus, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropSetableFielding", PropId::OfxImageEffectPropSetableFielding, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropSetableFrameRate", PropId::OfxImageEffectPropSetableFrameRate, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropSupportedComponents", PropId::OfxImageEffectPropSupportedComponents, + {PropType::Enum}, 1, 0, prop_enum_values::OfxImageEffectPropSupportedComponents.data(), prop_enum_values::OfxImageEffectPropSupportedComponents.size()}, +{ "OfxImageEffectPropSupportedContexts", PropId::OfxImageEffectPropSupportedContexts, + {PropType::Enum}, 1, 0, prop_enum_values::OfxImageEffectPropSupportedContexts.data(), prop_enum_values::OfxImageEffectPropSupportedContexts.size()}, +{ "OfxImageEffectPropSupportedPixelDepths", PropId::OfxImageEffectPropSupportedPixelDepths, + {PropType::Enum}, 1, 0, prop_enum_values::OfxImageEffectPropSupportedPixelDepths.data(), prop_enum_values::OfxImageEffectPropSupportedPixelDepths.size()}, +{ "OfxImageEffectPropSupportsMultiResolution", PropId::OfxImageEffectPropSupportsMultiResolution, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropSupportsMultipleClipPARs", PropId::OfxImageEffectPropSupportsMultipleClipPARs, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropSupportsOverlays", PropId::OfxImageEffectPropSupportsOverlays, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropSupportsTiles", PropId::OfxImageEffectPropSupportsTiles, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropTemporalClipAccess", PropId::OfxImageEffectPropTemporalClipAccess, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropUnmappedFrameRange", PropId::OfxImageEffectPropUnmappedFrameRange, + {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxImageEffectPropUnmappedFrameRate", PropId::OfxImageEffectPropUnmappedFrameRate, + {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxImagePropBounds", PropId::OfxImagePropBounds, + {PropType::Int}, 1, 4, nullptr, 0}, +{ "OfxImagePropData", PropId::OfxImagePropData, + {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxImagePropField", PropId::OfxImagePropField, + {PropType::Enum}, 1, 1, prop_enum_values::OfxImagePropField.data(), prop_enum_values::OfxImagePropField.size()}, +{ "OfxImagePropPixelAspectRatio", PropId::OfxImagePropPixelAspectRatio, + {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxImagePropRegionOfDefinition", PropId::OfxImagePropRegionOfDefinition, + {PropType::Int}, 1, 4, nullptr, 0}, +{ "OfxImagePropRowBytes", PropId::OfxImagePropRowBytes, + {PropType::Int}, 1, 1, nullptr, 0}, +{ "OfxImagePropUniqueIdentifier", PropId::OfxImagePropUniqueIdentifier, + {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxInteractPropBackgroundColour", PropId::OfxInteractPropBackgroundColour, + {PropType::Double}, 1, 3, nullptr, 0}, +{ "OfxInteractPropBitDepth", PropId::OfxInteractPropBitDepth, + {PropType::Int}, 1, 1, nullptr, 0}, +{ "OfxInteractPropDrawContext", PropId::OfxInteractPropDrawContext, + {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxInteractPropHasAlpha", PropId::OfxInteractPropHasAlpha, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxInteractPropPenPosition", PropId::OfxInteractPropPenPosition, + {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxInteractPropPenPressure", PropId::OfxInteractPropPenPressure, + {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxInteractPropPenViewportPosition", PropId::OfxInteractPropPenViewportPosition, + {PropType::Int}, 1, 2, nullptr, 0}, +{ "OfxInteractPropPixelScale", PropId::OfxInteractPropPixelScale, + {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxInteractPropSlaveToParam", PropId::OfxInteractPropSlaveToParam, + {PropType::String}, 1, 0, nullptr, 0}, +{ "OfxInteractPropSuggestedColour", PropId::OfxInteractPropSuggestedColour, + {PropType::Double}, 1, 3, nullptr, 0}, +{ "OfxInteractPropViewport", PropId::OfxInteractPropViewport, + {PropType::Int}, 1, 2, nullptr, 0}, +{ "OfxOpenGLPropPixelDepth", PropId::OfxOpenGLPropPixelDepth, + {PropType::Enum}, 1, 0, prop_enum_values::OfxOpenGLPropPixelDepth.data(), prop_enum_values::OfxOpenGLPropPixelDepth.size()}, +{ "OfxParamHostPropMaxPages", PropId::OfxParamHostPropMaxPages, + {PropType::Int}, 1, 1, nullptr, 0}, +{ "OfxParamHostPropMaxParameters", PropId::OfxParamHostPropMaxParameters, + {PropType::Int}, 1, 1, nullptr, 0}, +{ "OfxParamHostPropPageRowColumnCount", PropId::OfxParamHostPropPageRowColumnCount, + {PropType::Int}, 1, 2, nullptr, 0}, +{ "OfxParamHostPropSupportsBooleanAnimation", PropId::OfxParamHostPropSupportsBooleanAnimation, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamHostPropSupportsChoiceAnimation", PropId::OfxParamHostPropSupportsChoiceAnimation, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamHostPropSupportsCustomAnimation", PropId::OfxParamHostPropSupportsCustomAnimation, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamHostPropSupportsCustomInteract", PropId::OfxParamHostPropSupportsCustomInteract, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamHostPropSupportsParametricAnimation", PropId::OfxParamHostPropSupportsParametricAnimation, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamHostPropSupportsStrChoice", PropId::OfxParamHostPropSupportsStrChoice, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamHostPropSupportsStrChoiceAnimation", PropId::OfxParamHostPropSupportsStrChoiceAnimation, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamHostPropSupportsStringAnimation", PropId::OfxParamHostPropSupportsStringAnimation, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropAnimates", PropId::OfxParamPropAnimates, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropCacheInvalidation", PropId::OfxParamPropCacheInvalidation, + {PropType::Enum}, 1, 1, prop_enum_values::OfxParamPropCacheInvalidation.data(), prop_enum_values::OfxParamPropCacheInvalidation.size()}, +{ "OfxParamPropCanUndo", PropId::OfxParamPropCanUndo, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropChoiceEnum", PropId::OfxParamPropChoiceEnum, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropChoiceOption", PropId::OfxParamPropChoiceOption, + {PropType::String}, 1, 0, nullptr, 0}, +{ "OfxParamPropChoiceOrder", PropId::OfxParamPropChoiceOrder, + {PropType::Int}, 1, 0, nullptr, 0}, +{ "OfxParamPropCustomCallbackV1", PropId::OfxParamPropCustomCallbackV1, + {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxParamPropCustomValue", PropId::OfxParamPropCustomValue, + {PropType::String}, 1, 2, nullptr, 0}, +{ "OfxParamPropDataPtr", PropId::OfxParamPropDataPtr, + {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxParamPropDefault", PropId::OfxParamPropDefault, + {PropType::Int,PropType::Double,PropType::String,PropType::Pointer}, 4, 0, nullptr, 0}, +{ "OfxParamPropDefaultCoordinateSystem", PropId::OfxParamPropDefaultCoordinateSystem, + {PropType::Enum}, 1, 1, prop_enum_values::OfxParamPropDefaultCoordinateSystem.data(), prop_enum_values::OfxParamPropDefaultCoordinateSystem.size()}, +{ "OfxParamPropDigits", PropId::OfxParamPropDigits, + {PropType::Int}, 1, 1, nullptr, 0}, +{ "OfxParamPropDimensionLabel", PropId::OfxParamPropDimensionLabel, + {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxParamPropDisplayMax", PropId::OfxParamPropDisplayMax, + {PropType::Int,PropType::Double}, 2, 0, nullptr, 0}, +{ "OfxParamPropDisplayMin", PropId::OfxParamPropDisplayMin, + {PropType::Int,PropType::Double}, 2, 0, nullptr, 0}, +{ "OfxParamPropDoubleType", PropId::OfxParamPropDoubleType, + {PropType::Enum}, 1, 1, prop_enum_values::OfxParamPropDoubleType.data(), prop_enum_values::OfxParamPropDoubleType.size()}, +{ "OfxParamPropEnabled", PropId::OfxParamPropEnabled, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropEvaluateOnChange", PropId::OfxParamPropEvaluateOnChange, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropGroupOpen", PropId::OfxParamPropGroupOpen, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropHasHostOverlayHandle", PropId::OfxParamPropHasHostOverlayHandle, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropHint", PropId::OfxParamPropHint, + {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxParamPropIncrement", PropId::OfxParamPropIncrement, + {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxParamPropInteractMinimumSize", PropId::OfxParamPropInteractMinimumSize, + {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxParamPropInteractPreferedSize", PropId::OfxParamPropInteractPreferedSize, + {PropType::Int}, 1, 2, nullptr, 0}, +{ "OfxParamPropInteractSize", PropId::OfxParamPropInteractSize, + {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxParamPropInteractSizeAspect", PropId::OfxParamPropInteractSizeAspect, + {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxParamPropInteractV1", PropId::OfxParamPropInteractV1, + {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxParamPropInterpolationAmount", PropId::OfxParamPropInterpolationAmount, + {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxParamPropInterpolationTime", PropId::OfxParamPropInterpolationTime, + {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxParamPropIsAnimating", PropId::OfxParamPropIsAnimating, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropIsAutoKeying", PropId::OfxParamPropIsAutoKeying, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropMax", PropId::OfxParamPropMax, + {PropType::Int,PropType::Double}, 2, 0, nullptr, 0}, +{ "OfxParamPropMin", PropId::OfxParamPropMin, + {PropType::Int,PropType::Double}, 2, 0, nullptr, 0}, +{ "OfxParamPropPageChild", PropId::OfxParamPropPageChild, + {PropType::String}, 1, 0, nullptr, 0}, +{ "OfxParamPropParametricDimension", PropId::OfxParamPropParametricDimension, + {PropType::Int}, 1, 1, nullptr, 0}, +{ "OfxParamPropParametricInteractBackground", PropId::OfxParamPropParametricInteractBackground, + {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxParamPropParametricRange", PropId::OfxParamPropParametricRange, + {PropType::Double}, 1, 2, nullptr, 0}, +{ "OfxParamPropParametricUIColour", PropId::OfxParamPropParametricUIColour, + {PropType::Double}, 1, 0, nullptr, 0}, +{ "OfxParamPropParent", PropId::OfxParamPropParent, + {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxParamPropPersistant", PropId::OfxParamPropPersistant, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropPluginMayWrite", PropId::OfxParamPropPluginMayWrite, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropScriptName", PropId::OfxParamPropScriptName, + {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxParamPropSecret", PropId::OfxParamPropSecret, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropShowTimeMarker", PropId::OfxParamPropShowTimeMarker, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropStringFilePathExists", PropId::OfxParamPropStringFilePathExists, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxParamPropStringMode", PropId::OfxParamPropStringMode, + {PropType::Enum}, 1, 1, prop_enum_values::OfxParamPropStringMode.data(), prop_enum_values::OfxParamPropStringMode.size()}, +{ "OfxParamPropType", PropId::OfxParamPropType, + {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxPluginPropFilePath", PropId::OfxPluginPropFilePath, + {PropType::Enum}, 1, 1, prop_enum_values::OfxPluginPropFilePath.data(), prop_enum_values::OfxPluginPropFilePath.size()}, +{ "OfxPluginPropParamPageOrder", PropId::OfxPluginPropParamPageOrder, + {PropType::String}, 1, 0, nullptr, 0}, +{ "OfxPropAPIVersion", PropId::OfxPropAPIVersion, + {PropType::Int}, 1, 0, nullptr, 0}, +{ "OfxPropChangeReason", PropId::OfxPropChangeReason, + {PropType::Enum}, 1, 1, prop_enum_values::OfxPropChangeReason.data(), prop_enum_values::OfxPropChangeReason.size()}, +{ "OfxPropEffectInstance", PropId::OfxPropEffectInstance, + {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxPropHostOSHandle", PropId::OfxPropHostOSHandle, + {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxPropIcon", PropId::OfxPropIcon, + {PropType::String}, 1, 2, nullptr, 0}, +{ "OfxPropInstanceData", PropId::OfxPropInstanceData, + {PropType::Pointer}, 1, 1, nullptr, 0}, +{ "OfxPropIsInteractive", PropId::OfxPropIsInteractive, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxPropLabel", PropId::OfxPropLabel, + {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxPropLongLabel", PropId::OfxPropLongLabel, + {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxPropName", PropId::OfxPropName, + {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxPropParamSetNeedsSyncing", PropId::OfxPropParamSetNeedsSyncing, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxPropPluginDescription", PropId::OfxPropPluginDescription, + {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxPropShortLabel", PropId::OfxPropShortLabel, + {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxPropTime", PropId::OfxPropTime, + {PropType::Double}, 1, 1, nullptr, 0}, +{ "OfxPropType", PropId::OfxPropType, + {PropType::String}, 1, 1, nullptr, 0}, +{ "OfxPropVersion", PropId::OfxPropVersion, + {PropType::Int}, 1, 0, nullptr, 0}, +{ "OfxPropVersionLabel", PropId::OfxPropVersionLabel, + {PropType::String}, 1, 1, nullptr, 0}, +{ "kOfxParamPropUseHostOverlayHandle", PropId::OfxParamPropUseHostOverlayHandle, + {PropType::Bool}, 1, 1, nullptr, 0}, +{ "kOfxPropKeyString", PropId::OfxPropKeyString, + {PropType::String}, 1, 1, nullptr, 0}, +{ "kOfxPropKeySym", PropId::OfxPropKeySym, + {PropType::Int}, 1, 1, nullptr, 0}, }} }; @@ -495,1260 +676,377 @@ namespace properties { template struct PropTraits; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageClipPropColourspace]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageClipPropConnected]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageClipPropContinuousSamples]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageClipPropFieldExtraction]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageClipPropFieldOrder]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageClipPropIsMask]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageClipPropOptional]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageClipPropPreferredColourspaces]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageClipPropUnmappedComponents]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageClipPropUnmappedPixelDepth]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectFrameVarying]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectHostPropIsBackground]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectHostPropNativeOrigin]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectInstancePropEffectDuration]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectInstancePropSequentialRender]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPluginPropFieldRenderTwiceAlways]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPluginPropGrouping]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPluginPropHostFrameThreading]; -}; -template<> -struct PropTraits { - using type = void *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPluginPropOverlayInteractV1]; -}; -template<> -struct PropTraits { - using type = void *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPluginPropOverlayInteractV2]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPluginPropSingleInstance]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPluginRenderThreadSafety]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropClipPreferencesSlaveParam]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropColourManagementAvailableConfigs]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropColourManagementConfig]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropColourManagementStyle]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropComponents]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropContext]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropCudaEnabled]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropCudaRenderSupported]; -}; -template<> -struct PropTraits { - using type = void *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropCudaStream]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropCudaStreamSupported]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropDisplayColourspace]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropFieldToRender]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropFrameRange]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropFrameRate]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropFrameStep]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropInAnalysis]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropInteractiveRenderStatus]; -}; -template<> -struct PropTraits { - using type = void *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropMetalCommandQueue]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropMetalEnabled]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropMetalRenderSupported]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropMultipleClipDepths]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOCIOConfig]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOCIODisplay]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOCIOView]; -}; -template<> -struct PropTraits { - using type = void *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOpenCLCommandQueue]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOpenCLEnabled]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOpenCLImage]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOpenCLRenderSupported]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOpenCLSupported]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOpenGLEnabled]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOpenGLRenderSupported]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOpenGLTextureIndex]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropOpenGLTextureTarget]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropPixelAspectRatio]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropPixelDepth]; -}; -template<> -struct PropTraits { - using type = void *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropPluginHandle]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropPreMultiplication]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropProjectExtent]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropProjectOffset]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropProjectSize]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropRegionOfDefinition]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropRegionOfInterest]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropRenderQualityDraft]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropRenderScale]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropRenderWindow]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropSequentialRenderStatus]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropSetableFielding]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropSetableFrameRate]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropSupportedComponents]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropSupportedContexts]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropSupportedPixelDepths]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropSupportsMultiResolution]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropSupportsMultipleClipPARs]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropSupportsOverlays]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropSupportsTiles]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropTemporalClipAccess]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropUnmappedFrameRange]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImageEffectPropUnmappedFrameRate]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImagePropBounds]; -}; -template<> -struct PropTraits { - using type = void *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImagePropData]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImagePropField]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImagePropPixelAspectRatio]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImagePropRegionOfDefinition]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImagePropRowBytes]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxImagePropUniqueIdentifier]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropBackgroundColour]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropBitDepth]; -}; -template<> -struct PropTraits { - using type = void *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropDrawContext]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropHasAlpha]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropPenPosition]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropPenPressure]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropPenViewportPosition]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropPixelScale]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropSlaveToParam]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropSuggestedColour]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxInteractPropViewport]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxOpenGLPropPixelDepth]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropMaxPages]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropMaxParameters]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropPageRowColumnCount]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropSupportsBooleanAnimation]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropSupportsChoiceAnimation]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropSupportsCustomAnimation]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropSupportsCustomInteract]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropSupportsParametricAnimation]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropSupportsStrChoice]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropSupportsStrChoiceAnimation]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamHostPropSupportsStringAnimation]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropAnimates]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropCacheInvalidation]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropCanUndo]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropChoiceEnum]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropChoiceOption]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropChoiceOrder]; -}; -template<> -struct PropTraits { - using type = void *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropCustomCallbackV1]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropCustomValue]; -}; -template<> -struct PropTraits { - using type = void *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropDataPtr]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = true; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropDefault]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropDefaultCoordinateSystem]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropDigits]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropDimensionLabel]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = true; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropDisplayMax]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = true; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropDisplayMin]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropDoubleType]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropEnabled]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropEvaluateOnChange]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropGroupOpen]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropHasHostOverlayHandle]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropHint]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropIncrement]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropInteractMinimumSize]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropInteractPreferedSize]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropInteractSize]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropInteractSizeAspect]; -}; -template<> -struct PropTraits { - using type = void *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropInteractV1]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropInterpolationAmount]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropInterpolationTime]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropIsAnimating]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropIsAutoKeying]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = true; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropMax]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = true; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropMin]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropPageChild]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropParametricDimension]; -}; -template<> -struct PropTraits { - using type = void *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropParametricInteractBackground]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropParametricRange]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropParametricUIColour]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropParent]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropPersistant]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropPluginMayWrite]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropScriptName]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropSecret]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropShowTimeMarker]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropStringFilePathExists]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropStringMode]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropType]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxPluginPropFilePath]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxPluginPropParamPageOrder]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxPropAPIVersion]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxPropChangeReason]; -}; -template<> -struct PropTraits { - using type = void *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxPropEffectInstance]; -}; -template<> -struct PropTraits { - using type = void *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxPropHostOSHandle]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxPropIcon]; -}; -template<> -struct PropTraits { - using type = void *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxPropInstanceData]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxPropIsInteractive]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxPropLabel]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxPropLongLabel]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxPropName]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxPropParamSetNeedsSyncing]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxPropPluginDescription]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxPropShortLabel]; -}; -template<> -struct PropTraits { - using type = double; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxPropTime]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxPropType]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxPropVersion]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxPropVersionLabel]; -}; -template<> -struct PropTraits { - using type = bool; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxParamPropUseHostOverlayHandle]; -}; -template<> -struct PropTraits { - using type = const char *; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxPropKeyString]; -}; -template<> -struct PropTraits { - using type = int; - static constexpr bool is_multitype = false; - static constexpr const PropDef& def = prop_defs[PropId::OfxPropKeySym]; -}; +#define DEFINE_PROP_TRAITS(id, _type, _is_multitype) \ +template<> \ +struct PropTraits { \ + using type = _type; \ + static constexpr bool is_multitype = _is_multitype; \ + static constexpr const PropDef& def = prop_defs[PropId::id]; \ +} + +DEFINE_PROP_TRAITS(OfxImageClipPropColourspace, const char *, false); +DEFINE_PROP_TRAITS(OfxImageClipPropConnected, bool, false); +DEFINE_PROP_TRAITS(OfxImageClipPropContinuousSamples, bool, false); +DEFINE_PROP_TRAITS(OfxImageClipPropFieldExtraction, const char *, false); +DEFINE_PROP_TRAITS(OfxImageClipPropFieldOrder, const char *, false); +DEFINE_PROP_TRAITS(OfxImageClipPropIsMask, bool, false); +DEFINE_PROP_TRAITS(OfxImageClipPropOptional, bool, false); +DEFINE_PROP_TRAITS(OfxImageClipPropPreferredColourspaces, const char *, false); +DEFINE_PROP_TRAITS(OfxImageClipPropUnmappedComponents, const char *, false); +DEFINE_PROP_TRAITS(OfxImageClipPropUnmappedPixelDepth, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectFrameVarying, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectHostPropIsBackground, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectHostPropNativeOrigin, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectInstancePropEffectDuration, double, false); +DEFINE_PROP_TRAITS(OfxImageEffectInstancePropSequentialRender, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectPluginPropFieldRenderTwiceAlways, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectPluginPropGrouping, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPluginPropHostFrameThreading, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectPluginPropOverlayInteractV1, void *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPluginPropOverlayInteractV2, void *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPluginPropSingleInstance, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectPluginRenderThreadSafety, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropClipPreferencesSlaveParam, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropColourManagementAvailableConfigs, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropColourManagementConfig, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropColourManagementStyle, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropComponents, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropContext, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropCudaEnabled, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropCudaRenderSupported, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropCudaStream, void *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropCudaStreamSupported, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropDisplayColourspace, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropFieldToRender, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropFrameRange, double, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropFrameRate, double, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropFrameStep, double, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropInAnalysis, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropInteractiveRenderStatus, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropMetalCommandQueue, void *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropMetalEnabled, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropMetalRenderSupported, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropMultipleClipDepths, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropOCIOConfig, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropOCIODisplay, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropOCIOView, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropOpenCLCommandQueue, void *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropOpenCLEnabled, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropOpenCLImage, int, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropOpenCLRenderSupported, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropOpenCLSupported, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropOpenGLEnabled, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropOpenGLRenderSupported, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropOpenGLTextureIndex, int, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropOpenGLTextureTarget, int, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropPixelAspectRatio, double, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropPixelDepth, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropPluginHandle, void *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropPreMultiplication, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropProjectExtent, double, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropProjectOffset, double, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropProjectSize, double, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropRegionOfDefinition, int, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropRegionOfInterest, int, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropRenderQualityDraft, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropRenderScale, double, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropRenderWindow, int, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropSequentialRenderStatus, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropSetableFielding, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropSetableFrameRate, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropSupportedComponents, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropSupportedContexts, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropSupportedPixelDepths, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropSupportsMultiResolution, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropSupportsMultipleClipPARs, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropSupportsOverlays, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropSupportsTiles, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropTemporalClipAccess, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropUnmappedFrameRange, double, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropUnmappedFrameRate, double, false); +DEFINE_PROP_TRAITS(OfxImagePropBounds, int, false); +DEFINE_PROP_TRAITS(OfxImagePropData, void *, false); +DEFINE_PROP_TRAITS(OfxImagePropField, const char *, false); +DEFINE_PROP_TRAITS(OfxImagePropPixelAspectRatio, double, false); +DEFINE_PROP_TRAITS(OfxImagePropRegionOfDefinition, int, false); +DEFINE_PROP_TRAITS(OfxImagePropRowBytes, int, false); +DEFINE_PROP_TRAITS(OfxImagePropUniqueIdentifier, const char *, false); +DEFINE_PROP_TRAITS(OfxInteractPropBackgroundColour, double, false); +DEFINE_PROP_TRAITS(OfxInteractPropBitDepth, int, false); +DEFINE_PROP_TRAITS(OfxInteractPropDrawContext, void *, false); +DEFINE_PROP_TRAITS(OfxInteractPropHasAlpha, bool, false); +DEFINE_PROP_TRAITS(OfxInteractPropPenPosition, double, false); +DEFINE_PROP_TRAITS(OfxInteractPropPenPressure, double, false); +DEFINE_PROP_TRAITS(OfxInteractPropPenViewportPosition, int, false); +DEFINE_PROP_TRAITS(OfxInteractPropPixelScale, double, false); +DEFINE_PROP_TRAITS(OfxInteractPropSlaveToParam, const char *, false); +DEFINE_PROP_TRAITS(OfxInteractPropSuggestedColour, double, false); +DEFINE_PROP_TRAITS(OfxInteractPropViewport, int, false); +DEFINE_PROP_TRAITS(OfxOpenGLPropPixelDepth, const char *, false); +DEFINE_PROP_TRAITS(OfxParamHostPropMaxPages, int, false); +DEFINE_PROP_TRAITS(OfxParamHostPropMaxParameters, int, false); +DEFINE_PROP_TRAITS(OfxParamHostPropPageRowColumnCount, int, false); +DEFINE_PROP_TRAITS(OfxParamHostPropSupportsBooleanAnimation, bool, false); +DEFINE_PROP_TRAITS(OfxParamHostPropSupportsChoiceAnimation, bool, false); +DEFINE_PROP_TRAITS(OfxParamHostPropSupportsCustomAnimation, bool, false); +DEFINE_PROP_TRAITS(OfxParamHostPropSupportsCustomInteract, bool, false); +DEFINE_PROP_TRAITS(OfxParamHostPropSupportsParametricAnimation, bool, false); +DEFINE_PROP_TRAITS(OfxParamHostPropSupportsStrChoice, bool, false); +DEFINE_PROP_TRAITS(OfxParamHostPropSupportsStrChoiceAnimation, bool, false); +DEFINE_PROP_TRAITS(OfxParamHostPropSupportsStringAnimation, bool, false); +DEFINE_PROP_TRAITS(OfxParamPropAnimates, bool, false); +DEFINE_PROP_TRAITS(OfxParamPropCacheInvalidation, const char *, false); +DEFINE_PROP_TRAITS(OfxParamPropCanUndo, bool, false); +DEFINE_PROP_TRAITS(OfxParamPropChoiceEnum, bool, false); +DEFINE_PROP_TRAITS(OfxParamPropChoiceOption, const char *, false); +DEFINE_PROP_TRAITS(OfxParamPropChoiceOrder, int, false); +DEFINE_PROP_TRAITS(OfxParamPropCustomCallbackV1, void *, false); +DEFINE_PROP_TRAITS(OfxParamPropCustomValue, const char *, false); +DEFINE_PROP_TRAITS(OfxParamPropDataPtr, void *, false); +DEFINE_PROP_TRAITS(OfxParamPropDefault, int, true); +DEFINE_PROP_TRAITS(OfxParamPropDefaultCoordinateSystem, const char *, false); +DEFINE_PROP_TRAITS(OfxParamPropDigits, int, false); +DEFINE_PROP_TRAITS(OfxParamPropDimensionLabel, const char *, false); +DEFINE_PROP_TRAITS(OfxParamPropDisplayMax, int, true); +DEFINE_PROP_TRAITS(OfxParamPropDisplayMin, int, true); +DEFINE_PROP_TRAITS(OfxParamPropDoubleType, const char *, false); +DEFINE_PROP_TRAITS(OfxParamPropEnabled, bool, false); +DEFINE_PROP_TRAITS(OfxParamPropEvaluateOnChange, bool, false); +DEFINE_PROP_TRAITS(OfxParamPropGroupOpen, bool, false); +DEFINE_PROP_TRAITS(OfxParamPropHasHostOverlayHandle, bool, false); +DEFINE_PROP_TRAITS(OfxParamPropHint, const char *, false); +DEFINE_PROP_TRAITS(OfxParamPropIncrement, double, false); +DEFINE_PROP_TRAITS(OfxParamPropInteractMinimumSize, double, false); +DEFINE_PROP_TRAITS(OfxParamPropInteractPreferedSize, int, false); +DEFINE_PROP_TRAITS(OfxParamPropInteractSize, double, false); +DEFINE_PROP_TRAITS(OfxParamPropInteractSizeAspect, double, false); +DEFINE_PROP_TRAITS(OfxParamPropInteractV1, void *, false); +DEFINE_PROP_TRAITS(OfxParamPropInterpolationAmount, double, false); +DEFINE_PROP_TRAITS(OfxParamPropInterpolationTime, double, false); +DEFINE_PROP_TRAITS(OfxParamPropIsAnimating, bool, false); +DEFINE_PROP_TRAITS(OfxParamPropIsAutoKeying, bool, false); +DEFINE_PROP_TRAITS(OfxParamPropMax, int, true); +DEFINE_PROP_TRAITS(OfxParamPropMin, int, true); +DEFINE_PROP_TRAITS(OfxParamPropPageChild, const char *, false); +DEFINE_PROP_TRAITS(OfxParamPropParametricDimension, int, false); +DEFINE_PROP_TRAITS(OfxParamPropParametricInteractBackground, void *, false); +DEFINE_PROP_TRAITS(OfxParamPropParametricRange, double, false); +DEFINE_PROP_TRAITS(OfxParamPropParametricUIColour, double, false); +DEFINE_PROP_TRAITS(OfxParamPropParent, const char *, false); +DEFINE_PROP_TRAITS(OfxParamPropPersistant, bool, false); +DEFINE_PROP_TRAITS(OfxParamPropPluginMayWrite, bool, false); +DEFINE_PROP_TRAITS(OfxParamPropScriptName, const char *, false); +DEFINE_PROP_TRAITS(OfxParamPropSecret, bool, false); +DEFINE_PROP_TRAITS(OfxParamPropShowTimeMarker, bool, false); +DEFINE_PROP_TRAITS(OfxParamPropStringFilePathExists, bool, false); +DEFINE_PROP_TRAITS(OfxParamPropStringMode, const char *, false); +DEFINE_PROP_TRAITS(OfxParamPropType, const char *, false); +DEFINE_PROP_TRAITS(OfxPluginPropFilePath, const char *, false); +DEFINE_PROP_TRAITS(OfxPluginPropParamPageOrder, const char *, false); +DEFINE_PROP_TRAITS(OfxPropAPIVersion, int, false); +DEFINE_PROP_TRAITS(OfxPropChangeReason, const char *, false); +DEFINE_PROP_TRAITS(OfxPropEffectInstance, void *, false); +DEFINE_PROP_TRAITS(OfxPropHostOSHandle, void *, false); +DEFINE_PROP_TRAITS(OfxPropIcon, const char *, false); +DEFINE_PROP_TRAITS(OfxPropInstanceData, void *, false); +DEFINE_PROP_TRAITS(OfxPropIsInteractive, bool, false); +DEFINE_PROP_TRAITS(OfxPropLabel, const char *, false); +DEFINE_PROP_TRAITS(OfxPropLongLabel, const char *, false); +DEFINE_PROP_TRAITS(OfxPropName, const char *, false); +DEFINE_PROP_TRAITS(OfxPropParamSetNeedsSyncing, bool, false); +DEFINE_PROP_TRAITS(OfxPropPluginDescription, const char *, false); +DEFINE_PROP_TRAITS(OfxPropShortLabel, const char *, false); +DEFINE_PROP_TRAITS(OfxPropTime, double, false); +DEFINE_PROP_TRAITS(OfxPropType, const char *, false); +DEFINE_PROP_TRAITS(OfxPropVersion, int, false); +DEFINE_PROP_TRAITS(OfxPropVersionLabel, const char *, false); +DEFINE_PROP_TRAITS(OfxParamPropUseHostOverlayHandle, bool, false); +DEFINE_PROP_TRAITS(OfxPropKeyString, const char *, false); +DEFINE_PROP_TRAITS(OfxPropKeySym, int, false); } // namespace properties // Static asserts to check #define names vs. strings -static_assert(std::string_view("OfxImageClipPropColourspace") == std::string_view(kOfxImageClipPropColourspace)); -static_assert(std::string_view("OfxImageClipPropConnected") == std::string_view(kOfxImageClipPropConnected)); -static_assert(std::string_view("OfxImageClipPropContinuousSamples") == std::string_view(kOfxImageClipPropContinuousSamples)); -static_assert(std::string_view("OfxImageClipPropFieldExtraction") == std::string_view(kOfxImageClipPropFieldExtraction)); -static_assert(std::string_view("OfxImageClipPropFieldOrder") == std::string_view(kOfxImageClipPropFieldOrder)); -static_assert(std::string_view("OfxImageClipPropIsMask") == std::string_view(kOfxImageClipPropIsMask)); -static_assert(std::string_view("OfxImageClipPropOptional") == std::string_view(kOfxImageClipPropOptional)); -static_assert(std::string_view("OfxImageClipPropPreferredColourspaces") == std::string_view(kOfxImageClipPropPreferredColourspaces)); -static_assert(std::string_view("OfxImageClipPropUnmappedComponents") == std::string_view(kOfxImageClipPropUnmappedComponents)); -static_assert(std::string_view("OfxImageClipPropUnmappedPixelDepth") == std::string_view(kOfxImageClipPropUnmappedPixelDepth)); -static_assert(std::string_view("OfxImageEffectFrameVarying") == std::string_view(kOfxImageEffectFrameVarying)); -static_assert(std::string_view("OfxImageEffectHostPropIsBackground") == std::string_view(kOfxImageEffectHostPropIsBackground)); -static_assert(std::string_view("OfxImageEffectHostPropNativeOrigin") == std::string_view(kOfxImageEffectHostPropNativeOrigin)); -static_assert(std::string_view("OfxImageEffectInstancePropEffectDuration") == std::string_view(kOfxImageEffectInstancePropEffectDuration)); -static_assert(std::string_view("OfxImageEffectInstancePropSequentialRender") == std::string_view(kOfxImageEffectInstancePropSequentialRender)); -static_assert(std::string_view("OfxImageEffectPluginPropFieldRenderTwiceAlways") == std::string_view(kOfxImageEffectPluginPropFieldRenderTwiceAlways)); -static_assert(std::string_view("OfxImageEffectPluginPropGrouping") == std::string_view(kOfxImageEffectPluginPropGrouping)); -static_assert(std::string_view("OfxImageEffectPluginPropHostFrameThreading") == std::string_view(kOfxImageEffectPluginPropHostFrameThreading)); -static_assert(std::string_view("OfxImageEffectPluginPropOverlayInteractV1") == std::string_view(kOfxImageEffectPluginPropOverlayInteractV1)); -static_assert(std::string_view("OfxImageEffectPluginPropOverlayInteractV2") == std::string_view(kOfxImageEffectPluginPropOverlayInteractV2)); -static_assert(std::string_view("OfxImageEffectPluginPropSingleInstance") == std::string_view(kOfxImageEffectPluginPropSingleInstance)); -static_assert(std::string_view("OfxImageEffectPluginRenderThreadSafety") == std::string_view(kOfxImageEffectPluginRenderThreadSafety)); -static_assert(std::string_view("OfxImageEffectPropClipPreferencesSlaveParam") == std::string_view(kOfxImageEffectPropClipPreferencesSlaveParam)); -static_assert(std::string_view("OfxImageEffectPropColourManagementAvailableConfigs") == std::string_view(kOfxImageEffectPropColourManagementAvailableConfigs)); -static_assert(std::string_view("OfxImageEffectPropColourManagementConfig") == std::string_view(kOfxImageEffectPropColourManagementConfig)); -static_assert(std::string_view("OfxImageEffectPropColourManagementStyle") == std::string_view(kOfxImageEffectPropColourManagementStyle)); -static_assert(std::string_view("OfxImageEffectPropComponents") == std::string_view(kOfxImageEffectPropComponents)); -static_assert(std::string_view("OfxImageEffectPropContext") == std::string_view(kOfxImageEffectPropContext)); -static_assert(std::string_view("OfxImageEffectPropCudaEnabled") == std::string_view(kOfxImageEffectPropCudaEnabled)); -static_assert(std::string_view("OfxImageEffectPropCudaRenderSupported") == std::string_view(kOfxImageEffectPropCudaRenderSupported)); -static_assert(std::string_view("OfxImageEffectPropCudaStream") == std::string_view(kOfxImageEffectPropCudaStream)); -static_assert(std::string_view("OfxImageEffectPropCudaStreamSupported") == std::string_view(kOfxImageEffectPropCudaStreamSupported)); -static_assert(std::string_view("OfxImageEffectPropDisplayColourspace") == std::string_view(kOfxImageEffectPropDisplayColourspace)); -static_assert(std::string_view("OfxImageEffectPropFieldToRender") == std::string_view(kOfxImageEffectPropFieldToRender)); -static_assert(std::string_view("OfxImageEffectPropFrameRange") == std::string_view(kOfxImageEffectPropFrameRange)); -static_assert(std::string_view("OfxImageEffectPropFrameRate") == std::string_view(kOfxImageEffectPropFrameRate)); -static_assert(std::string_view("OfxImageEffectPropFrameStep") == std::string_view(kOfxImageEffectPropFrameStep)); -static_assert(std::string_view("OfxImageEffectPropInAnalysis") == std::string_view(kOfxImageEffectPropInAnalysis)); -static_assert(std::string_view("OfxImageEffectPropInteractiveRenderStatus") == std::string_view(kOfxImageEffectPropInteractiveRenderStatus)); -static_assert(std::string_view("OfxImageEffectPropMetalCommandQueue") == std::string_view(kOfxImageEffectPropMetalCommandQueue)); -static_assert(std::string_view("OfxImageEffectPropMetalEnabled") == std::string_view(kOfxImageEffectPropMetalEnabled)); -static_assert(std::string_view("OfxImageEffectPropMetalRenderSupported") == std::string_view(kOfxImageEffectPropMetalRenderSupported)); -static_assert(std::string_view("OfxImageEffectPropMultipleClipDepths") == std::string_view(kOfxImageEffectPropSupportsMultipleClipDepths)); -static_assert(std::string_view("OfxImageEffectPropOCIOConfig") == std::string_view(kOfxImageEffectPropOCIOConfig)); -static_assert(std::string_view("OfxImageEffectPropOCIODisplay") == std::string_view(kOfxImageEffectPropOCIODisplay)); -static_assert(std::string_view("OfxImageEffectPropOCIOView") == std::string_view(kOfxImageEffectPropOCIOView)); -static_assert(std::string_view("OfxImageEffectPropOpenCLCommandQueue") == std::string_view(kOfxImageEffectPropOpenCLCommandQueue)); -static_assert(std::string_view("OfxImageEffectPropOpenCLEnabled") == std::string_view(kOfxImageEffectPropOpenCLEnabled)); -static_assert(std::string_view("OfxImageEffectPropOpenCLImage") == std::string_view(kOfxImageEffectPropOpenCLImage)); -static_assert(std::string_view("OfxImageEffectPropOpenCLRenderSupported") == std::string_view(kOfxImageEffectPropOpenCLRenderSupported)); -static_assert(std::string_view("OfxImageEffectPropOpenCLSupported") == std::string_view(kOfxImageEffectPropOpenCLSupported)); -static_assert(std::string_view("OfxImageEffectPropOpenGLEnabled") == std::string_view(kOfxImageEffectPropOpenGLEnabled)); -static_assert(std::string_view("OfxImageEffectPropOpenGLRenderSupported") == std::string_view(kOfxImageEffectPropOpenGLRenderSupported)); -static_assert(std::string_view("OfxImageEffectPropOpenGLTextureIndex") == std::string_view(kOfxImageEffectPropOpenGLTextureIndex)); -static_assert(std::string_view("OfxImageEffectPropOpenGLTextureTarget") == std::string_view(kOfxImageEffectPropOpenGLTextureTarget)); -static_assert(std::string_view("OfxImageEffectPropPixelAspectRatio") == std::string_view(kOfxImageEffectPropProjectPixelAspectRatio)); -static_assert(std::string_view("OfxImageEffectPropPixelDepth") == std::string_view(kOfxImageEffectPropPixelDepth)); -static_assert(std::string_view("OfxImageEffectPropPluginHandle") == std::string_view(kOfxImageEffectPropPluginHandle)); -static_assert(std::string_view("OfxImageEffectPropPreMultiplication") == std::string_view(kOfxImageEffectPropPreMultiplication)); -static_assert(std::string_view("OfxImageEffectPropProjectExtent") == std::string_view(kOfxImageEffectPropProjectExtent)); -static_assert(std::string_view("OfxImageEffectPropProjectOffset") == std::string_view(kOfxImageEffectPropProjectOffset)); -static_assert(std::string_view("OfxImageEffectPropProjectSize") == std::string_view(kOfxImageEffectPropProjectSize)); -static_assert(std::string_view("OfxImageEffectPropRegionOfDefinition") == std::string_view(kOfxImageEffectPropRegionOfDefinition)); -static_assert(std::string_view("OfxImageEffectPropRegionOfInterest") == std::string_view(kOfxImageEffectPropRegionOfInterest)); -static_assert(std::string_view("OfxImageEffectPropRenderQualityDraft") == std::string_view(kOfxImageEffectPropRenderQualityDraft)); -static_assert(std::string_view("OfxImageEffectPropRenderScale") == std::string_view(kOfxImageEffectPropRenderScale)); -static_assert(std::string_view("OfxImageEffectPropRenderWindow") == std::string_view(kOfxImageEffectPropRenderWindow)); -static_assert(std::string_view("OfxImageEffectPropSequentialRenderStatus") == std::string_view(kOfxImageEffectPropSequentialRenderStatus)); -static_assert(std::string_view("OfxImageEffectPropSetableFielding") == std::string_view(kOfxImageEffectPropSetableFielding)); -static_assert(std::string_view("OfxImageEffectPropSetableFrameRate") == std::string_view(kOfxImageEffectPropSetableFrameRate)); -static_assert(std::string_view("OfxImageEffectPropSupportedComponents") == std::string_view(kOfxImageEffectPropSupportedComponents)); -static_assert(std::string_view("OfxImageEffectPropSupportedContexts") == std::string_view(kOfxImageEffectPropSupportedContexts)); -static_assert(std::string_view("OfxImageEffectPropSupportedPixelDepths") == std::string_view(kOfxImageEffectPropSupportedPixelDepths)); -static_assert(std::string_view("OfxImageEffectPropSupportsMultiResolution") == std::string_view(kOfxImageEffectPropSupportsMultiResolution)); -static_assert(std::string_view("OfxImageEffectPropSupportsMultipleClipPARs") == std::string_view(kOfxImageEffectPropSupportsMultipleClipPARs)); -static_assert(std::string_view("OfxImageEffectPropSupportsOverlays") == std::string_view(kOfxImageEffectPropSupportsOverlays)); -static_assert(std::string_view("OfxImageEffectPropSupportsTiles") == std::string_view(kOfxImageEffectPropSupportsTiles)); -static_assert(std::string_view("OfxImageEffectPropTemporalClipAccess") == std::string_view(kOfxImageEffectPropTemporalClipAccess)); -static_assert(std::string_view("OfxImageEffectPropUnmappedFrameRange") == std::string_view(kOfxImageEffectPropUnmappedFrameRange)); -static_assert(std::string_view("OfxImageEffectPropUnmappedFrameRate") == std::string_view(kOfxImageEffectPropUnmappedFrameRate)); -static_assert(std::string_view("OfxImagePropBounds") == std::string_view(kOfxImagePropBounds)); -static_assert(std::string_view("OfxImagePropData") == std::string_view(kOfxImagePropData)); -static_assert(std::string_view("OfxImagePropField") == std::string_view(kOfxImagePropField)); -static_assert(std::string_view("OfxImagePropPixelAspectRatio") == std::string_view(kOfxImagePropPixelAspectRatio)); -static_assert(std::string_view("OfxImagePropRegionOfDefinition") == std::string_view(kOfxImagePropRegionOfDefinition)); -static_assert(std::string_view("OfxImagePropRowBytes") == std::string_view(kOfxImagePropRowBytes)); -static_assert(std::string_view("OfxImagePropUniqueIdentifier") == std::string_view(kOfxImagePropUniqueIdentifier)); -static_assert(std::string_view("OfxInteractPropBackgroundColour") == std::string_view(kOfxInteractPropBackgroundColour)); -static_assert(std::string_view("OfxInteractPropBitDepth") == std::string_view(kOfxInteractPropBitDepth)); -static_assert(std::string_view("OfxInteractPropDrawContext") == std::string_view(kOfxInteractPropDrawContext)); -static_assert(std::string_view("OfxInteractPropHasAlpha") == std::string_view(kOfxInteractPropHasAlpha)); -static_assert(std::string_view("OfxInteractPropPenPosition") == std::string_view(kOfxInteractPropPenPosition)); -static_assert(std::string_view("OfxInteractPropPenPressure") == std::string_view(kOfxInteractPropPenPressure)); -static_assert(std::string_view("OfxInteractPropPenViewportPosition") == std::string_view(kOfxInteractPropPenViewportPosition)); -static_assert(std::string_view("OfxInteractPropPixelScale") == std::string_view(kOfxInteractPropPixelScale)); -static_assert(std::string_view("OfxInteractPropSlaveToParam") == std::string_view(kOfxInteractPropSlaveToParam)); -static_assert(std::string_view("OfxInteractPropSuggestedColour") == std::string_view(kOfxInteractPropSuggestedColour)); -static_assert(std::string_view("OfxInteractPropViewport") == std::string_view(kOfxInteractPropViewportSize)); -static_assert(std::string_view("OfxOpenGLPropPixelDepth") == std::string_view(kOfxOpenGLPropPixelDepth)); -static_assert(std::string_view("OfxParamHostPropMaxPages") == std::string_view(kOfxParamHostPropMaxPages)); -static_assert(std::string_view("OfxParamHostPropMaxParameters") == std::string_view(kOfxParamHostPropMaxParameters)); -static_assert(std::string_view("OfxParamHostPropPageRowColumnCount") == std::string_view(kOfxParamHostPropPageRowColumnCount)); -static_assert(std::string_view("OfxParamHostPropSupportsBooleanAnimation") == std::string_view(kOfxParamHostPropSupportsBooleanAnimation)); -static_assert(std::string_view("OfxParamHostPropSupportsChoiceAnimation") == std::string_view(kOfxParamHostPropSupportsChoiceAnimation)); -static_assert(std::string_view("OfxParamHostPropSupportsCustomAnimation") == std::string_view(kOfxParamHostPropSupportsCustomAnimation)); -static_assert(std::string_view("OfxParamHostPropSupportsCustomInteract") == std::string_view(kOfxParamHostPropSupportsCustomInteract)); -static_assert(std::string_view("OfxParamHostPropSupportsParametricAnimation") == std::string_view(kOfxParamHostPropSupportsParametricAnimation)); -static_assert(std::string_view("OfxParamHostPropSupportsStrChoice") == std::string_view(kOfxParamHostPropSupportsStrChoice)); -static_assert(std::string_view("OfxParamHostPropSupportsStrChoiceAnimation") == std::string_view(kOfxParamHostPropSupportsStrChoiceAnimation)); -static_assert(std::string_view("OfxParamHostPropSupportsStringAnimation") == std::string_view(kOfxParamHostPropSupportsStringAnimation)); -static_assert(std::string_view("OfxParamPropAnimates") == std::string_view(kOfxParamPropAnimates)); -static_assert(std::string_view("OfxParamPropCacheInvalidation") == std::string_view(kOfxParamPropCacheInvalidation)); -static_assert(std::string_view("OfxParamPropCanUndo") == std::string_view(kOfxParamPropCanUndo)); -static_assert(std::string_view("OfxParamPropChoiceEnum") == std::string_view(kOfxParamPropChoiceEnum)); -static_assert(std::string_view("OfxParamPropChoiceOption") == std::string_view(kOfxParamPropChoiceOption)); -static_assert(std::string_view("OfxParamPropChoiceOrder") == std::string_view(kOfxParamPropChoiceOrder)); -static_assert(std::string_view("OfxParamPropCustomCallbackV1") == std::string_view(kOfxParamPropCustomInterpCallbackV1)); -static_assert(std::string_view("OfxParamPropCustomValue") == std::string_view(kOfxParamPropCustomValue)); -static_assert(std::string_view("OfxParamPropDataPtr") == std::string_view(kOfxParamPropDataPtr)); -static_assert(std::string_view("OfxParamPropDefault") == std::string_view(kOfxParamPropDefault)); -static_assert(std::string_view("OfxParamPropDefaultCoordinateSystem") == std::string_view(kOfxParamPropDefaultCoordinateSystem)); -static_assert(std::string_view("OfxParamPropDigits") == std::string_view(kOfxParamPropDigits)); -static_assert(std::string_view("OfxParamPropDimensionLabel") == std::string_view(kOfxParamPropDimensionLabel)); -static_assert(std::string_view("OfxParamPropDisplayMax") == std::string_view(kOfxParamPropDisplayMax)); -static_assert(std::string_view("OfxParamPropDisplayMin") == std::string_view(kOfxParamPropDisplayMin)); -static_assert(std::string_view("OfxParamPropDoubleType") == std::string_view(kOfxParamPropDoubleType)); -static_assert(std::string_view("OfxParamPropEnabled") == std::string_view(kOfxParamPropEnabled)); -static_assert(std::string_view("OfxParamPropEvaluateOnChange") == std::string_view(kOfxParamPropEvaluateOnChange)); -static_assert(std::string_view("OfxParamPropGroupOpen") == std::string_view(kOfxParamPropGroupOpen)); -static_assert(std::string_view("OfxParamPropHasHostOverlayHandle") == std::string_view(kOfxParamPropHasHostOverlayHandle)); -static_assert(std::string_view("OfxParamPropHint") == std::string_view(kOfxParamPropHint)); -static_assert(std::string_view("OfxParamPropIncrement") == std::string_view(kOfxParamPropIncrement)); -static_assert(std::string_view("OfxParamPropInteractMinimumSize") == std::string_view(kOfxParamPropInteractMinimumSize)); -static_assert(std::string_view("OfxParamPropInteractPreferedSize") == std::string_view(kOfxParamPropInteractPreferedSize)); -static_assert(std::string_view("OfxParamPropInteractSize") == std::string_view(kOfxParamPropInteractSize)); -static_assert(std::string_view("OfxParamPropInteractSizeAspect") == std::string_view(kOfxParamPropInteractSizeAspect)); -static_assert(std::string_view("OfxParamPropInteractV1") == std::string_view(kOfxParamPropInteractV1)); -static_assert(std::string_view("OfxParamPropInterpolationAmount") == std::string_view(kOfxParamPropInterpolationAmount)); -static_assert(std::string_view("OfxParamPropInterpolationTime") == std::string_view(kOfxParamPropInterpolationTime)); -static_assert(std::string_view("OfxParamPropIsAnimating") == std::string_view(kOfxParamPropIsAnimating)); -static_assert(std::string_view("OfxParamPropIsAutoKeying") == std::string_view(kOfxParamPropIsAutoKeying)); -static_assert(std::string_view("OfxParamPropMax") == std::string_view(kOfxParamPropMax)); -static_assert(std::string_view("OfxParamPropMin") == std::string_view(kOfxParamPropMin)); -static_assert(std::string_view("OfxParamPropPageChild") == std::string_view(kOfxParamPropPageChild)); -static_assert(std::string_view("OfxParamPropParametricDimension") == std::string_view(kOfxParamPropParametricDimension)); -static_assert(std::string_view("OfxParamPropParametricInteractBackground") == std::string_view(kOfxParamPropParametricInteractBackground)); -static_assert(std::string_view("OfxParamPropParametricRange") == std::string_view(kOfxParamPropParametricRange)); -static_assert(std::string_view("OfxParamPropParametricUIColour") == std::string_view(kOfxParamPropParametricUIColour)); -static_assert(std::string_view("OfxParamPropParent") == std::string_view(kOfxParamPropParent)); -static_assert(std::string_view("OfxParamPropPersistant") == std::string_view(kOfxParamPropPersistant)); -static_assert(std::string_view("OfxParamPropPluginMayWrite") == std::string_view(kOfxParamPropPluginMayWrite)); -static_assert(std::string_view("OfxParamPropScriptName") == std::string_view(kOfxParamPropScriptName)); -static_assert(std::string_view("OfxParamPropSecret") == std::string_view(kOfxParamPropSecret)); -static_assert(std::string_view("OfxParamPropShowTimeMarker") == std::string_view(kOfxParamPropShowTimeMarker)); -static_assert(std::string_view("OfxParamPropStringFilePathExists") == std::string_view(kOfxParamPropStringFilePathExists)); -static_assert(std::string_view("OfxParamPropStringMode") == std::string_view(kOfxParamPropStringMode)); -static_assert(std::string_view("OfxParamPropType") == std::string_view(kOfxParamPropType)); -static_assert(std::string_view("OfxPluginPropFilePath") == std::string_view(kOfxPluginPropFilePath)); -static_assert(std::string_view("OfxPluginPropParamPageOrder") == std::string_view(kOfxPluginPropParamPageOrder)); -static_assert(std::string_view("OfxPropAPIVersion") == std::string_view(kOfxPropAPIVersion)); -static_assert(std::string_view("OfxPropChangeReason") == std::string_view(kOfxPropChangeReason)); -static_assert(std::string_view("OfxPropEffectInstance") == std::string_view(kOfxPropEffectInstance)); -static_assert(std::string_view("OfxPropHostOSHandle") == std::string_view(kOfxPropHostOSHandle)); -static_assert(std::string_view("OfxPropIcon") == std::string_view(kOfxPropIcon)); -static_assert(std::string_view("OfxPropInstanceData") == std::string_view(kOfxPropInstanceData)); -static_assert(std::string_view("OfxPropIsInteractive") == std::string_view(kOfxPropIsInteractive)); -static_assert(std::string_view("OfxPropLabel") == std::string_view(kOfxPropLabel)); -static_assert(std::string_view("OfxPropLongLabel") == std::string_view(kOfxPropLongLabel)); -static_assert(std::string_view("OfxPropName") == std::string_view(kOfxPropName)); -static_assert(std::string_view("OfxPropParamSetNeedsSyncing") == std::string_view(kOfxPropParamSetNeedsSyncing)); -static_assert(std::string_view("OfxPropPluginDescription") == std::string_view(kOfxPropPluginDescription)); -static_assert(std::string_view("OfxPropShortLabel") == std::string_view(kOfxPropShortLabel)); -static_assert(std::string_view("OfxPropTime") == std::string_view(kOfxPropTime)); -static_assert(std::string_view("OfxPropType") == std::string_view(kOfxPropType)); -static_assert(std::string_view("OfxPropVersion") == std::string_view(kOfxPropVersion)); -static_assert(std::string_view("OfxPropVersionLabel") == std::string_view(kOfxPropVersionLabel)); -static_assert(std::string_view("kOfxParamPropUseHostOverlayHandle") == std::string_view(kOfxParamPropUseHostOverlayHandle)); -static_assert(std::string_view("kOfxPropKeyString") == std::string_view(kOfxPropKeyString)); -static_assert(std::string_view("kOfxPropKeySym") == std::string_view(kOfxPropKeySym)); +namespace assertions { +using std::string_view; + +static_assert(string_view("OfxImageClipPropColourspace") == string_view(kOfxImageClipPropColourspace)); +static_assert(string_view("OfxImageClipPropConnected") == string_view(kOfxImageClipPropConnected)); +static_assert(string_view("OfxImageClipPropContinuousSamples") == string_view(kOfxImageClipPropContinuousSamples)); +static_assert(string_view("OfxImageClipPropFieldExtraction") == string_view(kOfxImageClipPropFieldExtraction)); +static_assert(string_view("OfxImageClipPropFieldOrder") == string_view(kOfxImageClipPropFieldOrder)); +static_assert(string_view("OfxImageClipPropIsMask") == string_view(kOfxImageClipPropIsMask)); +static_assert(string_view("OfxImageClipPropOptional") == string_view(kOfxImageClipPropOptional)); +static_assert(string_view("OfxImageClipPropPreferredColourspaces") == string_view(kOfxImageClipPropPreferredColourspaces)); +static_assert(string_view("OfxImageClipPropUnmappedComponents") == string_view(kOfxImageClipPropUnmappedComponents)); +static_assert(string_view("OfxImageClipPropUnmappedPixelDepth") == string_view(kOfxImageClipPropUnmappedPixelDepth)); +static_assert(string_view("OfxImageEffectFrameVarying") == string_view(kOfxImageEffectFrameVarying)); +static_assert(string_view("OfxImageEffectHostPropIsBackground") == string_view(kOfxImageEffectHostPropIsBackground)); +static_assert(string_view("OfxImageEffectHostPropNativeOrigin") == string_view(kOfxImageEffectHostPropNativeOrigin)); +static_assert(string_view("OfxImageEffectInstancePropEffectDuration") == string_view(kOfxImageEffectInstancePropEffectDuration)); +static_assert(string_view("OfxImageEffectInstancePropSequentialRender") == string_view(kOfxImageEffectInstancePropSequentialRender)); +static_assert(string_view("OfxImageEffectPluginPropFieldRenderTwiceAlways") == string_view(kOfxImageEffectPluginPropFieldRenderTwiceAlways)); +static_assert(string_view("OfxImageEffectPluginPropGrouping") == string_view(kOfxImageEffectPluginPropGrouping)); +static_assert(string_view("OfxImageEffectPluginPropHostFrameThreading") == string_view(kOfxImageEffectPluginPropHostFrameThreading)); +static_assert(string_view("OfxImageEffectPluginPropOverlayInteractV1") == string_view(kOfxImageEffectPluginPropOverlayInteractV1)); +static_assert(string_view("OfxImageEffectPluginPropOverlayInteractV2") == string_view(kOfxImageEffectPluginPropOverlayInteractV2)); +static_assert(string_view("OfxImageEffectPluginPropSingleInstance") == string_view(kOfxImageEffectPluginPropSingleInstance)); +static_assert(string_view("OfxImageEffectPluginRenderThreadSafety") == string_view(kOfxImageEffectPluginRenderThreadSafety)); +static_assert(string_view("OfxImageEffectPropClipPreferencesSlaveParam") == string_view(kOfxImageEffectPropClipPreferencesSlaveParam)); +static_assert(string_view("OfxImageEffectPropColourManagementAvailableConfigs") == string_view(kOfxImageEffectPropColourManagementAvailableConfigs)); +static_assert(string_view("OfxImageEffectPropColourManagementConfig") == string_view(kOfxImageEffectPropColourManagementConfig)); +static_assert(string_view("OfxImageEffectPropColourManagementStyle") == string_view(kOfxImageEffectPropColourManagementStyle)); +static_assert(string_view("OfxImageEffectPropComponents") == string_view(kOfxImageEffectPropComponents)); +static_assert(string_view("OfxImageEffectPropContext") == string_view(kOfxImageEffectPropContext)); +static_assert(string_view("OfxImageEffectPropCudaEnabled") == string_view(kOfxImageEffectPropCudaEnabled)); +static_assert(string_view("OfxImageEffectPropCudaRenderSupported") == string_view(kOfxImageEffectPropCudaRenderSupported)); +static_assert(string_view("OfxImageEffectPropCudaStream") == string_view(kOfxImageEffectPropCudaStream)); +static_assert(string_view("OfxImageEffectPropCudaStreamSupported") == string_view(kOfxImageEffectPropCudaStreamSupported)); +static_assert(string_view("OfxImageEffectPropDisplayColourspace") == string_view(kOfxImageEffectPropDisplayColourspace)); +static_assert(string_view("OfxImageEffectPropFieldToRender") == string_view(kOfxImageEffectPropFieldToRender)); +static_assert(string_view("OfxImageEffectPropFrameRange") == string_view(kOfxImageEffectPropFrameRange)); +static_assert(string_view("OfxImageEffectPropFrameRate") == string_view(kOfxImageEffectPropFrameRate)); +static_assert(string_view("OfxImageEffectPropFrameStep") == string_view(kOfxImageEffectPropFrameStep)); +static_assert(string_view("OfxImageEffectPropInAnalysis") == string_view(kOfxImageEffectPropInAnalysis)); +static_assert(string_view("OfxImageEffectPropInteractiveRenderStatus") == string_view(kOfxImageEffectPropInteractiveRenderStatus)); +static_assert(string_view("OfxImageEffectPropMetalCommandQueue") == string_view(kOfxImageEffectPropMetalCommandQueue)); +static_assert(string_view("OfxImageEffectPropMetalEnabled") == string_view(kOfxImageEffectPropMetalEnabled)); +static_assert(string_view("OfxImageEffectPropMetalRenderSupported") == string_view(kOfxImageEffectPropMetalRenderSupported)); +static_assert(string_view("OfxImageEffectPropMultipleClipDepths") == string_view(kOfxImageEffectPropSupportsMultipleClipDepths)); +static_assert(string_view("OfxImageEffectPropOCIOConfig") == string_view(kOfxImageEffectPropOCIOConfig)); +static_assert(string_view("OfxImageEffectPropOCIODisplay") == string_view(kOfxImageEffectPropOCIODisplay)); +static_assert(string_view("OfxImageEffectPropOCIOView") == string_view(kOfxImageEffectPropOCIOView)); +static_assert(string_view("OfxImageEffectPropOpenCLCommandQueue") == string_view(kOfxImageEffectPropOpenCLCommandQueue)); +static_assert(string_view("OfxImageEffectPropOpenCLEnabled") == string_view(kOfxImageEffectPropOpenCLEnabled)); +static_assert(string_view("OfxImageEffectPropOpenCLImage") == string_view(kOfxImageEffectPropOpenCLImage)); +static_assert(string_view("OfxImageEffectPropOpenCLRenderSupported") == string_view(kOfxImageEffectPropOpenCLRenderSupported)); +static_assert(string_view("OfxImageEffectPropOpenCLSupported") == string_view(kOfxImageEffectPropOpenCLSupported)); +static_assert(string_view("OfxImageEffectPropOpenGLEnabled") == string_view(kOfxImageEffectPropOpenGLEnabled)); +static_assert(string_view("OfxImageEffectPropOpenGLRenderSupported") == string_view(kOfxImageEffectPropOpenGLRenderSupported)); +static_assert(string_view("OfxImageEffectPropOpenGLTextureIndex") == string_view(kOfxImageEffectPropOpenGLTextureIndex)); +static_assert(string_view("OfxImageEffectPropOpenGLTextureTarget") == string_view(kOfxImageEffectPropOpenGLTextureTarget)); +static_assert(string_view("OfxImageEffectPropPixelAspectRatio") == string_view(kOfxImageEffectPropProjectPixelAspectRatio)); +static_assert(string_view("OfxImageEffectPropPixelDepth") == string_view(kOfxImageEffectPropPixelDepth)); +static_assert(string_view("OfxImageEffectPropPluginHandle") == string_view(kOfxImageEffectPropPluginHandle)); +static_assert(string_view("OfxImageEffectPropPreMultiplication") == string_view(kOfxImageEffectPropPreMultiplication)); +static_assert(string_view("OfxImageEffectPropProjectExtent") == string_view(kOfxImageEffectPropProjectExtent)); +static_assert(string_view("OfxImageEffectPropProjectOffset") == string_view(kOfxImageEffectPropProjectOffset)); +static_assert(string_view("OfxImageEffectPropProjectSize") == string_view(kOfxImageEffectPropProjectSize)); +static_assert(string_view("OfxImageEffectPropRegionOfDefinition") == string_view(kOfxImageEffectPropRegionOfDefinition)); +static_assert(string_view("OfxImageEffectPropRegionOfInterest") == string_view(kOfxImageEffectPropRegionOfInterest)); +static_assert(string_view("OfxImageEffectPropRenderQualityDraft") == string_view(kOfxImageEffectPropRenderQualityDraft)); +static_assert(string_view("OfxImageEffectPropRenderScale") == string_view(kOfxImageEffectPropRenderScale)); +static_assert(string_view("OfxImageEffectPropRenderWindow") == string_view(kOfxImageEffectPropRenderWindow)); +static_assert(string_view("OfxImageEffectPropSequentialRenderStatus") == string_view(kOfxImageEffectPropSequentialRenderStatus)); +static_assert(string_view("OfxImageEffectPropSetableFielding") == string_view(kOfxImageEffectPropSetableFielding)); +static_assert(string_view("OfxImageEffectPropSetableFrameRate") == string_view(kOfxImageEffectPropSetableFrameRate)); +static_assert(string_view("OfxImageEffectPropSupportedComponents") == string_view(kOfxImageEffectPropSupportedComponents)); +static_assert(string_view("OfxImageEffectPropSupportedContexts") == string_view(kOfxImageEffectPropSupportedContexts)); +static_assert(string_view("OfxImageEffectPropSupportedPixelDepths") == string_view(kOfxImageEffectPropSupportedPixelDepths)); +static_assert(string_view("OfxImageEffectPropSupportsMultiResolution") == string_view(kOfxImageEffectPropSupportsMultiResolution)); +static_assert(string_view("OfxImageEffectPropSupportsMultipleClipPARs") == string_view(kOfxImageEffectPropSupportsMultipleClipPARs)); +static_assert(string_view("OfxImageEffectPropSupportsOverlays") == string_view(kOfxImageEffectPropSupportsOverlays)); +static_assert(string_view("OfxImageEffectPropSupportsTiles") == string_view(kOfxImageEffectPropSupportsTiles)); +static_assert(string_view("OfxImageEffectPropTemporalClipAccess") == string_view(kOfxImageEffectPropTemporalClipAccess)); +static_assert(string_view("OfxImageEffectPropUnmappedFrameRange") == string_view(kOfxImageEffectPropUnmappedFrameRange)); +static_assert(string_view("OfxImageEffectPropUnmappedFrameRate") == string_view(kOfxImageEffectPropUnmappedFrameRate)); +static_assert(string_view("OfxImagePropBounds") == string_view(kOfxImagePropBounds)); +static_assert(string_view("OfxImagePropData") == string_view(kOfxImagePropData)); +static_assert(string_view("OfxImagePropField") == string_view(kOfxImagePropField)); +static_assert(string_view("OfxImagePropPixelAspectRatio") == string_view(kOfxImagePropPixelAspectRatio)); +static_assert(string_view("OfxImagePropRegionOfDefinition") == string_view(kOfxImagePropRegionOfDefinition)); +static_assert(string_view("OfxImagePropRowBytes") == string_view(kOfxImagePropRowBytes)); +static_assert(string_view("OfxImagePropUniqueIdentifier") == string_view(kOfxImagePropUniqueIdentifier)); +static_assert(string_view("OfxInteractPropBackgroundColour") == string_view(kOfxInteractPropBackgroundColour)); +static_assert(string_view("OfxInteractPropBitDepth") == string_view(kOfxInteractPropBitDepth)); +static_assert(string_view("OfxInteractPropDrawContext") == string_view(kOfxInteractPropDrawContext)); +static_assert(string_view("OfxInteractPropHasAlpha") == string_view(kOfxInteractPropHasAlpha)); +static_assert(string_view("OfxInteractPropPenPosition") == string_view(kOfxInteractPropPenPosition)); +static_assert(string_view("OfxInteractPropPenPressure") == string_view(kOfxInteractPropPenPressure)); +static_assert(string_view("OfxInteractPropPenViewportPosition") == string_view(kOfxInteractPropPenViewportPosition)); +static_assert(string_view("OfxInteractPropPixelScale") == string_view(kOfxInteractPropPixelScale)); +static_assert(string_view("OfxInteractPropSlaveToParam") == string_view(kOfxInteractPropSlaveToParam)); +static_assert(string_view("OfxInteractPropSuggestedColour") == string_view(kOfxInteractPropSuggestedColour)); +static_assert(string_view("OfxInteractPropViewport") == string_view(kOfxInteractPropViewportSize)); +static_assert(string_view("OfxOpenGLPropPixelDepth") == string_view(kOfxOpenGLPropPixelDepth)); +static_assert(string_view("OfxParamHostPropMaxPages") == string_view(kOfxParamHostPropMaxPages)); +static_assert(string_view("OfxParamHostPropMaxParameters") == string_view(kOfxParamHostPropMaxParameters)); +static_assert(string_view("OfxParamHostPropPageRowColumnCount") == string_view(kOfxParamHostPropPageRowColumnCount)); +static_assert(string_view("OfxParamHostPropSupportsBooleanAnimation") == string_view(kOfxParamHostPropSupportsBooleanAnimation)); +static_assert(string_view("OfxParamHostPropSupportsChoiceAnimation") == string_view(kOfxParamHostPropSupportsChoiceAnimation)); +static_assert(string_view("OfxParamHostPropSupportsCustomAnimation") == string_view(kOfxParamHostPropSupportsCustomAnimation)); +static_assert(string_view("OfxParamHostPropSupportsCustomInteract") == string_view(kOfxParamHostPropSupportsCustomInteract)); +static_assert(string_view("OfxParamHostPropSupportsParametricAnimation") == string_view(kOfxParamHostPropSupportsParametricAnimation)); +static_assert(string_view("OfxParamHostPropSupportsStrChoice") == string_view(kOfxParamHostPropSupportsStrChoice)); +static_assert(string_view("OfxParamHostPropSupportsStrChoiceAnimation") == string_view(kOfxParamHostPropSupportsStrChoiceAnimation)); +static_assert(string_view("OfxParamHostPropSupportsStringAnimation") == string_view(kOfxParamHostPropSupportsStringAnimation)); +static_assert(string_view("OfxParamPropAnimates") == string_view(kOfxParamPropAnimates)); +static_assert(string_view("OfxParamPropCacheInvalidation") == string_view(kOfxParamPropCacheInvalidation)); +static_assert(string_view("OfxParamPropCanUndo") == string_view(kOfxParamPropCanUndo)); +static_assert(string_view("OfxParamPropChoiceEnum") == string_view(kOfxParamPropChoiceEnum)); +static_assert(string_view("OfxParamPropChoiceOption") == string_view(kOfxParamPropChoiceOption)); +static_assert(string_view("OfxParamPropChoiceOrder") == string_view(kOfxParamPropChoiceOrder)); +static_assert(string_view("OfxParamPropCustomCallbackV1") == string_view(kOfxParamPropCustomInterpCallbackV1)); +static_assert(string_view("OfxParamPropCustomValue") == string_view(kOfxParamPropCustomValue)); +static_assert(string_view("OfxParamPropDataPtr") == string_view(kOfxParamPropDataPtr)); +static_assert(string_view("OfxParamPropDefault") == string_view(kOfxParamPropDefault)); +static_assert(string_view("OfxParamPropDefaultCoordinateSystem") == string_view(kOfxParamPropDefaultCoordinateSystem)); +static_assert(string_view("OfxParamPropDigits") == string_view(kOfxParamPropDigits)); +static_assert(string_view("OfxParamPropDimensionLabel") == string_view(kOfxParamPropDimensionLabel)); +static_assert(string_view("OfxParamPropDisplayMax") == string_view(kOfxParamPropDisplayMax)); +static_assert(string_view("OfxParamPropDisplayMin") == string_view(kOfxParamPropDisplayMin)); +static_assert(string_view("OfxParamPropDoubleType") == string_view(kOfxParamPropDoubleType)); +static_assert(string_view("OfxParamPropEnabled") == string_view(kOfxParamPropEnabled)); +static_assert(string_view("OfxParamPropEvaluateOnChange") == string_view(kOfxParamPropEvaluateOnChange)); +static_assert(string_view("OfxParamPropGroupOpen") == string_view(kOfxParamPropGroupOpen)); +static_assert(string_view("OfxParamPropHasHostOverlayHandle") == string_view(kOfxParamPropHasHostOverlayHandle)); +static_assert(string_view("OfxParamPropHint") == string_view(kOfxParamPropHint)); +static_assert(string_view("OfxParamPropIncrement") == string_view(kOfxParamPropIncrement)); +static_assert(string_view("OfxParamPropInteractMinimumSize") == string_view(kOfxParamPropInteractMinimumSize)); +static_assert(string_view("OfxParamPropInteractPreferedSize") == string_view(kOfxParamPropInteractPreferedSize)); +static_assert(string_view("OfxParamPropInteractSize") == string_view(kOfxParamPropInteractSize)); +static_assert(string_view("OfxParamPropInteractSizeAspect") == string_view(kOfxParamPropInteractSizeAspect)); +static_assert(string_view("OfxParamPropInteractV1") == string_view(kOfxParamPropInteractV1)); +static_assert(string_view("OfxParamPropInterpolationAmount") == string_view(kOfxParamPropInterpolationAmount)); +static_assert(string_view("OfxParamPropInterpolationTime") == string_view(kOfxParamPropInterpolationTime)); +static_assert(string_view("OfxParamPropIsAnimating") == string_view(kOfxParamPropIsAnimating)); +static_assert(string_view("OfxParamPropIsAutoKeying") == string_view(kOfxParamPropIsAutoKeying)); +static_assert(string_view("OfxParamPropMax") == string_view(kOfxParamPropMax)); +static_assert(string_view("OfxParamPropMin") == string_view(kOfxParamPropMin)); +static_assert(string_view("OfxParamPropPageChild") == string_view(kOfxParamPropPageChild)); +static_assert(string_view("OfxParamPropParametricDimension") == string_view(kOfxParamPropParametricDimension)); +static_assert(string_view("OfxParamPropParametricInteractBackground") == string_view(kOfxParamPropParametricInteractBackground)); +static_assert(string_view("OfxParamPropParametricRange") == string_view(kOfxParamPropParametricRange)); +static_assert(string_view("OfxParamPropParametricUIColour") == string_view(kOfxParamPropParametricUIColour)); +static_assert(string_view("OfxParamPropParent") == string_view(kOfxParamPropParent)); +static_assert(string_view("OfxParamPropPersistant") == string_view(kOfxParamPropPersistant)); +static_assert(string_view("OfxParamPropPluginMayWrite") == string_view(kOfxParamPropPluginMayWrite)); +static_assert(string_view("OfxParamPropScriptName") == string_view(kOfxParamPropScriptName)); +static_assert(string_view("OfxParamPropSecret") == string_view(kOfxParamPropSecret)); +static_assert(string_view("OfxParamPropShowTimeMarker") == string_view(kOfxParamPropShowTimeMarker)); +static_assert(string_view("OfxParamPropStringFilePathExists") == string_view(kOfxParamPropStringFilePathExists)); +static_assert(string_view("OfxParamPropStringMode") == string_view(kOfxParamPropStringMode)); +static_assert(string_view("OfxParamPropType") == string_view(kOfxParamPropType)); +static_assert(string_view("OfxPluginPropFilePath") == string_view(kOfxPluginPropFilePath)); +static_assert(string_view("OfxPluginPropParamPageOrder") == string_view(kOfxPluginPropParamPageOrder)); +static_assert(string_view("OfxPropAPIVersion") == string_view(kOfxPropAPIVersion)); +static_assert(string_view("OfxPropChangeReason") == string_view(kOfxPropChangeReason)); +static_assert(string_view("OfxPropEffectInstance") == string_view(kOfxPropEffectInstance)); +static_assert(string_view("OfxPropHostOSHandle") == string_view(kOfxPropHostOSHandle)); +static_assert(string_view("OfxPropIcon") == string_view(kOfxPropIcon)); +static_assert(string_view("OfxPropInstanceData") == string_view(kOfxPropInstanceData)); +static_assert(string_view("OfxPropIsInteractive") == string_view(kOfxPropIsInteractive)); +static_assert(string_view("OfxPropLabel") == string_view(kOfxPropLabel)); +static_assert(string_view("OfxPropLongLabel") == string_view(kOfxPropLongLabel)); +static_assert(string_view("OfxPropName") == string_view(kOfxPropName)); +static_assert(string_view("OfxPropParamSetNeedsSyncing") == string_view(kOfxPropParamSetNeedsSyncing)); +static_assert(string_view("OfxPropPluginDescription") == string_view(kOfxPropPluginDescription)); +static_assert(string_view("OfxPropShortLabel") == string_view(kOfxPropShortLabel)); +static_assert(string_view("OfxPropTime") == string_view(kOfxPropTime)); +static_assert(string_view("OfxPropType") == string_view(kOfxPropType)); +static_assert(string_view("OfxPropVersion") == string_view(kOfxPropVersion)); +static_assert(string_view("OfxPropVersionLabel") == string_view(kOfxPropVersionLabel)); +static_assert(string_view("kOfxParamPropUseHostOverlayHandle") == string_view(kOfxParamPropUseHostOverlayHandle)); +static_assert(string_view("kOfxPropKeyString") == string_view(kOfxPropKeyString)); +static_assert(string_view("kOfxPropKeySym") == string_view(kOfxPropKeySym)); +} // namespace assertions } // namespace openfx diff --git a/scripts/gen-props.py b/scripts/gen-props.py index 214ab59f..a2ba9730 100644 --- a/scripts/gen-props.py +++ b/scripts/gen-props.py @@ -266,7 +266,9 @@ def gen_props_metadata(props_metadata, outfile_path: Path): outfile.write(""" #pragma once -#include +#include +#include + #include "ofxImageEffect.h" #include "ofxGPURender.h" #include "ofxColour.h" @@ -354,7 +356,7 @@ def gen_props_metadata(props_metadata, outfile_path: Path): for p in sorted(props_metadata): try: # name and id - prop_def = f"{{ \"{p}\", PropId::{get_prop_id(p)}, " + prop_def = f"{{ \"{p}\", PropId::{get_prop_id(p)},\n " md = props_metadata[p] types = md.get('type') if isinstance(types, str): # make it always a list @@ -385,12 +387,18 @@ def gen_props_metadata(props_metadata, outfile_path: Path): template struct PropTraits; +#define DEFINE_PROP_TRAITS(id, _type, _is_multitype) \\ +template<> \\ +struct PropTraits { \\ + using type = _type; \\ + static constexpr bool is_multitype = _is_multitype; \\ + static constexpr const PropDef& def = prop_defs[PropId::id]; \\ +} + """) for p in sorted(props_metadata): try: - outfile.write(f"template<>\n") - outfile.write(f"struct PropTraits {{\n") md = props_metadata[p] types = md.get('type') if isinstance(types, str): # make it always a list @@ -403,11 +411,8 @@ def gen_props_metadata(props_metadata, outfile_path: Path): "double": "double", "pointer": "void *", } - outfile.write(f" using type = {ctypes[types[0]]};\n") is_multitype_bool = "true" if len(types) > 1 else "false" - outfile.write(f" static constexpr bool is_multitype = {is_multitype_bool};\n") - outfile.write(f" static constexpr const PropDef& def = prop_defs[PropId::{get_prop_id(p)}];\n") - outfile.write("};\n") # end of prop traits + outfile.write(f"DEFINE_PROP_TRAITS({get_prop_id(p)}, {ctypes[types[0]]}, {is_multitype_bool});\n") except Exception as e: logging.error(f"Error: {p} is missing metadata? {e}") raise(e) @@ -415,10 +420,12 @@ def gen_props_metadata(props_metadata, outfile_path: Path): outfile.write("} // namespace properties\n\n") # Generate static asserts to ensure our constants match the string values outfile.write("// Static asserts to check #define names vs. strings\n") + outfile.write("namespace assertions {\nusing std::string_view;\n\n") for p in sorted(props_metadata): cname = get_cname(p, props_metadata) - outfile.write(f"static_assert(std::string_view(\"{p}\") == std::string_view({cname}));\n") + outfile.write(f"static_assert(string_view(\"{p}\") == string_view({cname}));\n") + outfile.write("} // namespace assertions\n") outfile.write("} // namespace openfx\n") From 8339b0e8929808752f50fb9248271fac528b96c3 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Thu, 6 Mar 2025 09:10:17 -0500 Subject: [PATCH 19/33] Improve OfxRect converters, fix #includes and macros Signed-off-by: Gary Oberbrunner --- openfx-cpp/include/openfx/README-logging.md | 2 +- openfx-cpp/include/openfx/ofxImage.h | 2 +- openfx-cpp/include/openfx/ofxMisc.h | 82 ++++++---- openfx-cpp/include/openfx/ofxPropsAccess.h | 149 +++++++++++-------- openfx-cpp/include/openfx/ofxPropsBySet.h | 16 +- openfx-cpp/include/openfx/ofxPropsMetadata.h | 14 +- scripts/gen-props.py | 30 ++-- 7 files changed, 174 insertions(+), 121 deletions(-) diff --git a/openfx-cpp/include/openfx/README-logging.md b/openfx-cpp/include/openfx/README-logging.md index ff73c842..cf02f2ae 100644 --- a/openfx-cpp/include/openfx/README-logging.md +++ b/openfx-cpp/include/openfx/README-logging.md @@ -8,7 +8,7 @@ The OFX API Wrapper provides a lightweight, thread-safe customizable logging sys ## Basic Usage ```cpp -#include "ofxLog.h" +#include "openfx/ofxLog.h" // Log simple messages openfx::Logger::info("Application started"); diff --git a/openfx-cpp/include/openfx/ofxImage.h b/openfx-cpp/include/openfx/ofxImage.h index 69cc3457..1bb98532 100644 --- a/openfx-cpp/include/openfx/ofxImage.h +++ b/openfx-cpp/include/openfx/ofxImage.h @@ -5,7 +5,7 @@ #include #include -#include +#include "ofxPropsAccess.h" #include // For std::unique_ptr diff --git a/openfx-cpp/include/openfx/ofxMisc.h b/openfx-cpp/include/openfx/ofxMisc.h index f11da9a6..a505f7cf 100644 --- a/openfx-cpp/include/openfx/ofxMisc.h +++ b/openfx-cpp/include/openfx/ofxMisc.h @@ -4,41 +4,71 @@ #pragma once #include -#include +#include "ofxExceptions.h" + +#include +#include namespace openfx { -// Generic conversion function for any container to OfxRectI -// Works with std::array, std::vector, C-style arrays, and any container supporting operator[] -template -OfxRectI toOfxRectI(const Container& container) { - // Check container size at runtime for dynamic containers - if (container.size() < 4) { - throw OfxException(kOfxStatErrValue, - "Container has fewer than 4 elements required for OfxRectI"); - } +namespace detail { +// Element count traits +template +inline constexpr size_t ofx_elem_count = 0; +template <> +inline constexpr size_t ofx_elem_count = 4; +template <> +inline constexpr size_t ofx_elem_count = 4; +template <> +inline constexpr size_t ofx_elem_count = 2; +template <> +inline constexpr size_t ofx_elem_count = 2; - OfxRectI rect; - rect.x1 = container[0]; - rect.y1 = container[1]; - rect.x2 = container[2]; - rect.y2 = container[3]; +// Generic conversion implementation +template +Result toOfx(const Container& container) { + if (container.size() < ofx_elem_count) + throw OfxException(kOfxStatErrValue, "Container has too few elements"); - return rect; + Result result; + if constexpr (ofx_elem_count == 4) { + result.x1 = container[0]; + result.y1 = container[1]; + result.x2 = container[2]; + result.y2 = container[3]; + } else { + result.x = container[0]; + result.y = container[1]; + } + return result; } +} // namespace detail -// Specialization for fixed-size arrays where we can use static_assert -template -OfxRectI toOfxRectI(const std::array& arr) { - static_assert(N >= 4, "Array must have at least 4 elements to convert to OfxRectI"); +// Integer type functions - use std::remove_reference_t to handle references properly +template +auto toOfxRectI(const Container& c) + -> std::enable_if_t>, OfxRectI> { + return detail::toOfx(c); +} - OfxRectI rect; - rect.x1 = arr[0]; - rect.y1 = arr[1]; - rect.x2 = arr[2]; - rect.y2 = arr[3]; +template +auto toOfxPointI(const Container& c) + -> std::enable_if_t>, OfxPointI> { + return detail::toOfx(c); +} - return rect; +// Floating-point type functions +template +auto toOfxRectD(const Container& c) + -> std::enable_if_t>, + OfxRectD> { + return detail::toOfx(c); } +template +auto toOfxPointD(const Container& c) + -> std::enable_if_t>, + OfxPointD> { + return detail::toOfx(c); +} } // namespace openfx diff --git a/openfx-cpp/include/openfx/ofxPropsAccess.h b/openfx-cpp/include/openfx/ofxPropsAccess.h index 9fe7806b..b7298072 100644 --- a/openfx-cpp/include/openfx/ofxPropsAccess.h +++ b/openfx-cpp/include/openfx/ofxPropsAccess.h @@ -13,7 +13,7 @@ #include #include -#include "ofxCore.h" +#include #include "ofxExceptions.h" #include "ofxLog.h" #include "ofxPropsMetadata.h" @@ -117,9 +117,9 @@ openfx::EnumValue::size(); // End of examples */ -namespace openfx { +// Status checking private macros -#define OFXCHECK_THROW(expr, msg) \ +#define _OPENFX_CHECK_THROW(expr, msg) \ do { \ auto &&_status = (expr); \ if (_status != kOfxStatOK) { \ @@ -129,7 +129,7 @@ namespace openfx { } \ } while (0) -#define OFXCHECK_WARN(expr, msg) \ +#define _OPENFX_CHECK_WARN(expr, msg) \ do { \ auto &&_status = (expr); \ if (_status != kOfxStatOK) { \ @@ -138,15 +138,17 @@ namespace openfx { } \ } while (0) -#define OFXCHECK(expr, msg, error_if_fail) \ - do { \ - if (error_if_fail) { \ - OFXCHECK_THROW(expr, msg); \ - } else { \ - OFXCHECK_WARN(expr, msg); \ - } \ +#define _OPENFX_CHECK(expr, msg, error_if_fail) \ + do { \ + if (error_if_fail) { \ + _OPENFX_CHECK_THROW(expr, msg); \ + } else { \ + _OPENFX_CHECK_WARN(expr, msg); \ + } \ } while (0) +namespace openfx { + // Type-mapping helper to infer C++ type from PropType template struct PropTypeToNative { @@ -203,8 +205,23 @@ struct EnumValue { // Type-safe property accessor for any props of a given prop set class PropertyAccessor { public: - explicit PropertyAccessor(OfxPropertySetHandle propset, const OfxPropertySuiteV1 *propSuite) - : propset_(propset), propSuite_(propSuite) {} + explicit PropertyAccessor(OfxPropertySetHandle propset, const OfxPropertySuiteV1 *prop_suite) + : propset_(propset), propSuite_(prop_suite) {} + + // Convenience constructor for ImageEffect -- get effect property set & construct accessor + explicit PropertyAccessor(OfxImageEffectHandle effect, const OfxImageEffectSuiteV1 *effects_suite, + const OfxPropertySuiteV1 *prop_suite) + : propset_(nullptr), propSuite_(prop_suite) { + effects_suite->getPropertySet(effect, &propset_); + assert(propset_); + } + + explicit PropertyAccessor(OfxInteractHandle interact, const OfxInteractSuiteV1 *interact_suite, + const OfxPropertySuiteV1 *prop_suite) + : propset_(nullptr), propSuite_(prop_suite) { + interact_suite->interactGetPropertySet(interact, &propset_); + assert(propset_); + } // Get property value using PropId (compile-time type checking) template ::is_multitype>> @@ -219,23 +236,23 @@ class PropertyAccessor { assert(propset_ != nullptr); if constexpr (std::is_same_v || std::is_same_v) { int value = 0; - OFXCHECK(propSuite_->propGetInt(propset_, Traits::def.name, index, &value), Traits::def.name, - error_if_missing); + _OPENFX_CHECK(propSuite_->propGetInt(propset_, Traits::def.name, index, &value), + Traits::def.name, error_if_missing); return value; } else if constexpr (std::is_same_v || std::is_same_v) { double value = 0; - OFXCHECK(propSuite_->propGetDouble(propset_, Traits::def.name, index, &value), - Traits::def.name, error_if_missing); + _OPENFX_CHECK(propSuite_->propGetDouble(propset_, Traits::def.name, index, &value), + Traits::def.name, error_if_missing); return value; } else if constexpr (std::is_same_v) { char *value = nullptr; - OFXCHECK(propSuite_->propGetString(propset_, Traits::def.name, index, &value), - Traits::def.name, error_if_missing); + _OPENFX_CHECK(propSuite_->propGetString(propset_, Traits::def.name, index, &value), + Traits::def.name, error_if_missing); return value; } else if constexpr (std::is_same_v) { void *value = nullptr; - OFXCHECK(propSuite_->propGetPointer(propset_, Traits::def.name, index, &value), - Traits::def.name, error_if_missing); + _OPENFX_CHECK(propSuite_->propGetPointer(propset_, Traits::def.name, index, &value), + Traits::def.name, error_if_missing); return value; } else { static_assert(always_false::value, "Unsupported property value type"); @@ -275,23 +292,23 @@ class PropertyAccessor { if constexpr (std::is_same_v || std::is_same_v) { int value = 0; - OFXCHECK(propSuite_->propGetInt(propset_, Traits::def.name, index, &value), Traits::def.name, - error_if_missing); + _OPENFX_CHECK(propSuite_->propGetInt(propset_, Traits::def.name, index, &value), + Traits::def.name, error_if_missing); return value; } else if constexpr (std::is_same_v) { double value = NAN; - OFXCHECK(propSuite_->propGetDouble(propset_, Traits::def.name, index, &value), - Traits::def.name, error_if_missing); + _OPENFX_CHECK(propSuite_->propGetDouble(propset_, Traits::def.name, index, &value), + Traits::def.name, error_if_missing); return value; } else if constexpr (std::is_same_v) { char *value = nullptr; - OFXCHECK(propSuite_->propGetString(propset_, Traits::def.name, index, &value), - Traits::def.name, error_if_missing); + _OPENFX_CHECK(propSuite_->propGetString(propset_, Traits::def.name, index, &value), + Traits::def.name, error_if_missing); return value; } else if constexpr (std::is_same_v) { void *value = nullptr; - OFXCHECK(propSuite_->propGetPointer(propset_, Traits::def.name, index, &value), - Traits::def.name, error_if_missing); + _OPENFX_CHECK(propSuite_->propGetPointer(propset_, Traits::def.name, index, &value), + Traits::def.name, error_if_missing); return value; } else { static_assert(always_false::value, "Unsupported property value type"); @@ -316,23 +333,23 @@ class PropertyAccessor { using T = typename Traits::type; if constexpr (std::is_same_v) { // allow bool -> int - OFXCHECK(propSuite_->propSetInt(propset_, Traits::def.name, index, value), Traits::def.name, - error_if_missing); + _OPENFX_CHECK(propSuite_->propSetInt(propset_, Traits::def.name, index, value), + Traits::def.name, error_if_missing); } else if constexpr (std::is_same_v) { - OFXCHECK(propSuite_->propSetInt(propset_, Traits::def.name, index, value), Traits::def.name, - error_if_missing); + _OPENFX_CHECK(propSuite_->propSetInt(propset_, Traits::def.name, index, value), + Traits::def.name, error_if_missing); } else if constexpr (std::is_same_v) { // allow float -> double - OFXCHECK(propSuite_->propSetDouble(propset_, Traits::def.name, index, value), - Traits::def.name, error_if_missing); + _OPENFX_CHECK(propSuite_->propSetDouble(propset_, Traits::def.name, index, value), + Traits::def.name, error_if_missing); } else if constexpr (std::is_same_v) { - OFXCHECK(propSuite_->propSetDouble(propset_, Traits::def.name, index, value), - Traits::def.name, error_if_missing); + _OPENFX_CHECK(propSuite_->propSetDouble(propset_, Traits::def.name, index, value), + Traits::def.name, error_if_missing); } else if constexpr (std::is_same_v) { - OFXCHECK(propSuite_->propSetString(propset_, Traits::def.name, index, value), - openfx::format("{}={}", Traits::def.name, value), error_if_missing); + _OPENFX_CHECK(propSuite_->propSetString(propset_, Traits::def.name, index, value), + openfx::format("{}={}", Traits::def.name, value), error_if_missing); } else if constexpr (std::is_same_v) { - OFXCHECK(propSuite_->propSetPointer(propset_, Traits::def.name, index, value), - Traits::def.name, error_if_missing); + _OPENFX_CHECK(propSuite_->propSetPointer(propset_, Traits::def.name, index, value), + Traits::def.name, error_if_missing); } else { static_assert(always_false::value, "Invalid value type when setting property"); } @@ -372,17 +389,17 @@ class PropertyAccessor { assert(propset_ != nullptr); if constexpr (std::is_same_v || std::is_same_v) { - OFXCHECK(propSuite_->propSetInt(propset_, Traits::def.name, index, value), Traits::def.name, - error_if_missing); + _OPENFX_CHECK(propSuite_->propSetInt(propset_, Traits::def.name, index, value), + Traits::def.name, error_if_missing); } else if constexpr (std::is_same_v || std::is_same_v) { - OFXCHECK(propSuite_->propSetDouble(propset_, Traits::def.name, index, value), - Traits::def.name, error_if_missing); + _OPENFX_CHECK(propSuite_->propSetDouble(propset_, Traits::def.name, index, value), + Traits::def.name, error_if_missing); } else if constexpr (std::is_same_v) { - OFXCHECK(propSuite_->propSetString(propset_, Traits::def.name, index, value), - Traits::def.name, error_if_missing); + _OPENFX_CHECK(propSuite_->propSetString(propset_, Traits::def.name, index, value), + Traits::def.name, error_if_missing); } else if constexpr (std::is_same_v) { - OFXCHECK(propSuite_->propSetPointer(propset_, Traits::def.name, index, value), - Traits::def.name, error_if_missing); + _OPENFX_CHECK(propSuite_->propSetPointer(propset_, Traits::def.name, index, value), + Traits::def.name, error_if_missing); } else { static_assert(always_false::value, "Invalid value type when setting property"); } @@ -532,8 +549,8 @@ class PropertyAccessor { } else { // Otherwise query at runtime int dimension = 0; - OFXCHECK(propSuite_->propGetDimension(propset_, Traits::def.name, &dimension), - Traits::def.name, error_if_missing); + _OPENFX_CHECK(propSuite_->propGetDimension(propset_, Traits::def.name, &dimension), + Traits::def.name, error_if_missing); return dimension; } } @@ -545,19 +562,22 @@ class PropertyAccessor { assert(propset_ != nullptr); if constexpr (std::is_same_v) { int value = 0; - OFXCHECK(propSuite_->propGetInt(propset_, name, index, &value), name, error_if_missing); + _OPENFX_CHECK(propSuite_->propGetInt(propset_, name, index, &value), name, error_if_missing); return value; } else if constexpr (std::is_same_v) { double value = NAN; - OFXCHECK(propSuite_->propGetDouble(propset_, name, index, &value), name, error_if_missing); + _OPENFX_CHECK(propSuite_->propGetDouble(propset_, name, index, &value), name, + error_if_missing); return value; } else if constexpr (std::is_same_v) { char *value = nullptr; - OFXCHECK(propSuite_->propGetString(propset_, name, index, &value), name, error_if_missing); + _OPENFX_CHECK(propSuite_->propGetString(propset_, name, index, &value), name, + error_if_missing); return value; } else if constexpr (std::is_same_v) { void *value = nullptr; - OFXCHECK(propSuite_->propGetPointer(propset_, name, index, &value), name, error_if_missing); + _OPENFX_CHECK(propSuite_->propGetPointer(propset_, name, index, &value), name, + error_if_missing); return value; } else { static_assert(always_false::value, "Unsupported property type"); @@ -570,13 +590,16 @@ class PropertyAccessor { PropertyAccessor &setRaw(const char *name, T value, int index = 0, bool error_if_missing = true) { assert(propset_ != nullptr); if constexpr (std::is_same_v) { - OFXCHECK(propSuite_->propSetInt(propset_, name, index, value), name, error_if_missing); + _OPENFX_CHECK(propSuite_->propSetInt(propset_, name, index, value), name, error_if_missing); } else if constexpr (std::is_same_v) { - OFXCHECK(propSuite_->propSetDouble(propset_, name, index, value), name, error_if_missing); + _OPENFX_CHECK(propSuite_->propSetDouble(propset_, name, index, value), name, + error_if_missing); } else if constexpr (std::is_same_v) { - OFXCHECK(propSuite_->propSetString(propset_, name, index, value), name, error_if_missing); + _OPENFX_CHECK(propSuite_->propSetString(propset_, name, index, value), name, + error_if_missing); } else if constexpr (std::is_same_v) { - OFXCHECK(propSuite_->propSetPointer(propset_, name, index, value), name, error_if_missing); + _OPENFX_CHECK(propSuite_->propSetPointer(propset_, name, index, value), name, + error_if_missing); } else { static_assert(always_false::value, "Unsupported property type for setting"); } @@ -587,7 +610,7 @@ class PropertyAccessor { int getDimensionRaw(const char *name, bool error_if_missing = true) const { assert(propset_ != nullptr); int dimension = 0; - OFXCHECK(propSuite_->propGetDimension(propset_, name, &dimension), name, error_if_missing); + _OPENFX_CHECK(propSuite_->propGetDimension(propset_, name, &dimension), name, error_if_missing); return dimension; } @@ -634,8 +657,8 @@ constexpr bool supportsType() { } } // namespace prop -#undef OFXCHECK -#undef OFXCHECK_THROW -#undef OFXCHECK_WARN +#undef _OPENFX_CHECK +#undef _OPENFX_CHECK_THROW +#undef _OPENFX_CHECK_WARN } // namespace openfx diff --git a/openfx-cpp/include/openfx/ofxPropsBySet.h b/openfx-cpp/include/openfx/ofxPropsBySet.h index aae684ee..a5a3e059 100644 --- a/openfx-cpp/include/openfx/ofxPropsBySet.h +++ b/openfx-cpp/include/openfx/ofxPropsBySet.h @@ -8,14 +8,14 @@ #include #include #include -#include "ofxImageEffect.h" -#include "ofxGPURender.h" -#include "ofxColour.h" -#include "ofxDrawSuite.h" -#include "ofxParametricParam.h" -#include "ofxKeySyms.h" -#include "ofxPropsMetadata.h" -// #include "ofxOld.h" +#include +#include +#include +#include +#include +#include +#include +// #include namespace openfx { diff --git a/openfx-cpp/include/openfx/ofxPropsMetadata.h b/openfx-cpp/include/openfx/ofxPropsMetadata.h index f67d6b07..4f589b47 100644 --- a/openfx-cpp/include/openfx/ofxPropsMetadata.h +++ b/openfx-cpp/include/openfx/ofxPropsMetadata.h @@ -7,13 +7,13 @@ #include #include -#include "ofxImageEffect.h" -#include "ofxGPURender.h" -#include "ofxColour.h" -#include "ofxDrawSuite.h" -#include "ofxParametricParam.h" -#include "ofxKeySyms.h" -#include "ofxOld.h" +#include +#include +#include +#include +#include +#include +#include namespace openfx { enum class PropType { diff --git a/scripts/gen-props.py b/scripts/gen-props.py index a2ba9730..f66a29a6 100644 --- a/scripts/gen-props.py +++ b/scripts/gen-props.py @@ -269,13 +269,13 @@ def gen_props_metadata(props_metadata, outfile_path: Path): #include #include -#include "ofxImageEffect.h" -#include "ofxGPURender.h" -#include "ofxColour.h" -#include "ofxDrawSuite.h" -#include "ofxParametricParam.h" -#include "ofxKeySyms.h" -#include "ofxOld.h" +#include +#include +#include +#include +#include +#include +#include namespace openfx { enum class PropType { @@ -441,14 +441,14 @@ def gen_props_by_set(props_by_set, props_by_action, outfile_path: Path): #include #include #include -#include "ofxImageEffect.h" -#include "ofxGPURender.h" -#include "ofxColour.h" -#include "ofxDrawSuite.h" -#include "ofxParametricParam.h" -#include "ofxKeySyms.h" -#include "ofxPropsMetadata.h" -// #include "ofxOld.h" +#include +#include +#include +#include +#include +#include +#include +// #include namespace openfx { From 1d9909d71215a28d6af587dfa3113f9d3a5943e6 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Wed, 26 Mar 2025 15:44:45 -0400 Subject: [PATCH 20/33] Fix prop defs & add ofxClip.h with more clip/image accessors Signed-off-by: Gary Oberbrunner --- include/ofx-props.yml | 4 +- openfx-cpp/include/openfx/ofxClip.h | 113 +++++++++++++++++++ openfx-cpp/include/openfx/ofxImage.h | 26 +++-- openfx-cpp/include/openfx/ofxPropsBySet.h | 2 + openfx-cpp/include/openfx/ofxPropsMetadata.h | 4 +- 5 files changed, 139 insertions(+), 10 deletions(-) create mode 100644 openfx-cpp/include/openfx/ofxClip.h diff --git a/include/ofx-props.yml b/include/ofx-props.yml index 1f2336e9..710652e8 100644 --- a/include/ofx-props.yml +++ b/include/ofx-props.yml @@ -34,6 +34,7 @@ propertySets: - OfxImageEffectPropSupportedComponents - OfxImageEffectPropSupportedContexts - OfxImageEffectPropMultipleClipDepths + - OfxImageEffectPropOpenCLSupported - OfxImageEffectPropSupportsMultipleClipPARs - OfxImageEffectPropSetableFrameRate - OfxImageEffectPropSetableFielding @@ -71,6 +72,7 @@ propertySets: - OfxImageEffectPluginRenderThreadSafety - OfxImageEffectPluginPropHostFrameThreading - OfxImageEffectPluginPropOverlayInteractV1 + - OfxImageEffectPropOpenCLSupported - OfxImageEffectPropSupportsMultiResolution - OfxImageEffectPropSupportsTiles - OfxImageEffectPropTemporalClipAccess @@ -947,7 +949,7 @@ properties: dimension: 1 introduced: "1.5" OfxImageEffectPropOpenCLImage: - type: int + type: pointer dimension: 1 introduced: "1.5" OfxImageEffectPropOpenCLSupported: diff --git a/openfx-cpp/include/openfx/ofxClip.h b/openfx-cpp/include/openfx/ofxClip.h new file mode 100644 index 00000000..c9f2d214 --- /dev/null +++ b/openfx-cpp/include/openfx/ofxClip.h @@ -0,0 +1,113 @@ +// Copyright OpenFX and contributors to the OpenFX project. +// SPDX-License-Identifier: BSD-3-Clause + +#pragma once + +#include +#include + +#include // For std::unique_ptr + +#include "openfx/ofxExceptions.h" +#include "openfx/ofxImage.h" +#include "openfx/ofxPropsAccess.h" + +namespace openfx { + +class Clip { + private: + const OfxImageEffectSuiteV1* mEffectSuite; + const OfxPropertySuiteV1* mPropertySuite; + OfxImageClipHandle mClip{}; + OfxPropertySetHandle mClipPropSet{}; // The clip property set handle + std::unique_ptr mClipProps; // Accessor: use a pointer to defer construction + + public: + // Construct a clip given the raw clip handle. + // Gets the property set and sets up accessor for it. + Clip(const OfxImageEffectSuiteV1* effect_suite, const OfxPropertySuiteV1* prop_suite, + OfxImageClipHandle clip) + : mClip(clip), mEffectSuite(effect_suite), mPropertySuite(prop_suite), mClipProps(nullptr) { + if (clip != nullptr) { + OfxStatus status = mEffectSuite->clipGetPropertySet(clip, &mClipPropSet); + if (status != kOfxStatOK) + throw ClipNotFoundException(status); + if (mClipPropSet) { + mClipProps = std::make_unique(mClipPropSet, prop_suite); + } + } + } + + // Construct a clip given effect and clip name. + // Gets the clip with its property set, and sets up accessor for it. + Clip(const OfxImageEffectSuiteV1* effect_suite, const OfxPropertySuiteV1* prop_suite, + OfxImageEffectHandle effect, std::string_view clip_name) + : mEffectSuite(effect_suite), mPropertySuite(prop_suite), mClipProps(nullptr) { + OfxStatus status = effect_suite->clipGetHandle(effect, clip_name.data(), &mClip, &mClipPropSet); + if (status != kOfxStatOK || !mClip || !mClipPropSet) + throw ClipNotFoundException(status); + mClipProps = std::make_unique(mClipPropSet, prop_suite); + } + + // Default constructor: empty clip + Clip() : mEffectSuite(nullptr), mClipProps(nullptr) {} + + // Destructor releases the resource + ~Clip() { + if (mClipPropSet) { + mClipPropSet = nullptr; + } + } + + // Disable copying + Clip(const Clip&) = delete; + Clip& operator=(const Clip&) = delete; + + // Enable moving + Clip(Clip&& other) noexcept + : mEffectSuite(other.mEffectSuite), + mPropertySuite(other.mPropertySuite), + mClip(other.mClip), + mClipPropSet(other.mClipPropSet), + mClipProps(std::move(other.mClipProps)) { + other.mClipPropSet = nullptr; + } + + Clip& operator=(Clip&& other) noexcept { + if (this != &other) { + // Release any existing resource + + // Acquire the other's resource + mEffectSuite = other.mEffectSuite; + mPropertySuite = other.mPropertySuite; + mClip = other.mClip; + mClipPropSet = other.mClipPropSet; + mClipProps = std::move(other.mClipProps); + other.mClipPropSet = nullptr; + } + return *this; + } + + // Get an image from the clip at this time + openfx::Image get_image(OfxTime time, const OfxRectD* rect = nullptr) { + return openfx::Image(mEffectSuite, mPropertySuite, mClip, time, rect); + } + + // get the clip handle + OfxImageClipHandle clip() const { return mClip; } + + // get the clip's prop set + OfxPropertySetHandle get_propset() const { return mClipPropSet; } + + // Accessor for PropertyAccessor + PropertyAccessor* props() { return mClipProps.get(); } + const PropertyAccessor* props() const { return mClipProps.get(); } + + // Implicit conversions to the handle types + explicit operator OfxPropertySetHandle() const { return mClipPropSet; } + explicit operator OfxImageClipHandle() const { return mClip; } + + bool empty() const { return mClip == nullptr; } +}; + +} // namespace openfx diff --git a/openfx-cpp/include/openfx/ofxImage.h b/openfx-cpp/include/openfx/ofxImage.h index 1bb98532..ed599012 100644 --- a/openfx-cpp/include/openfx/ofxImage.h +++ b/openfx-cpp/include/openfx/ofxImage.h @@ -5,11 +5,12 @@ #include #include -#include "ofxPropsAccess.h" #include // For std::unique_ptr -#include "ofxExceptions.h" +#include "openfx/ofxExceptions.h" +#include "openfx/ofxMisc.h" +#include "openfx/ofxPropsAccess.h" namespace openfx { @@ -23,7 +24,7 @@ class Image { public: // Constructor acquires the resource Image(const OfxImageEffectSuiteV1* effect_suite, const OfxPropertySuiteV1* prop_suite, - OfxImageClipHandle clip, OfxTime time, OfxRectD* rect = nullptr) + OfxImageClipHandle clip, OfxTime time, const OfxRectD* rect = nullptr) : mEffectSuite(effect_suite), mImgProps(nullptr) { if (clip != nullptr) { OfxStatus status = mEffectSuite->clipGetImage(clip, time, rect, &mImg); @@ -72,14 +73,25 @@ class Image { return *this; } - // Accessor to get the underlying handle - OfxPropertySetHandle get() const { return mImg; } + // Get the image's data pointer + void* data() { return props()->get(); } + + // Get the image's bounds + OfxRectI bounds() { + return openfx::toOfxRectI(props()->getAll()); + } - // Accessor for PropertyAccessor + // Get the image's rowbytes + int rowbytes() { return props()->get(); } + + // Get the PropertyAccessor PropertyAccessor* props() { return mImgProps.get(); } const PropertyAccessor* props() const { return mImgProps.get(); } - // Implicit conversion to the handle type + // Get the underlying handle + OfxPropertySetHandle get() const { return mImg; } + + // Implicit conversion to base handle type explicit operator OfxPropertySetHandle() const { return mImg; } bool empty() const { return mImg == nullptr; } diff --git a/openfx-cpp/include/openfx/ofxPropsBySet.h b/openfx-cpp/include/openfx/ofxPropsBySet.h index a5a3e059..d382f1b3 100644 --- a/openfx-cpp/include/openfx/ofxPropsBySet.h +++ b/openfx-cpp/include/openfx/ofxPropsBySet.h @@ -88,6 +88,7 @@ static inline const std::map> prop_sets { { "OfxImageEffectPluginRenderThreadSafety", prop_defs[PropId::OfxImageEffectPluginRenderThreadSafety], false, true, false }, { "OfxImageEffectPluginPropHostFrameThreading", prop_defs[PropId::OfxImageEffectPluginPropHostFrameThreading], false, true, false }, { "OfxImageEffectPluginPropOverlayInteractV1", prop_defs[PropId::OfxImageEffectPluginPropOverlayInteractV1], false, true, false }, + { "OfxImageEffectPropOpenCLSupported", prop_defs[PropId::OfxImageEffectPropOpenCLSupported], false, true, false }, { "OfxImageEffectPropSupportsMultiResolution", prop_defs[PropId::OfxImageEffectPropSupportsMultiResolution], false, true, false }, { "OfxImageEffectPropSupportsTiles", prop_defs[PropId::OfxImageEffectPropSupportsTiles], false, true, false }, { "OfxImageEffectPropTemporalClipAccess", prop_defs[PropId::OfxImageEffectPropTemporalClipAccess], false, true, false }, @@ -155,6 +156,7 @@ static inline const std::map> prop_sets { { "OfxImageEffectPropSupportedComponents", prop_defs[PropId::OfxImageEffectPropSupportedComponents], true, false, false }, { "OfxImageEffectPropSupportedContexts", prop_defs[PropId::OfxImageEffectPropSupportedContexts], true, false, false }, { "OfxImageEffectPropMultipleClipDepths", prop_defs[PropId::OfxImageEffectPropMultipleClipDepths], true, false, false }, + { "OfxImageEffectPropOpenCLSupported", prop_defs[PropId::OfxImageEffectPropOpenCLSupported], true, false, false }, { "OfxImageEffectPropSupportsMultipleClipPARs", prop_defs[PropId::OfxImageEffectPropSupportsMultipleClipPARs], true, false, false }, { "OfxImageEffectPropSetableFrameRate", prop_defs[PropId::OfxImageEffectPropSetableFrameRate], true, false, false }, { "OfxImageEffectPropSetableFielding", prop_defs[PropId::OfxImageEffectPropSetableFielding], true, false, false }, diff --git a/openfx-cpp/include/openfx/ofxPropsMetadata.h b/openfx-cpp/include/openfx/ofxPropsMetadata.h index 4f589b47..2fd8de2c 100644 --- a/openfx-cpp/include/openfx/ofxPropsMetadata.h +++ b/openfx-cpp/include/openfx/ofxPropsMetadata.h @@ -404,7 +404,7 @@ static inline constexpr PropDefsArray prop_defs = { { "OfxImageEffectPropOpenCLEnabled", PropId::OfxImageEffectPropOpenCLEnabled, {PropType::Bool}, 1, 1, nullptr, 0}, { "OfxImageEffectPropOpenCLImage", PropId::OfxImageEffectPropOpenCLImage, - {PropType::Int}, 1, 1, nullptr, 0}, + {PropType::Pointer}, 1, 1, nullptr, 0}, { "OfxImageEffectPropOpenCLRenderSupported", PropId::OfxImageEffectPropOpenCLRenderSupported, {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropOpenCLRenderSupported.data(), prop_enum_values::OfxImageEffectPropOpenCLRenderSupported.size()}, { "OfxImageEffectPropOpenCLSupported", PropId::OfxImageEffectPropOpenCLSupported, @@ -732,7 +732,7 @@ DEFINE_PROP_TRAITS(OfxImageEffectPropOCIODisplay, const char *, false); DEFINE_PROP_TRAITS(OfxImageEffectPropOCIOView, const char *, false); DEFINE_PROP_TRAITS(OfxImageEffectPropOpenCLCommandQueue, void *, false); DEFINE_PROP_TRAITS(OfxImageEffectPropOpenCLEnabled, bool, false); -DEFINE_PROP_TRAITS(OfxImageEffectPropOpenCLImage, int, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropOpenCLImage, void *, false); DEFINE_PROP_TRAITS(OfxImageEffectPropOpenCLRenderSupported, const char *, false); DEFINE_PROP_TRAITS(OfxImageEffectPropOpenCLSupported, const char *, false); DEFINE_PROP_TRAITS(OfxImageEffectPropOpenGLEnabled, bool, false); From f44cecea9687bcea3b8f21925604203dd325d58f Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Fri, 28 Mar 2025 16:14:16 -0400 Subject: [PATCH 21/33] Fix prop types for RoD and RoI (should be double) Signed-off-by: Gary Oberbrunner --- include/ofx-props.yml | 4 ++-- openfx-cpp/include/openfx/ofxPropsMetadata.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/ofx-props.yml b/include/ofx-props.yml index 710652e8..3fd78042 100644 --- a/include/ofx-props.yml +++ b/include/ofx-props.yml @@ -1001,10 +1001,10 @@ properties: type: double dimension: 2 OfxImageEffectPropRegionOfDefinition: - type: int + type: double dimension: 4 OfxImageEffectPropRegionOfInterest: - type: int + type: double dimension: 4 OfxImageEffectPropRenderQualityDraft: type: bool diff --git a/openfx-cpp/include/openfx/ofxPropsMetadata.h b/openfx-cpp/include/openfx/ofxPropsMetadata.h index 2fd8de2c..31e55834 100644 --- a/openfx-cpp/include/openfx/ofxPropsMetadata.h +++ b/openfx-cpp/include/openfx/ofxPropsMetadata.h @@ -432,9 +432,9 @@ static inline constexpr PropDefsArray prop_defs = { { "OfxImageEffectPropProjectSize", PropId::OfxImageEffectPropProjectSize, {PropType::Double}, 1, 2, nullptr, 0}, { "OfxImageEffectPropRegionOfDefinition", PropId::OfxImageEffectPropRegionOfDefinition, - {PropType::Int}, 1, 4, nullptr, 0}, + {PropType::Double}, 1, 4, nullptr, 0}, { "OfxImageEffectPropRegionOfInterest", PropId::OfxImageEffectPropRegionOfInterest, - {PropType::Int}, 1, 4, nullptr, 0}, + {PropType::Double}, 1, 4, nullptr, 0}, { "OfxImageEffectPropRenderQualityDraft", PropId::OfxImageEffectPropRenderQualityDraft, {PropType::Bool}, 1, 1, nullptr, 0}, { "OfxImageEffectPropRenderScale", PropId::OfxImageEffectPropRenderScale, @@ -746,8 +746,8 @@ DEFINE_PROP_TRAITS(OfxImageEffectPropPreMultiplication, const char *, false); DEFINE_PROP_TRAITS(OfxImageEffectPropProjectExtent, double, false); DEFINE_PROP_TRAITS(OfxImageEffectPropProjectOffset, double, false); DEFINE_PROP_TRAITS(OfxImageEffectPropProjectSize, double, false); -DEFINE_PROP_TRAITS(OfxImageEffectPropRegionOfDefinition, int, false); -DEFINE_PROP_TRAITS(OfxImageEffectPropRegionOfInterest, int, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropRegionOfDefinition, double, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropRegionOfInterest, double, false); DEFINE_PROP_TRAITS(OfxImageEffectPropRenderQualityDraft, bool, false); DEFINE_PROP_TRAITS(OfxImageEffectPropRenderScale, double, false); DEFINE_PROP_TRAITS(OfxImageEffectPropRenderWindow, int, false); From 264e8443990a21c5d5b1855df9b366b24e925162 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Mon, 31 Mar 2025 09:53:20 -0400 Subject: [PATCH 22/33] Add property setters for OfxRect and OfxPoint Signed-off-by: Gary Oberbrunner --- openfx-cpp/include/openfx/ofxPropsAccess.h | 58 +++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/openfx-cpp/include/openfx/ofxPropsAccess.h b/openfx-cpp/include/openfx/ofxPropsAccess.h index b7298072..ef8a3ade 100644 --- a/openfx-cpp/include/openfx/ofxPropsAccess.h +++ b/openfx-cpp/include/openfx/ofxPropsAccess.h @@ -4,6 +4,7 @@ #pragma once #include +#include #include #include @@ -13,7 +14,6 @@ #include #include -#include #include "ofxExceptions.h" #include "ofxLog.h" #include "ofxPropsMetadata.h" @@ -506,6 +506,62 @@ class PropertyAccessor { return *this; } + // For 2-d (PointD) single-type properties + template ::def.dimension == 2 && + !properties::PropTraits::is_multitype && + std::is_same_v::type, double>, + int> = 0> + PropertyAccessor &set(OfxPointD values, bool error_if_missing = true) { + assert(propset_ != nullptr); + this->template set(values.x, 0, error_if_missing); + this->template set(values.y, 1, error_if_missing); + return *this; + } + + // For 2-d (PointI) single-type properties + template ::def.dimension == 2 && + !properties::PropTraits::is_multitype && + std::is_same_v::type, double>, + int> = 0> + PropertyAccessor &set(OfxPointI values, bool error_if_missing = true) { + assert(propset_ != nullptr); + this->template set(values.x, 0, error_if_missing); + this->template set(values.y, 1, error_if_missing); + return *this; + } + + // For 4-d (RectD) single-type properties + template ::def.dimension == 4 && + !properties::PropTraits::is_multitype && + std::is_same_v::type, double>, + int> = 0> + PropertyAccessor &set(OfxRectD values, bool error_if_missing = true) { + assert(propset_ != nullptr); + this->template set(values.x1, 0, error_if_missing); + this->template set(values.y1, 1, error_if_missing); + this->template set(values.x2, 2, error_if_missing); + this->template set(values.y2, 3, error_if_missing); + return *this; + } + + // For 4-d (RectI) single-type properties + template ::def.dimension == 4 && + !properties::PropTraits::is_multitype && + std::is_same_v::type, double>, + int> = 0> + PropertyAccessor &set(OfxRectI values, bool error_if_missing = true) { + assert(propset_ != nullptr); + this->template set(values.x1, 0, error_if_missing); + this->template set(values.y1, 1, error_if_missing); + this->template set(values.x2, 2, error_if_missing); + this->template set(values.y2, 3, error_if_missing); + return *this; + } + // For multi-type properties - require explicit ElementType template PropertyAccessor &setAllTyped(const std::initializer_list &values, From 0b725ac0cfba711511583e90389213cf9e77989e Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Sun, 27 Apr 2025 13:04:05 -0400 Subject: [PATCH 23/33] Add suite container, std exceptions, more accessors, fixes Signed-off-by: Gary Oberbrunner --- openfx-cpp/include/openfx/README.md | 7 +- openfx-cpp/include/openfx/ofxClip.h | 13 +- openfx-cpp/include/openfx/ofxExceptions.h | 12 +- openfx-cpp/include/openfx/ofxLog.h | 11 +- openfx-cpp/include/openfx/ofxPropsAccess.h | 61 ++++++- openfx-cpp/include/openfx/ofxPropsBySet.h | 2 +- openfx-cpp/include/openfx/ofxStatusStrings.h | 2 +- openfx-cpp/include/openfx/ofxSuites.h | 166 +++++++++++++++++++ 8 files changed, 265 insertions(+), 9 deletions(-) create mode 100644 openfx-cpp/include/openfx/ofxSuites.h diff --git a/openfx-cpp/include/openfx/README.md b/openfx-cpp/include/openfx/README.md index 80261773..8529bd3c 100644 --- a/openfx-cpp/include/openfx/README.md +++ b/openfx-cpp/include/openfx/README.md @@ -1,3 +1,8 @@ # OpenFX C++ Bindings -This is an early attempt at modern C++17 bindings for OpenFX. +This is a set of C++ bindings for parts of OpenFX. It consists of a +set of prerelease-quality (for now) C++17 header files. They primarily +simplify type-safe access to properties, params, images and suites. It +includes a simple logging facility and a set of standard exceptions. + +The goal is to include a version of this in the next OpenFX release. diff --git a/openfx-cpp/include/openfx/ofxClip.h b/openfx-cpp/include/openfx/ofxClip.h index c9f2d214..77fa5f1c 100644 --- a/openfx-cpp/include/openfx/ofxClip.h +++ b/openfx-cpp/include/openfx/ofxClip.h @@ -27,7 +27,7 @@ class Clip { // Gets the property set and sets up accessor for it. Clip(const OfxImageEffectSuiteV1* effect_suite, const OfxPropertySuiteV1* prop_suite, OfxImageClipHandle clip) - : mClip(clip), mEffectSuite(effect_suite), mPropertySuite(prop_suite), mClipProps(nullptr) { + : mEffectSuite(effect_suite), mPropertySuite(prop_suite), mClip(clip), mClipProps(nullptr) { if (clip != nullptr) { OfxStatus status = mEffectSuite->clipGetPropertySet(clip, &mClipPropSet); if (status != kOfxStatOK) @@ -49,6 +49,17 @@ class Clip { mClipProps = std::make_unique(mClipPropSet, prop_suite); } + // Construct a clip given effect and clip name, using suite container (simpler) + Clip(OfxImageEffectHandle effect, std::string_view clip_name, const SuiteContainer& suites) + : mClipProps(nullptr) { + mEffectSuite = suites.get(); + mPropertySuite = suites.get(); + OfxStatus status = mEffectSuite->clipGetHandle(effect, clip_name.data(), &mClip, &mClipPropSet); + if (status != kOfxStatOK || !mClip || !mClipPropSet) + throw ClipNotFoundException(status); + mClipProps = std::make_unique(mClipPropSet, mPropertySuite); + } + // Default constructor: empty clip Clip() : mEffectSuite(nullptr), mClipProps(nullptr) {} diff --git a/openfx-cpp/include/openfx/ofxExceptions.h b/openfx-cpp/include/openfx/ofxExceptions.h index b2b0a077..bb7a6e49 100644 --- a/openfx-cpp/include/openfx/ofxExceptions.h +++ b/openfx-cpp/include/openfx/ofxExceptions.h @@ -4,12 +4,13 @@ #pragma once #include -#include "ofxStatusStrings.h" #include #include #include +#include "ofxStatusStrings.h" + namespace openfx { /** @@ -66,4 +67,13 @@ class ImageNotFoundException : public OfxException { : OfxException(code, msg) {} }; +/** + * @brief Exception thrown when a suite isn't found + */ +class SuiteNotFoundException : public OfxException { + public: + explicit SuiteNotFoundException(int code, const std::string &msg = "") + : OfxException(code, msg) {} +}; + } // namespace openfx diff --git a/openfx-cpp/include/openfx/ofxLog.h b/openfx-cpp/include/openfx/ofxLog.h index b285d3e2..fb52db96 100644 --- a/openfx-cpp/include/openfx/ofxLog.h +++ b/openfx-cpp/include/openfx/ofxLog.h @@ -177,7 +177,14 @@ inline void Logger::defaultLogHandler(Level level, std::chrono::system_clock::ti const std::string& message) { // Convert timestamp to local time std::time_t time = std::chrono::system_clock::to_time_t(timestamp); - std::tm local_tm = *std::localtime(&time); + std::tm local_time; +#ifdef _WIN32 + // Microsoft’s localtime_s expects arguments in reverse order compared to C11's localtime_s: + localtime_s(&local_time, &time); +#else + // POSIX + localtime_r(&time, &local_time); +#endif // Stream to write log message std::ostream& os = (level == Level::Error) ? std::cerr : std::cout; @@ -197,7 +204,7 @@ inline void Logger::defaultLogHandler(Level level, std::chrono::system_clock::ti } // Write formatted log message - os << "[" << std::put_time(&local_tm, "%Y-%m-%d %H:%M:%S") << "][" << levelStr << "] " << message + os << "[" << std::put_time(&local_time, "%Y-%m-%d %H:%M:%S") << "][" << levelStr << "] " << message << std::endl; } diff --git a/openfx-cpp/include/openfx/ofxPropsAccess.h b/openfx-cpp/include/openfx/ofxPropsAccess.h index ef8a3ade..037aefb6 100644 --- a/openfx-cpp/include/openfx/ofxPropsAccess.h +++ b/openfx-cpp/include/openfx/ofxPropsAccess.h @@ -17,6 +17,7 @@ #include "ofxExceptions.h" #include "ofxLog.h" #include "ofxPropsMetadata.h" +#include "ofxSuites.h" /** * OpenFX Property Accessor System - Usage Examples @@ -205,20 +206,76 @@ struct EnumValue { // Type-safe property accessor for any props of a given prop set class PropertyAccessor { public: + // Basic constructor explicit PropertyAccessor(OfxPropertySetHandle propset, const OfxPropertySuiteV1 *prop_suite) - : propset_(propset), propSuite_(prop_suite) {} + : propset_(propset), propSuite_(prop_suite) { + if (!propSuite_) { + throw SuiteNotFoundException(kOfxStatErrMissingHostFeature, + "PropertyAccessor: missing property suite"); + } + } + + // Constructor taking a prop set and a suites container, for simplicity + explicit PropertyAccessor(OfxPropertySetHandle propset, const SuiteContainer &suites) + : propset_(propset) { + propSuite_ = suites.get(); + if (!propSuite_) { + throw SuiteNotFoundException(kOfxStatErrMissingHostFeature, + "PropertyAccessor: missing property suite"); + } + } - // Convenience constructor for ImageEffect -- get effect property set & construct accessor + // Convenience constructors for ImageEffect -- get effect property set & construct accessor explicit PropertyAccessor(OfxImageEffectHandle effect, const OfxImageEffectSuiteV1 *effects_suite, const OfxPropertySuiteV1 *prop_suite) : propset_(nullptr), propSuite_(prop_suite) { + if (!propSuite_) { + throw SuiteNotFoundException(kOfxStatErrMissingHostFeature, + "PropertyAccessor: missing property suite"); + } + if (!effects_suite) { + throw SuiteNotFoundException(kOfxStatErrMissingHostFeature, + "PropertyAccessor: missing effects suite"); + } + effects_suite->getPropertySet(effect, &propset_); + assert(propset_); + } + + explicit PropertyAccessor(OfxImageEffectHandle effect, const SuiteContainer &suites) + : propset_(nullptr) { + propSuite_ = suites.get(); + if (!propSuite_) { + throw SuiteNotFoundException(kOfxStatErrMissingHostFeature, + "PropertyAccessor: missing property suite"); + } + auto effects_suite = suites.get(); + if (!effects_suite) { + throw SuiteNotFoundException(kOfxStatErrMissingHostFeature, + "PropertyAccessor: missing effects suite"); + } effects_suite->getPropertySet(effect, &propset_); assert(propset_); } + // Convenience constructors for Interact -- get effect property set & construct accessor explicit PropertyAccessor(OfxInteractHandle interact, const OfxInteractSuiteV1 *interact_suite, const OfxPropertySuiteV1 *prop_suite) : propset_(nullptr), propSuite_(prop_suite) { + if (!interact_suite) { + throw SuiteNotFoundException(kOfxStatErrMissingHostFeature, + "PropertyAccessor: missing interact suite"); + } + interact_suite->interactGetPropertySet(interact, &propset_); + assert(propset_); + } + explicit PropertyAccessor(OfxInteractHandle interact, const SuiteContainer &suites) + : propset_(nullptr) { + propSuite_ = suites.get(); + auto interact_suite = suites.get(); + if (!interact_suite) { + throw SuiteNotFoundException(kOfxStatErrMissingHostFeature, + "PropertyAccessor: missing interact suite"); + } interact_suite->interactGetPropertySet(interact, &propset_); assert(propset_); } diff --git a/openfx-cpp/include/openfx/ofxPropsBySet.h b/openfx-cpp/include/openfx/ofxPropsBySet.h index d382f1b3..2b14174d 100644 --- a/openfx-cpp/include/openfx/ofxPropsBySet.h +++ b/openfx-cpp/include/openfx/ofxPropsBySet.h @@ -14,7 +14,7 @@ #include #include #include -#include +#include "ofxPropsMetadata.h" // #include namespace openfx { diff --git a/openfx-cpp/include/openfx/ofxStatusStrings.h b/openfx-cpp/include/openfx/ofxStatusStrings.h index e600ed1f..82c3251b 100644 --- a/openfx-cpp/include/openfx/ofxStatusStrings.h +++ b/openfx-cpp/include/openfx/ofxStatusStrings.h @@ -10,7 +10,7 @@ #include #include -static const char *ofxStatusToString(OfxStatus s) { +inline const char *ofxStatusToString(OfxStatus s) { switch (s) { case kOfxStatOK: return "kOfxStatOK"; diff --git a/openfx-cpp/include/openfx/ofxSuites.h b/openfx-cpp/include/openfx/ofxSuites.h new file mode 100644 index 00000000..a5d64288 --- /dev/null +++ b/openfx-cpp/include/openfx/ofxSuites.h @@ -0,0 +1,166 @@ +/**************************************************************/ +/* */ +/* Copyright 2025 GoPro, Inc. */ +/* All Rights Reserved. */ +/* */ +/**************************************************************/ + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +/*** + Usage: + + === Adding suites in onLoad: + + openfx::SuiteContainer gSuites; + + OfxStatus OnLoad() { + OfxParameterSuiteV1* paramSuite = + static_cast(gHost->fetchSuite(gHost->host, kOfxParameterSuite, 1)); + if (paramSuite) + gSuites.add(kOfxParameterSuite, 1, paramSuite); + + // or use the convenience macro: + OPENFX_FETCH_SUITE(gSuites, kOfxParameterSuite, 1, OfxParameterSuiteV1); + OPENFX_FETCH_SUITE(gSuites, kOfxPropertySuite, 1, OfxPropertySuiteV1); + // ... + } + + In both cases, missing suites will be null, Use gSuites.has() to check. + + === Getting suites: + auto paramSuite = gSuites.get(); + auto propSuite = gSuites.get(); + auto myCustomSuite = gSuites.get("customSuiteName"); + if (suites.has()) { + // ... + } +*/ + +// Use this in onLoad action to fetch suites and store them in the suites container +#define OPENFX_FETCH_SUITE(container, suiteName, suiteVersion, suiteType) \ + do { \ + const suiteType* suite = \ + static_cast(gHost->fetchSuite(gHost->host, suiteName, suiteVersion)); \ + if (suite) { \ + container.add(suiteName, suiteVersion, suite); \ + } \ + } while (0) + +namespace openfx { + +namespace detail { +struct SuiteKey { + std::string name; + int version; + + SuiteKey(const std::string& n, int v) : name(n), version(v) {} + + bool operator==(const SuiteKey& other) const { + return name == other.name && version == other.version; + } +}; + +// Hash a SuiteKey +struct SuiteKeyHash { + size_t operator()(const SuiteKey& key) const { + return std::hash()(key.name) ^ (std::hash()(key.version) << 1); + } +}; + +} // namespace detail + +struct SuiteContainer { + std::unordered_map suites; + + template + const T* get(const std::string& name, int version) const { + auto it = suites.find({name, version}); + return (it != suites.end()) ? static_cast(it->second) : nullptr; + } + + template + const T* get() const { + // Default impl, to be specialized for different suite types + assert((false && "Calling generic SuiteContainer.get with no suite name")); + return nullptr; // Default implementation returns nullptr + } + + // Check if suite is registered in the container + bool has(const std::string& name, int version) const { + return suites.find({name, version}) != suites.end(); + } + + template + bool has() const { + // Will be specialized just like get() + assert((false && "Calling generic SuiteContainer.has with no suite name")); + return false; + } + + template + void add(const std::string& name, int version, T* suite) { + suites[{name, version}] = static_cast(suite); + } +}; + +// Macro to define `get` and `has` specializations for a suite +#define DEFINE_SUITE(suiteType, suiteName, suiteVersion) \ + template <> \ + inline const suiteType* SuiteContainer::get() const { \ + try { \ + return static_cast(suites.at({suiteName, suiteVersion})); \ + } catch (std::out_of_range & e) { \ + return nullptr; \ + } \ + } \ + template <> \ + inline const suiteType* SuiteContainer::get() const { \ + try { \ + return static_cast(suites.at({suiteName, suiteVersion})); \ + } catch (std::out_of_range & e) { \ + return nullptr; \ + } \ + } \ + template <> \ + inline bool SuiteContainer::has() const { \ + return suites.find({suiteName, suiteVersion}) != suites.end(); \ + } + +// Define specializations for standard OFX suites +DEFINE_SUITE(OfxTimeLineSuiteV1, kOfxTimeLineSuite, 1); +DEFINE_SUITE(OfxParameterSuiteV1, kOfxParameterSuite, 1); +DEFINE_SUITE(OfxPropertySuiteV1, kOfxPropertySuite, 1); +DEFINE_SUITE(OfxDialogSuiteV1, kOfxDialogSuite, 1); +DEFINE_SUITE(OfxMessageSuiteV1, kOfxMessageSuite, 1); +DEFINE_SUITE(OfxMessageSuiteV2, kOfxMessageSuite, 2); +DEFINE_SUITE(OfxParametricParameterSuiteV1, kOfxParametricParameterSuite, 1); +DEFINE_SUITE(OfxMultiThreadSuiteV1, kOfxMultiThreadSuite, 1); +DEFINE_SUITE(OfxProgressSuiteV1, kOfxProgressSuite, 1); +DEFINE_SUITE(OfxProgressSuiteV2, kOfxProgressSuite, 2); +DEFINE_SUITE(OfxImageEffectOpenGLRenderSuiteV1, kOfxOpenGLRenderSuite, 1); +DEFINE_SUITE(OfxOpenCLProgramSuiteV1, kOfxOpenCLProgramSuite, 1); +DEFINE_SUITE(OfxMemorySuiteV1, kOfxMemorySuite, 1); +DEFINE_SUITE(OfxImageEffectSuiteV1, kOfxImageEffectSuite, 1); +DEFINE_SUITE(OfxDrawSuiteV1, kOfxDrawSuite, 1); +DEFINE_SUITE(OfxInteractSuiteV1, kOfxInteractSuite, 1); + +#undef DEFINE_SUITE + +} // namespace openfx From fe5cd5bda319e07586d6d2c908b633acc9d066d9 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Sun, 27 Apr 2025 15:39:26 -0400 Subject: [PATCH 24/33] Generate property & prop sets reference doc from ofx-props.yml - New script gen-props-doc.py to generate RST doc for all props and prop sets - Generated docs are checked in, just like the generated props headers. - Use it in Documentation/build.sh - Fix some other doc I noticed along the way Signed-off-by: Gary Oberbrunner --- Documentation/README.md | 2 + Documentation/build.sh | 10 + Documentation/pipreq.txt | 1 + .../sources/Guide/ofxExample5_Circle.rst | 18 +- Documentation/sources/Reference/index.rst | 8 +- .../sources/Reference/ofxInteracts.rst | 2 +- .../ofxPropertiesReferenceGenerated.rst | 2214 +++++++++++++++++ .../Reference/ofxPropertySetsGenerated.rst | 1349 ++++++++++ scripts/gen-props-doc.py | 416 ++++ 9 files changed, 4008 insertions(+), 12 deletions(-) create mode 100644 Documentation/sources/Reference/ofxPropertiesReferenceGenerated.rst create mode 100644 Documentation/sources/Reference/ofxPropertySetsGenerated.rst create mode 100755 scripts/gen-props-doc.py diff --git a/Documentation/README.md b/Documentation/README.md index dcbea8f4..5811c297 100755 --- a/Documentation/README.md +++ b/Documentation/README.md @@ -26,6 +26,8 @@ system python if you like.) * Make sure your virtualenv above is activated: `source ofx-docgen/bin/activate` * Generate references: `python Documentation/genPropertiesReference.py -i include -o Documentation/sources/Reference/ofxPropertiesReference.rst -r` +* Generate property documentation from YAML definitions: + `python scripts/gen-props-doc.py -v` (requires PyYAML) * Build the doxygen docs: `cd include; doxygen ofx.doxy; cd -` (you'll see some warnings) * Build the sphinx docs: diff --git a/Documentation/build.sh b/Documentation/build.sh index 9cfe889e..676ca040 100755 --- a/Documentation/build.sh +++ b/Documentation/build.sh @@ -41,6 +41,16 @@ $UV_RUN python genPropertiesReference.py \ > /tmp/ofx-doc-build.out 2>&1 grep -v -E "$EXPECTED_ERRS" /tmp/ofx-doc-build.out || true +# Generate property documentation from YAML definitions +cd .. +if command -v uv > /dev/null 2>&1; then + uv run scripts/gen-props-doc.py -v >> /tmp/ofx-doc-build.out 2>&1 +else + # Fall back to regular python if uv is not available + python scripts/gen-props-doc.py -v >> /tmp/ofx-doc-build.out 2>&1 +fi +cd Documentation + # 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 diff --git a/Documentation/pipreq.txt b/Documentation/pipreq.txt index 04d0a80a..242d9c16 100644 --- a/Documentation/pipreq.txt +++ b/Documentation/pipreq.txt @@ -1,3 +1,4 @@ sphinx<7 breathe sphinx_rtd_theme +pyyaml>=6.0 diff --git a/Documentation/sources/Guide/ofxExample5_Circle.rst b/Documentation/sources/Guide/ofxExample5_Circle.rst index cd8c418a..bdee4a90 100644 --- a/Documentation/sources/Guide/ofxExample5_Circle.rst +++ b/Documentation/sources/Guide/ofxExample5_Circle.rst @@ -4,7 +4,7 @@ This guide will introduce the spatial coordinate system used by OFX and will illustrate that with a simple circle drawing plugin. Its source can be found in the source code file -`circle.cpp `_. +`circle.cpp `_. This plugin takes a clip and draws a circle over it. The colour, size and position of the circle are controlled by several parameters. @@ -127,7 +127,7 @@ depending on what the host says it can do. Here is the source for the load action… -`circle.cpp `__ +`circle.cpp `__ .. code:: c++ @@ -191,7 +191,7 @@ Note, we are relying on a parameter type that is only available with the 1.2 version of OFX. Our plugin checks for this version of the API the host supports and will fail gracefully during the load action. -`circle.cpp `__ +`circle.cpp `__ .. code:: c++ @@ -252,7 +252,7 @@ are being described relative to the project size. So our circle’s radius will default to be a quarter of the nominal project size’s x dimension. For a 1080 HD project, this would be a value of 480. -`circle.cpp `__ +`circle.cpp `__ .. code:: c++ @@ -294,7 +294,7 @@ for such parameters to let you simply drag such positions around. We are also setting the default values relative to the project size, and in this case (0.5, 0.5), it should appear in the centre of the final image. -`circle.cpp `__ +`circle.cpp `__ .. code:: c++ @@ -325,7 +325,7 @@ when you get and set the colour, you need to scale the values up to the nominal white point of your image, which is implicitly defined by the data type of the image. -`circle.cpp `__ +`circle.cpp `__ .. code:: c++ @@ -382,7 +382,7 @@ To set the output rod, we need to trap the :c:macro:`kOfxImageEffectActionGetRegionOfDefinition` action. Our MainEntry function now has an extra conditional in there…. -`circle.cpp `__ +`circle.cpp `__ .. code:: c++ @@ -397,7 +397,7 @@ definition on those hosts RoDs are fixed. The code for the action itself is quite simple: -`circle.cpp `__ +`circle.cpp `__ :: @@ -479,7 +479,7 @@ The action code is fairly boiler plate, it fetches parameter values and images from clips before calling the templated PixelProcessing function. Which is below: -`circle.cpp `__ +`circle.cpp `__ :: diff --git a/Documentation/sources/Reference/index.rst b/Documentation/sources/Reference/index.rst index f531ab81..97d787c7 100644 --- a/Documentation/sources/Reference/index.rst +++ b/Documentation/sources/Reference/index.rst @@ -28,8 +28,12 @@ the API. The changes to the API are listed in an addendum. ofxImageEffectActions ofxInteractActions suites/ofxSuiteReference - ofxPropertiesByObject + .. outdated: + .. ofxPropertiesByObject ofxPropertiesReference + ofxPropertiesReferenceGenerated + ofxPropertySetsGenerated DoxygenIndex ofxStatusCodes - apiChanges_1_2_Chapter + .. not needed: + .. apiChanges_1_2_Chapter diff --git a/Documentation/sources/Reference/ofxInteracts.rst b/Documentation/sources/Reference/ofxInteracts.rst index d5add773..4a8d0611 100644 --- a/Documentation/sources/Reference/ofxInteracts.rst +++ b/Documentation/sources/Reference/ofxInteracts.rst @@ -5,7 +5,7 @@ Interacts When a host presents a graphical user interface to an image effect, it may optionally give it the chance to draw its own custom GUI tools and to be able to interact with pen and keyboard input. In OFX this is done -via the OfxInteract suite, which is found in the file `ofxInteract.h `_. +via the OfxInteract suite, which is found in the file `ofxInteract.h `_. OFX interacts by default use openGL to perform all drawing in interacts, due to its portabilty, robustness and wide implementation. diff --git a/Documentation/sources/Reference/ofxPropertiesReferenceGenerated.rst b/Documentation/sources/Reference/ofxPropertiesReferenceGenerated.rst new file mode 100644 index 00000000..137542a4 --- /dev/null +++ b/Documentation/sources/Reference/ofxPropertiesReferenceGenerated.rst @@ -0,0 +1,2214 @@ +.. _propertiesReferenceGenerated: +Properties Reference (Generated) +============================== + +This reference is auto-generated from property definitions in the OpenFX source code. +It provides a structured view of properties with their types, dimensions, and where they are used. +For each property, a link to the detailed Doxygen documentation is provided when available. + + +Boolean Properties +------------------ + +.. _prop_OfxImageClipPropConnected: + +**OfxImageClipPropConnected** +^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageClipPropConnected` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageClipPropConnected`. + +.. _prop_OfxImageClipPropContinuousSamples: + +**OfxImageClipPropContinuousSamples** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageClipPropContinuousSamples` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageClipPropContinuousSamples`. + +.. _prop_OfxImageClipPropIsMask: + +**OfxImageClipPropIsMask** +^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageClipPropIsMask` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipDescriptor `, :ref:`ClipInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageClipPropIsMask`. + +.. _prop_OfxImageClipPropOptional: + +**OfxImageClipPropOptional** +^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageClipPropOptional` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipDescriptor `, :ref:`ClipInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageClipPropOptional`. + +.. _prop_OfxImageEffectFrameVarying: + +**OfxImageEffectFrameVarying** +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectFrameVarying` +- **Type**: bool +- **Dimension**: 1 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectFrameVarying`. + +.. _prop_OfxImageEffectHostPropIsBackground: + +**OfxImageEffectHostPropIsBackground** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectHostPropIsBackground` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectHostPropIsBackground`. + +.. _prop_OfxImageEffectInstancePropSequentialRender: + +**OfxImageEffectInstancePropSequentialRender** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectInstancePropSequentialRender` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectInstance `, :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectInstancePropSequentialRender`. + +.. _prop_OfxImageEffectPluginPropFieldRenderTwiceAlways: + +**OfxImageEffectPluginPropFieldRenderTwiceAlways** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPluginPropFieldRenderTwiceAlways` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectDescriptor ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPluginPropFieldRenderTwiceAlways`. + +.. _prop_OfxImageEffectPluginPropHostFrameThreading: + +**OfxImageEffectPluginPropHostFrameThreading** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPluginPropHostFrameThreading` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectDescriptor ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPluginPropHostFrameThreading`. + +.. _prop_OfxImageEffectPluginPropSingleInstance: + +**OfxImageEffectPluginPropSingleInstance** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPluginPropSingleInstance` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectDescriptor ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPluginPropSingleInstance`. + +.. _prop_OfxImageEffectPropCudaEnabled: + +**OfxImageEffectPropCudaEnabled** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropCudaEnabled` +- **Type**: bool +- **Dimension**: 1 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropCudaEnabled`. + +.. _prop_OfxImageEffectPropInAnalysis: + +**OfxImageEffectPropInAnalysis** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropInAnalysis` +- **Type**: bool +- **Dimension**: 1 +- **Deprecated in**: version 1.4 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropInAnalysis`. + +.. _prop_OfxImageEffectPropInteractiveRenderStatus: + +**OfxImageEffectPropInteractiveRenderStatus** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropInteractiveRenderStatus` +- **Type**: bool +- **Dimension**: 1 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropInteractiveRenderStatus`. + +.. _prop_OfxImageEffectPropMetalEnabled: + +**OfxImageEffectPropMetalEnabled** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropMetalEnabled` +- **Type**: bool +- **Dimension**: 1 +- **Introduced in**: version 1.5 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropMetalEnabled`. + +.. _prop_OfxImageEffectPropMultipleClipDepths: + +**OfxImageEffectPropMultipleClipDepths** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropSupportsMultipleClipDepths` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectDescriptor `, :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropSupportsMultipleClipDepths`. + +.. _prop_OfxImageEffectPropOpenCLEnabled: + +**OfxImageEffectPropOpenCLEnabled** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropOpenCLEnabled` +- **Type**: bool +- **Dimension**: 1 +- **Introduced in**: version 1.5 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropOpenCLEnabled`. + +.. _prop_OfxImageEffectPropOpenGLEnabled: + +**OfxImageEffectPropOpenGLEnabled** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropOpenGLEnabled` +- **Type**: bool +- **Dimension**: 1 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropOpenGLEnabled`. + +.. _prop_OfxImageEffectPropRenderQualityDraft: + +**OfxImageEffectPropRenderQualityDraft** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropRenderQualityDraft` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropRenderQualityDraft`. + +.. _prop_OfxImageEffectPropSequentialRenderStatus: + +**OfxImageEffectPropSequentialRenderStatus** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropSequentialRenderStatus` +- **Type**: bool +- **Dimension**: 1 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropSequentialRenderStatus`. + +.. _prop_OfxImageEffectPropSetableFielding: + +**OfxImageEffectPropSetableFielding** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropSetableFielding` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropSetableFielding`. + +.. _prop_OfxImageEffectPropSetableFrameRate: + +**OfxImageEffectPropSetableFrameRate** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropSetableFrameRate` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropSetableFrameRate`. + +.. _prop_OfxImageEffectPropSupportsMultiResolution: + +**OfxImageEffectPropSupportsMultiResolution** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropSupportsMultiResolution` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectDescriptor `, :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropSupportsMultiResolution`. + +.. _prop_OfxImageEffectPropSupportsMultipleClipPARs: + +**OfxImageEffectPropSupportsMultipleClipPARs** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropSupportsMultipleClipPARs` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectDescriptor `, :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropSupportsMultipleClipPARs`. + +.. _prop_OfxImageEffectPropSupportsOverlays: + +**OfxImageEffectPropSupportsOverlays** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropSupportsOverlays` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropSupportsOverlays`. + +.. _prop_OfxImageEffectPropSupportsTiles: + +**OfxImageEffectPropSupportsTiles** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropSupportsTiles` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipDescriptor `, :ref:`ClipInstance `, :ref:`EffectDescriptor `, :ref:`EffectInstance `, :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropSupportsTiles`. + +.. _prop_OfxImageEffectPropTemporalClipAccess: + +**OfxImageEffectPropTemporalClipAccess** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropTemporalClipAccess` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipDescriptor `, :ref:`ClipInstance `, :ref:`EffectDescriptor `, :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropTemporalClipAccess`. + +.. _prop_OfxInteractPropHasAlpha: + +**OfxInteractPropHasAlpha** +^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxInteractPropHasAlpha` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`InteractDescriptor `, :ref:`InteractInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxInteractPropHasAlpha`. + +.. _prop_OfxParamHostPropSupportsBooleanAnimation: + +**OfxParamHostPropSupportsBooleanAnimation** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamHostPropSupportsBooleanAnimation` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamHostPropSupportsBooleanAnimation`. + +.. _prop_OfxParamHostPropSupportsChoiceAnimation: + +**OfxParamHostPropSupportsChoiceAnimation** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamHostPropSupportsChoiceAnimation` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamHostPropSupportsChoiceAnimation`. + +.. _prop_OfxParamHostPropSupportsCustomAnimation: + +**OfxParamHostPropSupportsCustomAnimation** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamHostPropSupportsCustomAnimation` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamHostPropSupportsCustomAnimation`. + +.. _prop_OfxParamHostPropSupportsCustomInteract: + +**OfxParamHostPropSupportsCustomInteract** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamHostPropSupportsCustomInteract` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamHostPropSupportsCustomInteract`. + +.. _prop_OfxParamHostPropSupportsParametricAnimation: + +**OfxParamHostPropSupportsParametricAnimation** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamHostPropSupportsParametricAnimation` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamHostPropSupportsParametricAnimation`. + +.. _prop_OfxParamHostPropSupportsStrChoice: + +**OfxParamHostPropSupportsStrChoice** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamHostPropSupportsStrChoice` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ImageEffectHost ` +- **Introduced in**: version 1.5 +- **Doc**: For detailed doc, see :c:macro:`kOfxParamHostPropSupportsStrChoice`. + +.. _prop_OfxParamHostPropSupportsStrChoiceAnimation: + +**OfxParamHostPropSupportsStrChoiceAnimation** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamHostPropSupportsStrChoiceAnimation` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ImageEffectHost ` +- **Introduced in**: version 1.5 +- **Doc**: For detailed doc, see :c:macro:`kOfxParamHostPropSupportsStrChoiceAnimation`. + +.. _prop_OfxParamHostPropSupportsStringAnimation: + +**OfxParamHostPropSupportsStringAnimation** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamHostPropSupportsStringAnimation` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamHostPropSupportsStringAnimation`. + +.. _prop_OfxParamPropAnimates: + +**OfxParamPropAnimates** +^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropAnimates` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsParametric `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropAnimates`. + +.. _prop_OfxParamPropCanUndo: + +**OfxParamPropCanUndo** +^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropCanUndo` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsParametric `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropCanUndo`. + +.. _prop_OfxParamPropChoiceEnum: + +**OfxParamPropChoiceEnum** +^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropChoiceEnum` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamsStrChoice ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropChoiceEnum`. + +.. _prop_OfxParamPropEnabled: + +**OfxParamPropEnabled** +^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropEnabled` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsGroup `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsPage `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropEnabled`. + +.. _prop_OfxParamPropEvaluateOnChange: + +**OfxParamPropEvaluateOnChange** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropEvaluateOnChange` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsParametric `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropEvaluateOnChange`. + +.. _prop_OfxParamPropGroupOpen: + +**OfxParamPropGroupOpen** +^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropGroupOpen` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamsGroup ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropGroupOpen`. + +.. _prop_OfxParamPropHasHostOverlayHandle: + +**OfxParamPropHasHostOverlayHandle** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropHasHostOverlayHandle` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropHasHostOverlayHandle`. + +.. _prop_OfxParamPropIsAnimating: + +**OfxParamPropIsAnimating** +^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropIsAnimating` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsParametric `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropIsAnimating`. + +.. _prop_OfxParamPropIsAutoKeying: + +**OfxParamPropIsAutoKeying** +^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropIsAutoKeying` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsParametric `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropIsAutoKeying`. + +.. _prop_OfxParamPropPersistant: + +**OfxParamPropPersistant** +^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropPersistant` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsParametric `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropPersistant`. + +.. _prop_OfxParamPropPluginMayWrite: + +**OfxParamPropPluginMayWrite** +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropPluginMayWrite` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsParametric `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Deprecated in**: version 1.4 +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropPluginMayWrite`. + +.. _prop_OfxParamPropSecret: + +**OfxParamPropSecret** +^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropSecret` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsGroup `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsPage `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropSecret`. + +.. _prop_OfxParamPropShowTimeMarker: + +**OfxParamPropShowTimeMarker** +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropShowTimeMarker` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropShowTimeMarker`. + +.. _prop_OfxParamPropStringFilePathExists: + +**OfxParamPropStringFilePathExists** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropStringFilePathExists` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropStringFilePathExists`. + +.. _prop_OfxPropIsInteractive: + +**OfxPropIsInteractive** +^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxPropIsInteractive` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxPropIsInteractive`. + +.. _prop_OfxPropParamSetNeedsSyncing: + +**OfxPropParamSetNeedsSyncing** +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxPropParamSetNeedsSyncing` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParameterSet ` +- **Doc**: For detailed doc, see :c:macro:`kOfxPropParamSetNeedsSyncing`. + +.. _prop_kOfxParamPropUseHostOverlayHandle: + +**kOfxParamPropUseHostOverlayHandle** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropUseHostOverlayHandle` +- **Type**: bool +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropUseHostOverlayHandle`. + + +Double Properties +----------------- + +.. _prop_OfxImageEffectInstancePropEffectDuration: + +**OfxImageEffectInstancePropEffectDuration** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectInstancePropEffectDuration` +- **Type**: double +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectInstancePropEffectDuration`. + +.. _prop_OfxImageEffectPropFrameRange: + +**OfxImageEffectPropFrameRange** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropFrameRange` +- **Type**: double +- **Dimension**: 2 +- **Used in Property Sets**: :ref:`ClipInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropFrameRange`. + +.. _prop_OfxImageEffectPropFrameRate: + +**OfxImageEffectPropFrameRate** +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropFrameRate` +- **Type**: double +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipInstance `, :ref:`EffectInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropFrameRate`. + +.. _prop_OfxImageEffectPropFrameStep: + +**OfxImageEffectPropFrameStep** +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropFrameStep` +- **Type**: double +- **Dimension**: 1 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropFrameStep`. + +.. _prop_OfxImageEffectPropPixelAspectRatio: + +**OfxImageEffectPropPixelAspectRatio** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropProjectPixelAspectRatio` +- **Type**: double +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropProjectPixelAspectRatio`. + +.. _prop_OfxImageEffectPropProjectExtent: + +**OfxImageEffectPropProjectExtent** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropProjectExtent` +- **Type**: double +- **Dimension**: 2 +- **Used in Property Sets**: :ref:`EffectInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropProjectExtent`. + +.. _prop_OfxImageEffectPropProjectOffset: + +**OfxImageEffectPropProjectOffset** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropProjectOffset` +- **Type**: double +- **Dimension**: 2 +- **Used in Property Sets**: :ref:`EffectInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropProjectOffset`. + +.. _prop_OfxImageEffectPropProjectSize: + +**OfxImageEffectPropProjectSize** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropProjectSize` +- **Type**: double +- **Dimension**: 2 +- **Used in Property Sets**: :ref:`EffectInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropProjectSize`. + +.. _prop_OfxImageEffectPropRegionOfDefinition: + +**OfxImageEffectPropRegionOfDefinition** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropRegionOfDefinition` +- **Type**: double +- **Dimension**: 4 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropRegionOfDefinition`. + +.. _prop_OfxImageEffectPropRegionOfInterest: + +**OfxImageEffectPropRegionOfInterest** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropRegionOfInterest` +- **Type**: double +- **Dimension**: 4 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropRegionOfInterest`. + +.. _prop_OfxImageEffectPropRenderScale: + +**OfxImageEffectPropRenderScale** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropRenderScale` +- **Type**: double +- **Dimension**: 2 +- **Used in Property Sets**: :ref:`Image ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropRenderScale`. + +.. _prop_OfxImageEffectPropUnmappedFrameRange: + +**OfxImageEffectPropUnmappedFrameRange** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropUnmappedFrameRange` +- **Type**: double +- **Dimension**: 2 +- **Used in Property Sets**: :ref:`ClipInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropUnmappedFrameRange`. + +.. _prop_OfxImageEffectPropUnmappedFrameRate: + +**OfxImageEffectPropUnmappedFrameRate** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropUnmappedFrameRate` +- **Type**: double +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropUnmappedFrameRate`. + +.. _prop_OfxImagePropPixelAspectRatio: + +**OfxImagePropPixelAspectRatio** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImagePropPixelAspectRatio` +- **Type**: double +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipInstance `, :ref:`Image ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImagePropPixelAspectRatio`. + +.. _prop_OfxInteractPropBackgroundColour: + +**OfxInteractPropBackgroundColour** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxInteractPropBackgroundColour` +- **Type**: double +- **Dimension**: 3 +- **Used in Property Sets**: :ref:`InteractInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxInteractPropBackgroundColour`. + +.. _prop_OfxInteractPropPenPosition: + +**OfxInteractPropPenPosition** +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxInteractPropPenPosition` +- **Type**: double +- **Dimension**: 2 +- **Doc**: For detailed doc, see :c:macro:`kOfxInteractPropPenPosition`. + +.. _prop_OfxInteractPropPenPressure: + +**OfxInteractPropPenPressure** +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxInteractPropPenPressure` +- **Type**: double +- **Dimension**: 1 +- **Doc**: For detailed doc, see :c:macro:`kOfxInteractPropPenPressure`. + +.. _prop_OfxInteractPropPixelScale: + +**OfxInteractPropPixelScale** +^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxInteractPropPixelScale` +- **Type**: double +- **Dimension**: 2 +- **Used in Property Sets**: :ref:`InteractInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxInteractPropPixelScale`. + +.. _prop_OfxInteractPropSuggestedColour: + +**OfxInteractPropSuggestedColour** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxInteractPropSuggestedColour` +- **Type**: double +- **Dimension**: 3 +- **Used in Property Sets**: :ref:`InteractInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxInteractPropSuggestedColour`. + +.. _prop_OfxParamPropDefault: + +**OfxParamPropDefault** +^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropDefault` +- **Type**: Multiple types: int, double, string, pointer +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropDefault`. + +.. _prop_OfxParamPropDisplayMax: + +**OfxParamPropDisplayMax** +^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropDisplayMax` +- **Type**: Multiple types: int, double +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropDisplayMax`. + +.. _prop_OfxParamPropDisplayMin: + +**OfxParamPropDisplayMin** +^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropDisplayMin` +- **Type**: Multiple types: int, double +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropDisplayMin`. + +.. _prop_OfxParamPropIncrement: + +**OfxParamPropIncrement** +^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropIncrement` +- **Type**: double +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsDouble2D3D `, :ref:`ParamsNormalizedSpatial ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropIncrement`. + +.. _prop_OfxParamPropInteractMinimumSize: + +**OfxParamPropInteractMinimumSize** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropInteractMinimumSize` +- **Type**: double +- **Dimension**: 2 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropInteractMinimumSize`. + +.. _prop_OfxParamPropInteractSize: + +**OfxParamPropInteractSize** +^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropInteractSize` +- **Type**: double +- **Dimension**: 2 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropInteractSize`. + +.. _prop_OfxParamPropInteractSizeAspect: + +**OfxParamPropInteractSizeAspect** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropInteractSizeAspect` +- **Type**: double +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropInteractSizeAspect`. + +.. _prop_OfxParamPropInterpolationAmount: + +**OfxParamPropInterpolationAmount** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropInterpolationAmount` +- **Type**: double +- **Dimension**: 1 +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropInterpolationAmount`. + +.. _prop_OfxParamPropInterpolationTime: + +**OfxParamPropInterpolationTime** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropInterpolationTime` +- **Type**: double +- **Dimension**: 2 +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropInterpolationTime`. + +.. _prop_OfxParamPropMax: + +**OfxParamPropMax** +^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropMax` +- **Type**: Multiple types: int, double +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropMax`. + +.. _prop_OfxParamPropMin: + +**OfxParamPropMin** +^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropMin` +- **Type**: Multiple types: int, double +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropMin`. + +.. _prop_OfxParamPropParametricRange: + +**OfxParamPropParametricRange** +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropParametricRange` +- **Type**: double +- **Dimension**: 2 +- **Used in Property Sets**: :ref:`ParamsParametric ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropParametricRange`. + +.. _prop_OfxParamPropParametricUIColour: + +**OfxParamPropParametricUIColour** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropParametricUIColour` +- **Type**: double +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`ParamsParametric ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropParametricUIColour`. + +.. _prop_OfxPropTime: + +**OfxPropTime** +^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxPropTime` +- **Type**: double +- **Dimension**: 1 +- **Doc**: For detailed doc, see :c:macro:`kOfxPropTime`. + + +Enumeration Properties +---------------------- + +.. _prop_OfxImageClipPropFieldExtraction: + +**OfxImageClipPropFieldExtraction** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageClipPropFieldExtraction` +- **Type**: enum +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipDescriptor `, :ref:`ClipInstance ` +- **Valid Values**: + - ``OfxImageFieldNone`` + - ``OfxImageFieldLower`` + - ``OfxImageFieldUpper`` + - ``OfxImageFieldBoth`` + - ``OfxImageFieldSingle`` + - ``OfxImageFieldDoubled`` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageClipPropFieldExtraction`. + +.. _prop_OfxImageClipPropFieldOrder: + +**OfxImageClipPropFieldOrder** +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageClipPropFieldOrder` +- **Type**: enum +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipInstance ` +- **Valid Values**: + - ``OfxImageFieldNone`` + - ``OfxImageFieldLower`` + - ``OfxImageFieldUpper`` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageClipPropFieldOrder`. + +.. _prop_OfxImageClipPropUnmappedComponents: + +**OfxImageClipPropUnmappedComponents** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageClipPropUnmappedComponents` +- **Type**: enum +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipInstance ` +- **Valid Values**: + - ``OfxImageComponentNone`` + - ``OfxImageComponentRGBA`` + - ``OfxImageComponentRGB`` + - ``OfxImageComponentAlpha`` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageClipPropUnmappedComponents`. + +.. _prop_OfxImageClipPropUnmappedPixelDepth: + +**OfxImageClipPropUnmappedPixelDepth** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageClipPropUnmappedPixelDepth` +- **Type**: enum +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipInstance ` +- **Valid Values**: + - ``OfxBitDepthNone`` + - ``OfxBitDepthByte`` + - ``OfxBitDepthShort`` + - ``OfxBitDepthHalf`` + - ``OfxBitDepthFloat`` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageClipPropUnmappedPixelDepth`. + +.. _prop_OfxImageEffectHostPropNativeOrigin: + +**OfxImageEffectHostPropNativeOrigin** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectHostPropNativeOrigin` +- **Type**: enum +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ImageEffectHost ` +- **Valid Values**: + - ``OfxImageEffectHostPropNativeOriginBottomLeft`` + - ``OfxImageEffectHostPropNativeOriginTopLeft`` + - ``OfxImageEffectHostPropNativeOriginCenter`` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectHostPropNativeOrigin`. + +.. _prop_OfxImageEffectPluginRenderThreadSafety: + +**OfxImageEffectPluginRenderThreadSafety** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPluginRenderThreadSafety` +- **Type**: enum +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectDescriptor `, :ref:`EffectDescriptor ` +- **Valid Values**: + - ``OfxImageEffectRenderUnsafe`` + - ``OfxImageEffectRenderInstanceSafe`` + - ``OfxImageEffectRenderFullySafe`` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPluginRenderThreadSafety`. + +.. _prop_OfxImageEffectPropColourManagementStyle: + +**OfxImageEffectPropColourManagementStyle** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropColourManagementStyle` +- **Type**: enum +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectDescriptor `, :ref:`EffectInstance `, :ref:`ImageEffectHost ` +- **Valid Values**: + - ``OfxImageEffectPropColourManagementNone`` + - ``OfxImageEffectPropColourManagementBasic`` + - ``OfxImageEffectPropColourManagementCore`` + - ``OfxImageEffectPropColourManagementFull`` + - ``OfxImageEffectPropColourManagementOCIO`` +- **Introduced in**: version 1.5 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropColourManagementStyle`. + +.. _prop_OfxImageEffectPropComponents: + +**OfxImageEffectPropComponents** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropComponents` +- **Type**: enum +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipInstance `, :ref:`Image ` +- **Valid Values**: + - ``OfxImageComponentNone`` + - ``OfxImageComponentRGBA`` + - ``OfxImageComponentRGB`` + - ``OfxImageComponentAlpha`` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropComponents`. + +.. _prop_OfxImageEffectPropContext: + +**OfxImageEffectPropContext** +^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropContext` +- **Type**: enum +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectInstance ` +- **Valid Values**: + - ``OfxImageEffectContextGenerator`` + - ``OfxImageEffectContextFilter`` + - ``OfxImageEffectContextTransition`` + - ``OfxImageEffectContextPaint`` + - ``OfxImageEffectContextGeneral`` + - ``OfxImageEffectContextRetimer`` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropContext`. + +.. _prop_OfxImageEffectPropCudaRenderSupported: + +**OfxImageEffectPropCudaRenderSupported** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropCudaRenderSupported` +- **Type**: enum +- **Dimension**: 1 +- **Valid Values**: + - ``false`` + - ``true`` + - ``needed`` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropCudaRenderSupported`. + +.. _prop_OfxImageEffectPropCudaStreamSupported: + +**OfxImageEffectPropCudaStreamSupported** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropCudaStreamSupported` +- **Type**: enum +- **Dimension**: 1 +- **Valid Values**: + - ``false`` + - ``true`` + - ``needed`` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropCudaStreamSupported`. + +.. _prop_OfxImageEffectPropFieldToRender: + +**OfxImageEffectPropFieldToRender** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropFieldToRender` +- **Type**: enum +- **Dimension**: 1 +- **Valid Values**: + - ``OfxImageFieldNone`` + - ``OfxImageFieldBoth`` + - ``OfxImageFieldLower`` + - ``OfxImageFieldUpper`` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropFieldToRender`. + +.. _prop_OfxImageEffectPropMetalRenderSupported: + +**OfxImageEffectPropMetalRenderSupported** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropMetalRenderSupported` +- **Type**: enum +- **Dimension**: 1 +- **Valid Values**: + - ``false`` + - ``true`` + - ``needed`` +- **Introduced in**: version 1.5 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropMetalRenderSupported`. + +.. _prop_OfxImageEffectPropOpenCLRenderSupported: + +**OfxImageEffectPropOpenCLRenderSupported** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropOpenCLRenderSupported` +- **Type**: enum +- **Dimension**: 1 +- **Valid Values**: + - ``false`` + - ``true`` + - ``needed`` +- **Introduced in**: version 1.5 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropOpenCLRenderSupported`. + +.. _prop_OfxImageEffectPropOpenCLSupported: + +**OfxImageEffectPropOpenCLSupported** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropOpenCLSupported` +- **Type**: enum +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectDescriptor `, :ref:`ImageEffectHost ` +- **Valid Values**: + - ``false`` + - ``true`` +- **Introduced in**: version 1.5 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropOpenCLSupported`. + +.. _prop_OfxImageEffectPropOpenGLRenderSupported: + +**OfxImageEffectPropOpenGLRenderSupported** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropOpenGLRenderSupported` +- **Type**: enum +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectDescriptor `, :ref:`EffectInstance `, :ref:`ImageEffectHost ` +- **Valid Values**: + - ``false`` + - ``true`` + - ``needed`` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropOpenGLRenderSupported`. + +.. _prop_OfxImageEffectPropPixelDepth: + +**OfxImageEffectPropPixelDepth** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropPixelDepth` +- **Type**: enum +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipInstance `, :ref:`Image ` +- **Valid Values**: + - ``OfxBitDepthNone`` + - ``OfxBitDepthByte`` + - ``OfxBitDepthShort`` + - ``OfxBitDepthHalf`` + - ``OfxBitDepthFloat`` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropPixelDepth`. + +.. _prop_OfxImageEffectPropPreMultiplication: + +**OfxImageEffectPropPreMultiplication** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropPreMultiplication` +- **Type**: enum +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipInstance `, :ref:`Image ` +- **Valid Values**: + - ``OfxImageOpaque`` + - ``OfxImagePreMultiplied`` + - ``OfxImageUnPreMultiplied`` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropPreMultiplication`. + +.. _prop_OfxImageEffectPropSupportedComponents: + +**OfxImageEffectPropSupportedComponents** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropSupportedComponents` +- **Type**: enum +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`ClipDescriptor `, :ref:`ClipInstance `, :ref:`ImageEffectHost ` +- **Valid Values**: + - ``OfxImageComponentNone`` + - ``OfxImageComponentRGBA`` + - ``OfxImageComponentRGB`` + - ``OfxImageComponentAlpha`` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropSupportedComponents`. + +.. _prop_OfxImageEffectPropSupportedContexts: + +**OfxImageEffectPropSupportedContexts** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropSupportedContexts` +- **Type**: enum +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`EffectDescriptor `, :ref:`ImageEffectHost ` +- **Valid Values**: + - ``OfxImageEffectContextGenerator`` + - ``OfxImageEffectContextFilter`` + - ``OfxImageEffectContextTransition`` + - ``OfxImageEffectContextPaint`` + - ``OfxImageEffectContextGeneral`` + - ``OfxImageEffectContextRetimer`` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropSupportedContexts`. + +.. _prop_OfxImageEffectPropSupportedPixelDepths: + +**OfxImageEffectPropSupportedPixelDepths** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropSupportedPixelDepths` +- **Type**: enum +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`EffectDescriptor ` +- **Valid Values**: + - ``OfxBitDepthNone`` + - ``OfxBitDepthByte`` + - ``OfxBitDepthShort`` + - ``OfxBitDepthHalf`` + - ``OfxBitDepthFloat`` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropSupportedPixelDepths`. + +.. _prop_OfxImagePropField: + +**OfxImagePropField** +^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImagePropField` +- **Type**: enum +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`Image ` +- **Valid Values**: + - ``OfxImageFieldNone`` + - ``OfxImageFieldBoth`` + - ``OfxImageFieldLower`` + - ``OfxImageFieldUpper`` +- **Doc**: For detailed doc, see :c:macro:`kOfxImagePropField`. + +.. _prop_OfxOpenGLPropPixelDepth: + +**OfxOpenGLPropPixelDepth** +^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxOpenGLPropPixelDepth` +- **Type**: enum +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`EffectDescriptor ` +- **Valid Values**: + - ``OfxBitDepthNone`` + - ``OfxBitDepthByte`` + - ``OfxBitDepthShort`` + - ``OfxBitDepthHalf`` + - ``OfxBitDepthFloat`` +- **Doc**: For detailed doc, see :c:macro:`kOfxOpenGLPropPixelDepth`. + +.. _prop_OfxParamPropCacheInvalidation: + +**OfxParamPropCacheInvalidation** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropCacheInvalidation` +- **Type**: enum +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsParametric `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Valid Values**: + - ``OfxParamInvalidateValueChange`` + - ``OfxParamInvalidateValueChangeToEnd`` + - ``OfxParamInvalidateAll`` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropCacheInvalidation`. + +.. _prop_OfxParamPropDefaultCoordinateSystem: + +**OfxParamPropDefaultCoordinateSystem** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropDefaultCoordinateSystem` +- **Type**: enum +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamsNormalizedSpatial ` +- **Valid Values**: + - ``OfxParamCoordinatesCanonical`` + - ``OfxParamCoordinatesNormalised`` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropDefaultCoordinateSystem`. + +.. _prop_OfxParamPropDoubleType: + +**OfxParamPropDoubleType** +^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropDoubleType` +- **Type**: enum +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsDouble2D3D ` +- **Valid Values**: + - ``OfxParamDoubleTypePlain`` + - ``OfxParamDoubleTypeAngle`` + - ``OfxParamDoubleTypeScale`` + - ``OfxParamDoubleTypeTime`` + - ``OfxParamDoubleTypeAbsoluteTime`` + - ``OfxParamDoubleTypeX`` + - ``OfxParamDoubleTypeXAbsolute`` + - ``OfxParamDoubleTypeY`` + - ``OfxParamDoubleTypeYAbsolute`` + - ``OfxParamDoubleTypeXY`` + - ``OfxParamDoubleTypeXYAbsolute`` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropDoubleType`. + +.. _prop_OfxParamPropStringMode: + +**OfxParamPropStringMode** +^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropStringMode` +- **Type**: enum +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamsString ` +- **Valid Values**: + - ``OfxParamStringIsSingleLine`` + - ``OfxParamStringIsMultiLine`` + - ``OfxParamStringIsFilePath`` + - ``OfxParamStringIsDirectoryPath`` + - ``OfxParamStringIsLabel`` + - ``OfxParamStringIsRichTextFormat`` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropStringMode`. + +.. _prop_OfxPluginPropFilePath: + +**OfxPluginPropFilePath** +^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxPluginPropFilePath` +- **Type**: enum +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectDescriptor ` +- **Valid Values**: + - ``false`` + - ``true`` + - ``needed`` +- **Doc**: For detailed doc, see :c:macro:`kOfxPluginPropFilePath`. + +.. _prop_OfxPropChangeReason: + +**OfxPropChangeReason** +^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxPropChangeReason` +- **Type**: enum +- **Dimension**: 1 +- **Valid Values**: + - ``OfxChangeUserEdited`` + - ``OfxChangePluginEdited`` + - ``OfxChangeTime`` +- **Doc**: For detailed doc, see :c:macro:`kOfxPropChangeReason`. + + +Integer Properties +------------------ + +.. _prop_OfxImageEffectPropOpenGLTextureIndex: + +**OfxImageEffectPropOpenGLTextureIndex** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropOpenGLTextureIndex` +- **Type**: int +- **Dimension**: 1 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropOpenGLTextureIndex`. + +.. _prop_OfxImageEffectPropOpenGLTextureTarget: + +**OfxImageEffectPropOpenGLTextureTarget** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropOpenGLTextureTarget` +- **Type**: int +- **Dimension**: 1 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropOpenGLTextureTarget`. + +.. _prop_OfxImageEffectPropRenderWindow: + +**OfxImageEffectPropRenderWindow** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropRenderWindow` +- **Type**: int +- **Dimension**: 4 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropRenderWindow`. + +.. _prop_OfxImagePropBounds: + +**OfxImagePropBounds** +^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImagePropBounds` +- **Type**: int +- **Dimension**: 4 +- **Used in Property Sets**: :ref:`Image ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImagePropBounds`. + +.. _prop_OfxImagePropRegionOfDefinition: + +**OfxImagePropRegionOfDefinition** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImagePropRegionOfDefinition` +- **Type**: int +- **Dimension**: 4 +- **Used in Property Sets**: :ref:`Image ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImagePropRegionOfDefinition`. + +.. _prop_OfxImagePropRowBytes: + +**OfxImagePropRowBytes** +^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImagePropRowBytes` +- **Type**: int +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`Image ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImagePropRowBytes`. + +.. _prop_OfxInteractPropBitDepth: + +**OfxInteractPropBitDepth** +^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxInteractPropBitDepth` +- **Type**: int +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`InteractDescriptor `, :ref:`InteractInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxInteractPropBitDepth`. + +.. _prop_OfxInteractPropPenViewportPosition: + +**OfxInteractPropPenViewportPosition** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxInteractPropPenViewportPosition` +- **Type**: int +- **Dimension**: 2 +- **Doc**: For detailed doc, see :c:macro:`kOfxInteractPropPenViewportPosition`. + +.. _prop_OfxInteractPropViewport: + +**OfxInteractPropViewport** +^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxInteractPropViewportSize` +- **Type**: int +- **Dimension**: 2 +- **Deprecated in**: version 1.3 +- **Doc**: For detailed doc, see :c:macro:`kOfxInteractPropViewportSize`. + +.. _prop_OfxParamHostPropMaxPages: + +**OfxParamHostPropMaxPages** +^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamHostPropMaxPages` +- **Type**: int +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamHostPropMaxPages`. + +.. _prop_OfxParamHostPropMaxParameters: + +**OfxParamHostPropMaxParameters** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamHostPropMaxParameters` +- **Type**: int +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamHostPropMaxParameters`. + +.. _prop_OfxParamHostPropPageRowColumnCount: + +**OfxParamHostPropPageRowColumnCount** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamHostPropPageRowColumnCount` +- **Type**: int +- **Dimension**: 2 +- **Used in Property Sets**: :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamHostPropPageRowColumnCount`. + +.. _prop_OfxParamPropChoiceOrder: + +**OfxParamPropChoiceOrder** +^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropChoiceOrder` +- **Type**: int +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`ParamsChoice ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropChoiceOrder`. + +.. _prop_OfxParamPropDefault: + +**OfxParamPropDefault** +^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropDefault` +- **Type**: Multiple types: int, double, string, pointer +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropDefault`. + +.. _prop_OfxParamPropDigits: + +**OfxParamPropDigits** +^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropDigits` +- **Type**: int +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsDouble2D3D `, :ref:`ParamsNormalizedSpatial ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropDigits`. + +.. _prop_OfxParamPropDisplayMax: + +**OfxParamPropDisplayMax** +^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropDisplayMax` +- **Type**: Multiple types: int, double +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropDisplayMax`. + +.. _prop_OfxParamPropDisplayMin: + +**OfxParamPropDisplayMin** +^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropDisplayMin` +- **Type**: Multiple types: int, double +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropDisplayMin`. + +.. _prop_OfxParamPropInteractPreferedSize: + +**OfxParamPropInteractPreferedSize** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropInteractPreferedSize` +- **Type**: int +- **Dimension**: 2 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropInteractPreferedSize`. + +.. _prop_OfxParamPropMax: + +**OfxParamPropMax** +^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropMax` +- **Type**: Multiple types: int, double +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropMax`. + +.. _prop_OfxParamPropMin: + +**OfxParamPropMin** +^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropMin` +- **Type**: Multiple types: int, double +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropMin`. + +.. _prop_OfxParamPropParametricDimension: + +**OfxParamPropParametricDimension** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropParametricDimension` +- **Type**: int +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamsParametric ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropParametricDimension`. + +.. _prop_OfxPropAPIVersion: + +**OfxPropAPIVersion** +^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxPropAPIVersion` +- **Type**: int +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxPropAPIVersion`. + +.. _prop_OfxPropVersion: + +**OfxPropVersion** +^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxPropVersion` +- **Type**: int +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`EffectDescriptor `, :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxPropVersion`. + +.. _prop_kOfxPropKeySym: + +**kOfxPropKeySym** +^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxPropKeySym` +- **Type**: int +- **Dimension**: 1 +- **Doc**: For detailed doc, see :c:macro:`kOfxPropKeySym`. + + +Pointer Properties +------------------ + +.. _prop_OfxImageEffectPluginPropOverlayInteractV1: + +**OfxImageEffectPluginPropOverlayInteractV1** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPluginPropOverlayInteractV1` +- **Type**: pointer +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectDescriptor ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPluginPropOverlayInteractV1`. + +.. _prop_OfxImageEffectPluginPropOverlayInteractV2: + +**OfxImageEffectPluginPropOverlayInteractV2** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPluginPropOverlayInteractV2` +- **Type**: pointer +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectDescriptor ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPluginPropOverlayInteractV2`. + +.. _prop_OfxImageEffectPropCudaStream: + +**OfxImageEffectPropCudaStream** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropCudaStream` +- **Type**: pointer +- **Dimension**: 1 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropCudaStream`. + +.. _prop_OfxImageEffectPropMetalCommandQueue: + +**OfxImageEffectPropMetalCommandQueue** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropMetalCommandQueue` +- **Type**: pointer +- **Dimension**: 1 +- **Introduced in**: version 1.5 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropMetalCommandQueue`. + +.. _prop_OfxImageEffectPropOpenCLCommandQueue: + +**OfxImageEffectPropOpenCLCommandQueue** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropOpenCLCommandQueue` +- **Type**: pointer +- **Dimension**: 1 +- **Introduced in**: version 1.5 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropOpenCLCommandQueue`. + +.. _prop_OfxImageEffectPropOpenCLImage: + +**OfxImageEffectPropOpenCLImage** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropOpenCLImage` +- **Type**: pointer +- **Dimension**: 1 +- **Introduced in**: version 1.5 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropOpenCLImage`. + +.. _prop_OfxImageEffectPropPluginHandle: + +**OfxImageEffectPropPluginHandle** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropPluginHandle` +- **Type**: pointer +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropPluginHandle`. + +.. _prop_OfxImagePropData: + +**OfxImagePropData** +^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImagePropData` +- **Type**: pointer +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`Image ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImagePropData`. + +.. _prop_OfxInteractPropDrawContext: + +**OfxInteractPropDrawContext** +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxInteractPropDrawContext` +- **Type**: pointer +- **Dimension**: 1 +- **Doc**: For detailed doc, see :c:macro:`kOfxInteractPropDrawContext`. + +.. _prop_OfxParamPropCustomCallbackV1: + +**OfxParamPropCustomCallbackV1** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropCustomInterpCallbackV1` +- **Type**: pointer +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamsCustom ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropCustomInterpCallbackV1`. + +.. _prop_OfxParamPropDataPtr: + +**OfxParamPropDataPtr** +^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropDataPtr` +- **Type**: pointer +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsGroup `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsPage `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropDataPtr`. + +.. _prop_OfxParamPropDefault: + +**OfxParamPropDefault** +^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropDefault` +- **Type**: Multiple types: int, double, string, pointer +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropDefault`. + +.. _prop_OfxParamPropInteractV1: + +**OfxParamPropInteractV1** +^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropInteractV1` +- **Type**: pointer +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropInteractV1`. + +.. _prop_OfxParamPropParametricInteractBackground: + +**OfxParamPropParametricInteractBackground** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropParametricInteractBackground` +- **Type**: pointer +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamsParametric ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropParametricInteractBackground`. + +.. _prop_OfxPropEffectInstance: + +**OfxPropEffectInstance** +^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxPropEffectInstance` +- **Type**: pointer +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`InteractInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxPropEffectInstance`. + +.. _prop_OfxPropHostOSHandle: + +**OfxPropHostOSHandle** +^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxPropHostOSHandle` +- **Type**: pointer +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxPropHostOSHandle`. + +.. _prop_OfxPropInstanceData: + +**OfxPropInstanceData** +^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxPropInstanceData` +- **Type**: pointer +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectInstance `, :ref:`InteractInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxPropInstanceData`. + + +String Properties +----------------- + +.. _prop_OfxImageClipPropColourspace: + +**OfxImageClipPropColourspace** +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageClipPropColourspace` +- **Type**: string +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipInstance ` +- **Introduced in**: version 1.5 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageClipPropColourspace`. + +.. _prop_OfxImageClipPropPreferredColourspaces: + +**OfxImageClipPropPreferredColourspaces** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageClipPropPreferredColourspaces` +- **Type**: string +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`ClipInstance ` +- **Introduced in**: version 1.5 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageClipPropPreferredColourspaces`. + +.. _prop_OfxImageEffectPluginPropGrouping: + +**OfxImageEffectPluginPropGrouping** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPluginPropGrouping` +- **Type**: string +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectDescriptor ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPluginPropGrouping`. + +.. _prop_OfxImageEffectPropClipPreferencesSlaveParam: + +**OfxImageEffectPropClipPreferencesSlaveParam** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropClipPreferencesSlaveParam` +- **Type**: string +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`EffectDescriptor ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropClipPreferencesSlaveParam`. + +.. _prop_OfxImageEffectPropColourManagementAvailableConfigs: + +**OfxImageEffectPropColourManagementAvailableConfigs** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropColourManagementAvailableConfigs` +- **Type**: string +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`EffectDescriptor `, :ref:`ImageEffectHost ` +- **Introduced in**: version 1.5 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropColourManagementAvailableConfigs`. + +.. _prop_OfxImageEffectPropColourManagementConfig: + +**OfxImageEffectPropColourManagementConfig** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropColourManagementConfig` +- **Type**: string +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectInstance ` +- **Introduced in**: version 1.5 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropColourManagementConfig`. + +.. _prop_OfxImageEffectPropDisplayColourspace: + +**OfxImageEffectPropDisplayColourspace** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropDisplayColourspace` +- **Type**: string +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectInstance ` +- **Introduced in**: version 1.5 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropDisplayColourspace`. + +.. _prop_OfxImageEffectPropOCIOConfig: + +**OfxImageEffectPropOCIOConfig** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropOCIOConfig` +- **Type**: string +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectInstance ` +- **Introduced in**: version 1.5 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropOCIOConfig`. + +.. _prop_OfxImageEffectPropOCIODisplay: + +**OfxImageEffectPropOCIODisplay** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropOCIODisplay` +- **Type**: string +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectInstance ` +- **Introduced in**: version 1.5 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropOCIODisplay`. + +.. _prop_OfxImageEffectPropOCIOView: + +**OfxImageEffectPropOCIOView** +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropOCIOView` +- **Type**: string +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectInstance ` +- **Introduced in**: version 1.5 +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropOCIOView`. + +.. _prop_OfxImagePropUniqueIdentifier: + +**OfxImagePropUniqueIdentifier** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImagePropUniqueIdentifier` +- **Type**: string +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`Image ` +- **Doc**: For detailed doc, see :c:macro:`kOfxImagePropUniqueIdentifier`. + +.. _prop_OfxInteractPropSlaveToParam: + +**OfxInteractPropSlaveToParam** +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxInteractPropSlaveToParam` +- **Type**: string +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`InteractInstance ` +- **Doc**: For detailed doc, see :c:macro:`kOfxInteractPropSlaveToParam`. + +.. _prop_OfxParamPropChoiceOption: + +**OfxParamPropChoiceOption** +^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropChoiceOption` +- **Type**: string +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`ParamsChoice `, :ref:`ParamsStrChoice ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropChoiceOption`. + +.. _prop_OfxParamPropCustomValue: + +**OfxParamPropCustomValue** +^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropCustomValue` +- **Type**: string +- **Dimension**: 2 +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropCustomValue`. + +.. _prop_OfxParamPropDefault: + +**OfxParamPropDefault** +^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropDefault` +- **Type**: Multiple types: int, double, string, pointer +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropDefault`. + +.. _prop_OfxParamPropDimensionLabel: + +**OfxParamPropDimensionLabel** +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropDimensionLabel` +- **Type**: string +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamsInt2D3D ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropDimensionLabel`. + +.. _prop_OfxParamPropHint: + +**OfxParamPropHint** +^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropHint` +- **Type**: string +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsGroup `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsPage `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropHint`. + +.. _prop_OfxParamPropPageChild: + +**OfxParamPropPageChild** +^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropPageChild` +- **Type**: string +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`ParamsPage ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropPageChild`. + +.. _prop_OfxParamPropParent: + +**OfxParamPropParent** +^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropParent` +- **Type**: string +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsGroup `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsPage `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropParent`. + +.. _prop_OfxParamPropScriptName: + +**OfxParamPropScriptName** +^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropScriptName` +- **Type**: string +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsGroup `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsPage `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropScriptName`. + +.. _prop_OfxParamPropType: + +**OfxParamPropType** +^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxParamPropType` +- **Type**: string +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsGroup `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsPage `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxParamPropType`. + +.. _prop_OfxPluginPropParamPageOrder: + +**OfxPluginPropParamPageOrder** +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxPluginPropParamPageOrder` +- **Type**: string +- **Dimension**: Variable (0 or more) +- **Used in Property Sets**: :ref:`ParameterSet ` +- **Doc**: For detailed doc, see :c:macro:`kOfxPluginPropParamPageOrder`. + +.. _prop_OfxPropIcon: + +**OfxPropIcon** +^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxPropIcon` +- **Type**: string +- **Dimension**: 2 +- **Used in Property Sets**: :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsGroup `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsPage `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxPropIcon`. + +.. _prop_OfxPropLabel: + +**OfxPropLabel** +^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxPropLabel` +- **Type**: string +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipDescriptor `, :ref:`ClipInstance `, :ref:`EffectDescriptor `, :ref:`ImageEffectHost `, :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsGroup `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsPage `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxPropLabel`. + +.. _prop_OfxPropLongLabel: + +**OfxPropLongLabel** +^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxPropLongLabel` +- **Type**: string +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipDescriptor `, :ref:`ClipInstance `, :ref:`EffectDescriptor `, :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsGroup `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsPage `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxPropLongLabel`. + +.. _prop_OfxPropName: + +**OfxPropName** +^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxPropName` +- **Type**: string +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipDescriptor `, :ref:`ClipInstance `, :ref:`ImageEffectHost `, :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsGroup `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsPage `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxPropName`. + +.. _prop_OfxPropPluginDescription: + +**OfxPropPluginDescription** +^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxPropPluginDescription` +- **Type**: string +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectDescriptor ` +- **Doc**: For detailed doc, see :c:macro:`kOfxPropPluginDescription`. + +.. _prop_OfxPropShortLabel: + +**OfxPropShortLabel** +^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxPropShortLabel` +- **Type**: string +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipDescriptor `, :ref:`ClipInstance `, :ref:`EffectDescriptor `, :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsGroup `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsPage `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxPropShortLabel`. + +.. _prop_OfxPropType: + +**OfxPropType** +^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxPropType` +- **Type**: string +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`ClipDescriptor `, :ref:`ClipInstance `, :ref:`EffectDescriptor `, :ref:`EffectInstance `, :ref:`Image `, :ref:`ImageEffectHost `, :ref:`ParamDouble1D `, :ref:`ParamsByte `, :ref:`ParamsChoice `, :ref:`ParamsCustom `, :ref:`ParamsDouble2D3D `, :ref:`ParamsGroup `, :ref:`ParamsInt2D3D `, :ref:`ParamsNormalizedSpatial `, :ref:`ParamsPage `, :ref:`ParamsParametric `, :ref:`ParamsStrChoice `, :ref:`ParamsString ` +- **Doc**: For detailed doc, see :c:macro:`kOfxPropType`. + +.. _prop_OfxPropVersionLabel: + +**OfxPropVersionLabel** +^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxPropVersionLabel` +- **Type**: string +- **Dimension**: 1 +- **Used in Property Sets**: :ref:`EffectDescriptor `, :ref:`ImageEffectHost ` +- **Doc**: For detailed doc, see :c:macro:`kOfxPropVersionLabel`. + +.. _prop_kOfxPropKeyString: + +**kOfxPropKeyString** +^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxPropKeyString` +- **Type**: string +- **Dimension**: 1 +- **Doc**: For detailed doc, see :c:macro:`kOfxPropKeyString`. + diff --git a/Documentation/sources/Reference/ofxPropertySetsGenerated.rst b/Documentation/sources/Reference/ofxPropertySetsGenerated.rst new file mode 100644 index 00000000..69cd51fa --- /dev/null +++ b/Documentation/sources/Reference/ofxPropertySetsGenerated.rst @@ -0,0 +1,1349 @@ +.. _propertySetReferenceGenerated: +Property Sets Reference (Generated) +================================== + +This reference is auto-generated from property set definitions in the OpenFX source code. +It provides an overview of property sets and their associated properties. +For each property, a link to its detailed description in the :doc:`Properties Reference (Generated) ` is provided. + +Regular Property Sets +-------------------- + +These property sets represent collections of properties associated with various OpenFX objects. + +**Property Sets Quick Reference** + +* :ref:`ClipDescriptor ` +* :ref:`ClipInstance ` +* :ref:`EffectDescriptor ` +* :ref:`EffectInstance ` +* :ref:`Image ` +* :ref:`ImageEffectHost ` +* :ref:`InteractDescriptor ` +* :ref:`InteractInstance ` +* :ref:`ParamDouble1D ` +* :ref:`ParameterSet ` +* :ref:`ParamsByte ` +* :ref:`ParamsChoice ` +* :ref:`ParamsCustom ` +* :ref:`ParamsDouble2D3D ` +* :ref:`ParamsGroup ` +* :ref:`ParamsInt2D3D ` +* :ref:`ParamsNormalizedSpatial ` +* :ref:`ParamsPage ` +* :ref:`ParamsParametric ` +* :ref:`ParamsStrChoice ` +* :ref:`ParamsString ` + +.. _propset_ClipDescriptor: + +**ClipDescriptor** +^^^^^^^^^^^^^^ + +- **Write Access**: plugin + +**Properties** + +- :ref:`OfxImageClipPropFieldExtraction ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageClipPropFieldExtraction`) +- :ref:`OfxImageClipPropIsMask ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageClipPropIsMask`) +- :ref:`OfxImageClipPropOptional ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageClipPropOptional`) +- :ref:`OfxImageEffectPropSupportedComponents ` - Type: enum, Dimension: Variable (doc: :c:macro:`kOfxImageEffectPropSupportedComponents`) +- :ref:`OfxImageEffectPropSupportsTiles ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropSupportsTiles`) +- :ref:`OfxImageEffectPropTemporalClipAccess ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropTemporalClipAccess`) +- :ref:`OfxPropLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLabel`) +- :ref:`OfxPropLongLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLongLabel`) +- :ref:`OfxPropName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropName`) +- :ref:`OfxPropShortLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropShortLabel`) +- :ref:`OfxPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropType`) + +.. _propset_ClipInstance: + +**ClipInstance** +^^^^^^^^^^^^ + +- **Write Access**: host + +**Properties** + +- :ref:`OfxImageClipPropColourspace ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxImageClipPropColourspace`) +- :ref:`OfxImageClipPropConnected ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageClipPropConnected`) +- :ref:`OfxImageClipPropContinuousSamples ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageClipPropContinuousSamples`) +- :ref:`OfxImageClipPropFieldExtraction ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageClipPropFieldExtraction`) +- :ref:`OfxImageClipPropFieldOrder ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageClipPropFieldOrder`) +- :ref:`OfxImageClipPropIsMask ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageClipPropIsMask`) +- :ref:`OfxImageClipPropOptional ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageClipPropOptional`) +- :ref:`OfxImageClipPropPreferredColourspaces ` - Type: string, Dimension: Variable (doc: :c:macro:`kOfxImageClipPropPreferredColourspaces`) +- :ref:`OfxImageClipPropUnmappedComponents ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageClipPropUnmappedComponents`) +- :ref:`OfxImageClipPropUnmappedPixelDepth ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageClipPropUnmappedPixelDepth`) +- :ref:`OfxImageEffectPropComponents ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropComponents`) +- :ref:`OfxImageEffectPropFrameRange ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxImageEffectPropFrameRange`) +- :ref:`OfxImageEffectPropFrameRate ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropFrameRate`) +- :ref:`OfxImageEffectPropPixelDepth ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropPixelDepth`) +- :ref:`OfxImageEffectPropPreMultiplication ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropPreMultiplication`) +- :ref:`OfxImageEffectPropSupportedComponents ` - Type: enum, Dimension: Variable (doc: :c:macro:`kOfxImageEffectPropSupportedComponents`) +- :ref:`OfxImageEffectPropSupportsTiles ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropSupportsTiles`) +- :ref:`OfxImageEffectPropTemporalClipAccess ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropTemporalClipAccess`) +- :ref:`OfxImageEffectPropUnmappedFrameRange ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxImageEffectPropUnmappedFrameRange`) +- :ref:`OfxImageEffectPropUnmappedFrameRate ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropUnmappedFrameRate`) +- :ref:`OfxImagePropPixelAspectRatio ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxImagePropPixelAspectRatio`) +- :ref:`OfxPropLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLabel`) +- :ref:`OfxPropLongLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLongLabel`) +- :ref:`OfxPropName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropName`) +- :ref:`OfxPropShortLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropShortLabel`) +- :ref:`OfxPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropType`) + +.. _propset_EffectDescriptor: + +**EffectDescriptor** +^^^^^^^^^^^^^^^^ + +- **Write Access**: plugin + +**Properties** + +- :ref:`OfxImageEffectPluginPropFieldRenderTwiceAlways ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPluginPropFieldRenderTwiceAlways`) +- :ref:`OfxImageEffectPluginPropGrouping ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPluginPropGrouping`) +- :ref:`OfxImageEffectPluginPropHostFrameThreading ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPluginPropHostFrameThreading`) +- :ref:`OfxImageEffectPluginPropOverlayInteractV1 ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPluginPropOverlayInteractV1`) +- :ref:`OfxImageEffectPluginPropOverlayInteractV2 ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPluginPropOverlayInteractV2`) +- :ref:`OfxImageEffectPluginPropSingleInstance ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPluginPropSingleInstance`) +- :ref:`OfxImageEffectPluginRenderThreadSafety ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPluginRenderThreadSafety`) +- :ref:`OfxImageEffectPluginRenderThreadSafety ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPluginRenderThreadSafety`) +- :ref:`OfxImageEffectPropClipPreferencesSlaveParam ` - Type: string, Dimension: Variable (doc: :c:macro:`kOfxImageEffectPropClipPreferencesSlaveParam`) +- :ref:`OfxImageEffectPropColourManagementAvailableConfigs ` - Type: string, Dimension: Variable (doc: :c:macro:`kOfxImageEffectPropColourManagementAvailableConfigs`) +- :ref:`OfxImageEffectPropColourManagementStyle ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropColourManagementStyle`) +- :ref:`OfxImageEffectPropMultipleClipDepths ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropSupportsMultipleClipDepths`) +- :ref:`OfxImageEffectPropOpenCLSupported ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropOpenCLSupported`) +- :ref:`OfxImageEffectPropOpenGLRenderSupported ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropOpenGLRenderSupported`) +- :ref:`OfxImageEffectPropSupportedContexts ` - Type: enum, Dimension: Variable (doc: :c:macro:`kOfxImageEffectPropSupportedContexts`) +- :ref:`OfxImageEffectPropSupportedPixelDepths ` - Type: enum, Dimension: Variable (doc: :c:macro:`kOfxImageEffectPropSupportedPixelDepths`) +- :ref:`OfxImageEffectPropSupportsMultiResolution ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropSupportsMultiResolution`) +- :ref:`OfxImageEffectPropSupportsMultipleClipPARs ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropSupportsMultipleClipPARs`) +- :ref:`OfxImageEffectPropSupportsTiles ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropSupportsTiles`) +- :ref:`OfxImageEffectPropTemporalClipAccess ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropTemporalClipAccess`) +- :ref:`OfxOpenGLPropPixelDepth ` - Type: enum, Dimension: Variable (doc: :c:macro:`kOfxOpenGLPropPixelDepth`) +- :ref:`OfxPluginPropFilePath ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxPluginPropFilePath`) +- :ref:`OfxPropLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLabel`) +- :ref:`OfxPropLongLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLongLabel`) +- :ref:`OfxPropPluginDescription ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropPluginDescription`) +- :ref:`OfxPropShortLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropShortLabel`) +- :ref:`OfxPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropType`) +- :ref:`OfxPropVersion ` - Type: int, Dimension: Variable (doc: :c:macro:`kOfxPropVersion`) +- :ref:`OfxPropVersionLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropVersionLabel`) + +.. _propset_EffectInstance: + +**EffectInstance** +^^^^^^^^^^^^^^ + +- **Write Access**: host + +**Properties** + +- :ref:`OfxImageEffectInstancePropEffectDuration ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxImageEffectInstancePropEffectDuration`) +- :ref:`OfxImageEffectInstancePropSequentialRender ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectInstancePropSequentialRender`) +- :ref:`OfxImageEffectPropColourManagementConfig ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropColourManagementConfig`) +- :ref:`OfxImageEffectPropColourManagementStyle ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropColourManagementStyle`) +- :ref:`OfxImageEffectPropContext ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropContext`) +- :ref:`OfxImageEffectPropDisplayColourspace ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropDisplayColourspace`) +- :ref:`OfxImageEffectPropFrameRate ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropFrameRate`) +- :ref:`OfxImageEffectPropOCIOConfig ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropOCIOConfig`) +- :ref:`OfxImageEffectPropOCIODisplay ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropOCIODisplay`) +- :ref:`OfxImageEffectPropOCIOView ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropOCIOView`) +- :ref:`OfxImageEffectPropOpenGLRenderSupported ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropOpenGLRenderSupported`) +- :ref:`OfxImageEffectPropPixelAspectRatio ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropProjectPixelAspectRatio`) +- :ref:`OfxImageEffectPropPluginHandle ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropPluginHandle`) +- :ref:`OfxImageEffectPropProjectExtent ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxImageEffectPropProjectExtent`) +- :ref:`OfxImageEffectPropProjectOffset ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxImageEffectPropProjectOffset`) +- :ref:`OfxImageEffectPropProjectSize ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxImageEffectPropProjectSize`) +- :ref:`OfxImageEffectPropSupportsTiles ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropSupportsTiles`) +- :ref:`OfxPropInstanceData ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxPropInstanceData`) +- :ref:`OfxPropIsInteractive ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxPropIsInteractive`) +- :ref:`OfxPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropType`) + +.. _propset_Image: + +**Image** +^^^^^ + +- **Write Access**: host + +**Properties** + +- :ref:`OfxImageEffectPropComponents ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropComponents`) +- :ref:`OfxImageEffectPropPixelDepth ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropPixelDepth`) +- :ref:`OfxImageEffectPropPreMultiplication ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropPreMultiplication`) +- :ref:`OfxImageEffectPropRenderScale ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxImageEffectPropRenderScale`) +- :ref:`OfxImagePropBounds ` - Type: int, Dimension: 4 (doc: :c:macro:`kOfxImagePropBounds`) +- :ref:`OfxImagePropData ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxImagePropData`) +- :ref:`OfxImagePropField ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImagePropField`) +- :ref:`OfxImagePropPixelAspectRatio ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxImagePropPixelAspectRatio`) +- :ref:`OfxImagePropRegionOfDefinition ` - Type: int, Dimension: 4 (doc: :c:macro:`kOfxImagePropRegionOfDefinition`) +- :ref:`OfxImagePropRowBytes ` - Type: int, Dimension: 1 (doc: :c:macro:`kOfxImagePropRowBytes`) +- :ref:`OfxImagePropUniqueIdentifier ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxImagePropUniqueIdentifier`) +- :ref:`OfxPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropType`) + +.. _propset_ImageEffectHost: + +**ImageEffectHost** +^^^^^^^^^^^^^^^ + +- **Write Access**: host + +**Properties** + +- :ref:`OfxImageEffectHostPropIsBackground ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectHostPropIsBackground`) +- :ref:`OfxImageEffectHostPropNativeOrigin ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageEffectHostPropNativeOrigin`) +- :ref:`OfxImageEffectInstancePropSequentialRender ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectInstancePropSequentialRender`) +- :ref:`OfxImageEffectPropColourManagementAvailableConfigs ` - Type: string, Dimension: Variable (doc: :c:macro:`kOfxImageEffectPropColourManagementAvailableConfigs`) +- :ref:`OfxImageEffectPropColourManagementStyle ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropColourManagementStyle`) +- :ref:`OfxImageEffectPropMultipleClipDepths ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropSupportsMultipleClipDepths`) +- :ref:`OfxImageEffectPropOpenCLSupported ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropOpenCLSupported`) +- :ref:`OfxImageEffectPropOpenGLRenderSupported ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropOpenGLRenderSupported`) +- :ref:`OfxImageEffectPropRenderQualityDraft ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropRenderQualityDraft`) +- :ref:`OfxImageEffectPropSetableFielding ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropSetableFielding`) +- :ref:`OfxImageEffectPropSetableFrameRate ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropSetableFrameRate`) +- :ref:`OfxImageEffectPropSupportedComponents ` - Type: enum, Dimension: Variable (doc: :c:macro:`kOfxImageEffectPropSupportedComponents`) +- :ref:`OfxImageEffectPropSupportedContexts ` - Type: enum, Dimension: Variable (doc: :c:macro:`kOfxImageEffectPropSupportedContexts`) +- :ref:`OfxImageEffectPropSupportsMultiResolution ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropSupportsMultiResolution`) +- :ref:`OfxImageEffectPropSupportsMultipleClipPARs ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropSupportsMultipleClipPARs`) +- :ref:`OfxImageEffectPropSupportsOverlays ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropSupportsOverlays`) +- :ref:`OfxImageEffectPropSupportsTiles ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropSupportsTiles`) +- :ref:`OfxImageEffectPropTemporalClipAccess ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropTemporalClipAccess`) +- :ref:`OfxParamHostPropMaxPages ` - Type: int, Dimension: 1 (doc: :c:macro:`kOfxParamHostPropMaxPages`) +- :ref:`OfxParamHostPropMaxParameters ` - Type: int, Dimension: 1 (doc: :c:macro:`kOfxParamHostPropMaxParameters`) +- :ref:`OfxParamHostPropPageRowColumnCount ` - Type: int, Dimension: 2 (doc: :c:macro:`kOfxParamHostPropPageRowColumnCount`) +- :ref:`OfxParamHostPropSupportsBooleanAnimation ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamHostPropSupportsBooleanAnimation`) +- :ref:`OfxParamHostPropSupportsChoiceAnimation ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamHostPropSupportsChoiceAnimation`) +- :ref:`OfxParamHostPropSupportsCustomAnimation ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamHostPropSupportsCustomAnimation`) +- :ref:`OfxParamHostPropSupportsCustomInteract ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamHostPropSupportsCustomInteract`) +- :ref:`OfxParamHostPropSupportsParametricAnimation ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamHostPropSupportsParametricAnimation`) +- :ref:`OfxParamHostPropSupportsStrChoice ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamHostPropSupportsStrChoice`) +- :ref:`OfxParamHostPropSupportsStrChoiceAnimation ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamHostPropSupportsStrChoiceAnimation`) +- :ref:`OfxParamHostPropSupportsStringAnimation ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamHostPropSupportsStringAnimation`) +- :ref:`OfxPropAPIVersion ` - Type: int, Dimension: Variable (doc: :c:macro:`kOfxPropAPIVersion`) +- :ref:`OfxPropHostOSHandle ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxPropHostOSHandle`) +- :ref:`OfxPropLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLabel`) +- :ref:`OfxPropName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropName`) +- :ref:`OfxPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropType`) +- :ref:`OfxPropVersion ` - Type: int, Dimension: Variable (doc: :c:macro:`kOfxPropVersion`) +- :ref:`OfxPropVersionLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropVersionLabel`) + +.. _propset_InteractDescriptor: + +**InteractDescriptor** +^^^^^^^^^^^^^^^^^^ + +- **Write Access**: host + +**Properties** + +- :ref:`OfxInteractPropBitDepth ` - Type: int, Dimension: 1 (doc: :c:macro:`kOfxInteractPropBitDepth`) +- :ref:`OfxInteractPropHasAlpha ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxInteractPropHasAlpha`) + +.. _propset_InteractInstance: + +**InteractInstance** +^^^^^^^^^^^^^^^^ + +- **Write Access**: host + +**Properties** + +- :ref:`OfxInteractPropBackgroundColour ` - Type: double, Dimension: 3 (doc: :c:macro:`kOfxInteractPropBackgroundColour`) +- :ref:`OfxInteractPropBitDepth ` - Type: int, Dimension: 1 (doc: :c:macro:`kOfxInteractPropBitDepth`) +- :ref:`OfxInteractPropHasAlpha ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxInteractPropHasAlpha`) +- :ref:`OfxInteractPropPixelScale ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxInteractPropPixelScale`) +- :ref:`OfxInteractPropSlaveToParam ` - Type: string, Dimension: Variable (doc: :c:macro:`kOfxInteractPropSlaveToParam`) +- :ref:`OfxInteractPropSuggestedColour ` - Type: double, Dimension: 3 (doc: :c:macro:`kOfxInteractPropSuggestedColour`) +- :ref:`OfxPropEffectInstance ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxPropEffectInstance`) +- :ref:`OfxPropInstanceData ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxPropInstanceData`) + +.. _propset_ParamDouble1D: + +**ParamDouble1D** +^^^^^^^^^^^^^ + +- **Write Access**: plugin + +**Properties** + +- :ref:`OfxParamPropAnimates ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropAnimates`) +- :ref:`OfxParamPropCacheInvalidation ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxParamPropCacheInvalidation`) +- :ref:`OfxParamPropCanUndo ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropCanUndo`) +- :ref:`OfxParamPropDataPtr ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropDataPtr`) +- :ref:`OfxParamPropDefault ` - Type: int/double/string/pointer, Dimension: Variable (doc: :c:macro:`kOfxParamPropDefault`) +- :ref:`OfxParamPropDigits ` - Type: int, Dimension: 1 (doc: :c:macro:`kOfxParamPropDigits`) +- :ref:`OfxParamPropDisplayMax ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropDisplayMax`) +- :ref:`OfxParamPropDisplayMin ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropDisplayMin`) +- :ref:`OfxParamPropDoubleType ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxParamPropDoubleType`) +- :ref:`OfxParamPropEnabled ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEnabled`) +- :ref:`OfxParamPropEvaluateOnChange ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEvaluateOnChange`) +- :ref:`OfxParamPropHasHostOverlayHandle ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropHasHostOverlayHandle`) +- :ref:`OfxParamPropHint ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropHint`) +- :ref:`OfxParamPropIncrement ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxParamPropIncrement`) +- :ref:`OfxParamPropInteractMinimumSize ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractMinimumSize`) +- :ref:`OfxParamPropInteractPreferedSize ` - Type: int, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractPreferedSize`) +- :ref:`OfxParamPropInteractSize ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractSize`) +- :ref:`OfxParamPropInteractSizeAspect ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxParamPropInteractSizeAspect`) +- :ref:`OfxParamPropInteractV1 ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropInteractV1`) +- :ref:`OfxParamPropIsAnimating ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAnimating`) +- :ref:`OfxParamPropIsAutoKeying ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAutoKeying`) +- :ref:`OfxParamPropMax ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropMax`) +- :ref:`OfxParamPropMin ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropMin`) +- :ref:`OfxParamPropParent ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropParent`) +- :ref:`OfxParamPropPersistant ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPersistant`) +- :ref:`OfxParamPropPluginMayWrite ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPluginMayWrite`) +- :ref:`OfxParamPropScriptName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropScriptName`) +- :ref:`OfxParamPropSecret ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropSecret`) +- :ref:`OfxParamPropShowTimeMarker ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropShowTimeMarker`) +- :ref:`OfxParamPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropType`) +- :ref:`OfxPropIcon ` - Type: string, Dimension: 2 (doc: :c:macro:`kOfxPropIcon`) +- :ref:`OfxPropLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLabel`) +- :ref:`OfxPropLongLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLongLabel`) +- :ref:`OfxPropName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropName`) +- :ref:`OfxPropShortLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropShortLabel`) +- :ref:`OfxPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropType`) +- :ref:`kOfxParamPropUseHostOverlayHandle ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropUseHostOverlayHandle`) + +.. _propset_ParameterSet: + +**ParameterSet** +^^^^^^^^^^^^ + +- **Write Access**: plugin + +**Properties** + +- :ref:`OfxPluginPropParamPageOrder ` - Type: string, Dimension: Variable (doc: :c:macro:`kOfxPluginPropParamPageOrder`) +- :ref:`OfxPropParamSetNeedsSyncing ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxPropParamSetNeedsSyncing`) + +.. _propset_ParamsByte: + +**ParamsByte** +^^^^^^^^^^ + +- **Write Access**: plugin + +**Properties** + +- :ref:`OfxParamPropAnimates ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropAnimates`) +- :ref:`OfxParamPropCacheInvalidation ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxParamPropCacheInvalidation`) +- :ref:`OfxParamPropCanUndo ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropCanUndo`) +- :ref:`OfxParamPropDataPtr ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropDataPtr`) +- :ref:`OfxParamPropDefault ` - Type: int/double/string/pointer, Dimension: Variable (doc: :c:macro:`kOfxParamPropDefault`) +- :ref:`OfxParamPropDisplayMax ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropDisplayMax`) +- :ref:`OfxParamPropDisplayMin ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropDisplayMin`) +- :ref:`OfxParamPropEnabled ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEnabled`) +- :ref:`OfxParamPropEvaluateOnChange ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEvaluateOnChange`) +- :ref:`OfxParamPropHasHostOverlayHandle ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropHasHostOverlayHandle`) +- :ref:`OfxParamPropHint ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropHint`) +- :ref:`OfxParamPropInteractMinimumSize ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractMinimumSize`) +- :ref:`OfxParamPropInteractPreferedSize ` - Type: int, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractPreferedSize`) +- :ref:`OfxParamPropInteractSize ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractSize`) +- :ref:`OfxParamPropInteractSizeAspect ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxParamPropInteractSizeAspect`) +- :ref:`OfxParamPropInteractV1 ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropInteractV1`) +- :ref:`OfxParamPropIsAnimating ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAnimating`) +- :ref:`OfxParamPropIsAutoKeying ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAutoKeying`) +- :ref:`OfxParamPropMax ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropMax`) +- :ref:`OfxParamPropMin ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropMin`) +- :ref:`OfxParamPropParent ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropParent`) +- :ref:`OfxParamPropPersistant ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPersistant`) +- :ref:`OfxParamPropPluginMayWrite ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPluginMayWrite`) +- :ref:`OfxParamPropScriptName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropScriptName`) +- :ref:`OfxParamPropSecret ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropSecret`) +- :ref:`OfxParamPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropType`) +- :ref:`OfxPropIcon ` - Type: string, Dimension: 2 (doc: :c:macro:`kOfxPropIcon`) +- :ref:`OfxPropLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLabel`) +- :ref:`OfxPropLongLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLongLabel`) +- :ref:`OfxPropName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropName`) +- :ref:`OfxPropShortLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropShortLabel`) +- :ref:`OfxPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropType`) +- :ref:`kOfxParamPropUseHostOverlayHandle ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropUseHostOverlayHandle`) + +.. _propset_ParamsChoice: + +**ParamsChoice** +^^^^^^^^^^^^ + +- **Write Access**: plugin + +**Properties** + +- :ref:`OfxParamPropAnimates ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropAnimates`) +- :ref:`OfxParamPropCacheInvalidation ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxParamPropCacheInvalidation`) +- :ref:`OfxParamPropCanUndo ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropCanUndo`) +- :ref:`OfxParamPropChoiceOption ` - Type: string, Dimension: Variable (doc: :c:macro:`kOfxParamPropChoiceOption`) +- :ref:`OfxParamPropChoiceOrder ` - Type: int, Dimension: Variable (doc: :c:macro:`kOfxParamPropChoiceOrder`) +- :ref:`OfxParamPropDataPtr ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropDataPtr`) +- :ref:`OfxParamPropDefault ` - Type: int/double/string/pointer, Dimension: Variable (doc: :c:macro:`kOfxParamPropDefault`) +- :ref:`OfxParamPropEnabled ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEnabled`) +- :ref:`OfxParamPropEvaluateOnChange ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEvaluateOnChange`) +- :ref:`OfxParamPropHasHostOverlayHandle ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropHasHostOverlayHandle`) +- :ref:`OfxParamPropHint ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropHint`) +- :ref:`OfxParamPropInteractMinimumSize ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractMinimumSize`) +- :ref:`OfxParamPropInteractPreferedSize ` - Type: int, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractPreferedSize`) +- :ref:`OfxParamPropInteractSize ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractSize`) +- :ref:`OfxParamPropInteractSizeAspect ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxParamPropInteractSizeAspect`) +- :ref:`OfxParamPropInteractV1 ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropInteractV1`) +- :ref:`OfxParamPropIsAnimating ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAnimating`) +- :ref:`OfxParamPropIsAutoKeying ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAutoKeying`) +- :ref:`OfxParamPropParent ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropParent`) +- :ref:`OfxParamPropPersistant ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPersistant`) +- :ref:`OfxParamPropPluginMayWrite ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPluginMayWrite`) +- :ref:`OfxParamPropScriptName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropScriptName`) +- :ref:`OfxParamPropSecret ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropSecret`) +- :ref:`OfxParamPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropType`) +- :ref:`OfxPropIcon ` - Type: string, Dimension: 2 (doc: :c:macro:`kOfxPropIcon`) +- :ref:`OfxPropLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLabel`) +- :ref:`OfxPropLongLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLongLabel`) +- :ref:`OfxPropName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropName`) +- :ref:`OfxPropShortLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropShortLabel`) +- :ref:`OfxPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropType`) +- :ref:`kOfxParamPropUseHostOverlayHandle ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropUseHostOverlayHandle`) + +.. _propset_ParamsCustom: + +**ParamsCustom** +^^^^^^^^^^^^ + +- **Write Access**: plugin + +**Properties** + +- :ref:`OfxParamPropAnimates ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropAnimates`) +- :ref:`OfxParamPropCacheInvalidation ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxParamPropCacheInvalidation`) +- :ref:`OfxParamPropCanUndo ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropCanUndo`) +- :ref:`OfxParamPropCustomCallbackV1 ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropCustomInterpCallbackV1`) +- :ref:`OfxParamPropDataPtr ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropDataPtr`) +- :ref:`OfxParamPropDefault ` - Type: int/double/string/pointer, Dimension: Variable (doc: :c:macro:`kOfxParamPropDefault`) +- :ref:`OfxParamPropEnabled ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEnabled`) +- :ref:`OfxParamPropEvaluateOnChange ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEvaluateOnChange`) +- :ref:`OfxParamPropHasHostOverlayHandle ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropHasHostOverlayHandle`) +- :ref:`OfxParamPropHint ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropHint`) +- :ref:`OfxParamPropInteractMinimumSize ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractMinimumSize`) +- :ref:`OfxParamPropInteractPreferedSize ` - Type: int, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractPreferedSize`) +- :ref:`OfxParamPropInteractSize ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractSize`) +- :ref:`OfxParamPropInteractSizeAspect ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxParamPropInteractSizeAspect`) +- :ref:`OfxParamPropInteractV1 ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropInteractV1`) +- :ref:`OfxParamPropIsAnimating ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAnimating`) +- :ref:`OfxParamPropIsAutoKeying ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAutoKeying`) +- :ref:`OfxParamPropParent ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropParent`) +- :ref:`OfxParamPropPersistant ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPersistant`) +- :ref:`OfxParamPropPluginMayWrite ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPluginMayWrite`) +- :ref:`OfxParamPropScriptName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropScriptName`) +- :ref:`OfxParamPropSecret ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropSecret`) +- :ref:`OfxParamPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropType`) +- :ref:`OfxPropIcon ` - Type: string, Dimension: 2 (doc: :c:macro:`kOfxPropIcon`) +- :ref:`OfxPropLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLabel`) +- :ref:`OfxPropLongLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLongLabel`) +- :ref:`OfxPropName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropName`) +- :ref:`OfxPropShortLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropShortLabel`) +- :ref:`OfxPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropType`) +- :ref:`kOfxParamPropUseHostOverlayHandle ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropUseHostOverlayHandle`) + +.. _propset_ParamsDouble2D3D: + +**ParamsDouble2D3D** +^^^^^^^^^^^^^^^^ + +- **Write Access**: plugin + +**Properties** + +- :ref:`OfxParamPropAnimates ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropAnimates`) +- :ref:`OfxParamPropCacheInvalidation ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxParamPropCacheInvalidation`) +- :ref:`OfxParamPropCanUndo ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropCanUndo`) +- :ref:`OfxParamPropDataPtr ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropDataPtr`) +- :ref:`OfxParamPropDefault ` - Type: int/double/string/pointer, Dimension: Variable (doc: :c:macro:`kOfxParamPropDefault`) +- :ref:`OfxParamPropDigits ` - Type: int, Dimension: 1 (doc: :c:macro:`kOfxParamPropDigits`) +- :ref:`OfxParamPropDisplayMax ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropDisplayMax`) +- :ref:`OfxParamPropDisplayMin ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropDisplayMin`) +- :ref:`OfxParamPropDoubleType ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxParamPropDoubleType`) +- :ref:`OfxParamPropEnabled ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEnabled`) +- :ref:`OfxParamPropEvaluateOnChange ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEvaluateOnChange`) +- :ref:`OfxParamPropHasHostOverlayHandle ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropHasHostOverlayHandle`) +- :ref:`OfxParamPropHint ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropHint`) +- :ref:`OfxParamPropIncrement ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxParamPropIncrement`) +- :ref:`OfxParamPropInteractMinimumSize ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractMinimumSize`) +- :ref:`OfxParamPropInteractPreferedSize ` - Type: int, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractPreferedSize`) +- :ref:`OfxParamPropInteractSize ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractSize`) +- :ref:`OfxParamPropInteractSizeAspect ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxParamPropInteractSizeAspect`) +- :ref:`OfxParamPropInteractV1 ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropInteractV1`) +- :ref:`OfxParamPropIsAnimating ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAnimating`) +- :ref:`OfxParamPropIsAutoKeying ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAutoKeying`) +- :ref:`OfxParamPropMax ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropMax`) +- :ref:`OfxParamPropMin ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropMin`) +- :ref:`OfxParamPropParent ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropParent`) +- :ref:`OfxParamPropPersistant ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPersistant`) +- :ref:`OfxParamPropPluginMayWrite ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPluginMayWrite`) +- :ref:`OfxParamPropScriptName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropScriptName`) +- :ref:`OfxParamPropSecret ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropSecret`) +- :ref:`OfxParamPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropType`) +- :ref:`OfxPropIcon ` - Type: string, Dimension: 2 (doc: :c:macro:`kOfxPropIcon`) +- :ref:`OfxPropLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLabel`) +- :ref:`OfxPropLongLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLongLabel`) +- :ref:`OfxPropName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropName`) +- :ref:`OfxPropShortLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropShortLabel`) +- :ref:`OfxPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropType`) +- :ref:`kOfxParamPropUseHostOverlayHandle ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropUseHostOverlayHandle`) + +.. _propset_ParamsGroup: + +**ParamsGroup** +^^^^^^^^^^^ + +- **Write Access**: plugin + +**Properties** + +- :ref:`OfxParamPropDataPtr ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropDataPtr`) +- :ref:`OfxParamPropEnabled ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEnabled`) +- :ref:`OfxParamPropGroupOpen ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropGroupOpen`) +- :ref:`OfxParamPropHint ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropHint`) +- :ref:`OfxParamPropParent ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropParent`) +- :ref:`OfxParamPropScriptName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropScriptName`) +- :ref:`OfxParamPropSecret ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropSecret`) +- :ref:`OfxParamPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropType`) +- :ref:`OfxPropIcon ` - Type: string, Dimension: 2 (doc: :c:macro:`kOfxPropIcon`) +- :ref:`OfxPropLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLabel`) +- :ref:`OfxPropLongLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLongLabel`) +- :ref:`OfxPropName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropName`) +- :ref:`OfxPropShortLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropShortLabel`) +- :ref:`OfxPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropType`) + +.. _propset_ParamsInt2D3D: + +**ParamsInt2D3D** +^^^^^^^^^^^^^ + +- **Write Access**: plugin + +**Properties** + +- :ref:`OfxParamPropAnimates ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropAnimates`) +- :ref:`OfxParamPropCacheInvalidation ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxParamPropCacheInvalidation`) +- :ref:`OfxParamPropCanUndo ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropCanUndo`) +- :ref:`OfxParamPropDataPtr ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropDataPtr`) +- :ref:`OfxParamPropDefault ` - Type: int/double/string/pointer, Dimension: Variable (doc: :c:macro:`kOfxParamPropDefault`) +- :ref:`OfxParamPropDimensionLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropDimensionLabel`) +- :ref:`OfxParamPropDisplayMax ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropDisplayMax`) +- :ref:`OfxParamPropDisplayMin ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropDisplayMin`) +- :ref:`OfxParamPropEnabled ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEnabled`) +- :ref:`OfxParamPropEvaluateOnChange ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEvaluateOnChange`) +- :ref:`OfxParamPropHasHostOverlayHandle ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropHasHostOverlayHandle`) +- :ref:`OfxParamPropHint ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropHint`) +- :ref:`OfxParamPropInteractMinimumSize ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractMinimumSize`) +- :ref:`OfxParamPropInteractPreferedSize ` - Type: int, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractPreferedSize`) +- :ref:`OfxParamPropInteractSize ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractSize`) +- :ref:`OfxParamPropInteractSizeAspect ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxParamPropInteractSizeAspect`) +- :ref:`OfxParamPropInteractV1 ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropInteractV1`) +- :ref:`OfxParamPropIsAnimating ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAnimating`) +- :ref:`OfxParamPropIsAutoKeying ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAutoKeying`) +- :ref:`OfxParamPropMax ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropMax`) +- :ref:`OfxParamPropMin ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropMin`) +- :ref:`OfxParamPropParent ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropParent`) +- :ref:`OfxParamPropPersistant ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPersistant`) +- :ref:`OfxParamPropPluginMayWrite ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPluginMayWrite`) +- :ref:`OfxParamPropScriptName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropScriptName`) +- :ref:`OfxParamPropSecret ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropSecret`) +- :ref:`OfxParamPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropType`) +- :ref:`OfxPropIcon ` - Type: string, Dimension: 2 (doc: :c:macro:`kOfxPropIcon`) +- :ref:`OfxPropLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLabel`) +- :ref:`OfxPropLongLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLongLabel`) +- :ref:`OfxPropName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropName`) +- :ref:`OfxPropShortLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropShortLabel`) +- :ref:`OfxPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropType`) +- :ref:`kOfxParamPropUseHostOverlayHandle ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropUseHostOverlayHandle`) + +.. _propset_ParamsNormalizedSpatial: + +**ParamsNormalizedSpatial** +^^^^^^^^^^^^^^^^^^^^^^^ + +- **Write Access**: plugin + +**Properties** + +- :ref:`OfxParamPropAnimates ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropAnimates`) +- :ref:`OfxParamPropCacheInvalidation ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxParamPropCacheInvalidation`) +- :ref:`OfxParamPropCanUndo ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropCanUndo`) +- :ref:`OfxParamPropDataPtr ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropDataPtr`) +- :ref:`OfxParamPropDefault ` - Type: int/double/string/pointer, Dimension: Variable (doc: :c:macro:`kOfxParamPropDefault`) +- :ref:`OfxParamPropDefaultCoordinateSystem ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxParamPropDefaultCoordinateSystem`) +- :ref:`OfxParamPropDigits ` - Type: int, Dimension: 1 (doc: :c:macro:`kOfxParamPropDigits`) +- :ref:`OfxParamPropDisplayMax ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropDisplayMax`) +- :ref:`OfxParamPropDisplayMin ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropDisplayMin`) +- :ref:`OfxParamPropEnabled ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEnabled`) +- :ref:`OfxParamPropEvaluateOnChange ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEvaluateOnChange`) +- :ref:`OfxParamPropHasHostOverlayHandle ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropHasHostOverlayHandle`) +- :ref:`OfxParamPropHint ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropHint`) +- :ref:`OfxParamPropIncrement ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxParamPropIncrement`) +- :ref:`OfxParamPropInteractMinimumSize ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractMinimumSize`) +- :ref:`OfxParamPropInteractPreferedSize ` - Type: int, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractPreferedSize`) +- :ref:`OfxParamPropInteractSize ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractSize`) +- :ref:`OfxParamPropInteractSizeAspect ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxParamPropInteractSizeAspect`) +- :ref:`OfxParamPropInteractV1 ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropInteractV1`) +- :ref:`OfxParamPropIsAnimating ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAnimating`) +- :ref:`OfxParamPropIsAutoKeying ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAutoKeying`) +- :ref:`OfxParamPropMax ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropMax`) +- :ref:`OfxParamPropMin ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropMin`) +- :ref:`OfxParamPropParent ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropParent`) +- :ref:`OfxParamPropPersistant ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPersistant`) +- :ref:`OfxParamPropPluginMayWrite ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPluginMayWrite`) +- :ref:`OfxParamPropScriptName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropScriptName`) +- :ref:`OfxParamPropSecret ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropSecret`) +- :ref:`OfxParamPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropType`) +- :ref:`OfxPropIcon ` - Type: string, Dimension: 2 (doc: :c:macro:`kOfxPropIcon`) +- :ref:`OfxPropLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLabel`) +- :ref:`OfxPropLongLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLongLabel`) +- :ref:`OfxPropName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropName`) +- :ref:`OfxPropShortLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropShortLabel`) +- :ref:`OfxPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropType`) +- :ref:`kOfxParamPropUseHostOverlayHandle ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropUseHostOverlayHandle`) + +.. _propset_ParamsPage: + +**ParamsPage** +^^^^^^^^^^ + +- **Write Access**: plugin + +**Properties** + +- :ref:`OfxParamPropDataPtr ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropDataPtr`) +- :ref:`OfxParamPropEnabled ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEnabled`) +- :ref:`OfxParamPropHint ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropHint`) +- :ref:`OfxParamPropPageChild ` - Type: string, Dimension: Variable (doc: :c:macro:`kOfxParamPropPageChild`) +- :ref:`OfxParamPropParent ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropParent`) +- :ref:`OfxParamPropScriptName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropScriptName`) +- :ref:`OfxParamPropSecret ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropSecret`) +- :ref:`OfxParamPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropType`) +- :ref:`OfxPropIcon ` - Type: string, Dimension: 2 (doc: :c:macro:`kOfxPropIcon`) +- :ref:`OfxPropLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLabel`) +- :ref:`OfxPropLongLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLongLabel`) +- :ref:`OfxPropName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropName`) +- :ref:`OfxPropShortLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropShortLabel`) +- :ref:`OfxPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropType`) + +.. _propset_ParamsParametric: + +**ParamsParametric** +^^^^^^^^^^^^^^^^ + +- **Write Access**: plugin + +**Properties** + +- :ref:`OfxParamPropAnimates ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropAnimates`) +- :ref:`OfxParamPropAnimates ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropAnimates`) +- :ref:`OfxParamPropCacheInvalidation ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxParamPropCacheInvalidation`) +- :ref:`OfxParamPropCacheInvalidation ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxParamPropCacheInvalidation`) +- :ref:`OfxParamPropCanUndo ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropCanUndo`) +- :ref:`OfxParamPropCanUndo ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropCanUndo`) +- :ref:`OfxParamPropDataPtr ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropDataPtr`) +- :ref:`OfxParamPropDefault ` - Type: int/double/string/pointer, Dimension: Variable (doc: :c:macro:`kOfxParamPropDefault`) +- :ref:`OfxParamPropEnabled ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEnabled`) +- :ref:`OfxParamPropEvaluateOnChange ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEvaluateOnChange`) +- :ref:`OfxParamPropEvaluateOnChange ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEvaluateOnChange`) +- :ref:`OfxParamPropHasHostOverlayHandle ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropHasHostOverlayHandle`) +- :ref:`OfxParamPropHint ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropHint`) +- :ref:`OfxParamPropInteractMinimumSize ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractMinimumSize`) +- :ref:`OfxParamPropInteractPreferedSize ` - Type: int, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractPreferedSize`) +- :ref:`OfxParamPropInteractSize ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractSize`) +- :ref:`OfxParamPropInteractSizeAspect ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxParamPropInteractSizeAspect`) +- :ref:`OfxParamPropInteractV1 ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropInteractV1`) +- :ref:`OfxParamPropIsAnimating ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAnimating`) +- :ref:`OfxParamPropIsAnimating ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAnimating`) +- :ref:`OfxParamPropIsAutoKeying ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAutoKeying`) +- :ref:`OfxParamPropIsAutoKeying ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAutoKeying`) +- :ref:`OfxParamPropParametricDimension ` - Type: int, Dimension: 1 (doc: :c:macro:`kOfxParamPropParametricDimension`) +- :ref:`OfxParamPropParametricInteractBackground ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropParametricInteractBackground`) +- :ref:`OfxParamPropParametricRange ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropParametricRange`) +- :ref:`OfxParamPropParametricUIColour ` - Type: double, Dimension: Variable (doc: :c:macro:`kOfxParamPropParametricUIColour`) +- :ref:`OfxParamPropParent ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropParent`) +- :ref:`OfxParamPropPersistant ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPersistant`) +- :ref:`OfxParamPropPersistant ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPersistant`) +- :ref:`OfxParamPropPluginMayWrite ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPluginMayWrite`) +- :ref:`OfxParamPropPluginMayWrite ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPluginMayWrite`) +- :ref:`OfxParamPropScriptName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropScriptName`) +- :ref:`OfxParamPropSecret ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropSecret`) +- :ref:`OfxParamPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropType`) +- :ref:`OfxPropIcon ` - Type: string, Dimension: 2 (doc: :c:macro:`kOfxPropIcon`) +- :ref:`OfxPropLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLabel`) +- :ref:`OfxPropLongLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLongLabel`) +- :ref:`OfxPropName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropName`) +- :ref:`OfxPropShortLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropShortLabel`) +- :ref:`OfxPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropType`) +- :ref:`kOfxParamPropUseHostOverlayHandle ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropUseHostOverlayHandle`) + +.. _propset_ParamsStrChoice: + +**ParamsStrChoice** +^^^^^^^^^^^^^^^ + +- **Write Access**: plugin + +**Properties** + +- :ref:`OfxParamPropAnimates ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropAnimates`) +- :ref:`OfxParamPropCacheInvalidation ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxParamPropCacheInvalidation`) +- :ref:`OfxParamPropCanUndo ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropCanUndo`) +- :ref:`OfxParamPropChoiceEnum ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropChoiceEnum`) +- :ref:`OfxParamPropChoiceOption ` - Type: string, Dimension: Variable (doc: :c:macro:`kOfxParamPropChoiceOption`) +- :ref:`OfxParamPropDataPtr ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropDataPtr`) +- :ref:`OfxParamPropDefault ` - Type: int/double/string/pointer, Dimension: Variable (doc: :c:macro:`kOfxParamPropDefault`) +- :ref:`OfxParamPropEnabled ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEnabled`) +- :ref:`OfxParamPropEvaluateOnChange ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEvaluateOnChange`) +- :ref:`OfxParamPropHasHostOverlayHandle ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropHasHostOverlayHandle`) +- :ref:`OfxParamPropHint ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropHint`) +- :ref:`OfxParamPropInteractMinimumSize ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractMinimumSize`) +- :ref:`OfxParamPropInteractPreferedSize ` - Type: int, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractPreferedSize`) +- :ref:`OfxParamPropInteractSize ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractSize`) +- :ref:`OfxParamPropInteractSizeAspect ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxParamPropInteractSizeAspect`) +- :ref:`OfxParamPropInteractV1 ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropInteractV1`) +- :ref:`OfxParamPropIsAnimating ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAnimating`) +- :ref:`OfxParamPropIsAutoKeying ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAutoKeying`) +- :ref:`OfxParamPropParent ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropParent`) +- :ref:`OfxParamPropPersistant ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPersistant`) +- :ref:`OfxParamPropPluginMayWrite ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPluginMayWrite`) +- :ref:`OfxParamPropScriptName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropScriptName`) +- :ref:`OfxParamPropSecret ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropSecret`) +- :ref:`OfxParamPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropType`) +- :ref:`OfxPropIcon ` - Type: string, Dimension: 2 (doc: :c:macro:`kOfxPropIcon`) +- :ref:`OfxPropLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLabel`) +- :ref:`OfxPropLongLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLongLabel`) +- :ref:`OfxPropName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropName`) +- :ref:`OfxPropShortLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropShortLabel`) +- :ref:`OfxPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropType`) +- :ref:`kOfxParamPropUseHostOverlayHandle ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropUseHostOverlayHandle`) + +.. _propset_ParamsString: + +**ParamsString** +^^^^^^^^^^^^ + +- **Write Access**: plugin + +**Properties** + +- :ref:`OfxParamPropAnimates ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropAnimates`) +- :ref:`OfxParamPropCacheInvalidation ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxParamPropCacheInvalidation`) +- :ref:`OfxParamPropCanUndo ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropCanUndo`) +- :ref:`OfxParamPropDataPtr ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropDataPtr`) +- :ref:`OfxParamPropDefault ` - Type: int/double/string/pointer, Dimension: Variable (doc: :c:macro:`kOfxParamPropDefault`) +- :ref:`OfxParamPropDisplayMax ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropDisplayMax`) +- :ref:`OfxParamPropDisplayMin ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropDisplayMin`) +- :ref:`OfxParamPropEnabled ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEnabled`) +- :ref:`OfxParamPropEvaluateOnChange ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropEvaluateOnChange`) +- :ref:`OfxParamPropHasHostOverlayHandle ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropHasHostOverlayHandle`) +- :ref:`OfxParamPropHint ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropHint`) +- :ref:`OfxParamPropInteractMinimumSize ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractMinimumSize`) +- :ref:`OfxParamPropInteractPreferedSize ` - Type: int, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractPreferedSize`) +- :ref:`OfxParamPropInteractSize ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropInteractSize`) +- :ref:`OfxParamPropInteractSizeAspect ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxParamPropInteractSizeAspect`) +- :ref:`OfxParamPropInteractV1 ` - Type: pointer, Dimension: 1 (doc: :c:macro:`kOfxParamPropInteractV1`) +- :ref:`OfxParamPropIsAnimating ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAnimating`) +- :ref:`OfxParamPropIsAutoKeying ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropIsAutoKeying`) +- :ref:`OfxParamPropMax ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropMax`) +- :ref:`OfxParamPropMin ` - Type: int/double, Dimension: Variable (doc: :c:macro:`kOfxParamPropMin`) +- :ref:`OfxParamPropParent ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropParent`) +- :ref:`OfxParamPropPersistant ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPersistant`) +- :ref:`OfxParamPropPluginMayWrite ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropPluginMayWrite`) +- :ref:`OfxParamPropScriptName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropScriptName`) +- :ref:`OfxParamPropSecret ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropSecret`) +- :ref:`OfxParamPropStringFilePathExists ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropStringFilePathExists`) +- :ref:`OfxParamPropStringMode ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxParamPropStringMode`) +- :ref:`OfxParamPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxParamPropType`) +- :ref:`OfxPropIcon ` - Type: string, Dimension: 2 (doc: :c:macro:`kOfxPropIcon`) +- :ref:`OfxPropLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLabel`) +- :ref:`OfxPropLongLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropLongLabel`) +- :ref:`OfxPropName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropName`) +- :ref:`OfxPropShortLabel ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropShortLabel`) +- :ref:`OfxPropType ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropType`) +- :ref:`kOfxParamPropUseHostOverlayHandle ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxParamPropUseHostOverlayHandle`) + + +Actions Property Sets +------------------- + +Actions in OFX have input and output property sets that are used to pass data between the host and plugin. +For each action, the required input properties (passed from host to plugin) and output properties (set by the plugin for the host to read) are documented. + +**Actions Quick Reference** + +* :ref:`CustomParamInterpFunc ` +* :ref:`OfxActionBeginInstanceChanged ` +* :ref:`OfxActionBeginInstanceEdit ` +* :ref:`OfxActionCreateInstance ` +* :ref:`OfxActionDescribe ` +* :ref:`OfxActionDestroyInstance ` +* :ref:`OfxActionEndInstanceChanged ` +* :ref:`OfxActionEndInstanceEdit ` +* :ref:`OfxActionInstanceChanged ` +* :ref:`OfxActionLoad ` +* :ref:`OfxActionPurgeCaches ` +* :ref:`OfxActionSyncPrivateData ` +* :ref:`OfxActionUnload ` +* :ref:`OfxImageEffectActionBeginSequenceRender ` +* :ref:`OfxImageEffectActionDescribeInContext ` +* :ref:`OfxImageEffectActionEndSequenceRender ` +* :ref:`OfxImageEffectActionGetClipPreferences ` +* :ref:`OfxImageEffectActionGetFramesNeeded ` +* :ref:`OfxImageEffectActionGetOutputColourspace ` +* :ref:`OfxImageEffectActionGetRegionOfDefinition ` +* :ref:`OfxImageEffectActionGetRegionsOfInterest ` +* :ref:`OfxImageEffectActionGetTimeDomain ` +* :ref:`OfxImageEffectActionIsIdentity ` +* :ref:`OfxImageEffectActionRender ` +* :ref:`OfxInteractActionDraw ` +* :ref:`OfxInteractActionGainFocus ` +* :ref:`OfxInteractActionKeyDown ` +* :ref:`OfxInteractActionKeyRepeat ` +* :ref:`OfxInteractActionKeyUp ` +* :ref:`OfxInteractActionLoseFocus ` +* :ref:`OfxInteractActionPenDown ` +* :ref:`OfxInteractActionPenMotion ` +* :ref:`OfxInteractActionPenUp ` + +.. _action_CustomParamInterpFunc: + +**CustomParamInterpFunc** +^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxParamPropCustomValue ` - Type: string, Dimension: 2 (:c:macro:`kOfxParamPropCustomValue`) + +- :ref:`OfxParamPropInterpolationTime ` - Type: double, Dimension: 2 (:c:macro:`kOfxParamPropInterpolationTime`) + +- :ref:`OfxParamPropInterpolationAmount ` - Type: double, Dimension: 1 (:c:macro:`kOfxParamPropInterpolationAmount`) + +**Output Arguments** + +- :ref:`OfxParamPropCustomValue ` - Type: string, Dimension: 2 (doc: :c:macro:`kOfxParamPropCustomValue`) + +- :ref:`OfxParamPropInterpolationTime ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxParamPropInterpolationTime`) + +.. _action_OfxActionBeginInstanceChanged: + +**OfxActionBeginInstanceChanged** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxPropChangeReason ` - Type: enum, Dimension: 1 (:c:macro:`kOfxPropChangeReason`) + +.. _action_OfxActionBeginInstanceEdit: + +**OfxActionBeginInstanceEdit** +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +-- no in/out args -- + +.. _action_OfxActionCreateInstance: + +**OfxActionCreateInstance** +^^^^^^^^^^^^^^^^^^^^^^^ + +-- no in/out args -- + +.. _action_OfxActionDescribe: + +**OfxActionDescribe** +^^^^^^^^^^^^^^^^^ + +-- no in/out args -- + +.. _action_OfxActionDestroyInstance: + +**OfxActionDestroyInstance** +^^^^^^^^^^^^^^^^^^^^^^^^ + +-- no in/out args -- + +.. _action_OfxActionEndInstanceChanged: + +**OfxActionEndInstanceChanged** +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxPropChangeReason ` - Type: enum, Dimension: 1 (:c:macro:`kOfxPropChangeReason`) + +.. _action_OfxActionEndInstanceEdit: + +**OfxActionEndInstanceEdit** +^^^^^^^^^^^^^^^^^^^^^^^^ + +-- no in/out args -- + +.. _action_OfxActionInstanceChanged: + +**OfxActionInstanceChanged** +^^^^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxPropType ` - Type: string, Dimension: 1 (:c:macro:`kOfxPropType`) + +- :ref:`OfxPropName ` - Type: string, Dimension: 1 (:c:macro:`kOfxPropName`) + +- :ref:`OfxPropChangeReason ` - Type: enum, Dimension: 1 (:c:macro:`kOfxPropChangeReason`) + +- :ref:`OfxPropTime ` - Type: double, Dimension: 1 (:c:macro:`kOfxPropTime`) + +- :ref:`OfxImageEffectPropRenderScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxImageEffectPropRenderScale`) + +.. _action_OfxActionLoad: + +**OfxActionLoad** +^^^^^^^^^^^^^ + +-- no in/out args -- + +.. _action_OfxActionPurgeCaches: + +**OfxActionPurgeCaches** +^^^^^^^^^^^^^^^^^^^^ + +-- no in/out args -- + +.. _action_OfxActionSyncPrivateData: + +**OfxActionSyncPrivateData** +^^^^^^^^^^^^^^^^^^^^^^^^ + +-- no in/out args -- + +.. _action_OfxActionUnload: + +**OfxActionUnload** +^^^^^^^^^^^^^^^ + +-- no in/out args -- + +.. _action_OfxImageEffectActionBeginSequenceRender: + +**OfxImageEffectActionBeginSequenceRender** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxImageEffectPropFrameRange ` - Type: double, Dimension: 2 (:c:macro:`kOfxImageEffectPropFrameRange`) + +- :ref:`OfxImageEffectPropFrameStep ` - Type: double, Dimension: 1 (:c:macro:`kOfxImageEffectPropFrameStep`) + +- :ref:`OfxPropIsInteractive ` - Type: bool, Dimension: 1 (:c:macro:`kOfxPropIsInteractive`) + +- :ref:`OfxImageEffectPropRenderScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxImageEffectPropRenderScale`) + +- :ref:`OfxImageEffectPropSequentialRenderStatus ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropSequentialRenderStatus`) + +- :ref:`OfxImageEffectPropInteractiveRenderStatus ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropInteractiveRenderStatus`) + +- :ref:`OfxImageEffectPropCudaEnabled ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropCudaEnabled`) + +- :ref:`OfxImageEffectPropCudaRenderSupported ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropCudaRenderSupported`) + +- :ref:`OfxImageEffectPropCudaStream ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxImageEffectPropCudaStream`) + +- :ref:`OfxImageEffectPropCudaStreamSupported ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropCudaStreamSupported`) + +- :ref:`OfxImageEffectPropMetalCommandQueue ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxImageEffectPropMetalCommandQueue`) + +- :ref:`OfxImageEffectPropMetalEnabled ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropMetalEnabled`) + +- :ref:`OfxImageEffectPropMetalRenderSupported ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropMetalRenderSupported`) + +- :ref:`OfxImageEffectPropOpenCLCommandQueue ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenCLCommandQueue`) + +- :ref:`OfxImageEffectPropOpenCLEnabled ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenCLEnabled`) + +- :ref:`OfxImageEffectPropOpenCLImage ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenCLImage`) + +- :ref:`OfxImageEffectPropOpenCLRenderSupported ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenCLRenderSupported`) + +- :ref:`OfxImageEffectPropOpenCLSupported ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenCLSupported`) + +- :ref:`OfxImageEffectPropOpenGLEnabled ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenGLEnabled`) + +- :ref:`OfxImageEffectPropOpenGLTextureIndex ` - Type: int, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenGLTextureIndex`) + +- :ref:`OfxImageEffectPropOpenGLTextureTarget ` - Type: int, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenGLTextureTarget`) + +- :ref:`OfxImageEffectPropInteractiveRenderStatus ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropInteractiveRenderStatus`) + +.. _action_OfxImageEffectActionDescribeInContext: + +**OfxImageEffectActionDescribeInContext** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxImageEffectPropContext ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropContext`) + +.. _action_OfxImageEffectActionEndSequenceRender: + +**OfxImageEffectActionEndSequenceRender** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxImageEffectPropFrameRange ` - Type: double, Dimension: 2 (:c:macro:`kOfxImageEffectPropFrameRange`) + +- :ref:`OfxImageEffectPropFrameStep ` - Type: double, Dimension: 1 (:c:macro:`kOfxImageEffectPropFrameStep`) + +- :ref:`OfxPropIsInteractive ` - Type: bool, Dimension: 1 (:c:macro:`kOfxPropIsInteractive`) + +- :ref:`OfxImageEffectPropRenderScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxImageEffectPropRenderScale`) + +- :ref:`OfxImageEffectPropSequentialRenderStatus ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropSequentialRenderStatus`) + +- :ref:`OfxImageEffectPropInteractiveRenderStatus ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropInteractiveRenderStatus`) + +- :ref:`OfxImageEffectPropCudaEnabled ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropCudaEnabled`) + +- :ref:`OfxImageEffectPropCudaRenderSupported ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropCudaRenderSupported`) + +- :ref:`OfxImageEffectPropCudaStream ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxImageEffectPropCudaStream`) + +- :ref:`OfxImageEffectPropCudaStreamSupported ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropCudaStreamSupported`) + +- :ref:`OfxImageEffectPropMetalCommandQueue ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxImageEffectPropMetalCommandQueue`) + +- :ref:`OfxImageEffectPropMetalEnabled ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropMetalEnabled`) + +- :ref:`OfxImageEffectPropMetalRenderSupported ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropMetalRenderSupported`) + +- :ref:`OfxImageEffectPropOpenCLCommandQueue ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenCLCommandQueue`) + +- :ref:`OfxImageEffectPropOpenCLEnabled ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenCLEnabled`) + +- :ref:`OfxImageEffectPropOpenCLImage ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenCLImage`) + +- :ref:`OfxImageEffectPropOpenCLRenderSupported ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenCLRenderSupported`) + +- :ref:`OfxImageEffectPropOpenCLSupported ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenCLSupported`) + +- :ref:`OfxImageEffectPropOpenGLEnabled ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenGLEnabled`) + +- :ref:`OfxImageEffectPropOpenGLTextureIndex ` - Type: int, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenGLTextureIndex`) + +- :ref:`OfxImageEffectPropOpenGLTextureTarget ` - Type: int, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenGLTextureTarget`) + +- :ref:`OfxImageEffectPropInteractiveRenderStatus ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropInteractiveRenderStatus`) + +.. _action_OfxImageEffectActionGetClipPreferences: + +**OfxImageEffectActionGetClipPreferences** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Output Arguments** + +- :ref:`OfxImageEffectPropFrameRate ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropFrameRate`) + +- :ref:`OfxImageClipPropFieldOrder ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageClipPropFieldOrder`) + +- :ref:`OfxImageEffectPropPreMultiplication ` - Type: enum, Dimension: 1 (doc: :c:macro:`kOfxImageEffectPropPreMultiplication`) + +- :ref:`OfxImageClipPropContinuousSamples ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageClipPropContinuousSamples`) + +- :ref:`OfxImageEffectFrameVarying ` - Type: bool, Dimension: 1 (doc: :c:macro:`kOfxImageEffectFrameVarying`) + +.. _action_OfxImageEffectActionGetFramesNeeded: + +**OfxImageEffectActionGetFramesNeeded** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxPropTime ` - Type: double, Dimension: 1 (:c:macro:`kOfxPropTime`) + +**Output Arguments** + +- :ref:`OfxImageEffectPropFrameRange ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxImageEffectPropFrameRange`) + +.. _action_OfxImageEffectActionGetOutputColourspace: + +**OfxImageEffectActionGetOutputColourspace** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxImageClipPropPreferredColourspaces ` - Type: string, Dimension: Variable (:c:macro:`kOfxImageClipPropPreferredColourspaces`) + +**Output Arguments** + +- :ref:`OfxImageClipPropColourspace ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxImageClipPropColourspace`) + +.. _action_OfxImageEffectActionGetRegionOfDefinition: + +**OfxImageEffectActionGetRegionOfDefinition** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxPropTime ` - Type: double, Dimension: 1 (:c:macro:`kOfxPropTime`) + +- :ref:`OfxImageEffectPropRenderScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxImageEffectPropRenderScale`) + +**Output Arguments** + +- :ref:`OfxImageEffectPropRegionOfDefinition ` - Type: double, Dimension: 4 (doc: :c:macro:`kOfxImageEffectPropRegionOfDefinition`) + +.. _action_OfxImageEffectActionGetRegionsOfInterest: + +**OfxImageEffectActionGetRegionsOfInterest** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxPropTime ` - Type: double, Dimension: 1 (:c:macro:`kOfxPropTime`) + +- :ref:`OfxImageEffectPropRenderScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxImageEffectPropRenderScale`) + +- :ref:`OfxImageEffectPropRegionOfInterest ` - Type: double, Dimension: 4 (:c:macro:`kOfxImageEffectPropRegionOfInterest`) + +.. _action_OfxImageEffectActionGetTimeDomain: + +**OfxImageEffectActionGetTimeDomain** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Output Arguments** + +- :ref:`OfxImageEffectPropFrameRange ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxImageEffectPropFrameRange`) + +.. _action_OfxImageEffectActionIsIdentity: + +**OfxImageEffectActionIsIdentity** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxPropTime ` - Type: double, Dimension: 1 (:c:macro:`kOfxPropTime`) + +- :ref:`OfxImageEffectPropFieldToRender ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropFieldToRender`) + +- :ref:`OfxImageEffectPropRenderWindow ` - Type: int, Dimension: 4 (:c:macro:`kOfxImageEffectPropRenderWindow`) + +- :ref:`OfxImageEffectPropRenderScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxImageEffectPropRenderScale`) + +.. _action_OfxImageEffectActionRender: + +**OfxImageEffectActionRender** +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxPropTime ` - Type: double, Dimension: 1 (:c:macro:`kOfxPropTime`) + +- :ref:`OfxImageEffectPropSequentialRenderStatus ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropSequentialRenderStatus`) + +- :ref:`OfxImageEffectPropInteractiveRenderStatus ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropInteractiveRenderStatus`) + +- :ref:`OfxImageEffectPropRenderQualityDraft ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropRenderQualityDraft`) + +- :ref:`OfxImageEffectPropCudaEnabled ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropCudaEnabled`) + +- :ref:`OfxImageEffectPropCudaRenderSupported ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropCudaRenderSupported`) + +- :ref:`OfxImageEffectPropCudaStream ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxImageEffectPropCudaStream`) + +- :ref:`OfxImageEffectPropCudaStreamSupported ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropCudaStreamSupported`) + +- :ref:`OfxImageEffectPropMetalCommandQueue ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxImageEffectPropMetalCommandQueue`) + +- :ref:`OfxImageEffectPropMetalEnabled ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropMetalEnabled`) + +- :ref:`OfxImageEffectPropMetalRenderSupported ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropMetalRenderSupported`) + +- :ref:`OfxImageEffectPropOpenCLCommandQueue ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenCLCommandQueue`) + +- :ref:`OfxImageEffectPropOpenCLEnabled ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenCLEnabled`) + +- :ref:`OfxImageEffectPropOpenCLImage ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenCLImage`) + +- :ref:`OfxImageEffectPropOpenCLRenderSupported ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenCLRenderSupported`) + +- :ref:`OfxImageEffectPropOpenCLSupported ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenCLSupported`) + +- :ref:`OfxImageEffectPropOpenGLEnabled ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenGLEnabled`) + +- :ref:`OfxImageEffectPropOpenGLTextureIndex ` - Type: int, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenGLTextureIndex`) + +- :ref:`OfxImageEffectPropOpenGLTextureTarget ` - Type: int, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenGLTextureTarget`) + +.. _action_OfxInteractActionDraw: + +**OfxInteractActionDraw** +^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxPropEffectInstance ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxPropEffectInstance`) + +- :ref:`OfxInteractPropDrawContext ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxInteractPropDrawContext`) + +- :ref:`OfxInteractPropPixelScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxInteractPropPixelScale`) + +- :ref:`OfxInteractPropBackgroundColour ` - Type: double, Dimension: 3 (:c:macro:`kOfxInteractPropBackgroundColour`) + +- :ref:`OfxPropTime ` - Type: double, Dimension: 1 (:c:macro:`kOfxPropTime`) + +- :ref:`OfxImageEffectPropRenderScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxImageEffectPropRenderScale`) + +.. _action_OfxInteractActionGainFocus: + +**OfxInteractActionGainFocus** +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxPropEffectInstance ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxPropEffectInstance`) + +- :ref:`OfxInteractPropPixelScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxInteractPropPixelScale`) + +- :ref:`OfxInteractPropBackgroundColour ` - Type: double, Dimension: 3 (:c:macro:`kOfxInteractPropBackgroundColour`) + +- :ref:`OfxPropTime ` - Type: double, Dimension: 1 (:c:macro:`kOfxPropTime`) + +- :ref:`OfxImageEffectPropRenderScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxImageEffectPropRenderScale`) + +.. _action_OfxInteractActionKeyDown: + +**OfxInteractActionKeyDown** +^^^^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxPropEffectInstance ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxPropEffectInstance`) + +- :ref:`kOfxPropKeySym ` - Type: int, Dimension: 1 (:c:macro:`kOfxPropKeySym`) + +- :ref:`kOfxPropKeyString ` - Type: string, Dimension: 1 (:c:macro:`kOfxPropKeyString`) + +- :ref:`OfxPropTime ` - Type: double, Dimension: 1 (:c:macro:`kOfxPropTime`) + +- :ref:`OfxImageEffectPropRenderScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxImageEffectPropRenderScale`) + +.. _action_OfxInteractActionKeyRepeat: + +**OfxInteractActionKeyRepeat** +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxPropEffectInstance ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxPropEffectInstance`) + +- :ref:`kOfxPropKeySym ` - Type: int, Dimension: 1 (:c:macro:`kOfxPropKeySym`) + +- :ref:`kOfxPropKeyString ` - Type: string, Dimension: 1 (:c:macro:`kOfxPropKeyString`) + +- :ref:`OfxPropTime ` - Type: double, Dimension: 1 (:c:macro:`kOfxPropTime`) + +- :ref:`OfxImageEffectPropRenderScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxImageEffectPropRenderScale`) + +.. _action_OfxInteractActionKeyUp: + +**OfxInteractActionKeyUp** +^^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxPropEffectInstance ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxPropEffectInstance`) + +- :ref:`kOfxPropKeySym ` - Type: int, Dimension: 1 (:c:macro:`kOfxPropKeySym`) + +- :ref:`kOfxPropKeyString ` - Type: string, Dimension: 1 (:c:macro:`kOfxPropKeyString`) + +- :ref:`OfxPropTime ` - Type: double, Dimension: 1 (:c:macro:`kOfxPropTime`) + +- :ref:`OfxImageEffectPropRenderScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxImageEffectPropRenderScale`) + +.. _action_OfxInteractActionLoseFocus: + +**OfxInteractActionLoseFocus** +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxPropEffectInstance ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxPropEffectInstance`) + +- :ref:`OfxInteractPropPixelScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxInteractPropPixelScale`) + +- :ref:`OfxInteractPropBackgroundColour ` - Type: double, Dimension: 3 (:c:macro:`kOfxInteractPropBackgroundColour`) + +- :ref:`OfxPropTime ` - Type: double, Dimension: 1 (:c:macro:`kOfxPropTime`) + +- :ref:`OfxImageEffectPropRenderScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxImageEffectPropRenderScale`) + +.. _action_OfxInteractActionPenDown: + +**OfxInteractActionPenDown** +^^^^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxPropEffectInstance ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxPropEffectInstance`) + +- :ref:`OfxInteractPropPixelScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxInteractPropPixelScale`) + +- :ref:`OfxInteractPropBackgroundColour ` - Type: double, Dimension: 3 (:c:macro:`kOfxInteractPropBackgroundColour`) + +- :ref:`OfxPropTime ` - Type: double, Dimension: 1 (:c:macro:`kOfxPropTime`) + +- :ref:`OfxImageEffectPropRenderScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxImageEffectPropRenderScale`) + +- :ref:`OfxInteractPropPenPosition ` - Type: double, Dimension: 2 (:c:macro:`kOfxInteractPropPenPosition`) + +- :ref:`OfxInteractPropPenViewportPosition ` - Type: int, Dimension: 2 (:c:macro:`kOfxInteractPropPenViewportPosition`) + +- :ref:`OfxInteractPropPenPressure ` - Type: double, Dimension: 1 (:c:macro:`kOfxInteractPropPenPressure`) + +.. _action_OfxInteractActionPenMotion: + +**OfxInteractActionPenMotion** +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxPropEffectInstance ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxPropEffectInstance`) + +- :ref:`OfxInteractPropPixelScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxInteractPropPixelScale`) + +- :ref:`OfxInteractPropBackgroundColour ` - Type: double, Dimension: 3 (:c:macro:`kOfxInteractPropBackgroundColour`) + +- :ref:`OfxPropTime ` - Type: double, Dimension: 1 (:c:macro:`kOfxPropTime`) + +- :ref:`OfxImageEffectPropRenderScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxImageEffectPropRenderScale`) + +- :ref:`OfxInteractPropPenPosition ` - Type: double, Dimension: 2 (:c:macro:`kOfxInteractPropPenPosition`) + +- :ref:`OfxInteractPropPenViewportPosition ` - Type: int, Dimension: 2 (:c:macro:`kOfxInteractPropPenViewportPosition`) + +- :ref:`OfxInteractPropPenPressure ` - Type: double, Dimension: 1 (:c:macro:`kOfxInteractPropPenPressure`) + +.. _action_OfxInteractActionPenUp: + +**OfxInteractActionPenUp** +^^^^^^^^^^^^^^^^^^^^^^ + +**Input Arguments** + +- :ref:`OfxPropEffectInstance ` - Type: pointer, Dimension: 1 (:c:macro:`kOfxPropEffectInstance`) + +- :ref:`OfxInteractPropPixelScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxInteractPropPixelScale`) + +- :ref:`OfxInteractPropBackgroundColour ` - Type: double, Dimension: 3 (:c:macro:`kOfxInteractPropBackgroundColour`) + +- :ref:`OfxPropTime ` - Type: double, Dimension: 1 (:c:macro:`kOfxPropTime`) + +- :ref:`OfxImageEffectPropRenderScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxImageEffectPropRenderScale`) + +- :ref:`OfxInteractPropPenPosition ` - Type: double, Dimension: 2 (:c:macro:`kOfxInteractPropPenPosition`) + +- :ref:`OfxInteractPropPenViewportPosition ` - Type: int, Dimension: 2 (:c:macro:`kOfxInteractPropPenViewportPosition`) + +- :ref:`OfxInteractPropPenPressure ` - Type: double, Dimension: 1 (:c:macro:`kOfxInteractPropPenPressure`) + diff --git a/scripts/gen-props-doc.py b/scripts/gen-props-doc.py new file mode 100755 index 00000000..c97e9185 --- /dev/null +++ b/scripts/gen-props-doc.py @@ -0,0 +1,416 @@ +#!/usr/bin/env python3 +# Copyright OpenFX and contributors to the OpenFX project. +# SPDX-License-Identifier: BSD-3-Clause + +# /// script +# requires-python = ">=3.11" +# dependencies = [ +# "pyyaml>=1.0", +# ] +# /// + +import os +import sys +import argparse +import yaml +import logging +from pathlib import Path +from collections import defaultdict + +# 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 get_def(name: str, defs): + if name.endswith('_REF'): + defname = name.replace("_REF", "_DEF") + return defs[defname] + else: + return [name] + +def expand_set_props(props_by_set): + """Expand refs in props_by_sets. + YAML can't interpolate a list, so we do it here, using + our own method: + - A prop set may end with _DEF in which case it's just a definition + containing a list of prop names. + - A prop *name* may be _REF which means to interpolate the + corresponding DEF list into this set's props. + Returns a new props_by_set with DEFs removed and all lists interpolated. + """ + # First get all the list defs + defs = {} + sets = {} + for key, value in props_by_set.items(): + if key.endswith('_DEF'): + defs[key] = value # should be a list to be interpolated + else: + sets[key] = value + for key in sets: + if not sets[key].get('props'): + pass # do nothing, no expansion needed in inArgs/outArgs for now + else: + sets[key]['props'] = [item for element in sets[key]['props'] \ + for item in get_def(element, defs)] + return sets + +def 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. + """ + import re + + 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 + if '|' in p: + parts = p.split('|', 1) + name = parts[0].strip() + key_values_str = parts[1].strip() + + if name_only: + yield name + else: + # Parse key/value pairs, apply defaults, and include name + options = {} + if key_values_str: + key_values = key_values_str.split(',') + for kv in key_values: + if '=' in kv: + k, v = kv.split('=', 1) + options[k.strip()] = v.strip() + + yield {**propset_options, **options, **{"name": name}} + else: + # Simple property name with no options + if name_only: + yield p + else: + yield {**propset_options, **{"name": p}} + +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 generate_property_documentation(props_metadata, props_by_set, outfile_path): + """Generate RST documentation for all properties + + This creates a comprehensive property reference that includes: + - Property name + - C #define name + - Type and dimension + - Property sets where it's used + - Description (if available) + - Valid values (for enums) + - Link to Doxygen documentation + """ + with open(outfile_path, 'w') as outfile: + outfile.write(".. _propertiesReferenceGenerated:\n") + outfile.write("Properties Reference (Generated)\n") + outfile.write("==============================\n\n") + outfile.write("This reference is auto-generated from property definitions in the OpenFX source code.\n") + outfile.write("It provides a structured view of properties with their types, dimensions, and where they are used.\n") + outfile.write("For each property, a link to the detailed Doxygen documentation is provided when available.\n\n") + + # Create a mapping from property to the sets that use it + prop_to_sets = defaultdict(list) + for pset in props_by_set: + for prop in props_for_set(pset, props_by_set): + prop_to_sets[prop].append(pset) + + # Process properties by type + types = { + 'int': 'Integer', + 'double': 'Double', + 'string': 'String', + 'bool': 'Boolean', + 'enum': 'Enumeration', + 'pointer': 'Pointer' + } + + # Group properties by type + for type_key, type_name in sorted(types.items()): + type_props = [p for p in props_metadata if props_metadata[p].get('type') == type_key or + (isinstance(props_metadata[p].get('type'), list) and type_key in props_metadata[p].get('type'))] + + if not type_props: + continue + + outfile.write(f"\n{type_name} Properties\n{'-' * len(type_name) + '-----------'}\n\n") + + for prop in sorted(type_props): + # Get metadata + metadata = props_metadata[prop] + cname = get_cname(prop, props_metadata) + + # Write property name and C define name + outfile.write(f".. _prop_{prop}:\n\n") + outfile.write(f"**{prop}**\n") + outfile.write(f"{'^' * len(prop)}\n\n") + + # Link to the corresponding Doxygen documentation + outfile.write(f"- **C #define**: :c:macro:`{cname}`\n") + + # Write type and dimension + if isinstance(metadata.get('type'), list): + types_str = ', '.join(metadata.get('type')) + outfile.write(f"- **Type**: Multiple types: {types_str}\n") + else: + outfile.write(f"- **Type**: {metadata.get('type', 'unknown')}\n") + + dim = metadata.get('dimension', 'unknown') + if dim == 0: + outfile.write(f"- **Dimension**: Variable (0 or more)\n") + else: + outfile.write(f"- **Dimension**: {dim}\n") + + # Write property sets where this is used + if prop in prop_to_sets: + sets_str = ', '.join([f':ref:`{s} `' for s in sorted(prop_to_sets[prop])]) + outfile.write(f"- **Used in Property Sets**: {sets_str}\n") + + # Write valid values for enums + if metadata.get('type') == 'enum' and metadata.get('values'): + outfile.write("- **Valid Values**:\n") + for value in metadata.get('values'): + outfile.write(f" - ``{value}``\n") + + # Write additional metadata + if metadata.get('default'): + outfile.write(f"- **Default**: {metadata.get('default')}\n") + + if metadata.get('introduced'): + outfile.write(f"- **Introduced in**: version {metadata.get('introduced')}\n") + + if metadata.get('deprecated'): + outfile.write(f"- **Deprecated in**: version {metadata.get('deprecated')}\n") + + # Add direct link to Doxygen documentation for detailed info + outfile.write(f"- **Doc**: For detailed doc, see :c:macro:`{cname}`.\n") + + outfile.write("\n") + +def generate_action_args_documentation(action_data, props_metadata, props_by_set_doc): + """Generate documentation for action arguments (inArgs/outArgs).""" + action_section = [] + + action_section.append("\nActions Property Sets\n-------------------\n\n") + action_section.append("Actions in OFX have input and output property sets that are used to pass data between the host and plugin.\n") + action_section.append("For each action, the required input properties (passed from host to plugin) and output properties ") + action_section.append("(set by the plugin for the host to read) are documented.\n\n") + + # Add a quick reference table of contents for all actions + action_section.append("**Actions Quick Reference**\n\n") + for action_name in sorted(action_data.keys()): + action_section.append(f"* :ref:`{action_name} `\n") + action_section.append("\n") + + for action_name in sorted(action_data.keys()): + # Create a section for this action + action_section.append(f".. _action_{action_name}:\n\n") + action_section.append(f"**{action_name}**\n") + action_section.append(f"{'^' * len(action_name)}\n\n") + has_args = False + + # Document inArgs (input properties) + if action_data[action_name].get('inArgs'): + has_args = True + action_section.append(f"**Input Arguments**\n\n") + + for prop in action_data[action_name]['inArgs']: + metadata = props_metadata.get(prop) + if not metadata: + action_section.append(f"- ``{prop}`` - (No metadata available)\n") + continue + + # Determine type display + if isinstance(metadata.get('type'), list): + type_str = '/'.join(metadata.get('type')) + else: + type_str = metadata.get('type', 'unknown') + + # Get dimension + dim = metadata.get('dimension', 'unknown') + if dim == 0: + dim_str = "Variable" + else: + dim_str = str(dim) + + # Get C name + cname = get_cname(prop, props_metadata) + + # Write property entry with link to full definition and Doxygen reference + action_section.append(f"- :ref:`{prop} ` - Type: {type_str}, Dimension: {dim_str} (:c:macro:`{cname}`)\n") + + action_section.append("\n") + + # Document outArgs (output properties) + if action_data[action_name].get('outArgs'): + has_args = True + action_section.append(f"**Output Arguments**\n\n") + + for prop in action_data[action_name]['outArgs']: + metadata = props_metadata.get(prop) + if not metadata: + action_section.append(f"- ``{prop}`` - (No metadata available)\n") + continue + + # Determine type display + if isinstance(metadata.get('type'), list): + type_str = '/'.join(metadata.get('type')) + else: + type_str = metadata.get('type', 'unknown') + + # Get dimension + dim = metadata.get('dimension', 'unknown') + if dim == 0: + dim_str = "Variable" + else: + dim_str = str(dim) + + # Get C name + cname = get_cname(prop, props_metadata) + + # Write property entry with link to full definition and Doxygen reference + action_section.append(f"- :ref:`{prop} ` - Type: {type_str}, Dimension: {dim_str} (doc: :c:macro:`{cname}`)\n") + + action_section.append("\n") + if not has_args: + action_section.append(f"-- no in/out args --\n\n") + return ''.join(action_section) + +def generate_property_set_documentation(props_by_set, props_metadata, actions_data, outfile_path): + """Generate RST documentation for property sets and action property sets + + This creates documentation on property sets and the properties they contain, + as well as action property sets (inArgs/outArgs) + """ + with open(outfile_path, 'w') as outfile: + outfile.write(".. _propertySetReferenceGenerated:\n") + outfile.write("Property Sets Reference (Generated)\n") + outfile.write("==================================\n\n") + outfile.write("This reference is auto-generated from property set definitions in the OpenFX source code.\n") + outfile.write("It provides an overview of property sets and their associated properties.\n") + outfile.write("For each property, a link to its detailed description in the :doc:`Properties Reference (Generated) ` is provided.\n\n") + + # First document the regular property sets + outfile.write("Regular Property Sets\n--------------------\n\n") + outfile.write("These property sets represent collections of properties associated with various OpenFX objects.\n\n") + + # Build a table of contents for the property sets + outfile.write("**Property Sets Quick Reference**\n\n") + for pset in sorted(props_by_set.keys()): + if not pset.endswith('_DEF'): + outfile.write(f"* :ref:`{pset} `\n") + outfile.write("\n") + + for pset in sorted(props_by_set.keys()): + # Skip DEF sets as they're just for internal organization + if pset.endswith('_DEF'): + continue + + outfile.write(f".. _propset_{pset}:\n\n") + outfile.write(f"**{pset}**\n") + outfile.write(f"{'^' * len(pset)}\n\n") + + # Write access information + write_access = props_by_set[pset].get('write', 'unknown') + outfile.write(f"- **Write Access**: {write_access}\n\n") + + # List all properties in this set + outfile.write("**Properties**\n\n") + + props_list = list(props_for_set(pset, props_by_set)) + if not props_list: + outfile.write("No properties defined for this set.\n\n") + continue + + for prop in sorted(props_list): + metadata = props_metadata.get(prop) + if not metadata: + continue + + # Determine type display + if isinstance(metadata.get('type'), list): + type_str = '/'.join(metadata.get('type')) + else: + type_str = metadata.get('type', 'unknown') + + # Get dimension + dim = metadata.get('dimension', 'unknown') + if dim == 0: + dim_str = "Variable" + else: + dim_str = str(dim) + + # Get C name + cname = get_cname(prop, props_metadata) + + # Write property entry with link to full definition and Doxygen doc reference + outfile.write(f"- :ref:`{prop} ` - Type: {type_str}, Dimension: {dim_str} (doc: :c:macro:`{cname}`)\n") + + outfile.write("\n") + + # Now add the Action property sets section + action_docs = generate_action_args_documentation(actions_data, props_metadata, props_by_set) + outfile.write(action_docs) + +def main(): + script_dir = os.path.dirname(os.path.abspath(__file__)) + include_dir = Path(script_dir).parent / 'include' + doc_ref_dir = Path(script_dir).parent / 'Documentation/sources/Reference' + + # Default output paths + props_doc_path = doc_ref_dir / 'ofxPropertiesReferenceGenerated.rst' + propsets_doc_path = doc_ref_dir / 'ofxPropertySetsGenerated.rst' + + parser = argparse.ArgumentParser(description="Generate RST documentation from OpenFX properties YAML") + parser.add_argument('--props-file', default=include_dir/'ofx-props.yml', + help="Path to the ofx-props.yml file") + parser.add_argument('--props-doc', default=props_doc_path, + help="Output path for properties documentation") + parser.add_argument('--propsets-doc', default=propsets_doc_path, + help="Output path for property sets documentation") + parser.add_argument('-v', '--verbose', action='store_true', + help="Enable verbose output") + + args = parser.parse_args() + + if args.verbose: + logging.info(f"Reading properties from {args.props_file}") + + # Load property definitions + with open(args.props_file, 'r') as props_file: + props_data = yaml.safe_load(props_file) + + props_by_set = expand_set_props(props_data['propertySets']) + props_metadata = props_data['properties'] + actions_data = props_data.get('Actions', {}) + + if args.verbose: + logging.info(f"Generating property documentation in {args.props_doc}") + generate_property_documentation(props_metadata, props_by_set, args.props_doc) + + if args.verbose: + logging.info(f"Generating property sets documentation in {args.propsets_doc}") + generate_property_set_documentation(props_by_set, props_metadata, actions_data, args.propsets_doc) + + if args.verbose: + logging.info("Documentation generation complete") + +if __name__ == "__main__": + main() From 9414098afad3f9a54e2111293accdf96182e83b8 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Mon, 13 Oct 2025 14:04:57 -0400 Subject: [PATCH 25/33] Add links from Properties Reference to the structured docs Also cleaned up a few doc typos I noticed. Signed-off-by: Gary Oberbrunner --- Documentation/genPropertiesReference.py | 3 +- .../Reference/ofxPropertiesReference.rst | 179 ++++++++++++++++++ Documentation/sources/_ext/.gitignore | 1 + Documentation/sources/_ext/property_links.py | 44 +++++ Documentation/sources/_static/css/custom.css | 17 ++ Documentation/sources/conf.py | 15 +- HostSupport/examples/hostDemoClipInstance.cpp | 2 +- HostSupport/examples/hostDemoClipInstance.h | 2 +- HostSupport/include/ofxhClip.h | 2 +- include/ofxCore.h | 4 +- include/ofxImageEffect.h | 2 +- 11 files changed, 262 insertions(+), 9 deletions(-) create mode 100644 Documentation/sources/_ext/.gitignore create mode 100644 Documentation/sources/_ext/property_links.py diff --git a/Documentation/genPropertiesReference.py b/Documentation/genPropertiesReference.py index be0dd781..e263c1dc 100755 --- a/Documentation/genPropertiesReference.py +++ b/Documentation/genPropertiesReference.py @@ -84,7 +84,8 @@ def main(argv): f.write('Properties Reference\n') f.write('=====================\n') for p in sorted(props): - f.write('.. doxygendefine:: ' + p + '\n\n') + f.write('.. doxygendefine:: ' + p + '\n') + f.write('.. property_link:: ' + p + '\n\n') if __name__ == "__main__": main(sys.argv[1:]) diff --git a/Documentation/sources/Reference/ofxPropertiesReference.rst b/Documentation/sources/Reference/ofxPropertiesReference.rst index 532f08ac..f449ef38 100644 --- a/Documentation/sources/Reference/ofxPropertiesReference.rst +++ b/Documentation/sources/Reference/ofxPropertiesReference.rst @@ -2,362 +2,541 @@ Properties Reference ===================== .. doxygendefine:: kOfxImageClipPropColourspace +.. property_link:: kOfxImageClipPropColourspace .. doxygendefine:: kOfxImageClipPropConnected +.. property_link:: kOfxImageClipPropConnected .. doxygendefine:: kOfxImageClipPropContinuousSamples +.. property_link:: kOfxImageClipPropContinuousSamples .. doxygendefine:: kOfxImageClipPropFieldExtraction +.. property_link:: kOfxImageClipPropFieldExtraction .. doxygendefine:: kOfxImageClipPropFieldOrder +.. property_link:: kOfxImageClipPropFieldOrder .. doxygendefine:: kOfxImageClipPropIsMask +.. property_link:: kOfxImageClipPropIsMask .. doxygendefine:: kOfxImageClipPropOptional +.. property_link:: kOfxImageClipPropOptional .. doxygendefine:: kOfxImageClipPropPreferredColourspaces +.. property_link:: kOfxImageClipPropPreferredColourspaces .. doxygendefine:: kOfxImageClipPropUnmappedComponents +.. property_link:: kOfxImageClipPropUnmappedComponents .. doxygendefine:: kOfxImageClipPropUnmappedPixelDepth +.. property_link:: kOfxImageClipPropUnmappedPixelDepth .. doxygendefine:: kOfxImageEffectFrameVarying +.. property_link:: kOfxImageEffectFrameVarying .. doxygendefine:: kOfxImageEffectHostPropIsBackground +.. property_link:: kOfxImageEffectHostPropIsBackground .. doxygendefine:: kOfxImageEffectHostPropNativeOrigin +.. property_link:: kOfxImageEffectHostPropNativeOrigin .. doxygendefine:: kOfxImageEffectInstancePropEffectDuration +.. property_link:: kOfxImageEffectInstancePropEffectDuration .. doxygendefine:: kOfxImageEffectInstancePropSequentialRender +.. property_link:: kOfxImageEffectInstancePropSequentialRender .. doxygendefine:: kOfxImageEffectPluginPropFieldRenderTwiceAlways +.. property_link:: kOfxImageEffectPluginPropFieldRenderTwiceAlways .. doxygendefine:: kOfxImageEffectPluginPropGrouping +.. property_link:: kOfxImageEffectPluginPropGrouping .. doxygendefine:: kOfxImageEffectPluginPropHostFrameThreading +.. property_link:: kOfxImageEffectPluginPropHostFrameThreading .. doxygendefine:: kOfxImageEffectPluginPropOverlayInteractV1 +.. property_link:: kOfxImageEffectPluginPropOverlayInteractV1 .. doxygendefine:: kOfxImageEffectPluginPropOverlayInteractV2 +.. property_link:: kOfxImageEffectPluginPropOverlayInteractV2 .. doxygendefine:: kOfxImageEffectPluginPropSingleInstance +.. property_link:: kOfxImageEffectPluginPropSingleInstance .. doxygendefine:: kOfxImageEffectPluginRenderThreadSafety +.. property_link:: kOfxImageEffectPluginRenderThreadSafety .. doxygendefine:: kOfxImageEffectPropClipPreferencesSlaveParam +.. property_link:: kOfxImageEffectPropClipPreferencesSlaveParam .. doxygendefine:: kOfxImageEffectPropColourManagementAvailableConfigs +.. property_link:: kOfxImageEffectPropColourManagementAvailableConfigs .. doxygendefine:: kOfxImageEffectPropColourManagementConfig +.. property_link:: kOfxImageEffectPropColourManagementConfig .. doxygendefine:: kOfxImageEffectPropColourManagementStyle +.. property_link:: kOfxImageEffectPropColourManagementStyle .. doxygendefine:: kOfxImageEffectPropComponents +.. property_link:: kOfxImageEffectPropComponents .. doxygendefine:: kOfxImageEffectPropContext +.. property_link:: kOfxImageEffectPropContext .. doxygendefine:: kOfxImageEffectPropCudaEnabled +.. property_link:: kOfxImageEffectPropCudaEnabled .. doxygendefine:: kOfxImageEffectPropCudaRenderSupported +.. property_link:: kOfxImageEffectPropCudaRenderSupported .. doxygendefine:: kOfxImageEffectPropCudaStream +.. property_link:: kOfxImageEffectPropCudaStream .. doxygendefine:: kOfxImageEffectPropCudaStreamSupported +.. property_link:: kOfxImageEffectPropCudaStreamSupported .. doxygendefine:: kOfxImageEffectPropDisplayColourspace +.. property_link:: kOfxImageEffectPropDisplayColourspace .. doxygendefine:: kOfxImageEffectPropFieldToRender +.. property_link:: kOfxImageEffectPropFieldToRender .. doxygendefine:: kOfxImageEffectPropFrameRange +.. property_link:: kOfxImageEffectPropFrameRange .. doxygendefine:: kOfxImageEffectPropFrameRate +.. property_link:: kOfxImageEffectPropFrameRate .. doxygendefine:: kOfxImageEffectPropFrameStep +.. property_link:: kOfxImageEffectPropFrameStep .. doxygendefine:: kOfxImageEffectPropInAnalysis +.. property_link:: kOfxImageEffectPropInAnalysis .. doxygendefine:: kOfxImageEffectPropInteractiveRenderStatus +.. property_link:: kOfxImageEffectPropInteractiveRenderStatus .. doxygendefine:: kOfxImageEffectPropMetalCommandQueue +.. property_link:: kOfxImageEffectPropMetalCommandQueue .. doxygendefine:: kOfxImageEffectPropMetalEnabled +.. property_link:: kOfxImageEffectPropMetalEnabled .. doxygendefine:: kOfxImageEffectPropMetalRenderSupported +.. property_link:: kOfxImageEffectPropMetalRenderSupported .. doxygendefine:: kOfxImageEffectPropNoSpatialAwareness .. doxygendefine:: kOfxImageEffectPropOCIOConfig +.. property_link:: kOfxImageEffectPropOCIOConfig .. doxygendefine:: kOfxImageEffectPropOCIODisplay +.. property_link:: kOfxImageEffectPropOCIODisplay .. doxygendefine:: kOfxImageEffectPropOCIOView +.. property_link:: kOfxImageEffectPropOCIOView .. doxygendefine:: kOfxImageEffectPropOpenCLCommandQueue +.. property_link:: kOfxImageEffectPropOpenCLCommandQueue .. doxygendefine:: kOfxImageEffectPropOpenCLEnabled +.. property_link:: kOfxImageEffectPropOpenCLEnabled .. doxygendefine:: kOfxImageEffectPropOpenCLImage +.. property_link:: kOfxImageEffectPropOpenCLImage .. doxygendefine:: kOfxImageEffectPropOpenCLRenderSupported +.. property_link:: kOfxImageEffectPropOpenCLRenderSupported .. doxygendefine:: kOfxImageEffectPropOpenCLSupported +.. property_link:: kOfxImageEffectPropOpenCLSupported .. doxygendefine:: kOfxImageEffectPropOpenGLEnabled +.. property_link:: kOfxImageEffectPropOpenGLEnabled .. doxygendefine:: kOfxImageEffectPropOpenGLRenderSupported +.. property_link:: kOfxImageEffectPropOpenGLRenderSupported .. doxygendefine:: kOfxImageEffectPropOpenGLTextureIndex +.. property_link:: kOfxImageEffectPropOpenGLTextureIndex .. doxygendefine:: kOfxImageEffectPropOpenGLTextureTarget +.. property_link:: kOfxImageEffectPropOpenGLTextureTarget .. doxygendefine:: kOfxImageEffectPropPixelDepth +.. property_link:: kOfxImageEffectPropPixelDepth .. doxygendefine:: kOfxImageEffectPropPluginHandle +.. property_link:: kOfxImageEffectPropPluginHandle .. doxygendefine:: kOfxImageEffectPropPreMultiplication +.. property_link:: kOfxImageEffectPropPreMultiplication .. doxygendefine:: kOfxImageEffectPropProjectExtent +.. property_link:: kOfxImageEffectPropProjectExtent .. doxygendefine:: kOfxImageEffectPropProjectOffset +.. property_link:: kOfxImageEffectPropProjectOffset .. doxygendefine:: kOfxImageEffectPropProjectPixelAspectRatio +.. property_link:: kOfxImageEffectPropProjectPixelAspectRatio .. doxygendefine:: kOfxImageEffectPropProjectSize +.. property_link:: kOfxImageEffectPropProjectSize .. doxygendefine:: kOfxImageEffectPropRegionOfDefinition +.. property_link:: kOfxImageEffectPropRegionOfDefinition .. doxygendefine:: kOfxImageEffectPropRegionOfInterest +.. property_link:: kOfxImageEffectPropRegionOfInterest .. doxygendefine:: kOfxImageEffectPropRenderQualityDraft +.. property_link:: kOfxImageEffectPropRenderQualityDraft .. doxygendefine:: kOfxImageEffectPropRenderScale +.. property_link:: kOfxImageEffectPropRenderScale .. doxygendefine:: kOfxImageEffectPropRenderWindow +.. property_link:: kOfxImageEffectPropRenderWindow .. doxygendefine:: kOfxImageEffectPropSequentialRenderStatus +.. property_link:: kOfxImageEffectPropSequentialRenderStatus .. doxygendefine:: kOfxImageEffectPropSetableFielding +.. property_link:: kOfxImageEffectPropSetableFielding .. doxygendefine:: kOfxImageEffectPropSetableFrameRate +.. property_link:: kOfxImageEffectPropSetableFrameRate .. doxygendefine:: kOfxImageEffectPropSupportedComponents +.. property_link:: kOfxImageEffectPropSupportedComponents .. doxygendefine:: kOfxImageEffectPropSupportedContexts +.. property_link:: kOfxImageEffectPropSupportedContexts .. doxygendefine:: kOfxImageEffectPropSupportedPixelDepths +.. property_link:: kOfxImageEffectPropSupportedPixelDepths .. doxygendefine:: kOfxImageEffectPropSupportsMultiResolution +.. property_link:: kOfxImageEffectPropSupportsMultiResolution .. doxygendefine:: kOfxImageEffectPropSupportsMultipleClipDepths +.. property_link:: kOfxImageEffectPropSupportsMultipleClipDepths .. doxygendefine:: kOfxImageEffectPropSupportsMultipleClipPARs +.. property_link:: kOfxImageEffectPropSupportsMultipleClipPARs .. doxygendefine:: kOfxImageEffectPropSupportsOverlays +.. property_link:: kOfxImageEffectPropSupportsOverlays .. doxygendefine:: kOfxImageEffectPropSupportsTiles +.. property_link:: kOfxImageEffectPropSupportsTiles .. doxygendefine:: kOfxImageEffectPropTemporalClipAccess +.. property_link:: kOfxImageEffectPropTemporalClipAccess .. doxygendefine:: kOfxImageEffectPropUnmappedFrameRange +.. property_link:: kOfxImageEffectPropUnmappedFrameRange .. doxygendefine:: kOfxImageEffectPropUnmappedFrameRate +.. property_link:: kOfxImageEffectPropUnmappedFrameRate .. doxygendefine:: kOfxImagePropBounds +.. property_link:: kOfxImagePropBounds .. doxygendefine:: kOfxImagePropData +.. property_link:: kOfxImagePropData .. doxygendefine:: kOfxImagePropField +.. property_link:: kOfxImagePropField .. doxygendefine:: kOfxImagePropPixelAspectRatio +.. property_link:: kOfxImagePropPixelAspectRatio .. doxygendefine:: kOfxImagePropRegionOfDefinition +.. property_link:: kOfxImagePropRegionOfDefinition .. doxygendefine:: kOfxImagePropRowBytes +.. property_link:: kOfxImagePropRowBytes .. doxygendefine:: kOfxImagePropUniqueIdentifier +.. property_link:: kOfxImagePropUniqueIdentifier .. doxygendefine:: kOfxInteractPropBackgroundColour +.. property_link:: kOfxInteractPropBackgroundColour .. doxygendefine:: kOfxInteractPropBitDepth +.. property_link:: kOfxInteractPropBitDepth .. doxygendefine:: kOfxInteractPropDrawContext +.. property_link:: kOfxInteractPropDrawContext .. doxygendefine:: kOfxInteractPropHasAlpha +.. property_link:: kOfxInteractPropHasAlpha .. doxygendefine:: kOfxInteractPropPenPosition +.. property_link:: kOfxInteractPropPenPosition .. doxygendefine:: kOfxInteractPropPenPressure +.. property_link:: kOfxInteractPropPenPressure .. doxygendefine:: kOfxInteractPropPenViewportPosition +.. property_link:: kOfxInteractPropPenViewportPosition .. doxygendefine:: kOfxInteractPropPixelScale +.. property_link:: kOfxInteractPropPixelScale .. doxygendefine:: kOfxInteractPropSlaveToParam +.. property_link:: kOfxInteractPropSlaveToParam .. doxygendefine:: kOfxInteractPropSuggestedColour +.. property_link:: kOfxInteractPropSuggestedColour .. doxygendefine:: kOfxInteractPropViewportSize +.. property_link:: kOfxInteractPropViewportSize .. doxygendefine:: kOfxOpenGLPropPixelDepth +.. property_link:: kOfxOpenGLPropPixelDepth .. doxygendefine:: kOfxParamHostPropMaxPages +.. property_link:: kOfxParamHostPropMaxPages .. doxygendefine:: kOfxParamHostPropMaxParameters +.. property_link:: kOfxParamHostPropMaxParameters .. doxygendefine:: kOfxParamHostPropPageRowColumnCount +.. property_link:: kOfxParamHostPropPageRowColumnCount .. doxygendefine:: kOfxParamHostPropSupportsBooleanAnimation +.. property_link:: kOfxParamHostPropSupportsBooleanAnimation .. doxygendefine:: kOfxParamHostPropSupportsChoiceAnimation +.. property_link:: kOfxParamHostPropSupportsChoiceAnimation .. doxygendefine:: kOfxParamHostPropSupportsCustomAnimation +.. property_link:: kOfxParamHostPropSupportsCustomAnimation .. doxygendefine:: kOfxParamHostPropSupportsCustomInteract +.. property_link:: kOfxParamHostPropSupportsCustomInteract .. doxygendefine:: kOfxParamHostPropSupportsParametricAnimation +.. property_link:: kOfxParamHostPropSupportsParametricAnimation .. doxygendefine:: kOfxParamHostPropSupportsStrChoice +.. property_link:: kOfxParamHostPropSupportsStrChoice .. doxygendefine:: kOfxParamHostPropSupportsStrChoiceAnimation +.. property_link:: kOfxParamHostPropSupportsStrChoiceAnimation .. doxygendefine:: kOfxParamHostPropSupportsStringAnimation +.. property_link:: kOfxParamHostPropSupportsStringAnimation .. doxygendefine:: kOfxParamPropAnimates +.. property_link:: kOfxParamPropAnimates .. doxygendefine:: kOfxParamPropCacheInvalidation +.. property_link:: kOfxParamPropCacheInvalidation .. doxygendefine:: kOfxParamPropCanUndo +.. property_link:: kOfxParamPropCanUndo .. doxygendefine:: kOfxParamPropChoiceEnum +.. property_link:: kOfxParamPropChoiceEnum .. doxygendefine:: kOfxParamPropChoiceOption +.. property_link:: kOfxParamPropChoiceOption .. doxygendefine:: kOfxParamPropChoiceOrder +.. property_link:: kOfxParamPropChoiceOrder .. doxygendefine:: kOfxParamPropCustomInterpCallbackV1 +.. property_link:: kOfxParamPropCustomInterpCallbackV1 .. doxygendefine:: kOfxParamPropCustomValue +.. property_link:: kOfxParamPropCustomValue .. doxygendefine:: kOfxParamPropDataPtr +.. property_link:: kOfxParamPropDataPtr .. doxygendefine:: kOfxParamPropDefault +.. property_link:: kOfxParamPropDefault .. doxygendefine:: kOfxParamPropDefaultCoordinateSystem +.. property_link:: kOfxParamPropDefaultCoordinateSystem .. doxygendefine:: kOfxParamPropDigits +.. property_link:: kOfxParamPropDigits .. doxygendefine:: kOfxParamPropDimensionLabel +.. property_link:: kOfxParamPropDimensionLabel .. doxygendefine:: kOfxParamPropDisplayMax +.. property_link:: kOfxParamPropDisplayMax .. doxygendefine:: kOfxParamPropDisplayMin +.. property_link:: kOfxParamPropDisplayMin .. doxygendefine:: kOfxParamPropDoubleType +.. property_link:: kOfxParamPropDoubleType .. doxygendefine:: kOfxParamPropEnabled +.. property_link:: kOfxParamPropEnabled .. doxygendefine:: kOfxParamPropEvaluateOnChange +.. property_link:: kOfxParamPropEvaluateOnChange .. doxygendefine:: kOfxParamPropGroupOpen +.. property_link:: kOfxParamPropGroupOpen .. doxygendefine:: kOfxParamPropHasHostOverlayHandle +.. property_link:: kOfxParamPropHasHostOverlayHandle .. doxygendefine:: kOfxParamPropHint +.. property_link:: kOfxParamPropHint .. doxygendefine:: kOfxParamPropIncrement +.. property_link:: kOfxParamPropIncrement .. doxygendefine:: kOfxParamPropInteractMinimumSize +.. property_link:: kOfxParamPropInteractMinimumSize .. doxygendefine:: kOfxParamPropInteractPreferedSize +.. property_link:: kOfxParamPropInteractPreferedSize .. doxygendefine:: kOfxParamPropInteractSize +.. property_link:: kOfxParamPropInteractSize .. doxygendefine:: kOfxParamPropInteractSizeAspect +.. property_link:: kOfxParamPropInteractSizeAspect .. doxygendefine:: kOfxParamPropInteractV1 +.. property_link:: kOfxParamPropInteractV1 .. doxygendefine:: kOfxParamPropInterpolationAmount +.. property_link:: kOfxParamPropInterpolationAmount .. doxygendefine:: kOfxParamPropInterpolationTime +.. property_link:: kOfxParamPropInterpolationTime .. doxygendefine:: kOfxParamPropIsAnimating +.. property_link:: kOfxParamPropIsAnimating .. doxygendefine:: kOfxParamPropIsAutoKeying +.. property_link:: kOfxParamPropIsAutoKeying .. doxygendefine:: kOfxParamPropMax +.. property_link:: kOfxParamPropMax .. doxygendefine:: kOfxParamPropMin +.. property_link:: kOfxParamPropMin .. doxygendefine:: kOfxParamPropPageChild +.. property_link:: kOfxParamPropPageChild .. doxygendefine:: kOfxParamPropParametricDimension +.. property_link:: kOfxParamPropParametricDimension .. doxygendefine:: kOfxParamPropParametricInteractBackground +.. property_link:: kOfxParamPropParametricInteractBackground .. doxygendefine:: kOfxParamPropParametricRange +.. property_link:: kOfxParamPropParametricRange .. doxygendefine:: kOfxParamPropParametricUIColour +.. property_link:: kOfxParamPropParametricUIColour .. doxygendefine:: kOfxParamPropParent +.. property_link:: kOfxParamPropParent .. doxygendefine:: kOfxParamPropPersistant +.. property_link:: kOfxParamPropPersistant .. doxygendefine:: kOfxParamPropPluginMayWrite +.. property_link:: kOfxParamPropPluginMayWrite .. doxygendefine:: kOfxParamPropScriptName +.. property_link:: kOfxParamPropScriptName .. doxygendefine:: kOfxParamPropSecret +.. property_link:: kOfxParamPropSecret .. doxygendefine:: kOfxParamPropShowTimeMarker +.. property_link:: kOfxParamPropShowTimeMarker .. doxygendefine:: kOfxParamPropStringFilePathExists +.. property_link:: kOfxParamPropStringFilePathExists .. doxygendefine:: kOfxParamPropStringMode +.. property_link:: kOfxParamPropStringMode .. doxygendefine:: kOfxParamPropType +.. property_link:: kOfxParamPropType .. doxygendefine:: kOfxParamPropUseHostOverlayHandle +.. property_link:: kOfxParamPropUseHostOverlayHandle .. doxygendefine:: kOfxPluginPropFilePath +.. property_link:: kOfxPluginPropFilePath .. doxygendefine:: kOfxPluginPropParamPageOrder +.. property_link:: kOfxPluginPropParamPageOrder .. doxygendefine:: kOfxPropAPIVersion +.. property_link:: kOfxPropAPIVersion .. doxygendefine:: kOfxPropChangeReason +.. property_link:: kOfxPropChangeReason .. doxygendefine:: kOfxPropEffectInstance +.. property_link:: kOfxPropEffectInstance .. doxygendefine:: kOfxPropHostOSHandle +.. property_link:: kOfxPropHostOSHandle .. doxygendefine:: kOfxPropIcon +.. property_link:: kOfxPropIcon .. doxygendefine:: kOfxPropInstanceData +.. property_link:: kOfxPropInstanceData .. doxygendefine:: kOfxPropIsInteractive +.. property_link:: kOfxPropIsInteractive .. doxygendefine:: kOfxPropKeyString +.. property_link:: kOfxPropKeyString .. doxygendefine:: kOfxPropKeySym +.. property_link:: kOfxPropKeySym .. doxygendefine:: kOfxPropLabel +.. property_link:: kOfxPropLabel .. doxygendefine:: kOfxPropLongLabel +.. property_link:: kOfxPropLongLabel .. doxygendefine:: kOfxPropName +.. property_link:: kOfxPropName .. doxygendefine:: kOfxPropParamSetNeedsSyncing +.. property_link:: kOfxPropParamSetNeedsSyncing .. doxygendefine:: kOfxPropPluginDescription +.. property_link:: kOfxPropPluginDescription .. doxygendefine:: kOfxPropShortLabel +.. property_link:: kOfxPropShortLabel .. doxygendefine:: kOfxPropTime +.. property_link:: kOfxPropTime .. doxygendefine:: kOfxPropType +.. property_link:: kOfxPropType .. doxygendefine:: kOfxPropVersion +.. property_link:: kOfxPropVersion .. doxygendefine:: kOfxPropVersionLabel +.. property_link:: kOfxPropVersionLabel diff --git a/Documentation/sources/_ext/.gitignore b/Documentation/sources/_ext/.gitignore new file mode 100644 index 00000000..bee8a64b --- /dev/null +++ b/Documentation/sources/_ext/.gitignore @@ -0,0 +1 @@ +__pycache__ diff --git a/Documentation/sources/_ext/property_links.py b/Documentation/sources/_ext/property_links.py new file mode 100644 index 00000000..7ff09ffd --- /dev/null +++ b/Documentation/sources/_ext/property_links.py @@ -0,0 +1,44 @@ +""" +Sphinx extension to add links from property documentation to structured documentation. +""" + +from docutils import nodes +from docutils.parsers.rst import Directive, directives +from sphinx.util.docutils import SphinxDirective + +class PropertyLinkDirective(SphinxDirective): + """ + Custom directive to add links to structured documentation. + """ + required_arguments = 1 + optional_arguments = 0 + has_content = False + + def run(self): + prop_name = self.arguments[0] + # Remove the 'k' prefix for the reference + if prop_name.startswith('k'): + ref_name = prop_name[1:] + else: + ref_name = prop_name + + # Create a paragraph node with the link + para = nodes.paragraph() + para['classes'].append('property-link') + + # Create a reference node + reference = nodes.reference('', f'See structured property reference for {prop_name}') + # Convert to lowercase for the actual HTML anchor + reference['refuri'] = f'ofxPropertiesReferenceGenerated.html#{ref_name.lower()}' + para += reference + + return [para] + +def setup(app): + app.add_directive('property_link', PropertyLinkDirective) + + return { + 'version': '0.1', + 'parallel_read_safe': True, + 'parallel_write_safe': True, + } diff --git a/Documentation/sources/_static/css/custom.css b/Documentation/sources/_static/css/custom.css index 33a5b6db..66e847f0 100644 --- a/Documentation/sources/_static/css/custom.css +++ b/Documentation/sources/_static/css/custom.css @@ -5,3 +5,20 @@ https://stackoverflow.com/questions/59215996/how-to-add-a-logo-to-my-readthedocs .wy-side-nav-search .wy-dropdown > a img.logo, .wy-side-nav-search > a img.logo { width: 275px; } + +/* +* Customizations for property documentation +*/ +/* Style for our custom property links */ +.property-link { + margin-top: -10px !important; + margin-bottom: 15px !important; + padding: 0px 0px 3px 22px !important; + font-size: 0.9em !important; + display: inline-block !important; +} + +/* Close up space between .cpp.macro and .property-link */ +dl.cpp.macro:has(+ p.property-link) { + margin-bottom: 0 !important; +} diff --git a/Documentation/sources/conf.py b/Documentation/sources/conf.py index 93cce72c..a1f9b205 100755 --- a/Documentation/sources/conf.py +++ b/Documentation/sources/conf.py @@ -9,13 +9,24 @@ # SPDX-License-Identifier: BSD-3-Clause -import subprocess, os, shutil +import subprocess, os, shutil, re, sys +from docutils import nodes +from docutils.parsers.rst import directives +from sphinx.directives import ObjectDescription +from sphinx.util.docutils import SphinxDirective + +# Add the _ext directory to Python path +sys.path.append(os.path.abspath('_ext')) + project = 'OpenFX' copyright = '''2025, OpenFX a Series of LF Projects, LLC. For web site terms of use, trademark policy and other project policies please see https://lfprojects.org/''' author = 'Contributors to the OpenFX Project' release = '1.5' +# We're now using a custom extension for property links +# Directive definitions have been moved to _ext/property_links.py + read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True' # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration @@ -53,7 +64,7 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = [ "breathe", "sphinx_rtd_theme" ] +extensions = [ "breathe", "sphinx_rtd_theme", "property_links" ] # breathe is an rst/sphinx extension to read and render doxygen xml output breathe_projects = { diff --git a/HostSupport/examples/hostDemoClipInstance.cpp b/HostSupport/examples/hostDemoClipInstance.cpp index c067816b..2b17c66d 100644 --- a/HostSupport/examples/hostDemoClipInstance.cpp +++ b/HostSupport/examples/hostDemoClipInstance.cpp @@ -301,7 +301,7 @@ namespace MyHost { // Continuous Samples - // // 0 if the images can only be sampled at discrete times (eg: the clip is a sequence of frames), - // 1 if the images can only be sampled continuously (eg: the clip is in fact an animating roto spline and can be rendered anywhen). + // 1 if the images can only be sampled continuously (eg: the clip is in fact an animating roto spline and can be rendered anywhen). bool MyClipInstance::getContinuousSamples() const { return false; diff --git a/HostSupport/examples/hostDemoClipInstance.h b/HostSupport/examples/hostDemoClipInstance.h index 4fa244e3..4b6733c5 100755 --- a/HostSupport/examples/hostDemoClipInstance.h +++ b/HostSupport/examples/hostDemoClipInstance.h @@ -99,7 +99,7 @@ namespace MyHost { // Continuous Samples - // // 0 if the images can only be sampled at discrete times (eg: the clip is a sequence of frames), - // 1 if the images can only be sampled continuously (eg: the clip is in fact an animating roto spline and can be rendered anywhen). + // 1 if the images can only be sampled continuously (eg: the clip is in fact an animating roto spline and can be rendered anywhen). virtual bool getContinuousSamples() const; /// override this to fill in the image at the given time. diff --git a/HostSupport/include/ofxhClip.h b/HostSupport/include/ofxhClip.h index fdc63cee..94058df9 100755 --- a/HostSupport/include/ofxhClip.h +++ b/HostSupport/include/ofxhClip.h @@ -246,7 +246,7 @@ namespace OFX { // Continuous Samples - // // 0 if the images can only be sampled at discrete times (eg: the clip is a sequence of frames), - // 1 if the images can only be sampled continuously (eg: the clip is in fact an animating roto spline and can be rendered anywhen). + // 1 if the images can only be sampled continuously (eg: the clip is in fact an animating roto spline and can be rendered anywhen). virtual bool getContinuousSamples() const = 0; /// override this to fill in the image at the given time. diff --git a/include/ofxCore.h b/include/ofxCore.h index 0fff10bd..9454eb8e 100644 --- a/include/ofxCore.h +++ b/include/ofxCore.h @@ -616,9 +616,9 @@ If this is not present, it is safe to assume that the version of the API is "1.0 - Property Set - effect instance (read only) - Valid Values - 0 or 1 -If false the effect currently has no interface, however this may be because the effect is loaded in a background render host, or it may be loaded on an interactive host that has not yet opened an editor for the effect. +If false, the effect currently has no interface. This may be because the effect is loaded in a background render host, or it may be loaded on an interactive host that has not yet opened an editor for the effect. -The output of an effect should only ever depend on the state of its parameters, not on the interactive flag. The interactive flag is more a courtesy flag to let a plugin know that it has an interface. If a plugin wants to have its behaviour dependent on the interactive flag, it can always make a secret parameter which shadows the state if the flag. +The output of an effect should only ever depend on the state of its parameters, not on the interactive flag. The interactive flag is more a courtesy flag to let a plugin know that it has an interface. If a plugin wants to have its behaviour depend on the interactive flag, it should make a secret parameter which shadows the state of the flag. */ #define kOfxPropIsInteractive "OfxPropIsInteractive" diff --git a/include/ofxImageEffect.h b/include/ofxImageEffect.h index 7dd644d2..7ef96159 100644 --- a/include/ofxImageEffect.h +++ b/include/ofxImageEffect.h @@ -931,7 +931,7 @@ then the plugin can detect this via an identifier change and re-evaluate the cac - Default - 0 as an out argument to the ::kOfxImageEffectActionGetClipPreferences action - Valid Values - This must be one of... - 0 if the images can only be sampled at discrete times (eg: the clip is a sequence of frames), - - 1 if the images can only be sampled continuously (eg: the clip is in fact an animating roto spline and can be rendered anywhen). + - 1 if the images can only be sampled continuously (eg: the clip is in fact an animating roto spline and can be rendered at any time). If this is set to true, then the frame rate of a clip is effectively infinite, so to stop arithmetic errors the frame rate should then be set to 0. From 1c01efc1a4ede910ccf9da8a44bfc5bd05f3e994 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Sun, 27 Apr 2025 17:51:07 -0400 Subject: [PATCH 26/33] Try to fix CI build by allowing older conan version (>=2.0.16) Signed-off-by: Gary Oberbrunner --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 56a33ed5..81265a01 100644 --- a/conanfile.py +++ b/conanfile.py @@ -3,7 +3,7 @@ from conan.tools.files import copy, collect_libs import os.path -required_conan_version = ">=2.12.0" +required_conan_version = ">=2.0.16" class openfx(ConanFile): name = "openfx" From 5cab34abfa78b04a8e9cd0553a01b2d828601a7d Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 6 May 2025 15:41:03 -0400 Subject: [PATCH 27/33] Rebase to main & include new prop PropNoSpatialAwareness - Added to ofx-props.yml - Ran gen-props.py script to update property set headers Signed-off-by: Gary Oberbrunner --- include/ofx-props.yml | 7 + openfx-cpp/include/openfx/ofxPropsBySet.h | 5 +- openfx-cpp/include/openfx/ofxPropsMetadata.h | 281 ++++++++++--------- scripts/gen-props.py | 2 +- 4 files changed, 156 insertions(+), 139 deletions(-) diff --git a/include/ofx-props.yml b/include/ofx-props.yml index 3fd78042..625bd42d 100644 --- a/include/ofx-props.yml +++ b/include/ofx-props.yml @@ -88,6 +88,7 @@ propertySets: - OfxImageEffectPluginPropOverlayInteractV2 - OfxImageEffectPropColourManagementAvailableConfigs - OfxImageEffectPropColourManagementStyle + - OfxImageEffectPropNoSpatialAwareness EffectInstance: write: host props: @@ -440,6 +441,7 @@ Actions: - OfxImageEffectPropOpenGLEnabled - OfxImageEffectPropOpenGLTextureIndex - OfxImageEffectPropOpenGLTextureTarget + - OfxImageEffectPropNoSpatialAwareness OfxImageEffectActionBeginSequenceRender: inArgs: - OfxImageEffectPropFrameRange @@ -464,6 +466,7 @@ Actions: - OfxImageEffectPropOpenGLTextureIndex - OfxImageEffectPropOpenGLTextureTarget - OfxImageEffectPropInteractiveRenderStatus + - OfxImageEffectPropNoSpatialAwareness outArgs: OfxImageEffectActionEndSequenceRender: inArgs: @@ -1339,3 +1342,7 @@ properties: OfxPropParamSetNeedsSyncing: type: bool dimension: 1 + OfxImageEffectPropNoSpatialAwareness: + dimension: 1 + type: enum + values: ['false', 'true'] diff --git a/openfx-cpp/include/openfx/ofxPropsBySet.h b/openfx-cpp/include/openfx/ofxPropsBySet.h index 2b14174d..befdc1c9 100644 --- a/openfx-cpp/include/openfx/ofxPropsBySet.h +++ b/openfx-cpp/include/openfx/ofxPropsBySet.h @@ -103,7 +103,8 @@ static inline const std::map> prop_sets { { "OfxOpenGLPropPixelDepth", prop_defs[PropId::OfxOpenGLPropPixelDepth], false, true, false }, { "OfxImageEffectPluginPropOverlayInteractV2", prop_defs[PropId::OfxImageEffectPluginPropOverlayInteractV2], false, true, false }, { "OfxImageEffectPropColourManagementAvailableConfigs", prop_defs[PropId::OfxImageEffectPropColourManagementAvailableConfigs], false, true, false }, - { "OfxImageEffectPropColourManagementStyle", prop_defs[PropId::OfxImageEffectPropColourManagementStyle], false, true, false } } }, + { "OfxImageEffectPropColourManagementStyle", prop_defs[PropId::OfxImageEffectPropColourManagementStyle], false, true, false }, + { "OfxImageEffectPropNoSpatialAwareness", prop_defs[PropId::OfxImageEffectPropNoSpatialAwareness], false, true, false } } }, // EffectInstance { "EffectInstance", { { "OfxPropType", prop_defs[PropId::OfxPropType], true, false, false }, @@ -668,6 +669,7 @@ static inline const std::map, std::vector, std::vector prop_defs = { {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropMetalRenderSupported.data(), prop_enum_values::OfxImageEffectPropMetalRenderSupported.size()}, { "OfxImageEffectPropMultipleClipDepths", PropId::OfxImageEffectPropMultipleClipDepths, {PropType::Bool}, 1, 1, nullptr, 0}, +{ "OfxImageEffectPropNoSpatialAwareness", PropId::OfxImageEffectPropNoSpatialAwareness, + {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropNoSpatialAwareness.data(), prop_enum_values::OfxImageEffectPropNoSpatialAwareness.size()}, { "OfxImageEffectPropOCIOConfig", PropId::OfxImageEffectPropOCIOConfig, {PropType::String}, 1, 1, nullptr, 0}, { "OfxImageEffectPropOCIODisplay", PropId::OfxImageEffectPropOCIODisplay, @@ -727,6 +732,7 @@ DEFINE_PROP_TRAITS(OfxImageEffectPropMetalCommandQueue, void *, false); DEFINE_PROP_TRAITS(OfxImageEffectPropMetalEnabled, bool, false); DEFINE_PROP_TRAITS(OfxImageEffectPropMetalRenderSupported, const char *, false); DEFINE_PROP_TRAITS(OfxImageEffectPropMultipleClipDepths, bool, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropNoSpatialAwareness, const char *, false); DEFINE_PROP_TRAITS(OfxImageEffectPropOCIOConfig, const char *, false); DEFINE_PROP_TRAITS(OfxImageEffectPropOCIODisplay, const char *, false); DEFINE_PROP_TRAITS(OfxImageEffectPropOCIOView, const char *, false); @@ -912,6 +918,7 @@ static_assert(string_view("OfxImageEffectPropMetalCommandQueue") == string_view( static_assert(string_view("OfxImageEffectPropMetalEnabled") == string_view(kOfxImageEffectPropMetalEnabled)); static_assert(string_view("OfxImageEffectPropMetalRenderSupported") == string_view(kOfxImageEffectPropMetalRenderSupported)); static_assert(string_view("OfxImageEffectPropMultipleClipDepths") == string_view(kOfxImageEffectPropSupportsMultipleClipDepths)); +static_assert(string_view("OfxImageEffectPropNoSpatialAwareness") == string_view(kOfxImageEffectPropNoSpatialAwareness)); static_assert(string_view("OfxImageEffectPropOCIOConfig") == string_view(kOfxImageEffectPropOCIOConfig)); static_assert(string_view("OfxImageEffectPropOCIODisplay") == string_view(kOfxImageEffectPropOCIODisplay)); static_assert(string_view("OfxImageEffectPropOCIOView") == string_view(kOfxImageEffectPropOCIOView)); diff --git a/scripts/gen-props.py b/scripts/gen-props.py index f66a29a6..5c995e05 100644 --- a/scripts/gen-props.py +++ b/scripts/gen-props.py @@ -447,7 +447,7 @@ def gen_props_by_set(props_by_set, props_by_action, outfile_path: Path): #include #include #include -#include +#include "ofxPropsMetadata.h" // #include namespace openfx { From 1fe96c87b17efe0316400cbd945929e0143bb9bf Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Mon, 13 Oct 2025 18:22:00 -0400 Subject: [PATCH 28/33] Add ofxSpan.h for spans, using tcb-span or std::span Switch to using spans in a few places where it makes sense, mostly for property type arrays. Signed-off-by: Gary Oberbrunner --- CMakeLists.txt | 1 + Examples/CMakeLists.txt | 1 + Examples/TestProps/testProperties.cpp | 25 +- conanfile.py | 1 + openfx-cpp/include/openfx/ofxPropsAccess.h | 16 +- openfx-cpp/include/openfx/ofxPropsMetadata.h | 560 ++++++++++++------- openfx-cpp/include/openfx/ofxSpan.h | 138 +++++ scripts/gen-props.py | 41 +- 8 files changed, 570 insertions(+), 213 deletions(-) create mode 100644 openfx-cpp/include/openfx/ofxSpan.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 9769abd9..91bbb6e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,6 +65,7 @@ find_package(EXPAT) find_package(opengl_system REQUIRED) find_package(cimg REQUIRED) find_package(spdlog REQUIRED) +find_package(tcb-span REQUIRED) # Macros include(OpenFX) diff --git a/Examples/CMakeLists.txt b/Examples/CMakeLists.txt index 7c8841cd..7f21ae77 100644 --- a/Examples/CMakeLists.txt +++ b/Examples/CMakeLists.txt @@ -34,4 +34,5 @@ target_link_libraries(example-Custom PRIVATE opengl::opengl) target_link_libraries(example-ColourSpace PRIVATE cimg::cimg) target_link_libraries(example-ColourSpace PRIVATE spdlog::spdlog_header_only) target_link_libraries(example-TestProps PRIVATE spdlog::spdlog_header_only) +target_link_libraries(example-TestProps PRIVATE tcb-span::tcb-span) target_include_directories(example-TestProps PUBLIC ${OFX_CPP_BINDINGS_HEADER_DIR}) diff --git a/Examples/TestProps/testProperties.cpp b/Examples/TestProps/testProperties.cpp index 86af4790..695ce81b 100644 --- a/Examples/TestProps/testProperties.cpp +++ b/Examples/TestProps/testProperties.cpp @@ -125,7 +125,30 @@ void readProperty(PropertyAccessor &accessor, const PropDef &def, values.push_back(accessor.getRaw(def.name, i)); } else if (primaryType == PropType::String || primaryType == PropType::Enum) { - values.push_back(accessor.getRaw(def.name, i)); + const char *strValue = accessor.getRaw(def.name, i); + values.push_back(strValue); + + // Validate enum values against spec + if (primaryType == PropType::Enum && !def.enumValues.empty()) { + bool valid = false; + for (auto validValue : def.enumValues) { + if (std::strcmp(strValue, validValue) == 0) { + valid = true; + break; + } + } + if (!valid) { + spdlog::warn("Property '{}' has invalid enum value '{}' (not in spec)", + def.name, strValue); + // Log valid values for debugging + std::string validValues; + for (size_t j = 0; j < def.enumValues.size(); ++j) { + if (j > 0) validValues += ", "; + validValues += def.enumValues[j]; + } + spdlog::warn(" Valid values are: {}", validValues); + } + } } else if (primaryType == PropType::Pointer) { values.push_back(accessor.getRaw(def.name, i)); } diff --git a/conanfile.py b/conanfile.py index 81265a01..1fc3dc75 100644 --- a/conanfile.py +++ b/conanfile.py @@ -44,6 +44,7 @@ def requirements(self): self.requires("expat/2.7.1") # for HostSupport self.requires("cimg/3.3.2") # to draw text into images self.requires("spdlog/1.13.0") # for logging + self.requires("tcb-span/cci.20220616") # for openfx-cpp span support (C++17) def layout(self): cmake_layout(self) diff --git a/openfx-cpp/include/openfx/ofxPropsAccess.h b/openfx-cpp/include/openfx/ofxPropsAccess.h index 037aefb6..63b5eb95 100644 --- a/openfx-cpp/include/openfx/ofxPropsAccess.h +++ b/openfx-cpp/include/openfx/ofxPropsAccess.h @@ -186,16 +186,15 @@ struct PropTypeToNative { template struct EnumValue { static constexpr const char *get(size_t index) { - static_assert(index < properties::PropTraits::def.enumValuesCount, + static_assert(index < properties::PropTraits::def.enumValues.size(), "Property enum index out of range"); - return properties::PropTraits::enumValues[index]; + return properties::PropTraits::def.enumValues[index]; } - static constexpr size_t size() { return properties::PropTraits::enumValues.size(); } + static constexpr size_t size() { return properties::PropTraits::def.enumValues.size(); } static constexpr bool isValid(const char *value) { - for (int i = 0; i < properties::PropTraits::def.enumValuesCount; i++) { - auto val = properties::PropTraits::def.enumValues[i]; + for (auto val : properties::PropTraits::def.enumValues) { if (std::strcmp(val, value) == 0) return true; } @@ -324,9 +323,7 @@ class PropertyAccessor { // Check if T is compatible with any of the supported PropTypes constexpr bool isValidType = [&]() { - constexpr auto types = - std::array(Traits::def.supportedTypes, Traits::def.supportedTypesCount); - for (const auto &type : types) { + for (const auto &type : Traits::def.supportedTypes) { if constexpr (std::is_same_v || std::is_same_v) { if (type == PropType::Int || type == PropType::Bool || type == PropType::Enum) return true; @@ -422,8 +419,7 @@ class PropertyAccessor { // Check if T is compatible with any of the supported PropTypes constexpr bool isValidType = [&]() { - for (int i = 0; i < Traits::def.supportedTypesCount; i++) { - auto type = Traits::def.supportedTypes[i]; + for (const auto &type : Traits::def.supportedTypes) { if constexpr (std::is_same_v || std::is_same_v) { if (type == PropType::Int || type == PropType::Bool) return true; diff --git a/openfx-cpp/include/openfx/ofxPropsMetadata.h b/openfx-cpp/include/openfx/ofxPropsMetadata.h index c8dc1409..ac520c6a 100644 --- a/openfx-cpp/include/openfx/ofxPropsMetadata.h +++ b/openfx-cpp/include/openfx/ofxPropsMetadata.h @@ -15,6 +15,8 @@ #include #include +#include "ofxSpan.h" + namespace openfx { enum class PropType { Int, @@ -278,15 +280,197 @@ constexpr std::array OfxPropChangeReason = } // namespace prop_enum_values -#define MAX_PROP_TYPES 4 +// Property type arrays for spans (generated before PropDef) +namespace prop_type_arrays { +static constexpr PropType OfxImageClipPropColourspace_types[] = {PropType::String}; +static constexpr PropType OfxImageClipPropConnected_types[] = {PropType::Bool}; +static constexpr PropType OfxImageClipPropContinuousSamples_types[] = {PropType::Bool}; +static constexpr PropType OfxImageClipPropFieldExtraction_types[] = {PropType::Enum}; +static constexpr PropType OfxImageClipPropFieldOrder_types[] = {PropType::Enum}; +static constexpr PropType OfxImageClipPropIsMask_types[] = {PropType::Bool}; +static constexpr PropType OfxImageClipPropOptional_types[] = {PropType::Bool}; +static constexpr PropType OfxImageClipPropPreferredColourspaces_types[] = {PropType::String}; +static constexpr PropType OfxImageClipPropUnmappedComponents_types[] = {PropType::Enum}; +static constexpr PropType OfxImageClipPropUnmappedPixelDepth_types[] = {PropType::Enum}; +static constexpr PropType OfxImageEffectFrameVarying_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectHostPropIsBackground_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectHostPropNativeOrigin_types[] = {PropType::Enum}; +static constexpr PropType OfxImageEffectInstancePropEffectDuration_types[] = {PropType::Double}; +static constexpr PropType OfxImageEffectInstancePropSequentialRender_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectPluginPropFieldRenderTwiceAlways_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectPluginPropGrouping_types[] = {PropType::String}; +static constexpr PropType OfxImageEffectPluginPropHostFrameThreading_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectPluginPropOverlayInteractV1_types[] = {PropType::Pointer}; +static constexpr PropType OfxImageEffectPluginPropOverlayInteractV2_types[] = {PropType::Pointer}; +static constexpr PropType OfxImageEffectPluginPropSingleInstance_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectPluginRenderThreadSafety_types[] = {PropType::Enum}; +static constexpr PropType OfxImageEffectPropClipPreferencesSlaveParam_types[] = {PropType::String}; +static constexpr PropType OfxImageEffectPropColourManagementAvailableConfigs_types[] = {PropType::String}; +static constexpr PropType OfxImageEffectPropColourManagementConfig_types[] = {PropType::String}; +static constexpr PropType OfxImageEffectPropColourManagementStyle_types[] = {PropType::Enum}; +static constexpr PropType OfxImageEffectPropComponents_types[] = {PropType::Enum}; +static constexpr PropType OfxImageEffectPropContext_types[] = {PropType::Enum}; +static constexpr PropType OfxImageEffectPropCudaEnabled_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectPropCudaRenderSupported_types[] = {PropType::Enum}; +static constexpr PropType OfxImageEffectPropCudaStream_types[] = {PropType::Pointer}; +static constexpr PropType OfxImageEffectPropCudaStreamSupported_types[] = {PropType::Enum}; +static constexpr PropType OfxImageEffectPropDisplayColourspace_types[] = {PropType::String}; +static constexpr PropType OfxImageEffectPropFieldToRender_types[] = {PropType::Enum}; +static constexpr PropType OfxImageEffectPropFrameRange_types[] = {PropType::Double}; +static constexpr PropType OfxImageEffectPropFrameRate_types[] = {PropType::Double}; +static constexpr PropType OfxImageEffectPropFrameStep_types[] = {PropType::Double}; +static constexpr PropType OfxImageEffectPropInAnalysis_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectPropInteractiveRenderStatus_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectPropMetalCommandQueue_types[] = {PropType::Pointer}; +static constexpr PropType OfxImageEffectPropMetalEnabled_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectPropMetalRenderSupported_types[] = {PropType::Enum}; +static constexpr PropType OfxImageEffectPropMultipleClipDepths_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectPropNoSpatialAwareness_types[] = {PropType::Enum}; +static constexpr PropType OfxImageEffectPropOCIOConfig_types[] = {PropType::String}; +static constexpr PropType OfxImageEffectPropOCIODisplay_types[] = {PropType::String}; +static constexpr PropType OfxImageEffectPropOCIOView_types[] = {PropType::String}; +static constexpr PropType OfxImageEffectPropOpenCLCommandQueue_types[] = {PropType::Pointer}; +static constexpr PropType OfxImageEffectPropOpenCLEnabled_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectPropOpenCLImage_types[] = {PropType::Pointer}; +static constexpr PropType OfxImageEffectPropOpenCLRenderSupported_types[] = {PropType::Enum}; +static constexpr PropType OfxImageEffectPropOpenCLSupported_types[] = {PropType::Enum}; +static constexpr PropType OfxImageEffectPropOpenGLEnabled_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectPropOpenGLRenderSupported_types[] = {PropType::Enum}; +static constexpr PropType OfxImageEffectPropOpenGLTextureIndex_types[] = {PropType::Int}; +static constexpr PropType OfxImageEffectPropOpenGLTextureTarget_types[] = {PropType::Int}; +static constexpr PropType OfxImageEffectPropPixelAspectRatio_types[] = {PropType::Double}; +static constexpr PropType OfxImageEffectPropPixelDepth_types[] = {PropType::Enum}; +static constexpr PropType OfxImageEffectPropPluginHandle_types[] = {PropType::Pointer}; +static constexpr PropType OfxImageEffectPropPreMultiplication_types[] = {PropType::Enum}; +static constexpr PropType OfxImageEffectPropProjectExtent_types[] = {PropType::Double}; +static constexpr PropType OfxImageEffectPropProjectOffset_types[] = {PropType::Double}; +static constexpr PropType OfxImageEffectPropProjectSize_types[] = {PropType::Double}; +static constexpr PropType OfxImageEffectPropRegionOfDefinition_types[] = {PropType::Double}; +static constexpr PropType OfxImageEffectPropRegionOfInterest_types[] = {PropType::Double}; +static constexpr PropType OfxImageEffectPropRenderQualityDraft_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectPropRenderScale_types[] = {PropType::Double}; +static constexpr PropType OfxImageEffectPropRenderWindow_types[] = {PropType::Int}; +static constexpr PropType OfxImageEffectPropSequentialRenderStatus_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectPropSetableFielding_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectPropSetableFrameRate_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectPropSupportedComponents_types[] = {PropType::Enum}; +static constexpr PropType OfxImageEffectPropSupportedContexts_types[] = {PropType::Enum}; +static constexpr PropType OfxImageEffectPropSupportedPixelDepths_types[] = {PropType::Enum}; +static constexpr PropType OfxImageEffectPropSupportsMultiResolution_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectPropSupportsMultipleClipPARs_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectPropSupportsOverlays_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectPropSupportsTiles_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectPropTemporalClipAccess_types[] = {PropType::Bool}; +static constexpr PropType OfxImageEffectPropUnmappedFrameRange_types[] = {PropType::Double}; +static constexpr PropType OfxImageEffectPropUnmappedFrameRate_types[] = {PropType::Double}; +static constexpr PropType OfxImagePropBounds_types[] = {PropType::Int}; +static constexpr PropType OfxImagePropData_types[] = {PropType::Pointer}; +static constexpr PropType OfxImagePropField_types[] = {PropType::Enum}; +static constexpr PropType OfxImagePropPixelAspectRatio_types[] = {PropType::Double}; +static constexpr PropType OfxImagePropRegionOfDefinition_types[] = {PropType::Int}; +static constexpr PropType OfxImagePropRowBytes_types[] = {PropType::Int}; +static constexpr PropType OfxImagePropUniqueIdentifier_types[] = {PropType::String}; +static constexpr PropType OfxInteractPropBackgroundColour_types[] = {PropType::Double}; +static constexpr PropType OfxInteractPropBitDepth_types[] = {PropType::Int}; +static constexpr PropType OfxInteractPropDrawContext_types[] = {PropType::Pointer}; +static constexpr PropType OfxInteractPropHasAlpha_types[] = {PropType::Bool}; +static constexpr PropType OfxInteractPropPenPosition_types[] = {PropType::Double}; +static constexpr PropType OfxInteractPropPenPressure_types[] = {PropType::Double}; +static constexpr PropType OfxInteractPropPenViewportPosition_types[] = {PropType::Int}; +static constexpr PropType OfxInteractPropPixelScale_types[] = {PropType::Double}; +static constexpr PropType OfxInteractPropSlaveToParam_types[] = {PropType::String}; +static constexpr PropType OfxInteractPropSuggestedColour_types[] = {PropType::Double}; +static constexpr PropType OfxInteractPropViewport_types[] = {PropType::Int}; +static constexpr PropType OfxOpenGLPropPixelDepth_types[] = {PropType::Enum}; +static constexpr PropType OfxParamHostPropMaxPages_types[] = {PropType::Int}; +static constexpr PropType OfxParamHostPropMaxParameters_types[] = {PropType::Int}; +static constexpr PropType OfxParamHostPropPageRowColumnCount_types[] = {PropType::Int}; +static constexpr PropType OfxParamHostPropSupportsBooleanAnimation_types[] = {PropType::Bool}; +static constexpr PropType OfxParamHostPropSupportsChoiceAnimation_types[] = {PropType::Bool}; +static constexpr PropType OfxParamHostPropSupportsCustomAnimation_types[] = {PropType::Bool}; +static constexpr PropType OfxParamHostPropSupportsCustomInteract_types[] = {PropType::Bool}; +static constexpr PropType OfxParamHostPropSupportsParametricAnimation_types[] = {PropType::Bool}; +static constexpr PropType OfxParamHostPropSupportsStrChoice_types[] = {PropType::Bool}; +static constexpr PropType OfxParamHostPropSupportsStrChoiceAnimation_types[] = {PropType::Bool}; +static constexpr PropType OfxParamHostPropSupportsStringAnimation_types[] = {PropType::Bool}; +static constexpr PropType OfxParamPropAnimates_types[] = {PropType::Bool}; +static constexpr PropType OfxParamPropCacheInvalidation_types[] = {PropType::Enum}; +static constexpr PropType OfxParamPropCanUndo_types[] = {PropType::Bool}; +static constexpr PropType OfxParamPropChoiceEnum_types[] = {PropType::Bool}; +static constexpr PropType OfxParamPropChoiceOption_types[] = {PropType::String}; +static constexpr PropType OfxParamPropChoiceOrder_types[] = {PropType::Int}; +static constexpr PropType OfxParamPropCustomCallbackV1_types[] = {PropType::Pointer}; +static constexpr PropType OfxParamPropCustomValue_types[] = {PropType::String}; +static constexpr PropType OfxParamPropDataPtr_types[] = {PropType::Pointer}; +static constexpr PropType OfxParamPropDefault_types[] = {PropType::Int,PropType::Double,PropType::String,PropType::Pointer}; +static constexpr PropType OfxParamPropDefaultCoordinateSystem_types[] = {PropType::Enum}; +static constexpr PropType OfxParamPropDigits_types[] = {PropType::Int}; +static constexpr PropType OfxParamPropDimensionLabel_types[] = {PropType::String}; +static constexpr PropType OfxParamPropDisplayMax_types[] = {PropType::Int,PropType::Double}; +static constexpr PropType OfxParamPropDisplayMin_types[] = {PropType::Int,PropType::Double}; +static constexpr PropType OfxParamPropDoubleType_types[] = {PropType::Enum}; +static constexpr PropType OfxParamPropEnabled_types[] = {PropType::Bool}; +static constexpr PropType OfxParamPropEvaluateOnChange_types[] = {PropType::Bool}; +static constexpr PropType OfxParamPropGroupOpen_types[] = {PropType::Bool}; +static constexpr PropType OfxParamPropHasHostOverlayHandle_types[] = {PropType::Bool}; +static constexpr PropType OfxParamPropHint_types[] = {PropType::String}; +static constexpr PropType OfxParamPropIncrement_types[] = {PropType::Double}; +static constexpr PropType OfxParamPropInteractMinimumSize_types[] = {PropType::Double}; +static constexpr PropType OfxParamPropInteractPreferedSize_types[] = {PropType::Int}; +static constexpr PropType OfxParamPropInteractSize_types[] = {PropType::Double}; +static constexpr PropType OfxParamPropInteractSizeAspect_types[] = {PropType::Double}; +static constexpr PropType OfxParamPropInteractV1_types[] = {PropType::Pointer}; +static constexpr PropType OfxParamPropInterpolationAmount_types[] = {PropType::Double}; +static constexpr PropType OfxParamPropInterpolationTime_types[] = {PropType::Double}; +static constexpr PropType OfxParamPropIsAnimating_types[] = {PropType::Bool}; +static constexpr PropType OfxParamPropIsAutoKeying_types[] = {PropType::Bool}; +static constexpr PropType OfxParamPropMax_types[] = {PropType::Int,PropType::Double}; +static constexpr PropType OfxParamPropMin_types[] = {PropType::Int,PropType::Double}; +static constexpr PropType OfxParamPropPageChild_types[] = {PropType::String}; +static constexpr PropType OfxParamPropParametricDimension_types[] = {PropType::Int}; +static constexpr PropType OfxParamPropParametricInteractBackground_types[] = {PropType::Pointer}; +static constexpr PropType OfxParamPropParametricRange_types[] = {PropType::Double}; +static constexpr PropType OfxParamPropParametricUIColour_types[] = {PropType::Double}; +static constexpr PropType OfxParamPropParent_types[] = {PropType::String}; +static constexpr PropType OfxParamPropPersistant_types[] = {PropType::Bool}; +static constexpr PropType OfxParamPropPluginMayWrite_types[] = {PropType::Bool}; +static constexpr PropType OfxParamPropScriptName_types[] = {PropType::String}; +static constexpr PropType OfxParamPropSecret_types[] = {PropType::Bool}; +static constexpr PropType OfxParamPropShowTimeMarker_types[] = {PropType::Bool}; +static constexpr PropType OfxParamPropStringFilePathExists_types[] = {PropType::Bool}; +static constexpr PropType OfxParamPropStringMode_types[] = {PropType::Enum}; +static constexpr PropType OfxParamPropType_types[] = {PropType::String}; +static constexpr PropType OfxPluginPropFilePath_types[] = {PropType::Enum}; +static constexpr PropType OfxPluginPropParamPageOrder_types[] = {PropType::String}; +static constexpr PropType OfxPropAPIVersion_types[] = {PropType::Int}; +static constexpr PropType OfxPropChangeReason_types[] = {PropType::Enum}; +static constexpr PropType OfxPropEffectInstance_types[] = {PropType::Pointer}; +static constexpr PropType OfxPropHostOSHandle_types[] = {PropType::Pointer}; +static constexpr PropType OfxPropIcon_types[] = {PropType::String}; +static constexpr PropType OfxPropInstanceData_types[] = {PropType::Pointer}; +static constexpr PropType OfxPropIsInteractive_types[] = {PropType::Bool}; +static constexpr PropType OfxPropLabel_types[] = {PropType::String}; +static constexpr PropType OfxPropLongLabel_types[] = {PropType::String}; +static constexpr PropType OfxPropName_types[] = {PropType::String}; +static constexpr PropType OfxPropParamSetNeedsSyncing_types[] = {PropType::Bool}; +static constexpr PropType OfxPropPluginDescription_types[] = {PropType::String}; +static constexpr PropType OfxPropShortLabel_types[] = {PropType::String}; +static constexpr PropType OfxPropTime_types[] = {PropType::Double}; +static constexpr PropType OfxPropType_types[] = {PropType::String}; +static constexpr PropType OfxPropVersion_types[] = {PropType::Int}; +static constexpr PropType OfxPropVersionLabel_types[] = {PropType::String}; +static constexpr PropType kOfxParamPropUseHostOverlayHandle_types[] = {PropType::Bool}; +static constexpr PropType kOfxPropKeyString_types[] = {PropType::String}; +static constexpr PropType kOfxPropKeySym_types[] = {PropType::Int}; +} // namespace prop_type_arrays + + struct PropDef { - const char* name; // Property name - PropId id; // ID for known props - PropType supportedTypes[MAX_PROP_TYPES]; // Supported data types - size_t supportedTypesCount; - int dimension; // Property dimension (0 for variable) - const char* const* enumValues; // Valid values for enum properties - size_t enumValuesCount; + const char* name; // Property name + PropId id; // ID for known props + openfx::span supportedTypes; // Supported data types + int dimension; // Property dimension (0 for variable) + openfx::span enumValues; // Valid values for enum properties }; // Array type for storing all PropDefs, indexed by PropId for simplicity @@ -311,365 +495,365 @@ struct PropDefsArray { static inline constexpr PropDefsArray prop_defs = { {{ { "OfxImageClipPropColourspace", PropId::OfxImageClipPropColourspace, - {PropType::String}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageClipPropColourspace_types, 1), 1, openfx::span()}, { "OfxImageClipPropConnected", PropId::OfxImageClipPropConnected, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageClipPropConnected_types, 1), 1, openfx::span()}, { "OfxImageClipPropContinuousSamples", PropId::OfxImageClipPropContinuousSamples, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageClipPropContinuousSamples_types, 1), 1, openfx::span()}, { "OfxImageClipPropFieldExtraction", PropId::OfxImageClipPropFieldExtraction, - {PropType::Enum}, 1, 1, prop_enum_values::OfxImageClipPropFieldExtraction.data(), prop_enum_values::OfxImageClipPropFieldExtraction.size()}, + openfx::span(prop_type_arrays::OfxImageClipPropFieldExtraction_types, 1), 1, openfx::span(prop_enum_values::OfxImageClipPropFieldExtraction.data(), prop_enum_values::OfxImageClipPropFieldExtraction.size())}, { "OfxImageClipPropFieldOrder", PropId::OfxImageClipPropFieldOrder, - {PropType::Enum}, 1, 1, prop_enum_values::OfxImageClipPropFieldOrder.data(), prop_enum_values::OfxImageClipPropFieldOrder.size()}, + openfx::span(prop_type_arrays::OfxImageClipPropFieldOrder_types, 1), 1, openfx::span(prop_enum_values::OfxImageClipPropFieldOrder.data(), prop_enum_values::OfxImageClipPropFieldOrder.size())}, { "OfxImageClipPropIsMask", PropId::OfxImageClipPropIsMask, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageClipPropIsMask_types, 1), 1, openfx::span()}, { "OfxImageClipPropOptional", PropId::OfxImageClipPropOptional, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageClipPropOptional_types, 1), 1, openfx::span()}, { "OfxImageClipPropPreferredColourspaces", PropId::OfxImageClipPropPreferredColourspaces, - {PropType::String}, 1, 0, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageClipPropPreferredColourspaces_types, 1), 0, openfx::span()}, { "OfxImageClipPropUnmappedComponents", PropId::OfxImageClipPropUnmappedComponents, - {PropType::Enum}, 1, 1, prop_enum_values::OfxImageClipPropUnmappedComponents.data(), prop_enum_values::OfxImageClipPropUnmappedComponents.size()}, + openfx::span(prop_type_arrays::OfxImageClipPropUnmappedComponents_types, 1), 1, openfx::span(prop_enum_values::OfxImageClipPropUnmappedComponents.data(), prop_enum_values::OfxImageClipPropUnmappedComponents.size())}, { "OfxImageClipPropUnmappedPixelDepth", PropId::OfxImageClipPropUnmappedPixelDepth, - {PropType::Enum}, 1, 1, prop_enum_values::OfxImageClipPropUnmappedPixelDepth.data(), prop_enum_values::OfxImageClipPropUnmappedPixelDepth.size()}, + openfx::span(prop_type_arrays::OfxImageClipPropUnmappedPixelDepth_types, 1), 1, openfx::span(prop_enum_values::OfxImageClipPropUnmappedPixelDepth.data(), prop_enum_values::OfxImageClipPropUnmappedPixelDepth.size())}, { "OfxImageEffectFrameVarying", PropId::OfxImageEffectFrameVarying, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectFrameVarying_types, 1), 1, openfx::span()}, { "OfxImageEffectHostPropIsBackground", PropId::OfxImageEffectHostPropIsBackground, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectHostPropIsBackground_types, 1), 1, openfx::span()}, { "OfxImageEffectHostPropNativeOrigin", PropId::OfxImageEffectHostPropNativeOrigin, - {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectHostPropNativeOrigin.data(), prop_enum_values::OfxImageEffectHostPropNativeOrigin.size()}, + openfx::span(prop_type_arrays::OfxImageEffectHostPropNativeOrigin_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectHostPropNativeOrigin.data(), prop_enum_values::OfxImageEffectHostPropNativeOrigin.size())}, { "OfxImageEffectInstancePropEffectDuration", PropId::OfxImageEffectInstancePropEffectDuration, - {PropType::Double}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectInstancePropEffectDuration_types, 1), 1, openfx::span()}, { "OfxImageEffectInstancePropSequentialRender", PropId::OfxImageEffectInstancePropSequentialRender, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectInstancePropSequentialRender_types, 1), 1, openfx::span()}, { "OfxImageEffectPluginPropFieldRenderTwiceAlways", PropId::OfxImageEffectPluginPropFieldRenderTwiceAlways, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPluginPropFieldRenderTwiceAlways_types, 1), 1, openfx::span()}, { "OfxImageEffectPluginPropGrouping", PropId::OfxImageEffectPluginPropGrouping, - {PropType::String}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPluginPropGrouping_types, 1), 1, openfx::span()}, { "OfxImageEffectPluginPropHostFrameThreading", PropId::OfxImageEffectPluginPropHostFrameThreading, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPluginPropHostFrameThreading_types, 1), 1, openfx::span()}, { "OfxImageEffectPluginPropOverlayInteractV1", PropId::OfxImageEffectPluginPropOverlayInteractV1, - {PropType::Pointer}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPluginPropOverlayInteractV1_types, 1), 1, openfx::span()}, { "OfxImageEffectPluginPropOverlayInteractV2", PropId::OfxImageEffectPluginPropOverlayInteractV2, - {PropType::Pointer}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPluginPropOverlayInteractV2_types, 1), 1, openfx::span()}, { "OfxImageEffectPluginPropSingleInstance", PropId::OfxImageEffectPluginPropSingleInstance, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPluginPropSingleInstance_types, 1), 1, openfx::span()}, { "OfxImageEffectPluginRenderThreadSafety", PropId::OfxImageEffectPluginRenderThreadSafety, - {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPluginRenderThreadSafety.data(), prop_enum_values::OfxImageEffectPluginRenderThreadSafety.size()}, + openfx::span(prop_type_arrays::OfxImageEffectPluginRenderThreadSafety_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPluginRenderThreadSafety.data(), prop_enum_values::OfxImageEffectPluginRenderThreadSafety.size())}, { "OfxImageEffectPropClipPreferencesSlaveParam", PropId::OfxImageEffectPropClipPreferencesSlaveParam, - {PropType::String}, 1, 0, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropClipPreferencesSlaveParam_types, 1), 0, openfx::span()}, { "OfxImageEffectPropColourManagementAvailableConfigs", PropId::OfxImageEffectPropColourManagementAvailableConfigs, - {PropType::String}, 1, 0, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropColourManagementAvailableConfigs_types, 1), 0, openfx::span()}, { "OfxImageEffectPropColourManagementConfig", PropId::OfxImageEffectPropColourManagementConfig, - {PropType::String}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropColourManagementConfig_types, 1), 1, openfx::span()}, { "OfxImageEffectPropColourManagementStyle", PropId::OfxImageEffectPropColourManagementStyle, - {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropColourManagementStyle.data(), prop_enum_values::OfxImageEffectPropColourManagementStyle.size()}, + openfx::span(prop_type_arrays::OfxImageEffectPropColourManagementStyle_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropColourManagementStyle.data(), prop_enum_values::OfxImageEffectPropColourManagementStyle.size())}, { "OfxImageEffectPropComponents", PropId::OfxImageEffectPropComponents, - {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropComponents.data(), prop_enum_values::OfxImageEffectPropComponents.size()}, + openfx::span(prop_type_arrays::OfxImageEffectPropComponents_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropComponents.data(), prop_enum_values::OfxImageEffectPropComponents.size())}, { "OfxImageEffectPropContext", PropId::OfxImageEffectPropContext, - {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropContext.data(), prop_enum_values::OfxImageEffectPropContext.size()}, + openfx::span(prop_type_arrays::OfxImageEffectPropContext_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropContext.data(), prop_enum_values::OfxImageEffectPropContext.size())}, { "OfxImageEffectPropCudaEnabled", PropId::OfxImageEffectPropCudaEnabled, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropCudaEnabled_types, 1), 1, openfx::span()}, { "OfxImageEffectPropCudaRenderSupported", PropId::OfxImageEffectPropCudaRenderSupported, - {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropCudaRenderSupported.data(), prop_enum_values::OfxImageEffectPropCudaRenderSupported.size()}, + openfx::span(prop_type_arrays::OfxImageEffectPropCudaRenderSupported_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropCudaRenderSupported.data(), prop_enum_values::OfxImageEffectPropCudaRenderSupported.size())}, { "OfxImageEffectPropCudaStream", PropId::OfxImageEffectPropCudaStream, - {PropType::Pointer}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropCudaStream_types, 1), 1, openfx::span()}, { "OfxImageEffectPropCudaStreamSupported", PropId::OfxImageEffectPropCudaStreamSupported, - {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropCudaStreamSupported.data(), prop_enum_values::OfxImageEffectPropCudaStreamSupported.size()}, + openfx::span(prop_type_arrays::OfxImageEffectPropCudaStreamSupported_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropCudaStreamSupported.data(), prop_enum_values::OfxImageEffectPropCudaStreamSupported.size())}, { "OfxImageEffectPropDisplayColourspace", PropId::OfxImageEffectPropDisplayColourspace, - {PropType::String}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropDisplayColourspace_types, 1), 1, openfx::span()}, { "OfxImageEffectPropFieldToRender", PropId::OfxImageEffectPropFieldToRender, - {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropFieldToRender.data(), prop_enum_values::OfxImageEffectPropFieldToRender.size()}, + openfx::span(prop_type_arrays::OfxImageEffectPropFieldToRender_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropFieldToRender.data(), prop_enum_values::OfxImageEffectPropFieldToRender.size())}, { "OfxImageEffectPropFrameRange", PropId::OfxImageEffectPropFrameRange, - {PropType::Double}, 1, 2, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropFrameRange_types, 1), 2, openfx::span()}, { "OfxImageEffectPropFrameRate", PropId::OfxImageEffectPropFrameRate, - {PropType::Double}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropFrameRate_types, 1), 1, openfx::span()}, { "OfxImageEffectPropFrameStep", PropId::OfxImageEffectPropFrameStep, - {PropType::Double}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropFrameStep_types, 1), 1, openfx::span()}, { "OfxImageEffectPropInAnalysis", PropId::OfxImageEffectPropInAnalysis, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropInAnalysis_types, 1), 1, openfx::span()}, { "OfxImageEffectPropInteractiveRenderStatus", PropId::OfxImageEffectPropInteractiveRenderStatus, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropInteractiveRenderStatus_types, 1), 1, openfx::span()}, { "OfxImageEffectPropMetalCommandQueue", PropId::OfxImageEffectPropMetalCommandQueue, - {PropType::Pointer}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropMetalCommandQueue_types, 1), 1, openfx::span()}, { "OfxImageEffectPropMetalEnabled", PropId::OfxImageEffectPropMetalEnabled, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropMetalEnabled_types, 1), 1, openfx::span()}, { "OfxImageEffectPropMetalRenderSupported", PropId::OfxImageEffectPropMetalRenderSupported, - {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropMetalRenderSupported.data(), prop_enum_values::OfxImageEffectPropMetalRenderSupported.size()}, + openfx::span(prop_type_arrays::OfxImageEffectPropMetalRenderSupported_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropMetalRenderSupported.data(), prop_enum_values::OfxImageEffectPropMetalRenderSupported.size())}, { "OfxImageEffectPropMultipleClipDepths", PropId::OfxImageEffectPropMultipleClipDepths, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropMultipleClipDepths_types, 1), 1, openfx::span()}, { "OfxImageEffectPropNoSpatialAwareness", PropId::OfxImageEffectPropNoSpatialAwareness, - {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropNoSpatialAwareness.data(), prop_enum_values::OfxImageEffectPropNoSpatialAwareness.size()}, + openfx::span(prop_type_arrays::OfxImageEffectPropNoSpatialAwareness_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropNoSpatialAwareness.data(), prop_enum_values::OfxImageEffectPropNoSpatialAwareness.size())}, { "OfxImageEffectPropOCIOConfig", PropId::OfxImageEffectPropOCIOConfig, - {PropType::String}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropOCIOConfig_types, 1), 1, openfx::span()}, { "OfxImageEffectPropOCIODisplay", PropId::OfxImageEffectPropOCIODisplay, - {PropType::String}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropOCIODisplay_types, 1), 1, openfx::span()}, { "OfxImageEffectPropOCIOView", PropId::OfxImageEffectPropOCIOView, - {PropType::String}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropOCIOView_types, 1), 1, openfx::span()}, { "OfxImageEffectPropOpenCLCommandQueue", PropId::OfxImageEffectPropOpenCLCommandQueue, - {PropType::Pointer}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropOpenCLCommandQueue_types, 1), 1, openfx::span()}, { "OfxImageEffectPropOpenCLEnabled", PropId::OfxImageEffectPropOpenCLEnabled, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropOpenCLEnabled_types, 1), 1, openfx::span()}, { "OfxImageEffectPropOpenCLImage", PropId::OfxImageEffectPropOpenCLImage, - {PropType::Pointer}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropOpenCLImage_types, 1), 1, openfx::span()}, { "OfxImageEffectPropOpenCLRenderSupported", PropId::OfxImageEffectPropOpenCLRenderSupported, - {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropOpenCLRenderSupported.data(), prop_enum_values::OfxImageEffectPropOpenCLRenderSupported.size()}, + openfx::span(prop_type_arrays::OfxImageEffectPropOpenCLRenderSupported_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropOpenCLRenderSupported.data(), prop_enum_values::OfxImageEffectPropOpenCLRenderSupported.size())}, { "OfxImageEffectPropOpenCLSupported", PropId::OfxImageEffectPropOpenCLSupported, - {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropOpenCLSupported.data(), prop_enum_values::OfxImageEffectPropOpenCLSupported.size()}, + openfx::span(prop_type_arrays::OfxImageEffectPropOpenCLSupported_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropOpenCLSupported.data(), prop_enum_values::OfxImageEffectPropOpenCLSupported.size())}, { "OfxImageEffectPropOpenGLEnabled", PropId::OfxImageEffectPropOpenGLEnabled, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropOpenGLEnabled_types, 1), 1, openfx::span()}, { "OfxImageEffectPropOpenGLRenderSupported", PropId::OfxImageEffectPropOpenGLRenderSupported, - {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropOpenGLRenderSupported.data(), prop_enum_values::OfxImageEffectPropOpenGLRenderSupported.size()}, + openfx::span(prop_type_arrays::OfxImageEffectPropOpenGLRenderSupported_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropOpenGLRenderSupported.data(), prop_enum_values::OfxImageEffectPropOpenGLRenderSupported.size())}, { "OfxImageEffectPropOpenGLTextureIndex", PropId::OfxImageEffectPropOpenGLTextureIndex, - {PropType::Int}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropOpenGLTextureIndex_types, 1), 1, openfx::span()}, { "OfxImageEffectPropOpenGLTextureTarget", PropId::OfxImageEffectPropOpenGLTextureTarget, - {PropType::Int}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropOpenGLTextureTarget_types, 1), 1, openfx::span()}, { "OfxImageEffectPropPixelAspectRatio", PropId::OfxImageEffectPropPixelAspectRatio, - {PropType::Double}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropPixelAspectRatio_types, 1), 1, openfx::span()}, { "OfxImageEffectPropPixelDepth", PropId::OfxImageEffectPropPixelDepth, - {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropPixelDepth.data(), prop_enum_values::OfxImageEffectPropPixelDepth.size()}, + openfx::span(prop_type_arrays::OfxImageEffectPropPixelDepth_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropPixelDepth.data(), prop_enum_values::OfxImageEffectPropPixelDepth.size())}, { "OfxImageEffectPropPluginHandle", PropId::OfxImageEffectPropPluginHandle, - {PropType::Pointer}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropPluginHandle_types, 1), 1, openfx::span()}, { "OfxImageEffectPropPreMultiplication", PropId::OfxImageEffectPropPreMultiplication, - {PropType::Enum}, 1, 1, prop_enum_values::OfxImageEffectPropPreMultiplication.data(), prop_enum_values::OfxImageEffectPropPreMultiplication.size()}, + openfx::span(prop_type_arrays::OfxImageEffectPropPreMultiplication_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropPreMultiplication.data(), prop_enum_values::OfxImageEffectPropPreMultiplication.size())}, { "OfxImageEffectPropProjectExtent", PropId::OfxImageEffectPropProjectExtent, - {PropType::Double}, 1, 2, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropProjectExtent_types, 1), 2, openfx::span()}, { "OfxImageEffectPropProjectOffset", PropId::OfxImageEffectPropProjectOffset, - {PropType::Double}, 1, 2, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropProjectOffset_types, 1), 2, openfx::span()}, { "OfxImageEffectPropProjectSize", PropId::OfxImageEffectPropProjectSize, - {PropType::Double}, 1, 2, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropProjectSize_types, 1), 2, openfx::span()}, { "OfxImageEffectPropRegionOfDefinition", PropId::OfxImageEffectPropRegionOfDefinition, - {PropType::Double}, 1, 4, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropRegionOfDefinition_types, 1), 4, openfx::span()}, { "OfxImageEffectPropRegionOfInterest", PropId::OfxImageEffectPropRegionOfInterest, - {PropType::Double}, 1, 4, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropRegionOfInterest_types, 1), 4, openfx::span()}, { "OfxImageEffectPropRenderQualityDraft", PropId::OfxImageEffectPropRenderQualityDraft, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropRenderQualityDraft_types, 1), 1, openfx::span()}, { "OfxImageEffectPropRenderScale", PropId::OfxImageEffectPropRenderScale, - {PropType::Double}, 1, 2, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropRenderScale_types, 1), 2, openfx::span()}, { "OfxImageEffectPropRenderWindow", PropId::OfxImageEffectPropRenderWindow, - {PropType::Int}, 1, 4, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropRenderWindow_types, 1), 4, openfx::span()}, { "OfxImageEffectPropSequentialRenderStatus", PropId::OfxImageEffectPropSequentialRenderStatus, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropSequentialRenderStatus_types, 1), 1, openfx::span()}, { "OfxImageEffectPropSetableFielding", PropId::OfxImageEffectPropSetableFielding, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropSetableFielding_types, 1), 1, openfx::span()}, { "OfxImageEffectPropSetableFrameRate", PropId::OfxImageEffectPropSetableFrameRate, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropSetableFrameRate_types, 1), 1, openfx::span()}, { "OfxImageEffectPropSupportedComponents", PropId::OfxImageEffectPropSupportedComponents, - {PropType::Enum}, 1, 0, prop_enum_values::OfxImageEffectPropSupportedComponents.data(), prop_enum_values::OfxImageEffectPropSupportedComponents.size()}, + openfx::span(prop_type_arrays::OfxImageEffectPropSupportedComponents_types, 1), 0, openfx::span(prop_enum_values::OfxImageEffectPropSupportedComponents.data(), prop_enum_values::OfxImageEffectPropSupportedComponents.size())}, { "OfxImageEffectPropSupportedContexts", PropId::OfxImageEffectPropSupportedContexts, - {PropType::Enum}, 1, 0, prop_enum_values::OfxImageEffectPropSupportedContexts.data(), prop_enum_values::OfxImageEffectPropSupportedContexts.size()}, + openfx::span(prop_type_arrays::OfxImageEffectPropSupportedContexts_types, 1), 0, openfx::span(prop_enum_values::OfxImageEffectPropSupportedContexts.data(), prop_enum_values::OfxImageEffectPropSupportedContexts.size())}, { "OfxImageEffectPropSupportedPixelDepths", PropId::OfxImageEffectPropSupportedPixelDepths, - {PropType::Enum}, 1, 0, prop_enum_values::OfxImageEffectPropSupportedPixelDepths.data(), prop_enum_values::OfxImageEffectPropSupportedPixelDepths.size()}, + openfx::span(prop_type_arrays::OfxImageEffectPropSupportedPixelDepths_types, 1), 0, openfx::span(prop_enum_values::OfxImageEffectPropSupportedPixelDepths.data(), prop_enum_values::OfxImageEffectPropSupportedPixelDepths.size())}, { "OfxImageEffectPropSupportsMultiResolution", PropId::OfxImageEffectPropSupportsMultiResolution, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropSupportsMultiResolution_types, 1), 1, openfx::span()}, { "OfxImageEffectPropSupportsMultipleClipPARs", PropId::OfxImageEffectPropSupportsMultipleClipPARs, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropSupportsMultipleClipPARs_types, 1), 1, openfx::span()}, { "OfxImageEffectPropSupportsOverlays", PropId::OfxImageEffectPropSupportsOverlays, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropSupportsOverlays_types, 1), 1, openfx::span()}, { "OfxImageEffectPropSupportsTiles", PropId::OfxImageEffectPropSupportsTiles, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropSupportsTiles_types, 1), 1, openfx::span()}, { "OfxImageEffectPropTemporalClipAccess", PropId::OfxImageEffectPropTemporalClipAccess, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropTemporalClipAccess_types, 1), 1, openfx::span()}, { "OfxImageEffectPropUnmappedFrameRange", PropId::OfxImageEffectPropUnmappedFrameRange, - {PropType::Double}, 1, 2, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropUnmappedFrameRange_types, 1), 2, openfx::span()}, { "OfxImageEffectPropUnmappedFrameRate", PropId::OfxImageEffectPropUnmappedFrameRate, - {PropType::Double}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImageEffectPropUnmappedFrameRate_types, 1), 1, openfx::span()}, { "OfxImagePropBounds", PropId::OfxImagePropBounds, - {PropType::Int}, 1, 4, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImagePropBounds_types, 1), 4, openfx::span()}, { "OfxImagePropData", PropId::OfxImagePropData, - {PropType::Pointer}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImagePropData_types, 1), 1, openfx::span()}, { "OfxImagePropField", PropId::OfxImagePropField, - {PropType::Enum}, 1, 1, prop_enum_values::OfxImagePropField.data(), prop_enum_values::OfxImagePropField.size()}, + openfx::span(prop_type_arrays::OfxImagePropField_types, 1), 1, openfx::span(prop_enum_values::OfxImagePropField.data(), prop_enum_values::OfxImagePropField.size())}, { "OfxImagePropPixelAspectRatio", PropId::OfxImagePropPixelAspectRatio, - {PropType::Double}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImagePropPixelAspectRatio_types, 1), 1, openfx::span()}, { "OfxImagePropRegionOfDefinition", PropId::OfxImagePropRegionOfDefinition, - {PropType::Int}, 1, 4, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImagePropRegionOfDefinition_types, 1), 4, openfx::span()}, { "OfxImagePropRowBytes", PropId::OfxImagePropRowBytes, - {PropType::Int}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImagePropRowBytes_types, 1), 1, openfx::span()}, { "OfxImagePropUniqueIdentifier", PropId::OfxImagePropUniqueIdentifier, - {PropType::String}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxImagePropUniqueIdentifier_types, 1), 1, openfx::span()}, { "OfxInteractPropBackgroundColour", PropId::OfxInteractPropBackgroundColour, - {PropType::Double}, 1, 3, nullptr, 0}, + openfx::span(prop_type_arrays::OfxInteractPropBackgroundColour_types, 1), 3, openfx::span()}, { "OfxInteractPropBitDepth", PropId::OfxInteractPropBitDepth, - {PropType::Int}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxInteractPropBitDepth_types, 1), 1, openfx::span()}, { "OfxInteractPropDrawContext", PropId::OfxInteractPropDrawContext, - {PropType::Pointer}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxInteractPropDrawContext_types, 1), 1, openfx::span()}, { "OfxInteractPropHasAlpha", PropId::OfxInteractPropHasAlpha, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxInteractPropHasAlpha_types, 1), 1, openfx::span()}, { "OfxInteractPropPenPosition", PropId::OfxInteractPropPenPosition, - {PropType::Double}, 1, 2, nullptr, 0}, + openfx::span(prop_type_arrays::OfxInteractPropPenPosition_types, 1), 2, openfx::span()}, { "OfxInteractPropPenPressure", PropId::OfxInteractPropPenPressure, - {PropType::Double}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxInteractPropPenPressure_types, 1), 1, openfx::span()}, { "OfxInteractPropPenViewportPosition", PropId::OfxInteractPropPenViewportPosition, - {PropType::Int}, 1, 2, nullptr, 0}, + openfx::span(prop_type_arrays::OfxInteractPropPenViewportPosition_types, 1), 2, openfx::span()}, { "OfxInteractPropPixelScale", PropId::OfxInteractPropPixelScale, - {PropType::Double}, 1, 2, nullptr, 0}, + openfx::span(prop_type_arrays::OfxInteractPropPixelScale_types, 1), 2, openfx::span()}, { "OfxInteractPropSlaveToParam", PropId::OfxInteractPropSlaveToParam, - {PropType::String}, 1, 0, nullptr, 0}, + openfx::span(prop_type_arrays::OfxInteractPropSlaveToParam_types, 1), 0, openfx::span()}, { "OfxInteractPropSuggestedColour", PropId::OfxInteractPropSuggestedColour, - {PropType::Double}, 1, 3, nullptr, 0}, + openfx::span(prop_type_arrays::OfxInteractPropSuggestedColour_types, 1), 3, openfx::span()}, { "OfxInteractPropViewport", PropId::OfxInteractPropViewport, - {PropType::Int}, 1, 2, nullptr, 0}, + openfx::span(prop_type_arrays::OfxInteractPropViewport_types, 1), 2, openfx::span()}, { "OfxOpenGLPropPixelDepth", PropId::OfxOpenGLPropPixelDepth, - {PropType::Enum}, 1, 0, prop_enum_values::OfxOpenGLPropPixelDepth.data(), prop_enum_values::OfxOpenGLPropPixelDepth.size()}, + openfx::span(prop_type_arrays::OfxOpenGLPropPixelDepth_types, 1), 0, openfx::span(prop_enum_values::OfxOpenGLPropPixelDepth.data(), prop_enum_values::OfxOpenGLPropPixelDepth.size())}, { "OfxParamHostPropMaxPages", PropId::OfxParamHostPropMaxPages, - {PropType::Int}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamHostPropMaxPages_types, 1), 1, openfx::span()}, { "OfxParamHostPropMaxParameters", PropId::OfxParamHostPropMaxParameters, - {PropType::Int}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamHostPropMaxParameters_types, 1), 1, openfx::span()}, { "OfxParamHostPropPageRowColumnCount", PropId::OfxParamHostPropPageRowColumnCount, - {PropType::Int}, 1, 2, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamHostPropPageRowColumnCount_types, 1), 2, openfx::span()}, { "OfxParamHostPropSupportsBooleanAnimation", PropId::OfxParamHostPropSupportsBooleanAnimation, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamHostPropSupportsBooleanAnimation_types, 1), 1, openfx::span()}, { "OfxParamHostPropSupportsChoiceAnimation", PropId::OfxParamHostPropSupportsChoiceAnimation, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamHostPropSupportsChoiceAnimation_types, 1), 1, openfx::span()}, { "OfxParamHostPropSupportsCustomAnimation", PropId::OfxParamHostPropSupportsCustomAnimation, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamHostPropSupportsCustomAnimation_types, 1), 1, openfx::span()}, { "OfxParamHostPropSupportsCustomInteract", PropId::OfxParamHostPropSupportsCustomInteract, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamHostPropSupportsCustomInteract_types, 1), 1, openfx::span()}, { "OfxParamHostPropSupportsParametricAnimation", PropId::OfxParamHostPropSupportsParametricAnimation, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamHostPropSupportsParametricAnimation_types, 1), 1, openfx::span()}, { "OfxParamHostPropSupportsStrChoice", PropId::OfxParamHostPropSupportsStrChoice, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamHostPropSupportsStrChoice_types, 1), 1, openfx::span()}, { "OfxParamHostPropSupportsStrChoiceAnimation", PropId::OfxParamHostPropSupportsStrChoiceAnimation, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamHostPropSupportsStrChoiceAnimation_types, 1), 1, openfx::span()}, { "OfxParamHostPropSupportsStringAnimation", PropId::OfxParamHostPropSupportsStringAnimation, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamHostPropSupportsStringAnimation_types, 1), 1, openfx::span()}, { "OfxParamPropAnimates", PropId::OfxParamPropAnimates, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropAnimates_types, 1), 1, openfx::span()}, { "OfxParamPropCacheInvalidation", PropId::OfxParamPropCacheInvalidation, - {PropType::Enum}, 1, 1, prop_enum_values::OfxParamPropCacheInvalidation.data(), prop_enum_values::OfxParamPropCacheInvalidation.size()}, + openfx::span(prop_type_arrays::OfxParamPropCacheInvalidation_types, 1), 1, openfx::span(prop_enum_values::OfxParamPropCacheInvalidation.data(), prop_enum_values::OfxParamPropCacheInvalidation.size())}, { "OfxParamPropCanUndo", PropId::OfxParamPropCanUndo, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropCanUndo_types, 1), 1, openfx::span()}, { "OfxParamPropChoiceEnum", PropId::OfxParamPropChoiceEnum, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropChoiceEnum_types, 1), 1, openfx::span()}, { "OfxParamPropChoiceOption", PropId::OfxParamPropChoiceOption, - {PropType::String}, 1, 0, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropChoiceOption_types, 1), 0, openfx::span()}, { "OfxParamPropChoiceOrder", PropId::OfxParamPropChoiceOrder, - {PropType::Int}, 1, 0, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropChoiceOrder_types, 1), 0, openfx::span()}, { "OfxParamPropCustomCallbackV1", PropId::OfxParamPropCustomCallbackV1, - {PropType::Pointer}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropCustomCallbackV1_types, 1), 1, openfx::span()}, { "OfxParamPropCustomValue", PropId::OfxParamPropCustomValue, - {PropType::String}, 1, 2, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropCustomValue_types, 1), 2, openfx::span()}, { "OfxParamPropDataPtr", PropId::OfxParamPropDataPtr, - {PropType::Pointer}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropDataPtr_types, 1), 1, openfx::span()}, { "OfxParamPropDefault", PropId::OfxParamPropDefault, - {PropType::Int,PropType::Double,PropType::String,PropType::Pointer}, 4, 0, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropDefault_types, 4), 0, openfx::span()}, { "OfxParamPropDefaultCoordinateSystem", PropId::OfxParamPropDefaultCoordinateSystem, - {PropType::Enum}, 1, 1, prop_enum_values::OfxParamPropDefaultCoordinateSystem.data(), prop_enum_values::OfxParamPropDefaultCoordinateSystem.size()}, + openfx::span(prop_type_arrays::OfxParamPropDefaultCoordinateSystem_types, 1), 1, openfx::span(prop_enum_values::OfxParamPropDefaultCoordinateSystem.data(), prop_enum_values::OfxParamPropDefaultCoordinateSystem.size())}, { "OfxParamPropDigits", PropId::OfxParamPropDigits, - {PropType::Int}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropDigits_types, 1), 1, openfx::span()}, { "OfxParamPropDimensionLabel", PropId::OfxParamPropDimensionLabel, - {PropType::String}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropDimensionLabel_types, 1), 1, openfx::span()}, { "OfxParamPropDisplayMax", PropId::OfxParamPropDisplayMax, - {PropType::Int,PropType::Double}, 2, 0, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropDisplayMax_types, 2), 0, openfx::span()}, { "OfxParamPropDisplayMin", PropId::OfxParamPropDisplayMin, - {PropType::Int,PropType::Double}, 2, 0, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropDisplayMin_types, 2), 0, openfx::span()}, { "OfxParamPropDoubleType", PropId::OfxParamPropDoubleType, - {PropType::Enum}, 1, 1, prop_enum_values::OfxParamPropDoubleType.data(), prop_enum_values::OfxParamPropDoubleType.size()}, + openfx::span(prop_type_arrays::OfxParamPropDoubleType_types, 1), 1, openfx::span(prop_enum_values::OfxParamPropDoubleType.data(), prop_enum_values::OfxParamPropDoubleType.size())}, { "OfxParamPropEnabled", PropId::OfxParamPropEnabled, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropEnabled_types, 1), 1, openfx::span()}, { "OfxParamPropEvaluateOnChange", PropId::OfxParamPropEvaluateOnChange, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropEvaluateOnChange_types, 1), 1, openfx::span()}, { "OfxParamPropGroupOpen", PropId::OfxParamPropGroupOpen, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropGroupOpen_types, 1), 1, openfx::span()}, { "OfxParamPropHasHostOverlayHandle", PropId::OfxParamPropHasHostOverlayHandle, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropHasHostOverlayHandle_types, 1), 1, openfx::span()}, { "OfxParamPropHint", PropId::OfxParamPropHint, - {PropType::String}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropHint_types, 1), 1, openfx::span()}, { "OfxParamPropIncrement", PropId::OfxParamPropIncrement, - {PropType::Double}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropIncrement_types, 1), 1, openfx::span()}, { "OfxParamPropInteractMinimumSize", PropId::OfxParamPropInteractMinimumSize, - {PropType::Double}, 1, 2, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropInteractMinimumSize_types, 1), 2, openfx::span()}, { "OfxParamPropInteractPreferedSize", PropId::OfxParamPropInteractPreferedSize, - {PropType::Int}, 1, 2, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropInteractPreferedSize_types, 1), 2, openfx::span()}, { "OfxParamPropInteractSize", PropId::OfxParamPropInteractSize, - {PropType::Double}, 1, 2, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropInteractSize_types, 1), 2, openfx::span()}, { "OfxParamPropInteractSizeAspect", PropId::OfxParamPropInteractSizeAspect, - {PropType::Double}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropInteractSizeAspect_types, 1), 1, openfx::span()}, { "OfxParamPropInteractV1", PropId::OfxParamPropInteractV1, - {PropType::Pointer}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropInteractV1_types, 1), 1, openfx::span()}, { "OfxParamPropInterpolationAmount", PropId::OfxParamPropInterpolationAmount, - {PropType::Double}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropInterpolationAmount_types, 1), 1, openfx::span()}, { "OfxParamPropInterpolationTime", PropId::OfxParamPropInterpolationTime, - {PropType::Double}, 1, 2, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropInterpolationTime_types, 1), 2, openfx::span()}, { "OfxParamPropIsAnimating", PropId::OfxParamPropIsAnimating, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropIsAnimating_types, 1), 1, openfx::span()}, { "OfxParamPropIsAutoKeying", PropId::OfxParamPropIsAutoKeying, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropIsAutoKeying_types, 1), 1, openfx::span()}, { "OfxParamPropMax", PropId::OfxParamPropMax, - {PropType::Int,PropType::Double}, 2, 0, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropMax_types, 2), 0, openfx::span()}, { "OfxParamPropMin", PropId::OfxParamPropMin, - {PropType::Int,PropType::Double}, 2, 0, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropMin_types, 2), 0, openfx::span()}, { "OfxParamPropPageChild", PropId::OfxParamPropPageChild, - {PropType::String}, 1, 0, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropPageChild_types, 1), 0, openfx::span()}, { "OfxParamPropParametricDimension", PropId::OfxParamPropParametricDimension, - {PropType::Int}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropParametricDimension_types, 1), 1, openfx::span()}, { "OfxParamPropParametricInteractBackground", PropId::OfxParamPropParametricInteractBackground, - {PropType::Pointer}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropParametricInteractBackground_types, 1), 1, openfx::span()}, { "OfxParamPropParametricRange", PropId::OfxParamPropParametricRange, - {PropType::Double}, 1, 2, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropParametricRange_types, 1), 2, openfx::span()}, { "OfxParamPropParametricUIColour", PropId::OfxParamPropParametricUIColour, - {PropType::Double}, 1, 0, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropParametricUIColour_types, 1), 0, openfx::span()}, { "OfxParamPropParent", PropId::OfxParamPropParent, - {PropType::String}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropParent_types, 1), 1, openfx::span()}, { "OfxParamPropPersistant", PropId::OfxParamPropPersistant, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropPersistant_types, 1), 1, openfx::span()}, { "OfxParamPropPluginMayWrite", PropId::OfxParamPropPluginMayWrite, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropPluginMayWrite_types, 1), 1, openfx::span()}, { "OfxParamPropScriptName", PropId::OfxParamPropScriptName, - {PropType::String}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropScriptName_types, 1), 1, openfx::span()}, { "OfxParamPropSecret", PropId::OfxParamPropSecret, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropSecret_types, 1), 1, openfx::span()}, { "OfxParamPropShowTimeMarker", PropId::OfxParamPropShowTimeMarker, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropShowTimeMarker_types, 1), 1, openfx::span()}, { "OfxParamPropStringFilePathExists", PropId::OfxParamPropStringFilePathExists, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropStringFilePathExists_types, 1), 1, openfx::span()}, { "OfxParamPropStringMode", PropId::OfxParamPropStringMode, - {PropType::Enum}, 1, 1, prop_enum_values::OfxParamPropStringMode.data(), prop_enum_values::OfxParamPropStringMode.size()}, + openfx::span(prop_type_arrays::OfxParamPropStringMode_types, 1), 1, openfx::span(prop_enum_values::OfxParamPropStringMode.data(), prop_enum_values::OfxParamPropStringMode.size())}, { "OfxParamPropType", PropId::OfxParamPropType, - {PropType::String}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxParamPropType_types, 1), 1, openfx::span()}, { "OfxPluginPropFilePath", PropId::OfxPluginPropFilePath, - {PropType::Enum}, 1, 1, prop_enum_values::OfxPluginPropFilePath.data(), prop_enum_values::OfxPluginPropFilePath.size()}, + openfx::span(prop_type_arrays::OfxPluginPropFilePath_types, 1), 1, openfx::span(prop_enum_values::OfxPluginPropFilePath.data(), prop_enum_values::OfxPluginPropFilePath.size())}, { "OfxPluginPropParamPageOrder", PropId::OfxPluginPropParamPageOrder, - {PropType::String}, 1, 0, nullptr, 0}, + openfx::span(prop_type_arrays::OfxPluginPropParamPageOrder_types, 1), 0, openfx::span()}, { "OfxPropAPIVersion", PropId::OfxPropAPIVersion, - {PropType::Int}, 1, 0, nullptr, 0}, + openfx::span(prop_type_arrays::OfxPropAPIVersion_types, 1), 0, openfx::span()}, { "OfxPropChangeReason", PropId::OfxPropChangeReason, - {PropType::Enum}, 1, 1, prop_enum_values::OfxPropChangeReason.data(), prop_enum_values::OfxPropChangeReason.size()}, + openfx::span(prop_type_arrays::OfxPropChangeReason_types, 1), 1, openfx::span(prop_enum_values::OfxPropChangeReason.data(), prop_enum_values::OfxPropChangeReason.size())}, { "OfxPropEffectInstance", PropId::OfxPropEffectInstance, - {PropType::Pointer}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxPropEffectInstance_types, 1), 1, openfx::span()}, { "OfxPropHostOSHandle", PropId::OfxPropHostOSHandle, - {PropType::Pointer}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxPropHostOSHandle_types, 1), 1, openfx::span()}, { "OfxPropIcon", PropId::OfxPropIcon, - {PropType::String}, 1, 2, nullptr, 0}, + openfx::span(prop_type_arrays::OfxPropIcon_types, 1), 2, openfx::span()}, { "OfxPropInstanceData", PropId::OfxPropInstanceData, - {PropType::Pointer}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxPropInstanceData_types, 1), 1, openfx::span()}, { "OfxPropIsInteractive", PropId::OfxPropIsInteractive, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxPropIsInteractive_types, 1), 1, openfx::span()}, { "OfxPropLabel", PropId::OfxPropLabel, - {PropType::String}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxPropLabel_types, 1), 1, openfx::span()}, { "OfxPropLongLabel", PropId::OfxPropLongLabel, - {PropType::String}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxPropLongLabel_types, 1), 1, openfx::span()}, { "OfxPropName", PropId::OfxPropName, - {PropType::String}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxPropName_types, 1), 1, openfx::span()}, { "OfxPropParamSetNeedsSyncing", PropId::OfxPropParamSetNeedsSyncing, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxPropParamSetNeedsSyncing_types, 1), 1, openfx::span()}, { "OfxPropPluginDescription", PropId::OfxPropPluginDescription, - {PropType::String}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxPropPluginDescription_types, 1), 1, openfx::span()}, { "OfxPropShortLabel", PropId::OfxPropShortLabel, - {PropType::String}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxPropShortLabel_types, 1), 1, openfx::span()}, { "OfxPropTime", PropId::OfxPropTime, - {PropType::Double}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxPropTime_types, 1), 1, openfx::span()}, { "OfxPropType", PropId::OfxPropType, - {PropType::String}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxPropType_types, 1), 1, openfx::span()}, { "OfxPropVersion", PropId::OfxPropVersion, - {PropType::Int}, 1, 0, nullptr, 0}, + openfx::span(prop_type_arrays::OfxPropVersion_types, 1), 0, openfx::span()}, { "OfxPropVersionLabel", PropId::OfxPropVersionLabel, - {PropType::String}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::OfxPropVersionLabel_types, 1), 1, openfx::span()}, { "kOfxParamPropUseHostOverlayHandle", PropId::OfxParamPropUseHostOverlayHandle, - {PropType::Bool}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::kOfxParamPropUseHostOverlayHandle_types, 1), 1, openfx::span()}, { "kOfxPropKeyString", PropId::OfxPropKeyString, - {PropType::String}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::kOfxPropKeyString_types, 1), 1, openfx::span()}, { "kOfxPropKeySym", PropId::OfxPropKeySym, - {PropType::Int}, 1, 1, nullptr, 0}, + openfx::span(prop_type_arrays::kOfxPropKeySym_types, 1), 1, openfx::span()}, }} }; diff --git a/openfx-cpp/include/openfx/ofxSpan.h b/openfx-cpp/include/openfx/ofxSpan.h new file mode 100644 index 00000000..cdcfc1b4 --- /dev/null +++ b/openfx-cpp/include/openfx/ofxSpan.h @@ -0,0 +1,138 @@ +// Copyright OpenFX and contributors to the OpenFX project. +// SPDX-License-Identifier: BSD-3-Clause + +#pragma once + +/** + * @file ofxSpan.h + * @brief Provides std::span or compatible implementation for all C++ versions + * + * This header provides a span type (non-owning view over contiguous sequences) + * that works with C++17 and later. In C++20+, it uses std::span. For earlier + * versions, it uses tcbrindle/span from the Conan package tcb-span. + * + * The tcb-span package is automatically provided via Conan dependencies. + * See https://github.com/tcbrindle/span for more information. + * + * Usage: + * openfx::span values = myVector; + * openfx::span writable = myArray; + * for (auto v : values) { ... } + */ + +// Use std::span if available (C++20+) +#if __cplusplus >= 202002L && __has_include() + #include + namespace openfx { + template + using span = std::span; + + inline constexpr std::size_t dynamic_extent = std::dynamic_extent; + } + #define OPENFX_HAS_STD_SPAN 1 + +// Otherwise use tcbrindle/span for C++11/14/17 (via Conan package tcb-span) +#else + // The tcb-span Conan package provides tcb/span.hpp + // You can override this by defining OPENFX_SPAN_HEADER before including this file: + // #define OPENFX_SPAN_HEADER "my_span.hpp" + + #ifndef OPENFX_SPAN_HEADER + #define OPENFX_SPAN_HEADER + #endif + + // Configure tcbrindle/span to use openfx namespace + #define TCB_SPAN_NAMESPACE_NAME openfx + #include OPENFX_SPAN_HEADER + #undef TCB_SPAN_NAMESPACE_NAME + + // Note: tcbrindle/span already defines openfx::span, openfx::dynamic_extent, + // and openfx::make_span helpers + #define OPENFX_HAS_STD_SPAN 0 +#endif + +// Only define make_span helpers when using std::span (C++20+) +// tcbrindle/span already provides these in the openfx namespace +#if OPENFX_HAS_STD_SPAN +namespace openfx { + +/** + * @brief Helper to create a span from a C-style array with size + * + * Usage: + * const char* items[] = {"a", "b", "c"}; + * auto s = make_span(items, 3); + */ +template +constexpr span make_span(T* ptr, std::size_t count) noexcept { + return span(ptr, count); +} + +/** + * @brief Helper to create a span from a C-style array + * + * Usage: + * const char* items[] = {"a", "b", "c"}; + * auto s = make_span(items); // Size deduced as 3 + */ +template +constexpr span make_span(T (&arr)[N]) noexcept { + return span(arr); +} + +/** + * @brief Helper to create a span from a container (vector, array, etc.) + * + * Usage: + * std::vector v = {1, 2, 3}; + * auto s = make_span(v); + */ +template +constexpr auto make_span(Container& cont) noexcept + -> span { + return span(cont); +} + +template +constexpr auto make_span(const Container& cont) noexcept + -> span { + return span(cont); +} + +} // namespace openfx +#endif // OPENFX_HAS_STD_SPAN + +/** + * Usage Examples: + * + * // From vector: + * std::vector vec = {1, 2, 3}; + * openfx::span s1 = vec; + * + * // From array: + * std::array arr = {1.0, 2.0, 3.0, 4.0}; + * openfx::span s2 = arr; + * + * // From C-style array: + * const char* items[] = {"a", "b", "c"}; + * openfx::span s3 = openfx::make_span(items, 3); + * + * // Range-for: + * for (auto item : s3) { + * // process item + * } + * + * // Bounds-checked access (debug mode with tcbrindle/span): + * auto first = s1[0]; // OK + * auto oob = s1[100]; // Throws/asserts in debug mode + * + * // Named accessors: + * auto front = s1.front(); + * auto back = s1.back(); + * bool empty = s1.empty(); + * size_t size = s1.size(); + * + * // Subspans: + * auto first_two = s1.subspan(0, 2); + * auto last_two = s1.subspan(s1.size() - 2); + */ diff --git a/scripts/gen-props.py b/scripts/gen-props.py index 5c995e05..7e3db09e 100644 --- a/scripts/gen-props.py +++ b/scripts/gen-props.py @@ -277,6 +277,8 @@ def gen_props_metadata(props_metadata, outfile_path: Path): #include #include +#include "ofxSpan.h" + namespace openfx { enum class PropType { Int, @@ -319,15 +321,26 @@ def gen_props_metadata(props_metadata, outfile_path: Path): outfile.write(""" -#define MAX_PROP_TYPES 4 +// Property type arrays for spans (generated before PropDef) +namespace prop_type_arrays { +""") + # Generate type arrays for each property + for p in sorted(props_metadata): + md = props_metadata[p] + types = md.get('type') + if isinstance(types, str): + types = (types,) + prop_type_defs = "{" + ",".join(f'PropType::{t.capitalize()}' for t in types) + "}" + outfile.write(f"static constexpr PropType {p}_types[] = {prop_type_defs};\n") + outfile.write("} // namespace prop_type_arrays\n\n") + + outfile.write(""" struct PropDef { - const char* name; // Property name - PropId id; // ID for known props - PropType supportedTypes[MAX_PROP_TYPES]; // Supported data types - size_t supportedTypesCount; - int dimension; // Property dimension (0 for variable) - const char* const* enumValues; // Valid values for enum properties - size_t enumValuesCount; + const char* name; // Property name + PropId id; // ID for known props + openfx::span supportedTypes; // Supported data types + int dimension; // Property dimension (0 for variable) + openfx::span enumValues; // Valid values for enum properties }; // Array type for storing all PropDefs, indexed by PropId for simplicity @@ -361,17 +374,17 @@ def gen_props_metadata(props_metadata, outfile_path: Path): types = md.get('type') if isinstance(types, str): # make it always a list types = (types,) - # types - prop_type_defs = "{" + ",".join(f'PropType::{t.capitalize()}' for t in types) + "}" - prop_def += prop_type_defs + f', {len(types)}, ' + # types - use span pointing to type array + type_count = len(types) + prop_def += f"openfx::span(prop_type_arrays::{p}_types, {type_count}), " # dimension prop_def += f"{md['dimension']}, " - # enum values + # enum values - use span if md['type'] == 'enum': assert isinstance(md['values'], list) - prop_def += f"prop_enum_values::{p}.data(), prop_enum_values::{p}.size()" + prop_def += f"openfx::span(prop_enum_values::{p}.data(), prop_enum_values::{p}.size())" else: - prop_def += "nullptr, 0" + prop_def += "openfx::span()" prop_def += "},\n" outfile.write(prop_def) except Exception as e: From de7d2cddb9fe42fa7ca85862d65ebb267deb5843 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Mon, 3 Nov 2025 17:06:13 -0500 Subject: [PATCH 29/33] Add system for type-safe host-specific properties Hosts can set up properties in their own namespaces and give plugins type-safe access just like built-in properties. Signed-off-by: Gary Oberbrunner --- .../examples/host-specific-props/README.md | 281 ++++++++++++++++++ .../host-specific-props/example-usage.cpp | 153 ++++++++++ .../myhost/myhost-props.yml | 46 +++ .../myhost/myhostPropsMetadata.h | 114 +++++++ openfx-cpp/include/openfx/ofxPropsAccess.h | 218 +++++++++----- 5 files changed, 737 insertions(+), 75 deletions(-) create mode 100644 openfx-cpp/examples/host-specific-props/README.md create mode 100644 openfx-cpp/examples/host-specific-props/example-usage.cpp create mode 100644 openfx-cpp/examples/host-specific-props/myhost/myhost-props.yml create mode 100644 openfx-cpp/examples/host-specific-props/myhost/myhostPropsMetadata.h diff --git a/openfx-cpp/examples/host-specific-props/README.md b/openfx-cpp/examples/host-specific-props/README.md new file mode 100644 index 00000000..8d32083b --- /dev/null +++ b/openfx-cpp/examples/host-specific-props/README.md @@ -0,0 +1,281 @@ +# Host-Extensible Property System + +This directory contains examples showing how OpenFX hosts can define custom properties that plugins can access with full type safety, without modifying OpenFX core code. + +## Overview + +The OpenFX C++ property system now supports **host-extensible properties** through C++17 `auto` template parameters and argument-dependent lookup (ADL). This allows hosts like MyHost, Resolve, Flame, etc. to: + +- Define custom properties in their own namespace +- Provide the same type safety as standard OpenFX properties +- Maintain zero coupling with OpenFX core code +- Give plugins optional access to host-specific features + +## How It Works + +### Architecture + +``` +┌─────────────────────────────────────────────────────────────┐ +│ OpenFX Core (openfx namespace) │ +│ - PropId enum (standard properties) │ +│ - PropTraits (metadata) │ +│ - PropertyAccessor with template │ +│ - prop_traits_helper() for ADL │ +└─────────────────────────────────────────────────────────────┘ + │ + │ No coupling - hosts extend independently + │ +┌─────────────────────────────────────────────────────────────┐ +│ Host Extension (e.g., myhost namespace) │ +│ - PropId enum (host properties) │ +│ - PropTraits (metadata) │ +│ - prop_traits_helper() for ADL │ +└─────────────────────────────────────────────────────────────┘ + │ + │ Plugins include host headers + │ +┌─────────────────────────────────────────────────────────────┐ +│ Plugin Code │ +│ - props.get() │ +│ - props.get() │ +└─────────────────────────────────────────────────────────────┘ +``` + +### Key Mechanism: ADL (Argument-Dependent Lookup) + +The `PropertyAccessor` uses `template` to accept any enum type: + +```cpp +template +auto get() { + using Traits = PropTraits_t; // Uses ADL to find correct namespace + // ... +} +``` + +The `PropTraits_t` type alias uses decltype + ADL: + +```cpp +template +using PropTraits_t = decltype( + prop_traits_helper(std::integral_constant{}) +); +``` + +Each namespace provides a `prop_traits_helper` function for its `PropId` enum: + +```cpp +// In openfx namespace: +template +properties::PropTraits prop_traits_helper(std::integral_constant); + +// In myhost namespace: +template +properties::PropTraits prop_traits_helper(std::integral_constant); +``` + +When the compiler sees `prop_traits_helper(std::integral_constant{})`, ADL finds the `myhost::prop_traits_helper` function because the argument type (`std::integral_constant`) is associated with the `nuke` namespace. + +## For Hosts: Defining Custom Properties + +### Step 1: Define Properties in YAML (Recommended) + +Create a YAML file following the OpenFX property schema: + +```yaml +# myhost-props.yml +properties: + MyHostCustomProperty: + name: "com.mycompany.myhost.CustomProperty" + type: string + dimension: 1 + description: "Description of the custom property" + valid_for: + - "Effect Descriptor" + - "Effect Instance" +``` + +**Naming Convention**: Use reverse-DNS notation: +- `com.company.product.PropertyName` +- Examples: `com.foundry.myhost.ViewerProcess`, `com.blackmagic.resolve.Timeline` + +### Step 2: Generate Metadata Header + +Use the OpenFX `gen-props.py` script (or create your own generator): + +```bash +./scripts/gen-props.py \ + --input myhost-props.yml \ + --output myhost/myhostPropsMetadata.h \ + --namespace myhost +``` + +Or create the header manually (see `nuke/nukePropsMetadata.h` for an example). + +### Step 3: Distribute Header to Plugin Developers + +Provide the generated header file to plugin developers in your SDK: + +``` +MyHostSDK/ + include/ + myhost/ + myhostPropsMetadata.h +``` + +## For Plugin Developers: Using Host Properties + +### Step 1: Include Host Header + +```cpp +#include // OpenFX core +#include // Host-specific +``` + +### Step 2: Use Properties with Type Safety + +```cpp +using namespace openfx; + +void describe(OfxImageEffectHandle effect, const SuiteContainer& suites) { + PropertyAccessor props(effect, suites); + + // Standard OpenFX property + props.set("My Effect"); + + // Host-specific property (fully qualified) + try { + auto value = props.get(0, false); + Logger::info("Host property value: {}", value); + } catch (const PropertyNotFoundException&) { + // Not running in MyHost, or property not supported + } +} +``` + +### Step 3: Handle Missing Properties Gracefully + +Host properties may not exist when running in other hosts: + +```cpp +// Method 1: Use error_if_missing=false +auto value = props.get(0, false); +if (value) { + // Use the value +} + +// Method 2: Use try/catch +try { + auto value = props.get(); + // Use the value +} catch (const PropertyNotFoundException&) { + // Handle missing property +} +``` + +## Examples + +### MyHost Example + +See `nuke/` directory for a complete example showing: +- YAML property definition (`nuke-props.yml`) +- Generated metadata header (`nukePropsMetadata.h`) +- Example plugin usage (`example-plugin.cpp`) + +Properties defined: +- `MyHostViewerProcess`: OCIO viewer process name +- `MyHostOCIOConfig`: Path to OCIO config +- `MyHostScriptPath`: Current MyHost script path +- `MyHostNodeName`: Name of the containing node +- `MyHostNodeColor`: RGB color of the node (3 ints) + +## Benefits + +### For Hosts +- **Zero Coupling**: No need to modify OpenFX core +- **Version Control**: Version your property definitions independently +- **Documentation**: Generate docs from YAML files +- **Flexibility**: Add properties without coordinating with OpenFX releases + +### For Plugin Developers +- **Type Safety**: Compile-time checking for all properties +- **IDE Support**: Autocomplete and documentation tooltips +- **Discoverability**: Browse available host properties with IDE +- **Optional**: Ignore host extensions if not needed +- **Backward Compatible**: Existing code continues to work + +## Technical Details + +### Requirements +- C++17 or later (for `template` and structured bindings) +- Standard OpenFX C++ headers (`openfx-cpp`) + +### Compiler Compatibility +Tested with: +- GCC 7+ (C++17) +- Clang 5+ (C++17) +- MSVC 2017+ (C++17) + +### Performance +- **Zero runtime overhead**: All property lookups are template-based +- **Compile-time**: Type checking happens at compile time +- **Same performance** as direct property suite calls + +### Limitations +- Host properties must use reverse-DNS naming (`com.company.product.*`) to avoid string name collisions +- PropId enum values only need to be unique within each host's own namespace (used for array indexing) +- ADL requires proper namespace organization (each host defines `prop_traits_helper` in their namespace) + +## Migration Guide + +### Existing Code +No changes needed! Existing code using `PropId` continues to work: + +```cpp +// This still works exactly as before +props.get(); +props.set("OfxImageComponentRGBA"); +``` + +### New Code +Take advantage of host extensions: + +```cpp +// Mix standard and host properties seamlessly +props.set("My Effect") + .set("sRGB") + .setAll({128, 200, 255}); +``` + +## FAQ + +**Q: Do I need to modify OpenFX core to add host properties?** +A: No! That's the whole point. Hosts define properties in their own namespace. + +**Q: What if two hosts define the same property name?** +A: Use reverse-DNS naming (`com.company.product.*`) to avoid collisions. Even if names collide, they're in different C++ namespaces. + +**Q: Can I still use `getRaw()` for dynamic properties?** +A: Yes! The "escape hatch" methods (`getRaw`, `setRaw`) still work for truly dynamic property access. + +**Q: Do host properties work with older OpenFX versions?** +A: Host properties require the C++17-based property system (OpenFX 1.5+). For older versions, use `getRaw()`. + +**Q: How do I discover what host properties are available?** +A: Include the host's metadata header and use IDE autocomplete on `hostname::PropId::` to see all available properties. + +**Q: Can hosts add new properties without breaking plugins?** +A: Yes! New properties are opt-in. Plugins that don't know about them can simply not access them. + +## Support + +For questions or issues: +- OpenFX discussion forum: https://github.com/AcademySoftwareFoundation/openfx/discussions +- OpenFX issue tracker: https://github.com/AcademySoftwareFoundation/openfx/issues + +## See Also + +- [OpenFX Property System Documentation](../../Documentation/properties.md) +- [PropertyAccessor API Reference](../../openfx-cpp/include/openfx/ofxPropsAccess.h) +- [Property Generation Script](../../scripts/gen-props.py) diff --git a/openfx-cpp/examples/host-specific-props/example-usage.cpp b/openfx-cpp/examples/host-specific-props/example-usage.cpp new file mode 100644 index 00000000..c1cfea8e --- /dev/null +++ b/openfx-cpp/examples/host-specific-props/example-usage.cpp @@ -0,0 +1,153 @@ +// Copyright OpenFX and contributors to the OpenFX project. +// SPDX-License-Identifier: BSD-3-Clause +// +// Example: Using Host-Defined Properties +// +// NOTE: This file contains example CODE SNIPPETS for documentation purposes. +// It is NOT a complete, buildable OFX plugin. These examples demonstrate how +// a plugin would access both standard OpenFX properties and host-defined +// properties (in this case, MyHost properties) with full type safety. +// +// For complete, buildable plugin examples, see the Examples/ directory at +// the project root (e.g., TestProps, Basic, etc.). + +#include +#include +#include "myhost/myhostPropsMetadata.h" + +using namespace openfx; + +// Example plugin describe function +void describeMyHostAwarePlugin(OfxImageEffectHandle effect, const SuiteContainer& suites) { + PropertyAccessor props(effect, suites); + + // ========================================================================= + // Standard OpenFX Properties + // ========================================================================= + // These work exactly as before - no changes needed to existing code + + props.set("MyHost-Aware Effect") + .set("1.0") + .setAll({1, 0, 0}); + + // ========================================================================= + // Host-Defined Properties + // ========================================================================= + // Now we can also access MyHost-specific properties with the same type safety! + + // Try to get MyHost-specific properties + // Use error_if_missing=false since these properties only exist in MyHost + try { + // Get the viewer process - this tells us the color management display transform + auto viewerProcess = props.get(0, false); + if (viewerProcess) { + Logger::info("Running in MyHost with viewer process: {}", viewerProcess); + } + + // Get the project path + auto projectPath = props.get(0, false); + if (projectPath) { + Logger::info("MyHost project path: {}", projectPath); + } + + // Get the node name + auto nodeName = props.get(0, false); + if (nodeName) { + Logger::info("This effect is in MyHost node: {}", nodeName); + } + + // Set a custom node color (RGB 0-255) + // This demonstrates setting host properties + props.setAll({128, 200, 255}); + Logger::info("Set MyHost node color to light blue"); + + } catch (const PropertyNotFoundException& e) { + // Not running in MyHost, or MyHost doesn't support these properties + Logger::info("MyHost properties not available - probably not running in MyHost"); + } +} + +// Example showing compile-time type safety +void demonstrateTypeSafety(OfxImageEffectHandle effect, const SuiteContainer& suites) { + PropertyAccessor props(effect, suites); + + // ✅ This compiles - MyHostViewerProcess is a string property + auto viewerProcess = props.get(); + + // ✅ This compiles - MyHostNodeColor is an int property with dimension 3 + auto colors = props.getAll(); + // colors is std::array because dimension is known at compile time + + // ✅ This compiles - setting an int array property + props.setAll({255, 128, 0}); + + // ❌ This would NOT compile - type mismatch! + // auto wrong = props.get(); + // ^^^^^^^^^ Compile error: MyHostNodeColor is int, not string + + // ✅ Standard OpenFX properties still work exactly as before + props.set("My Effect"); + auto label = props.get(); +} + +// Example showing namespace flexibility +void demonstrateNamespaces(OfxImageEffectHandle effect, const SuiteContainer& suites) { + PropertyAccessor props(effect, suites); + + // Method 1: Fully qualified names (explicit and clear) + auto viewer1 = props.get(0, false); + auto label1 = props.get(); + + // Method 2: Using namespace for convenience + { + using namespace myhost; + auto viewer2 = props.get(0, false); + // Note: This would be ambiguous if both namespaces are in scope! + // So we still need openfx:: for standard properties + auto label2 = props.get(); + } + + // Method 3: Mix and match as needed + props.set("Mixed Namespaces") + .setAll({200, 100, 50}); +} + +// Example showing the "escape hatch" still works +void demonstrateDynamicAccess(OfxPropertySetHandle propSet, const OfxPropertySuiteV1* propSuite) { + PropertyAccessor props(propSet, propSuite); + + // For truly dynamic properties, the getRaw/setRaw methods still work + auto unknownProp = props.getRaw("com.somehost.unknownProperty", 0, false); + + // But when possible, use the type-safe methods with PropId enums + auto typeSafe = props.get(0, false); +} + +/* + * KEY BENEFITS of this approach: + * + * 1. **Zero Coupling**: MyHost (the host) doesn't modify OpenFX core code + * - myhostPropsMetadata.h is distributed by MyHost, not OpenFX + * - Plugins include it only if they want MyHost-specific features + * + * 2. **Type Safety**: Compile-time checking for host properties + * - Wrong type? Compile error. + * - Wrong property ID? Compile error. + * - IDE autocomplete shows available properties + * + * 3. **Clean Syntax**: Same API for standard and host properties + * - props.get() + * - props.get() + * + * 4. **Backward Compatible**: Existing code continues to work + * - No changes needed to existing plugins + * - New features are opt-in + * + * 5. **Discoverability**: IDE autocomplete works + * - Type "myhost::PropId::" and see all available properties + * - Hover over a property to see its documentation + * + * 6. **Optional**: Plugins can ignore host extensions + * - Don't include myhostPropsMetadata.h? No problem. + * - Use getRaw() for dynamic access? Still works. + */ diff --git a/openfx-cpp/examples/host-specific-props/myhost/myhost-props.yml b/openfx-cpp/examples/host-specific-props/myhost/myhost-props.yml new file mode 100644 index 00000000..8c70f6b6 --- /dev/null +++ b/openfx-cpp/examples/host-specific-props/myhost/myhost-props.yml @@ -0,0 +1,46 @@ +# Example host-defined properties for MyHost +# This file would be processed by gen-props.py (or a host's own generator) +# to create myhostPropsMetadata.h + +properties: + MyHostViewerProcess: + name: "com.example.myhost.ViewerProcess" + type: string + dimension: 1 + description: "MyHost viewer process name (color management display transform)" + valid_for: + - "Effect Descriptor" + - "Effect Instance" + + MyHostColorConfig: + name: "com.example.myhost.ColorConfig" + type: string + dimension: 1 + description: "Path to MyHost's color management config file" + valid_for: + - "Effect Instance" + + MyHostProjectPath: + name: "com.example.myhost.ProjectPath" + type: string + dimension: 1 + description: "Path to the current MyHost project file" + valid_for: + - "Effect Instance" + + MyHostNodeName: + name: "com.example.myhost.NodeName" + type: string + dimension: 1 + description: "Name of the MyHost node containing this effect" + valid_for: + - "Effect Instance" + + MyHostNodeColor: + name: "com.example.myhost.NodeColor" + type: int + dimension: 3 + description: "RGB color of the node in MyHost's node graph (0-255)" + valid_for: + - "Effect Descriptor" + - "Effect Instance" diff --git a/openfx-cpp/examples/host-specific-props/myhost/myhostPropsMetadata.h b/openfx-cpp/examples/host-specific-props/myhost/myhostPropsMetadata.h new file mode 100644 index 00000000..ebbcc23c --- /dev/null +++ b/openfx-cpp/examples/host-specific-props/myhost/myhostPropsMetadata.h @@ -0,0 +1,114 @@ +// Copyright OpenFX and contributors to the OpenFX project. +// SPDX-License-Identifier: BSD-3-Clause +// +// Example: Host-Defined Properties for MyHost +// +// This file demonstrates how a host (MyHost) would define custom properties +// that plugins can access with the same type safety as standard OpenFX properties. +// +// In practice, this file would be generated from myhost-props.yml using gen-props.py +// (or a similar tool provided by the host). +// +// NOTE: This is for demonstration purposes only. MyHost is a fictitious host +// used to show the extensibility pattern without implying endorsement by any +// actual product. + +#pragma once + +#include +#include +#include + +namespace myhost { + +// Property ID enum for compile-time lookup and type safety. +// NOTE: Enum values are used only for indexing into prop_defs array below. +// They don't need to avoid collisions with other namespaces since this is +// a separate C++ type. Starting at 10000 is arbitrary but helps distinguish +// from standard OpenFX properties when debugging. +enum class PropId { + MyHostViewerProcess = 10000, + MyHostColorConfig = 10001, + MyHostProjectPath = 10002, + MyHostNodeName = 10003, + MyHostNodeColor = 10004, +}; + +namespace properties { + +// Property definitions using the same structure as OpenFX properties +constexpr openfx::PropDef prop_defs[] = { + // MyHostViewerProcess + { + .name = "com.example.myhost.ViewerProcess", + .supportedTypes = std::array{openfx::PropType::String}, + .dimension = 1, + .enumValues = openfx::ofxSpan{}, + .description = "MyHost viewer process name (color management display transform)", + }, + // MyHostColorConfig + { + .name = "com.example.myhost.ColorConfig", + .supportedTypes = std::array{openfx::PropType::String}, + .dimension = 1, + .enumValues = openfx::ofxSpan{}, + .description = "Path to MyHost's color management config file", + }, + // MyHostProjectPath + { + .name = "com.example.myhost.ProjectPath", + .supportedTypes = std::array{openfx::PropType::String}, + .dimension = 1, + .enumValues = openfx::ofxSpan{}, + .description = "Path to the current MyHost project file", + }, + // MyHostNodeName + { + .name = "com.example.myhost.NodeName", + .supportedTypes = std::array{openfx::PropType::String}, + .dimension = 1, + .enumValues = openfx::ofxSpan{}, + .description = "Name of the MyHost node containing this effect", + }, + // MyHostNodeColor + { + .name = "com.example.myhost.NodeColor", + .supportedTypes = std::array{openfx::PropType::Int}, + .dimension = 3, + .enumValues = openfx::ofxSpan{}, + .description = "RGB color of the node in MyHost's node graph (0-255)", + }, +}; + +// Base template struct for property traits +template +struct PropTraits; + +// Helper macro to define PropTraits specializations +#define MYHOST_DEFINE_PROP_TRAITS(id, _type, _is_multitype) \ +template<> \ +struct PropTraits { \ + using type = _type; \ + static constexpr bool is_multitype = _is_multitype; \ + static constexpr int dimension = prop_defs[static_cast(PropId::id) - 10000].dimension; \ + static constexpr const openfx::PropDef& def = prop_defs[static_cast(PropId::id) - 10000]; \ +} + +// Define traits for each property +MYHOST_DEFINE_PROP_TRAITS(MyHostViewerProcess, const char*, false); +MYHOST_DEFINE_PROP_TRAITS(MyHostColorConfig, const char*, false); +MYHOST_DEFINE_PROP_TRAITS(MyHostProjectPath, const char*, false); +MYHOST_DEFINE_PROP_TRAITS(MyHostNodeName, const char*, false); +MYHOST_DEFINE_PROP_TRAITS(MyHostNodeColor, int, false); + +#undef MYHOST_DEFINE_PROP_TRAITS + +} // namespace properties + +// ADL helper function for PropTraits lookup. +// This enables openfx::PropertyAccessor to find myhost::properties::PropTraits +// via argument-dependent lookup. +template +properties::PropTraits prop_traits_helper(std::integral_constant); + +} // namespace myhost diff --git a/openfx-cpp/include/openfx/ofxPropsAccess.h b/openfx-cpp/include/openfx/ofxPropsAccess.h index 63b5eb95..ecc7df98 100644 --- a/openfx-cpp/include/openfx/ofxPropsAccess.h +++ b/openfx-cpp/include/openfx/ofxPropsAccess.h @@ -150,6 +150,52 @@ openfx::EnumValue::size(); namespace openfx { +// ============================================================================ +// Host-Extensible Property System Support +// ============================================================================ +// +// This section enables hosts to define their own custom properties in their +// own namespaces while maintaining the same type safety as standard OpenFX +// properties. This is achieved through C++17 auto template parameters and +// argument-dependent lookup (ADL). +// +// How it works: +// 1. Hosts define their own PropId enum in their namespace (e.g., nuke::PropId) +// 2. Hosts define PropTraits specializations in their namespace +// 3. Hosts define a prop_traits_helper function for ADL lookup +// 4. PropertyAccessor uses template to accept any enum type +// 5. PropTraits_t uses ADL to find the correct PropTraits in the right namespace +// +// Example host usage (in host's header file): +// namespace myhost { +// enum class PropId { CustomProperty, ... }; +// namespace properties { +// template struct PropTraits; +// template<> struct PropTraits { ... }; +// } +// // Enable ADL lookup +// template +// properties::PropTraits prop_traits_helper(std::integral_constant); +// } +// +// Plugin usage: +// props.get(); // Standard property +// props.get(); // Host property +// +// ============================================================================ + +// Forward declare the ADL helper for standard OpenFX properties. +// This function is never actually called - it's only used for type deduction via decltype. +// It must be in the same namespace as PropId (openfx) for ADL to work. +template +properties::PropTraits prop_traits_helper(std::integral_constant); + +// PropTraits_t: Type alias that uses ADL to find the correct PropTraits +// for any PropId enum (openfx::PropId or host-defined). +// The decltype+ADL pattern allows each namespace to provide its own prop_traits_helper. +template +using PropTraits_t = decltype(prop_traits_helper(std::integral_constant{})); + // Type-mapping helper to infer C++ type from PropType template struct PropTypeToNative { @@ -182,19 +228,24 @@ struct PropTypeToNative { using type = void *; }; -// Helper to create property enum values with strong typing -template +// Helper to access enum property values with strong typing. +// Works with any PropId enum (standard OpenFX or host-defined). +template struct EnumValue { + using Traits = PropTraits_t; + static constexpr const char *get(size_t index) { - static_assert(index < properties::PropTraits::def.enumValues.size(), + static_assert(index < Traits::def.enumValues.size(), "Property enum index out of range"); - return properties::PropTraits::def.enumValues[index]; + return Traits::def.enumValues[index]; } - static constexpr size_t size() { return properties::PropTraits::def.enumValues.size(); } + static constexpr size_t size() { + return Traits::def.enumValues.size(); + } static constexpr bool isValid(const char *value) { - for (auto val : properties::PropTraits::def.enumValues) { + for (auto val : Traits::def.enumValues) { if (std::strcmp(val, value) == 0) return true; } @@ -279,10 +330,11 @@ class PropertyAccessor { assert(propset_); } - // Get property value using PropId (compile-time type checking) - template ::is_multitype>> - typename properties::PropTraits::type get(int index = 0, bool error_if_missing = true) const { - using Traits = properties::PropTraits; + // Get property value using PropId (compile-time type checking). + // Works with any PropId enum (openfx::PropId or host-defined). + template ::is_multitype>> + typename PropTraits_t::type get(int index = 0, bool error_if_missing = true) const { + using Traits = PropTraits_t; static_assert(!Traits::is_multitype, "This property supports multiple types. Use get() instead."); @@ -315,11 +367,12 @@ class PropertyAccessor { } } - // Get multi-type property value (requires explicit type) - template ::is_multitype>> + // Get multi-type property value (requires explicit type). + // Works with any PropId enum (openfx::PropId or host-defined). + template ::is_multitype>> T get(int index = 0, bool error_if_missing = true) const { - using Traits = properties::PropTraits; + using Traits = PropTraits_t; // Check if T is compatible with any of the supported PropTypes constexpr bool isValidType = [&]() { @@ -369,11 +422,12 @@ class PropertyAccessor { } } - // Set property value using PropId (compile-time type checking) - template - PropertyAccessor &set(typename properties::PropTraits::type value, int index = 0, + // Set property value using PropId (compile-time type checking). + // Works with any PropId enum (openfx::PropId or host-defined). + template + PropertyAccessor &set(typename PropTraits_t::type value, int index = 0, bool error_if_missing = true) { - using Traits = properties::PropTraits; + using Traits = PropTraits_t; static_assert(!Traits::is_multitype, "This property supports multiple types. Use set() instead."); @@ -410,12 +464,13 @@ class PropertyAccessor { return *this; } - // Set multi-type property value (requires explicit type) - // Should only be used for multitype props (SFINAE) - template ::is_multitype>> + // Set multi-type property value (requires explicit type). + // Should only be used for multitype props (SFINAE). + // Works with any PropId enum (openfx::PropId or host-defined). + template ::is_multitype>> PropertyAccessor &set(T value, int index = 0, bool error_if_missing = true) { - using Traits = properties::PropTraits; + using Traits = PropTraits_t; // Check if T is compatible with any of the supported PropTypes constexpr bool isValidType = [&]() { @@ -459,19 +514,20 @@ class PropertyAccessor { return *this; } - // Get all values of a property (for single-type properties) - template + // Get all values of a property (for single-type properties). + // Works with any PropId enum (openfx::PropId or host-defined). + template auto getAll(bool error_if_missing = true) const { static_assert( - !properties::PropTraits::is_multitype, + !PropTraits_t::is_multitype, "This property supports multiple types. Use getAllTyped() instead."); assert(propset_ != nullptr); - using ValueType = typename properties::PropTraits::type; + using ValueType = typename PropTraits_t::type; // If dimension is known at compile time, use std::array for stack allocation - if constexpr (properties::PropTraits::def.dimension > 0) { - constexpr int dim = properties::PropTraits::def.dimension; + if constexpr (PropTraits_t::def.dimension > 0) { + constexpr int dim = PropTraits_t::def.dimension; std::array values; for (int i = 0; i < dim; ++i) { @@ -493,16 +549,17 @@ class PropertyAccessor { } } - // Get all values of a multi-type property - require explicit ElementType - template + // Get all values of a multi-type property - require explicit ElementType. + // Works with any PropId enum (openfx::PropId or host-defined). + template auto getAllTyped(bool error_if_missing = true) const { - static_assert(properties::PropTraits::is_multitype, + static_assert(PropTraits_t::is_multitype, "This property does not support multiple types. Use getAll() instead."); assert(propset_ != nullptr); // If dimension is known at compile time, use std::array for stack allocation - if constexpr (properties::PropTraits::def.dimension > 0) { - constexpr int dim = properties::PropTraits::def.dimension; + if constexpr (PropTraits_t::def.dimension > 0) { + constexpr int dim = PropTraits_t::def.dimension; std::array values; for (int i = 0; i < dim; ++i) { @@ -526,11 +583,12 @@ class PropertyAccessor { // Set all values of a prop - // For single-type properties with any container - template // Container must have size() and operator[] PropertyAccessor &setAll(const Container &values, bool error_if_missing = true) { - static_assert(!properties::PropTraits::is_multitype, + static_assert(!PropTraits_t::is_multitype, "This property supports multiple types. Use setAll(container) instead."); assert(propset_ != nullptr); @@ -542,11 +600,12 @@ class PropertyAccessor { return *this; } - // For single-type properties with initializer lists - template - PropertyAccessor &setAll(std::initializer_list::type> values, + // For single-type properties with initializer lists. + // Works with any PropId enum (openfx::PropId or host-defined). + template + PropertyAccessor &setAll(std::initializer_list::type> values, bool error_if_missing = true) { - static_assert(!properties::PropTraits::is_multitype, + static_assert(!PropTraits_t::is_multitype, "This property supports multiple types. Use " "setAllTyped() instead."); assert(propset_ != nullptr); @@ -559,11 +618,12 @@ class PropertyAccessor { return *this; } - // For 2-d (PointD) single-type properties - template ::def.dimension == 2 && - !properties::PropTraits::is_multitype && - std::is_same_v::type, double>, + // For 2-d (PointD) single-type properties. + // Works with any PropId enum (openfx::PropId or host-defined). + template ::def.dimension == 2 && + !PropTraits_t::is_multitype && + std::is_same_v::type, double>, int> = 0> PropertyAccessor &set(OfxPointD values, bool error_if_missing = true) { assert(propset_ != nullptr); @@ -572,11 +632,12 @@ class PropertyAccessor { return *this; } - // For 2-d (PointI) single-type properties - template ::def.dimension == 2 && - !properties::PropTraits::is_multitype && - std::is_same_v::type, double>, + // For 2-d (PointI) single-type properties. + // Works with any PropId enum (openfx::PropId or host-defined). + template ::def.dimension == 2 && + !PropTraits_t::is_multitype && + std::is_same_v::type, double>, int> = 0> PropertyAccessor &set(OfxPointI values, bool error_if_missing = true) { assert(propset_ != nullptr); @@ -585,11 +646,12 @@ class PropertyAccessor { return *this; } - // For 4-d (RectD) single-type properties - template ::def.dimension == 4 && - !properties::PropTraits::is_multitype && - std::is_same_v::type, double>, + // For 4-d (RectD) single-type properties. + // Works with any PropId enum (openfx::PropId or host-defined). + template ::def.dimension == 4 && + !PropTraits_t::is_multitype && + std::is_same_v::type, double>, int> = 0> PropertyAccessor &set(OfxRectD values, bool error_if_missing = true) { assert(propset_ != nullptr); @@ -600,11 +662,12 @@ class PropertyAccessor { return *this; } - // For 4-d (RectI) single-type properties - template ::def.dimension == 4 && - !properties::PropTraits::is_multitype && - std::is_same_v::type, double>, + // For 4-d (RectI) single-type properties. + // Works with any PropId enum (openfx::PropId or host-defined). + template ::def.dimension == 4 && + !PropTraits_t::is_multitype && + std::is_same_v::type, double>, int> = 0> PropertyAccessor &set(OfxRectI values, bool error_if_missing = true) { assert(propset_ != nullptr); @@ -615,11 +678,12 @@ class PropertyAccessor { return *this; } - // For multi-type properties - require explicit ElementType - template + // For multi-type properties - require explicit ElementType. + // Works with any PropId enum (openfx::PropId or host-defined). + template PropertyAccessor &setAllTyped(const std::initializer_list &values, bool error_if_missing = true) { - static_assert(properties::PropTraits::is_multitype, + static_assert(PropTraits_t::is_multitype, "This property does not support multiple types. Use " "setAll() instead."); assert(propset_ != nullptr); @@ -631,10 +695,11 @@ class PropertyAccessor { return *this; } - // Overload for any container with multi-type properties - template + // Overload for any container with multi-type properties. + // Works with any PropId enum (openfx::PropId or host-defined). + template PropertyAccessor &setAllTyped(const Container &values, bool error_if_missing = true) { - static_assert(properties::PropTraits::is_multitype, + static_assert(PropTraits_t::is_multitype, "This property does not support multiple types. Use " "setAll() instead."); assert(propset_ != nullptr); @@ -646,10 +711,11 @@ class PropertyAccessor { return *this; } - // Get dimension of a property - template + // Get dimension of a property. + // Works with any PropId enum (openfx::PropId or host-defined). + template int getDimension(bool error_if_missing = true) const { - using Traits = properties::PropTraits; + using Traits = PropTraits_t; assert(propset_ != nullptr); // If dimension is known at compile time, we can just return it @@ -736,16 +802,18 @@ class PropertyAccessor { namespace prop { // We'll use the existing defined constants like kOfxImageClipPropColourspace -// Helper to validate property existence at compile time -template +// Helper to validate property existence at compile time. +// Works with any PropId enum (openfx::PropId or host-defined). +template constexpr bool exists() { return true; // All PropId values are valid by definition } -// Helper to check if a property supports a specific C++ type -template +// Helper to check if a property supports a specific C++ type. +// Works with any PropId enum (openfx::PropId or host-defined). +template constexpr bool supportsType() { - constexpr auto supportedTypes = properties::PropTraits::def.supportedTypes; + constexpr auto supportedTypes = PropTraits_t::def.supportedTypes; for (const auto &type : supportedTypes) { if constexpr (std::is_same_v) { From 898bcecbf23f0670b7a58e0e207c1fc1e869e91c Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 4 Nov 2025 09:04:51 -0500 Subject: [PATCH 30/33] Checkpoint: template for host-specific properties Signed-off-by: Gary Oberbrunner --- Examples/TestProps/testProperties.cpp | 23 ++ .../examples/host-specific-props/README.md | 29 ++- .../host-specific-props/example-usage.cpp | 3 + .../myhost/myhostPropsMetadata.h | 225 +++++++++++------- 4 files changed, 188 insertions(+), 92 deletions(-) diff --git a/Examples/TestProps/testProperties.cpp b/Examples/TestProps/testProperties.cpp index 695ce81b..b2b19200 100644 --- a/Examples/TestProps/testProperties.cpp +++ b/Examples/TestProps/testProperties.cpp @@ -13,6 +13,7 @@ #include "openfx/ofxPropsAccess.h" #include "openfx/ofxPropsBySet.h" #include "openfx/ofxPropsMetadata.h" +#include "../openfx-cpp/examples/host-specific-props/myhost/myhostPropsMetadata.h" // Ensure example compiles #include "spdlog/spdlog.h" #include // stl maps #include // stl strings @@ -419,6 +420,28 @@ static OfxStatus actionDescribe(OfxImageEffectHandle effect) { .setAll( supportedPixelDepths); + // Test host-specific property extensibility (will fail at runtime but compiles!) + spdlog::info("Testing host-specific property extensibility..."); + try { + // Test myhost properties (from examples/host-specific-props) + auto viewerProcess = accessor.get(0, false); + spdlog::info(" MyHost viewer process: {}", viewerProcess ? viewerProcess : "(not available)"); + + auto projectPath = accessor.get(0, false); + spdlog::info(" MyHost project path: {}", projectPath ? projectPath : "(not available)"); + + auto nodeColor = accessor.getAll(); + spdlog::info(" MyHost node color dimension: {}", nodeColor.size()); + + // Test setting host properties + accessor.setAll({255, 128, 64}); + + } catch (const PropertyNotFoundException& e) { + spdlog::info(" Host properties not available (expected) - but compilation succeeded!"); + } catch (...) { + spdlog::info(" Host properties failed (expected) - but compilation succeeded!"); + } + // After setting up, log all known props const auto prop_values = getAllPropertiesOfSet(accessor, "EffectDescriptor"); logPropValues("EffectDescriptor", prop_values); diff --git a/openfx-cpp/examples/host-specific-props/README.md b/openfx-cpp/examples/host-specific-props/README.md index 8d32083b..ffd8dba2 100644 --- a/openfx-cpp/examples/host-specific-props/README.md +++ b/openfx-cpp/examples/host-specific-props/README.md @@ -111,7 +111,7 @@ Use the OpenFX `gen-props.py` script (or create your own generator): --namespace myhost ``` -Or create the header manually (see `nuke/nukePropsMetadata.h` for an example). +Or create the header manually (see `myhost/myhostPropsMetadata.h` for the canonical template). ### Step 3: Distribute Header to Plugin Developers @@ -176,19 +176,24 @@ try { ## Examples -### MyHost Example +### MyHost Template -See `nuke/` directory for a complete example showing: -- YAML property definition (`nuke-props.yml`) -- Generated metadata header (`nukePropsMetadata.h`) -- Example plugin usage (`example-plugin.cpp`) +The `myhost/` directory provides a **canonical template** for hosts to follow: +- Complete metadata header (`myhostPropsMetadata.h`) with detailed step-by-step comments +- Example plugin usage (`example-usage.cpp`) showing best practices +- This template is compile-tested as part of the TestProps example -Properties defined: -- `MyHostViewerProcess`: OCIO viewer process name -- `MyHostOCIOConfig`: Path to OCIO config -- `MyHostScriptPath`: Current MyHost script path -- `MyHostNodeName`: Name of the containing node -- `MyHostNodeColor`: RGB color of the node (3 ints) +**To create your own host properties:** +1. Copy `myhost/myhostPropsMetadata.h` to your SDK +2. Rename the namespace from `myhost` to your host name +3. Follow the numbered STEP comments in the header to customize it + +**Example properties defined in the template:** +- `MyHostViewerProcess`: Viewer process name (demonstrates string property) +- `MyHostColorConfig`: Path to color management config (demonstrates string property) +- `MyHostProjectPath`: Current project path (demonstrates string property) +- `MyHostNodeName`: Name of the containing node (demonstrates string property) +- `MyHostNodeColor`: RGB color of the node (demonstrates int[3] array property) ## Benefits diff --git a/openfx-cpp/examples/host-specific-props/example-usage.cpp b/openfx-cpp/examples/host-specific-props/example-usage.cpp index c1cfea8e..bb4a7cda 100644 --- a/openfx-cpp/examples/host-specific-props/example-usage.cpp +++ b/openfx-cpp/examples/host-specific-props/example-usage.cpp @@ -8,6 +8,9 @@ // a plugin would access both standard OpenFX properties and host-defined // properties (in this case, MyHost properties) with full type safety. // +// The myhost/myhostPropsMetadata.h header IS compile-tested as part of the +// TestProps example build, ensuring the example code is syntactically correct. +// // For complete, buildable plugin examples, see the Examples/ directory at // the project root (e.g., TestProps, Basic, etc.). diff --git a/openfx-cpp/examples/host-specific-props/myhost/myhostPropsMetadata.h b/openfx-cpp/examples/host-specific-props/myhost/myhostPropsMetadata.h index ebbcc23c..105f859e 100644 --- a/openfx-cpp/examples/host-specific-props/myhost/myhostPropsMetadata.h +++ b/openfx-cpp/examples/host-specific-props/myhost/myhostPropsMetadata.h @@ -1,113 +1,178 @@ // Copyright OpenFX and contributors to the OpenFX project. // SPDX-License-Identifier: BSD-3-Clause // -// Example: Host-Defined Properties for MyHost +// TEMPLATE: Host-Defined Properties Header // -// This file demonstrates how a host (MyHost) would define custom properties -// that plugins can access with the same type safety as standard OpenFX properties. +// This file serves as the canonical template for hosts that want to define +// custom properties with full compile-time type safety. // -// In practice, this file would be generated from myhost-props.yml using gen-props.py -// (or a similar tool provided by the host). +// HOW TO USE THIS TEMPLATE: +// 1. Copy this file to your host's SDK/include directory +// 2. Rename the namespace from 'myhost' to match your host (e.g., 'nuke', 'resolve', etc.) +// 3. Define your host's custom properties in the PropId enum +// 4. Update the prop_defs array with your property definitions +// 5. Add PropTraits specializations for each property +// 6. Distribute this header with your host's plugin SDK // -// NOTE: This is for demonstration purposes only. MyHost is a fictitious host -// used to show the extensibility pattern without implying endorsement by any -// actual product. +// GENERATION: While this template can be manually edited, we recommend +// generating it from a YAML file using gen-props.py (see Support/Scripts/). +// This ensures consistency and reduces the chance of errors. +// +// This example uses "MyHost" as a fictitious host name to demonstrate the +// pattern without implying endorsement by any actual product. #pragma once #include #include #include +#include namespace myhost { +// ============================================================================ +// STEP 1: Define your host's property IDs +// ============================================================================ // Property ID enum for compile-time lookup and type safety. -// NOTE: Enum values are used only for indexing into prop_defs array below. -// They don't need to avoid collisions with other namespaces since this is -// a separate C++ type. Starting at 10000 is arbitrary but helps distinguish -// from standard OpenFX properties when debugging. +// +// IMPORTANT: Enum values are ONLY used as array indices into prop_defs below. +// They don't need to avoid collisions with other hosts because: +// - This is a separate C++ type (myhost::PropId vs other::PropId) +// - Runtime property access uses STRING NAMES, not these numeric values +// - No coordination needed between hosts - each namespace is independent +// +// Best practices: +// - Start at 0 and increment sequentially for simple indexing +// - Use descriptive names matching your property naming convention +// - Order doesn't matter, but sequential is easiest to maintain +// enum class PropId { - MyHostViewerProcess = 10000, - MyHostColorConfig = 10001, - MyHostProjectPath = 10002, - MyHostNodeName = 10003, - MyHostNodeColor = 10004, + MyHostViewerProcess = 0, // Example: string property + MyHostColorConfig = 1, // Example: string property + MyHostProjectPath = 2, // Example: string property + MyHostNodeName = 3, // Example: string property + MyHostNodeColor = 4, // Example: int[3] property (RGB color) }; namespace properties { -// Property definitions using the same structure as OpenFX properties +// ============================================================================ +// STEP 2: Define type arrays for each property +// ============================================================================ +// Each property needs a constexpr array specifying its supported types. +// Most properties have a single type, but multi-type properties are possible. +// +static constexpr openfx::PropType MyHostViewerProcess_types[] = {openfx::PropType::String}; +static constexpr openfx::PropType MyHostColorConfig_types[] = {openfx::PropType::String}; +static constexpr openfx::PropType MyHostProjectPath_types[] = {openfx::PropType::String}; +static constexpr openfx::PropType MyHostNodeName_types[] = {openfx::PropType::String}; +static constexpr openfx::PropType MyHostNodeColor_types[] = {openfx::PropType::Int}; + +// ============================================================================ +// STEP 3: Define property metadata +// ============================================================================ +// Property definitions array using openfx::PropDef structure. +// +// Each PropDef entry contains: +// 1. name: Full property name string (use reverse-DNS: "com.yourcompany.yourhost.PropertyName") +// 2. id: Use openfx::PropId::NProps as placeholder (runtime uses string name, not this) +// 3. supportedTypes: span of the type array defined above +// 4. dimension: Number of values (1 for scalars, >1 for arrays) +// 5. enumValues: span of valid enum strings (empty for non-enum properties) +// +// NOTE: The 'id' field is typed as openfx::PropId, so we use NProps as a +// placeholder. This is fine because runtime property access uses the STRING +// NAME field, not the enum id value. The id field is only for metadata. +// constexpr openfx::PropDef prop_defs[] = { - // MyHostViewerProcess - { - .name = "com.example.myhost.ViewerProcess", - .supportedTypes = std::array{openfx::PropType::String}, - .dimension = 1, - .enumValues = openfx::ofxSpan{}, - .description = "MyHost viewer process name (color management display transform)", - }, - // MyHostColorConfig - { - .name = "com.example.myhost.ColorConfig", - .supportedTypes = std::array{openfx::PropType::String}, - .dimension = 1, - .enumValues = openfx::ofxSpan{}, - .description = "Path to MyHost's color management config file", - }, - // MyHostProjectPath - { - .name = "com.example.myhost.ProjectPath", - .supportedTypes = std::array{openfx::PropType::String}, - .dimension = 1, - .enumValues = openfx::ofxSpan{}, - .description = "Path to the current MyHost project file", - }, - // MyHostNodeName - { - .name = "com.example.myhost.NodeName", - .supportedTypes = std::array{openfx::PropType::String}, - .dimension = 1, - .enumValues = openfx::ofxSpan{}, - .description = "Name of the MyHost node containing this effect", - }, - // MyHostNodeColor - { - .name = "com.example.myhost.NodeColor", - .supportedTypes = std::array{openfx::PropType::Int}, - .dimension = 3, - .enumValues = openfx::ofxSpan{}, - .description = "RGB color of the node in MyHost's node graph (0-255)", - }, + // MyHostViewerProcess - "MyHost viewer process name (color management display transform)" + { "com.example.myhost.ViewerProcess", openfx::PropId::NProps, + openfx::span(MyHostViewerProcess_types, 1), 1, openfx::span() }, + // MyHostColorConfig - "Path to MyHost's color management config file" + { "com.example.myhost.ColorConfig", openfx::PropId::NProps, + openfx::span(MyHostColorConfig_types, 1), 1, openfx::span() }, + // MyHostProjectPath - "Path to the current MyHost project file" + { "com.example.myhost.ProjectPath", openfx::PropId::NProps, + openfx::span(MyHostProjectPath_types, 1), 1, openfx::span() }, + // MyHostNodeName - "Name of the MyHost node containing this effect" + { "com.example.myhost.NodeName", openfx::PropId::NProps, + openfx::span(MyHostNodeName_types, 1), 1, openfx::span() }, + // MyHostNodeColor - "RGB color of the node in MyHost's node graph (0-255)" + { "com.example.myhost.NodeColor", openfx::PropId::NProps, + openfx::span(MyHostNodeColor_types, 1), 3, openfx::span() }, }; -// Base template struct for property traits +// ============================================================================ +// STEP 4: Define PropTraits specializations +// ============================================================================ +// PropTraits maps each PropId enum value to its type metadata. +// This enables compile-time type checking in PropertyAccessor. +// +// Each specialization must define: +// - type: The C++ type (const char* for strings, int for ints, etc.) +// - is_multitype: false for single-type properties, true for multi-type +// - dimension: Number of values (must match prop_defs entry) +// - def: Reference to the corresponding prop_defs entry +// + +// Base template (leave undefined - specializations required) template struct PropTraits; -// Helper macro to define PropTraits specializations -#define MYHOST_DEFINE_PROP_TRAITS(id, _type, _is_multitype) \ -template<> \ -struct PropTraits { \ - using type = _type; \ - static constexpr bool is_multitype = _is_multitype; \ - static constexpr int dimension = prop_defs[static_cast(PropId::id) - 10000].dimension; \ - static constexpr const openfx::PropDef& def = prop_defs[static_cast(PropId::id) - 10000]; \ -} - -// Define traits for each property -MYHOST_DEFINE_PROP_TRAITS(MyHostViewerProcess, const char*, false); -MYHOST_DEFINE_PROP_TRAITS(MyHostColorConfig, const char*, false); -MYHOST_DEFINE_PROP_TRAITS(MyHostProjectPath, const char*, false); -MYHOST_DEFINE_PROP_TRAITS(MyHostNodeName, const char*, false); -MYHOST_DEFINE_PROP_TRAITS(MyHostNodeColor, int, false); - -#undef MYHOST_DEFINE_PROP_TRAITS +// PropTraits specializations for each property +template<> +struct PropTraits { + using type = const char*; + static constexpr bool is_multitype = false; + static constexpr int dimension = 1; + static constexpr const openfx::PropDef& def = prop_defs[static_cast(PropId::MyHostViewerProcess)]; +}; + +template<> +struct PropTraits { + using type = const char*; + static constexpr bool is_multitype = false; + static constexpr int dimension = 1; + static constexpr const openfx::PropDef& def = prop_defs[static_cast(PropId::MyHostColorConfig)]; +}; + +template<> +struct PropTraits { + using type = const char*; + static constexpr bool is_multitype = false; + static constexpr int dimension = 1; + static constexpr const openfx::PropDef& def = prop_defs[static_cast(PropId::MyHostProjectPath)]; +}; + +template<> +struct PropTraits { + using type = const char*; + static constexpr bool is_multitype = false; + static constexpr int dimension = 1; + static constexpr const openfx::PropDef& def = prop_defs[static_cast(PropId::MyHostNodeName)]; +}; + +template<> +struct PropTraits { + using type = int; + static constexpr bool is_multitype = false; + static constexpr int dimension = 3; + static constexpr const openfx::PropDef& def = prop_defs[static_cast(PropId::MyHostNodeColor)]; +}; } // namespace properties -// ADL helper function for PropTraits lookup. -// This enables openfx::PropertyAccessor to find myhost::properties::PropTraits -// via argument-dependent lookup. +// ============================================================================ +// STEP 5: Define ADL helper (DO NOT MODIFY) +// ============================================================================ +// This function declaration enables Argument-Dependent Lookup (ADL) so that +// openfx::PropertyAccessor can automatically find your PropTraits. +// +// IMPORTANT: This must be declared in the same namespace as your PropId enum +// (i.e., the myhost namespace, NOT the properties sub-namespace). +// +// You should not need to modify this - just copy it as-is. +// template properties::PropTraits prop_traits_helper(std::integral_constant); From 71ec870717da2d5eda525dda42742be5f9ef54f8 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 4 Nov 2025 10:11:28 -0500 Subject: [PATCH 31/33] Remove unneeded `id` PropDef struct member & clean up Signed-off-by: Gary Oberbrunner --- .../myhost/myhostPropsMetadata.h | 21 +- openfx-cpp/include/openfx/ofxPropsMetadata.h | 361 +++++++++--------- scripts/gen-props.py | 5 +- 3 files changed, 190 insertions(+), 197 deletions(-) diff --git a/openfx-cpp/examples/host-specific-props/myhost/myhostPropsMetadata.h b/openfx-cpp/examples/host-specific-props/myhost/myhostPropsMetadata.h index 105f859e..df03777c 100644 --- a/openfx-cpp/examples/host-specific-props/myhost/myhostPropsMetadata.h +++ b/openfx-cpp/examples/host-specific-props/myhost/myhostPropsMetadata.h @@ -75,30 +75,25 @@ static constexpr openfx::PropType MyHostNodeColor_types[] = {openfx::PropType::I // // Each PropDef entry contains: // 1. name: Full property name string (use reverse-DNS: "com.yourcompany.yourhost.PropertyName") -// 2. id: Use openfx::PropId::NProps as placeholder (runtime uses string name, not this) -// 3. supportedTypes: span of the type array defined above -// 4. dimension: Number of values (1 for scalars, >1 for arrays) -// 5. enumValues: span of valid enum strings (empty for non-enum properties) -// -// NOTE: The 'id' field is typed as openfx::PropId, so we use NProps as a -// placeholder. This is fine because runtime property access uses the STRING -// NAME field, not the enum id value. The id field is only for metadata. +// 2. supportedTypes: span of the type array defined above +// 3. dimension: Number of values (1 for scalars, >1 for arrays) +// 4. enumValues: span of valid enum strings (empty for non-enum properties) // constexpr openfx::PropDef prop_defs[] = { // MyHostViewerProcess - "MyHost viewer process name (color management display transform)" - { "com.example.myhost.ViewerProcess", openfx::PropId::NProps, + { "com.example.myhost.ViewerProcess", openfx::span(MyHostViewerProcess_types, 1), 1, openfx::span() }, // MyHostColorConfig - "Path to MyHost's color management config file" - { "com.example.myhost.ColorConfig", openfx::PropId::NProps, + { "com.example.myhost.ColorConfig", openfx::span(MyHostColorConfig_types, 1), 1, openfx::span() }, // MyHostProjectPath - "Path to the current MyHost project file" - { "com.example.myhost.ProjectPath", openfx::PropId::NProps, + { "com.example.myhost.ProjectPath", openfx::span(MyHostProjectPath_types, 1), 1, openfx::span() }, // MyHostNodeName - "Name of the MyHost node containing this effect" - { "com.example.myhost.NodeName", openfx::PropId::NProps, + { "com.example.myhost.NodeName", openfx::span(MyHostNodeName_types, 1), 1, openfx::span() }, // MyHostNodeColor - "RGB color of the node in MyHost's node graph (0-255)" - { "com.example.myhost.NodeColor", openfx::PropId::NProps, + { "com.example.myhost.NodeColor", openfx::span(MyHostNodeColor_types, 1), 3, openfx::span() }, }; diff --git a/openfx-cpp/include/openfx/ofxPropsMetadata.h b/openfx-cpp/include/openfx/ofxPropsMetadata.h index ac520c6a..790565f4 100644 --- a/openfx-cpp/include/openfx/ofxPropsMetadata.h +++ b/openfx-cpp/include/openfx/ofxPropsMetadata.h @@ -467,7 +467,6 @@ static constexpr PropType kOfxPropKeySym_types[] = {PropType::Int}; struct PropDef { const char* name; // Property name - PropId id; // ID for known props openfx::span supportedTypes; // Supported data types int dimension; // Property dimension (0 for variable) openfx::span enumValues; // Valid values for enum properties @@ -494,365 +493,365 @@ struct PropDefsArray { // Property definitions static inline constexpr PropDefsArray prop_defs = { {{ -{ "OfxImageClipPropColourspace", PropId::OfxImageClipPropColourspace, +{ "OfxImageClipPropColourspace", openfx::span(prop_type_arrays::OfxImageClipPropColourspace_types, 1), 1, openfx::span()}, -{ "OfxImageClipPropConnected", PropId::OfxImageClipPropConnected, +{ "OfxImageClipPropConnected", openfx::span(prop_type_arrays::OfxImageClipPropConnected_types, 1), 1, openfx::span()}, -{ "OfxImageClipPropContinuousSamples", PropId::OfxImageClipPropContinuousSamples, +{ "OfxImageClipPropContinuousSamples", openfx::span(prop_type_arrays::OfxImageClipPropContinuousSamples_types, 1), 1, openfx::span()}, -{ "OfxImageClipPropFieldExtraction", PropId::OfxImageClipPropFieldExtraction, +{ "OfxImageClipPropFieldExtraction", openfx::span(prop_type_arrays::OfxImageClipPropFieldExtraction_types, 1), 1, openfx::span(prop_enum_values::OfxImageClipPropFieldExtraction.data(), prop_enum_values::OfxImageClipPropFieldExtraction.size())}, -{ "OfxImageClipPropFieldOrder", PropId::OfxImageClipPropFieldOrder, +{ "OfxImageClipPropFieldOrder", openfx::span(prop_type_arrays::OfxImageClipPropFieldOrder_types, 1), 1, openfx::span(prop_enum_values::OfxImageClipPropFieldOrder.data(), prop_enum_values::OfxImageClipPropFieldOrder.size())}, -{ "OfxImageClipPropIsMask", PropId::OfxImageClipPropIsMask, +{ "OfxImageClipPropIsMask", openfx::span(prop_type_arrays::OfxImageClipPropIsMask_types, 1), 1, openfx::span()}, -{ "OfxImageClipPropOptional", PropId::OfxImageClipPropOptional, +{ "OfxImageClipPropOptional", openfx::span(prop_type_arrays::OfxImageClipPropOptional_types, 1), 1, openfx::span()}, -{ "OfxImageClipPropPreferredColourspaces", PropId::OfxImageClipPropPreferredColourspaces, +{ "OfxImageClipPropPreferredColourspaces", openfx::span(prop_type_arrays::OfxImageClipPropPreferredColourspaces_types, 1), 0, openfx::span()}, -{ "OfxImageClipPropUnmappedComponents", PropId::OfxImageClipPropUnmappedComponents, +{ "OfxImageClipPropUnmappedComponents", openfx::span(prop_type_arrays::OfxImageClipPropUnmappedComponents_types, 1), 1, openfx::span(prop_enum_values::OfxImageClipPropUnmappedComponents.data(), prop_enum_values::OfxImageClipPropUnmappedComponents.size())}, -{ "OfxImageClipPropUnmappedPixelDepth", PropId::OfxImageClipPropUnmappedPixelDepth, +{ "OfxImageClipPropUnmappedPixelDepth", openfx::span(prop_type_arrays::OfxImageClipPropUnmappedPixelDepth_types, 1), 1, openfx::span(prop_enum_values::OfxImageClipPropUnmappedPixelDepth.data(), prop_enum_values::OfxImageClipPropUnmappedPixelDepth.size())}, -{ "OfxImageEffectFrameVarying", PropId::OfxImageEffectFrameVarying, +{ "OfxImageEffectFrameVarying", openfx::span(prop_type_arrays::OfxImageEffectFrameVarying_types, 1), 1, openfx::span()}, -{ "OfxImageEffectHostPropIsBackground", PropId::OfxImageEffectHostPropIsBackground, +{ "OfxImageEffectHostPropIsBackground", openfx::span(prop_type_arrays::OfxImageEffectHostPropIsBackground_types, 1), 1, openfx::span()}, -{ "OfxImageEffectHostPropNativeOrigin", PropId::OfxImageEffectHostPropNativeOrigin, +{ "OfxImageEffectHostPropNativeOrigin", openfx::span(prop_type_arrays::OfxImageEffectHostPropNativeOrigin_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectHostPropNativeOrigin.data(), prop_enum_values::OfxImageEffectHostPropNativeOrigin.size())}, -{ "OfxImageEffectInstancePropEffectDuration", PropId::OfxImageEffectInstancePropEffectDuration, +{ "OfxImageEffectInstancePropEffectDuration", openfx::span(prop_type_arrays::OfxImageEffectInstancePropEffectDuration_types, 1), 1, openfx::span()}, -{ "OfxImageEffectInstancePropSequentialRender", PropId::OfxImageEffectInstancePropSequentialRender, +{ "OfxImageEffectInstancePropSequentialRender", openfx::span(prop_type_arrays::OfxImageEffectInstancePropSequentialRender_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPluginPropFieldRenderTwiceAlways", PropId::OfxImageEffectPluginPropFieldRenderTwiceAlways, +{ "OfxImageEffectPluginPropFieldRenderTwiceAlways", openfx::span(prop_type_arrays::OfxImageEffectPluginPropFieldRenderTwiceAlways_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPluginPropGrouping", PropId::OfxImageEffectPluginPropGrouping, +{ "OfxImageEffectPluginPropGrouping", openfx::span(prop_type_arrays::OfxImageEffectPluginPropGrouping_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPluginPropHostFrameThreading", PropId::OfxImageEffectPluginPropHostFrameThreading, +{ "OfxImageEffectPluginPropHostFrameThreading", openfx::span(prop_type_arrays::OfxImageEffectPluginPropHostFrameThreading_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPluginPropOverlayInteractV1", PropId::OfxImageEffectPluginPropOverlayInteractV1, +{ "OfxImageEffectPluginPropOverlayInteractV1", openfx::span(prop_type_arrays::OfxImageEffectPluginPropOverlayInteractV1_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPluginPropOverlayInteractV2", PropId::OfxImageEffectPluginPropOverlayInteractV2, +{ "OfxImageEffectPluginPropOverlayInteractV2", openfx::span(prop_type_arrays::OfxImageEffectPluginPropOverlayInteractV2_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPluginPropSingleInstance", PropId::OfxImageEffectPluginPropSingleInstance, +{ "OfxImageEffectPluginPropSingleInstance", openfx::span(prop_type_arrays::OfxImageEffectPluginPropSingleInstance_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPluginRenderThreadSafety", PropId::OfxImageEffectPluginRenderThreadSafety, +{ "OfxImageEffectPluginRenderThreadSafety", openfx::span(prop_type_arrays::OfxImageEffectPluginRenderThreadSafety_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPluginRenderThreadSafety.data(), prop_enum_values::OfxImageEffectPluginRenderThreadSafety.size())}, -{ "OfxImageEffectPropClipPreferencesSlaveParam", PropId::OfxImageEffectPropClipPreferencesSlaveParam, +{ "OfxImageEffectPropClipPreferencesSlaveParam", openfx::span(prop_type_arrays::OfxImageEffectPropClipPreferencesSlaveParam_types, 1), 0, openfx::span()}, -{ "OfxImageEffectPropColourManagementAvailableConfigs", PropId::OfxImageEffectPropColourManagementAvailableConfigs, +{ "OfxImageEffectPropColourManagementAvailableConfigs", openfx::span(prop_type_arrays::OfxImageEffectPropColourManagementAvailableConfigs_types, 1), 0, openfx::span()}, -{ "OfxImageEffectPropColourManagementConfig", PropId::OfxImageEffectPropColourManagementConfig, +{ "OfxImageEffectPropColourManagementConfig", openfx::span(prop_type_arrays::OfxImageEffectPropColourManagementConfig_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropColourManagementStyle", PropId::OfxImageEffectPropColourManagementStyle, +{ "OfxImageEffectPropColourManagementStyle", openfx::span(prop_type_arrays::OfxImageEffectPropColourManagementStyle_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropColourManagementStyle.data(), prop_enum_values::OfxImageEffectPropColourManagementStyle.size())}, -{ "OfxImageEffectPropComponents", PropId::OfxImageEffectPropComponents, +{ "OfxImageEffectPropComponents", openfx::span(prop_type_arrays::OfxImageEffectPropComponents_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropComponents.data(), prop_enum_values::OfxImageEffectPropComponents.size())}, -{ "OfxImageEffectPropContext", PropId::OfxImageEffectPropContext, +{ "OfxImageEffectPropContext", openfx::span(prop_type_arrays::OfxImageEffectPropContext_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropContext.data(), prop_enum_values::OfxImageEffectPropContext.size())}, -{ "OfxImageEffectPropCudaEnabled", PropId::OfxImageEffectPropCudaEnabled, +{ "OfxImageEffectPropCudaEnabled", openfx::span(prop_type_arrays::OfxImageEffectPropCudaEnabled_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropCudaRenderSupported", PropId::OfxImageEffectPropCudaRenderSupported, +{ "OfxImageEffectPropCudaRenderSupported", openfx::span(prop_type_arrays::OfxImageEffectPropCudaRenderSupported_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropCudaRenderSupported.data(), prop_enum_values::OfxImageEffectPropCudaRenderSupported.size())}, -{ "OfxImageEffectPropCudaStream", PropId::OfxImageEffectPropCudaStream, +{ "OfxImageEffectPropCudaStream", openfx::span(prop_type_arrays::OfxImageEffectPropCudaStream_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropCudaStreamSupported", PropId::OfxImageEffectPropCudaStreamSupported, +{ "OfxImageEffectPropCudaStreamSupported", openfx::span(prop_type_arrays::OfxImageEffectPropCudaStreamSupported_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropCudaStreamSupported.data(), prop_enum_values::OfxImageEffectPropCudaStreamSupported.size())}, -{ "OfxImageEffectPropDisplayColourspace", PropId::OfxImageEffectPropDisplayColourspace, +{ "OfxImageEffectPropDisplayColourspace", openfx::span(prop_type_arrays::OfxImageEffectPropDisplayColourspace_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropFieldToRender", PropId::OfxImageEffectPropFieldToRender, +{ "OfxImageEffectPropFieldToRender", openfx::span(prop_type_arrays::OfxImageEffectPropFieldToRender_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropFieldToRender.data(), prop_enum_values::OfxImageEffectPropFieldToRender.size())}, -{ "OfxImageEffectPropFrameRange", PropId::OfxImageEffectPropFrameRange, +{ "OfxImageEffectPropFrameRange", openfx::span(prop_type_arrays::OfxImageEffectPropFrameRange_types, 1), 2, openfx::span()}, -{ "OfxImageEffectPropFrameRate", PropId::OfxImageEffectPropFrameRate, +{ "OfxImageEffectPropFrameRate", openfx::span(prop_type_arrays::OfxImageEffectPropFrameRate_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropFrameStep", PropId::OfxImageEffectPropFrameStep, +{ "OfxImageEffectPropFrameStep", openfx::span(prop_type_arrays::OfxImageEffectPropFrameStep_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropInAnalysis", PropId::OfxImageEffectPropInAnalysis, +{ "OfxImageEffectPropInAnalysis", openfx::span(prop_type_arrays::OfxImageEffectPropInAnalysis_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropInteractiveRenderStatus", PropId::OfxImageEffectPropInteractiveRenderStatus, +{ "OfxImageEffectPropInteractiveRenderStatus", openfx::span(prop_type_arrays::OfxImageEffectPropInteractiveRenderStatus_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropMetalCommandQueue", PropId::OfxImageEffectPropMetalCommandQueue, +{ "OfxImageEffectPropMetalCommandQueue", openfx::span(prop_type_arrays::OfxImageEffectPropMetalCommandQueue_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropMetalEnabled", PropId::OfxImageEffectPropMetalEnabled, +{ "OfxImageEffectPropMetalEnabled", openfx::span(prop_type_arrays::OfxImageEffectPropMetalEnabled_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropMetalRenderSupported", PropId::OfxImageEffectPropMetalRenderSupported, +{ "OfxImageEffectPropMetalRenderSupported", openfx::span(prop_type_arrays::OfxImageEffectPropMetalRenderSupported_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropMetalRenderSupported.data(), prop_enum_values::OfxImageEffectPropMetalRenderSupported.size())}, -{ "OfxImageEffectPropMultipleClipDepths", PropId::OfxImageEffectPropMultipleClipDepths, +{ "OfxImageEffectPropMultipleClipDepths", openfx::span(prop_type_arrays::OfxImageEffectPropMultipleClipDepths_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropNoSpatialAwareness", PropId::OfxImageEffectPropNoSpatialAwareness, +{ "OfxImageEffectPropNoSpatialAwareness", openfx::span(prop_type_arrays::OfxImageEffectPropNoSpatialAwareness_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropNoSpatialAwareness.data(), prop_enum_values::OfxImageEffectPropNoSpatialAwareness.size())}, -{ "OfxImageEffectPropOCIOConfig", PropId::OfxImageEffectPropOCIOConfig, +{ "OfxImageEffectPropOCIOConfig", openfx::span(prop_type_arrays::OfxImageEffectPropOCIOConfig_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropOCIODisplay", PropId::OfxImageEffectPropOCIODisplay, +{ "OfxImageEffectPropOCIODisplay", openfx::span(prop_type_arrays::OfxImageEffectPropOCIODisplay_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropOCIOView", PropId::OfxImageEffectPropOCIOView, +{ "OfxImageEffectPropOCIOView", openfx::span(prop_type_arrays::OfxImageEffectPropOCIOView_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropOpenCLCommandQueue", PropId::OfxImageEffectPropOpenCLCommandQueue, +{ "OfxImageEffectPropOpenCLCommandQueue", openfx::span(prop_type_arrays::OfxImageEffectPropOpenCLCommandQueue_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropOpenCLEnabled", PropId::OfxImageEffectPropOpenCLEnabled, +{ "OfxImageEffectPropOpenCLEnabled", openfx::span(prop_type_arrays::OfxImageEffectPropOpenCLEnabled_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropOpenCLImage", PropId::OfxImageEffectPropOpenCLImage, +{ "OfxImageEffectPropOpenCLImage", openfx::span(prop_type_arrays::OfxImageEffectPropOpenCLImage_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropOpenCLRenderSupported", PropId::OfxImageEffectPropOpenCLRenderSupported, +{ "OfxImageEffectPropOpenCLRenderSupported", openfx::span(prop_type_arrays::OfxImageEffectPropOpenCLRenderSupported_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropOpenCLRenderSupported.data(), prop_enum_values::OfxImageEffectPropOpenCLRenderSupported.size())}, -{ "OfxImageEffectPropOpenCLSupported", PropId::OfxImageEffectPropOpenCLSupported, +{ "OfxImageEffectPropOpenCLSupported", openfx::span(prop_type_arrays::OfxImageEffectPropOpenCLSupported_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropOpenCLSupported.data(), prop_enum_values::OfxImageEffectPropOpenCLSupported.size())}, -{ "OfxImageEffectPropOpenGLEnabled", PropId::OfxImageEffectPropOpenGLEnabled, +{ "OfxImageEffectPropOpenGLEnabled", openfx::span(prop_type_arrays::OfxImageEffectPropOpenGLEnabled_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropOpenGLRenderSupported", PropId::OfxImageEffectPropOpenGLRenderSupported, +{ "OfxImageEffectPropOpenGLRenderSupported", openfx::span(prop_type_arrays::OfxImageEffectPropOpenGLRenderSupported_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropOpenGLRenderSupported.data(), prop_enum_values::OfxImageEffectPropOpenGLRenderSupported.size())}, -{ "OfxImageEffectPropOpenGLTextureIndex", PropId::OfxImageEffectPropOpenGLTextureIndex, +{ "OfxImageEffectPropOpenGLTextureIndex", openfx::span(prop_type_arrays::OfxImageEffectPropOpenGLTextureIndex_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropOpenGLTextureTarget", PropId::OfxImageEffectPropOpenGLTextureTarget, +{ "OfxImageEffectPropOpenGLTextureTarget", openfx::span(prop_type_arrays::OfxImageEffectPropOpenGLTextureTarget_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropPixelAspectRatio", PropId::OfxImageEffectPropPixelAspectRatio, +{ "OfxImageEffectPropPixelAspectRatio", openfx::span(prop_type_arrays::OfxImageEffectPropPixelAspectRatio_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropPixelDepth", PropId::OfxImageEffectPropPixelDepth, +{ "OfxImageEffectPropPixelDepth", openfx::span(prop_type_arrays::OfxImageEffectPropPixelDepth_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropPixelDepth.data(), prop_enum_values::OfxImageEffectPropPixelDepth.size())}, -{ "OfxImageEffectPropPluginHandle", PropId::OfxImageEffectPropPluginHandle, +{ "OfxImageEffectPropPluginHandle", openfx::span(prop_type_arrays::OfxImageEffectPropPluginHandle_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropPreMultiplication", PropId::OfxImageEffectPropPreMultiplication, +{ "OfxImageEffectPropPreMultiplication", openfx::span(prop_type_arrays::OfxImageEffectPropPreMultiplication_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropPreMultiplication.data(), prop_enum_values::OfxImageEffectPropPreMultiplication.size())}, -{ "OfxImageEffectPropProjectExtent", PropId::OfxImageEffectPropProjectExtent, +{ "OfxImageEffectPropProjectExtent", openfx::span(prop_type_arrays::OfxImageEffectPropProjectExtent_types, 1), 2, openfx::span()}, -{ "OfxImageEffectPropProjectOffset", PropId::OfxImageEffectPropProjectOffset, +{ "OfxImageEffectPropProjectOffset", openfx::span(prop_type_arrays::OfxImageEffectPropProjectOffset_types, 1), 2, openfx::span()}, -{ "OfxImageEffectPropProjectSize", PropId::OfxImageEffectPropProjectSize, +{ "OfxImageEffectPropProjectSize", openfx::span(prop_type_arrays::OfxImageEffectPropProjectSize_types, 1), 2, openfx::span()}, -{ "OfxImageEffectPropRegionOfDefinition", PropId::OfxImageEffectPropRegionOfDefinition, +{ "OfxImageEffectPropRegionOfDefinition", openfx::span(prop_type_arrays::OfxImageEffectPropRegionOfDefinition_types, 1), 4, openfx::span()}, -{ "OfxImageEffectPropRegionOfInterest", PropId::OfxImageEffectPropRegionOfInterest, +{ "OfxImageEffectPropRegionOfInterest", openfx::span(prop_type_arrays::OfxImageEffectPropRegionOfInterest_types, 1), 4, openfx::span()}, -{ "OfxImageEffectPropRenderQualityDraft", PropId::OfxImageEffectPropRenderQualityDraft, +{ "OfxImageEffectPropRenderQualityDraft", openfx::span(prop_type_arrays::OfxImageEffectPropRenderQualityDraft_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropRenderScale", PropId::OfxImageEffectPropRenderScale, +{ "OfxImageEffectPropRenderScale", openfx::span(prop_type_arrays::OfxImageEffectPropRenderScale_types, 1), 2, openfx::span()}, -{ "OfxImageEffectPropRenderWindow", PropId::OfxImageEffectPropRenderWindow, +{ "OfxImageEffectPropRenderWindow", openfx::span(prop_type_arrays::OfxImageEffectPropRenderWindow_types, 1), 4, openfx::span()}, -{ "OfxImageEffectPropSequentialRenderStatus", PropId::OfxImageEffectPropSequentialRenderStatus, +{ "OfxImageEffectPropSequentialRenderStatus", openfx::span(prop_type_arrays::OfxImageEffectPropSequentialRenderStatus_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropSetableFielding", PropId::OfxImageEffectPropSetableFielding, +{ "OfxImageEffectPropSetableFielding", openfx::span(prop_type_arrays::OfxImageEffectPropSetableFielding_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropSetableFrameRate", PropId::OfxImageEffectPropSetableFrameRate, +{ "OfxImageEffectPropSetableFrameRate", openfx::span(prop_type_arrays::OfxImageEffectPropSetableFrameRate_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropSupportedComponents", PropId::OfxImageEffectPropSupportedComponents, +{ "OfxImageEffectPropSupportedComponents", openfx::span(prop_type_arrays::OfxImageEffectPropSupportedComponents_types, 1), 0, openfx::span(prop_enum_values::OfxImageEffectPropSupportedComponents.data(), prop_enum_values::OfxImageEffectPropSupportedComponents.size())}, -{ "OfxImageEffectPropSupportedContexts", PropId::OfxImageEffectPropSupportedContexts, +{ "OfxImageEffectPropSupportedContexts", openfx::span(prop_type_arrays::OfxImageEffectPropSupportedContexts_types, 1), 0, openfx::span(prop_enum_values::OfxImageEffectPropSupportedContexts.data(), prop_enum_values::OfxImageEffectPropSupportedContexts.size())}, -{ "OfxImageEffectPropSupportedPixelDepths", PropId::OfxImageEffectPropSupportedPixelDepths, +{ "OfxImageEffectPropSupportedPixelDepths", openfx::span(prop_type_arrays::OfxImageEffectPropSupportedPixelDepths_types, 1), 0, openfx::span(prop_enum_values::OfxImageEffectPropSupportedPixelDepths.data(), prop_enum_values::OfxImageEffectPropSupportedPixelDepths.size())}, -{ "OfxImageEffectPropSupportsMultiResolution", PropId::OfxImageEffectPropSupportsMultiResolution, +{ "OfxImageEffectPropSupportsMultiResolution", openfx::span(prop_type_arrays::OfxImageEffectPropSupportsMultiResolution_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropSupportsMultipleClipPARs", PropId::OfxImageEffectPropSupportsMultipleClipPARs, +{ "OfxImageEffectPropSupportsMultipleClipPARs", openfx::span(prop_type_arrays::OfxImageEffectPropSupportsMultipleClipPARs_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropSupportsOverlays", PropId::OfxImageEffectPropSupportsOverlays, +{ "OfxImageEffectPropSupportsOverlays", openfx::span(prop_type_arrays::OfxImageEffectPropSupportsOverlays_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropSupportsTiles", PropId::OfxImageEffectPropSupportsTiles, +{ "OfxImageEffectPropSupportsTiles", openfx::span(prop_type_arrays::OfxImageEffectPropSupportsTiles_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropTemporalClipAccess", PropId::OfxImageEffectPropTemporalClipAccess, +{ "OfxImageEffectPropTemporalClipAccess", openfx::span(prop_type_arrays::OfxImageEffectPropTemporalClipAccess_types, 1), 1, openfx::span()}, -{ "OfxImageEffectPropUnmappedFrameRange", PropId::OfxImageEffectPropUnmappedFrameRange, +{ "OfxImageEffectPropUnmappedFrameRange", openfx::span(prop_type_arrays::OfxImageEffectPropUnmappedFrameRange_types, 1), 2, openfx::span()}, -{ "OfxImageEffectPropUnmappedFrameRate", PropId::OfxImageEffectPropUnmappedFrameRate, +{ "OfxImageEffectPropUnmappedFrameRate", openfx::span(prop_type_arrays::OfxImageEffectPropUnmappedFrameRate_types, 1), 1, openfx::span()}, -{ "OfxImagePropBounds", PropId::OfxImagePropBounds, +{ "OfxImagePropBounds", openfx::span(prop_type_arrays::OfxImagePropBounds_types, 1), 4, openfx::span()}, -{ "OfxImagePropData", PropId::OfxImagePropData, +{ "OfxImagePropData", openfx::span(prop_type_arrays::OfxImagePropData_types, 1), 1, openfx::span()}, -{ "OfxImagePropField", PropId::OfxImagePropField, +{ "OfxImagePropField", openfx::span(prop_type_arrays::OfxImagePropField_types, 1), 1, openfx::span(prop_enum_values::OfxImagePropField.data(), prop_enum_values::OfxImagePropField.size())}, -{ "OfxImagePropPixelAspectRatio", PropId::OfxImagePropPixelAspectRatio, +{ "OfxImagePropPixelAspectRatio", openfx::span(prop_type_arrays::OfxImagePropPixelAspectRatio_types, 1), 1, openfx::span()}, -{ "OfxImagePropRegionOfDefinition", PropId::OfxImagePropRegionOfDefinition, +{ "OfxImagePropRegionOfDefinition", openfx::span(prop_type_arrays::OfxImagePropRegionOfDefinition_types, 1), 4, openfx::span()}, -{ "OfxImagePropRowBytes", PropId::OfxImagePropRowBytes, +{ "OfxImagePropRowBytes", openfx::span(prop_type_arrays::OfxImagePropRowBytes_types, 1), 1, openfx::span()}, -{ "OfxImagePropUniqueIdentifier", PropId::OfxImagePropUniqueIdentifier, +{ "OfxImagePropUniqueIdentifier", openfx::span(prop_type_arrays::OfxImagePropUniqueIdentifier_types, 1), 1, openfx::span()}, -{ "OfxInteractPropBackgroundColour", PropId::OfxInteractPropBackgroundColour, +{ "OfxInteractPropBackgroundColour", openfx::span(prop_type_arrays::OfxInteractPropBackgroundColour_types, 1), 3, openfx::span()}, -{ "OfxInteractPropBitDepth", PropId::OfxInteractPropBitDepth, +{ "OfxInteractPropBitDepth", openfx::span(prop_type_arrays::OfxInteractPropBitDepth_types, 1), 1, openfx::span()}, -{ "OfxInteractPropDrawContext", PropId::OfxInteractPropDrawContext, +{ "OfxInteractPropDrawContext", openfx::span(prop_type_arrays::OfxInteractPropDrawContext_types, 1), 1, openfx::span()}, -{ "OfxInteractPropHasAlpha", PropId::OfxInteractPropHasAlpha, +{ "OfxInteractPropHasAlpha", openfx::span(prop_type_arrays::OfxInteractPropHasAlpha_types, 1), 1, openfx::span()}, -{ "OfxInteractPropPenPosition", PropId::OfxInteractPropPenPosition, +{ "OfxInteractPropPenPosition", openfx::span(prop_type_arrays::OfxInteractPropPenPosition_types, 1), 2, openfx::span()}, -{ "OfxInteractPropPenPressure", PropId::OfxInteractPropPenPressure, +{ "OfxInteractPropPenPressure", openfx::span(prop_type_arrays::OfxInteractPropPenPressure_types, 1), 1, openfx::span()}, -{ "OfxInteractPropPenViewportPosition", PropId::OfxInteractPropPenViewportPosition, +{ "OfxInteractPropPenViewportPosition", openfx::span(prop_type_arrays::OfxInteractPropPenViewportPosition_types, 1), 2, openfx::span()}, -{ "OfxInteractPropPixelScale", PropId::OfxInteractPropPixelScale, +{ "OfxInteractPropPixelScale", openfx::span(prop_type_arrays::OfxInteractPropPixelScale_types, 1), 2, openfx::span()}, -{ "OfxInteractPropSlaveToParam", PropId::OfxInteractPropSlaveToParam, +{ "OfxInteractPropSlaveToParam", openfx::span(prop_type_arrays::OfxInteractPropSlaveToParam_types, 1), 0, openfx::span()}, -{ "OfxInteractPropSuggestedColour", PropId::OfxInteractPropSuggestedColour, +{ "OfxInteractPropSuggestedColour", openfx::span(prop_type_arrays::OfxInteractPropSuggestedColour_types, 1), 3, openfx::span()}, -{ "OfxInteractPropViewport", PropId::OfxInteractPropViewport, +{ "OfxInteractPropViewport", openfx::span(prop_type_arrays::OfxInteractPropViewport_types, 1), 2, openfx::span()}, -{ "OfxOpenGLPropPixelDepth", PropId::OfxOpenGLPropPixelDepth, +{ "OfxOpenGLPropPixelDepth", openfx::span(prop_type_arrays::OfxOpenGLPropPixelDepth_types, 1), 0, openfx::span(prop_enum_values::OfxOpenGLPropPixelDepth.data(), prop_enum_values::OfxOpenGLPropPixelDepth.size())}, -{ "OfxParamHostPropMaxPages", PropId::OfxParamHostPropMaxPages, +{ "OfxParamHostPropMaxPages", openfx::span(prop_type_arrays::OfxParamHostPropMaxPages_types, 1), 1, openfx::span()}, -{ "OfxParamHostPropMaxParameters", PropId::OfxParamHostPropMaxParameters, +{ "OfxParamHostPropMaxParameters", openfx::span(prop_type_arrays::OfxParamHostPropMaxParameters_types, 1), 1, openfx::span()}, -{ "OfxParamHostPropPageRowColumnCount", PropId::OfxParamHostPropPageRowColumnCount, +{ "OfxParamHostPropPageRowColumnCount", openfx::span(prop_type_arrays::OfxParamHostPropPageRowColumnCount_types, 1), 2, openfx::span()}, -{ "OfxParamHostPropSupportsBooleanAnimation", PropId::OfxParamHostPropSupportsBooleanAnimation, +{ "OfxParamHostPropSupportsBooleanAnimation", openfx::span(prop_type_arrays::OfxParamHostPropSupportsBooleanAnimation_types, 1), 1, openfx::span()}, -{ "OfxParamHostPropSupportsChoiceAnimation", PropId::OfxParamHostPropSupportsChoiceAnimation, +{ "OfxParamHostPropSupportsChoiceAnimation", openfx::span(prop_type_arrays::OfxParamHostPropSupportsChoiceAnimation_types, 1), 1, openfx::span()}, -{ "OfxParamHostPropSupportsCustomAnimation", PropId::OfxParamHostPropSupportsCustomAnimation, +{ "OfxParamHostPropSupportsCustomAnimation", openfx::span(prop_type_arrays::OfxParamHostPropSupportsCustomAnimation_types, 1), 1, openfx::span()}, -{ "OfxParamHostPropSupportsCustomInteract", PropId::OfxParamHostPropSupportsCustomInteract, +{ "OfxParamHostPropSupportsCustomInteract", openfx::span(prop_type_arrays::OfxParamHostPropSupportsCustomInteract_types, 1), 1, openfx::span()}, -{ "OfxParamHostPropSupportsParametricAnimation", PropId::OfxParamHostPropSupportsParametricAnimation, +{ "OfxParamHostPropSupportsParametricAnimation", openfx::span(prop_type_arrays::OfxParamHostPropSupportsParametricAnimation_types, 1), 1, openfx::span()}, -{ "OfxParamHostPropSupportsStrChoice", PropId::OfxParamHostPropSupportsStrChoice, +{ "OfxParamHostPropSupportsStrChoice", openfx::span(prop_type_arrays::OfxParamHostPropSupportsStrChoice_types, 1), 1, openfx::span()}, -{ "OfxParamHostPropSupportsStrChoiceAnimation", PropId::OfxParamHostPropSupportsStrChoiceAnimation, +{ "OfxParamHostPropSupportsStrChoiceAnimation", openfx::span(prop_type_arrays::OfxParamHostPropSupportsStrChoiceAnimation_types, 1), 1, openfx::span()}, -{ "OfxParamHostPropSupportsStringAnimation", PropId::OfxParamHostPropSupportsStringAnimation, +{ "OfxParamHostPropSupportsStringAnimation", openfx::span(prop_type_arrays::OfxParamHostPropSupportsStringAnimation_types, 1), 1, openfx::span()}, -{ "OfxParamPropAnimates", PropId::OfxParamPropAnimates, +{ "OfxParamPropAnimates", openfx::span(prop_type_arrays::OfxParamPropAnimates_types, 1), 1, openfx::span()}, -{ "OfxParamPropCacheInvalidation", PropId::OfxParamPropCacheInvalidation, +{ "OfxParamPropCacheInvalidation", openfx::span(prop_type_arrays::OfxParamPropCacheInvalidation_types, 1), 1, openfx::span(prop_enum_values::OfxParamPropCacheInvalidation.data(), prop_enum_values::OfxParamPropCacheInvalidation.size())}, -{ "OfxParamPropCanUndo", PropId::OfxParamPropCanUndo, +{ "OfxParamPropCanUndo", openfx::span(prop_type_arrays::OfxParamPropCanUndo_types, 1), 1, openfx::span()}, -{ "OfxParamPropChoiceEnum", PropId::OfxParamPropChoiceEnum, +{ "OfxParamPropChoiceEnum", openfx::span(prop_type_arrays::OfxParamPropChoiceEnum_types, 1), 1, openfx::span()}, -{ "OfxParamPropChoiceOption", PropId::OfxParamPropChoiceOption, +{ "OfxParamPropChoiceOption", openfx::span(prop_type_arrays::OfxParamPropChoiceOption_types, 1), 0, openfx::span()}, -{ "OfxParamPropChoiceOrder", PropId::OfxParamPropChoiceOrder, +{ "OfxParamPropChoiceOrder", openfx::span(prop_type_arrays::OfxParamPropChoiceOrder_types, 1), 0, openfx::span()}, -{ "OfxParamPropCustomCallbackV1", PropId::OfxParamPropCustomCallbackV1, +{ "OfxParamPropCustomCallbackV1", openfx::span(prop_type_arrays::OfxParamPropCustomCallbackV1_types, 1), 1, openfx::span()}, -{ "OfxParamPropCustomValue", PropId::OfxParamPropCustomValue, +{ "OfxParamPropCustomValue", openfx::span(prop_type_arrays::OfxParamPropCustomValue_types, 1), 2, openfx::span()}, -{ "OfxParamPropDataPtr", PropId::OfxParamPropDataPtr, +{ "OfxParamPropDataPtr", openfx::span(prop_type_arrays::OfxParamPropDataPtr_types, 1), 1, openfx::span()}, -{ "OfxParamPropDefault", PropId::OfxParamPropDefault, +{ "OfxParamPropDefault", openfx::span(prop_type_arrays::OfxParamPropDefault_types, 4), 0, openfx::span()}, -{ "OfxParamPropDefaultCoordinateSystem", PropId::OfxParamPropDefaultCoordinateSystem, +{ "OfxParamPropDefaultCoordinateSystem", openfx::span(prop_type_arrays::OfxParamPropDefaultCoordinateSystem_types, 1), 1, openfx::span(prop_enum_values::OfxParamPropDefaultCoordinateSystem.data(), prop_enum_values::OfxParamPropDefaultCoordinateSystem.size())}, -{ "OfxParamPropDigits", PropId::OfxParamPropDigits, +{ "OfxParamPropDigits", openfx::span(prop_type_arrays::OfxParamPropDigits_types, 1), 1, openfx::span()}, -{ "OfxParamPropDimensionLabel", PropId::OfxParamPropDimensionLabel, +{ "OfxParamPropDimensionLabel", openfx::span(prop_type_arrays::OfxParamPropDimensionLabel_types, 1), 1, openfx::span()}, -{ "OfxParamPropDisplayMax", PropId::OfxParamPropDisplayMax, +{ "OfxParamPropDisplayMax", openfx::span(prop_type_arrays::OfxParamPropDisplayMax_types, 2), 0, openfx::span()}, -{ "OfxParamPropDisplayMin", PropId::OfxParamPropDisplayMin, +{ "OfxParamPropDisplayMin", openfx::span(prop_type_arrays::OfxParamPropDisplayMin_types, 2), 0, openfx::span()}, -{ "OfxParamPropDoubleType", PropId::OfxParamPropDoubleType, +{ "OfxParamPropDoubleType", openfx::span(prop_type_arrays::OfxParamPropDoubleType_types, 1), 1, openfx::span(prop_enum_values::OfxParamPropDoubleType.data(), prop_enum_values::OfxParamPropDoubleType.size())}, -{ "OfxParamPropEnabled", PropId::OfxParamPropEnabled, +{ "OfxParamPropEnabled", openfx::span(prop_type_arrays::OfxParamPropEnabled_types, 1), 1, openfx::span()}, -{ "OfxParamPropEvaluateOnChange", PropId::OfxParamPropEvaluateOnChange, +{ "OfxParamPropEvaluateOnChange", openfx::span(prop_type_arrays::OfxParamPropEvaluateOnChange_types, 1), 1, openfx::span()}, -{ "OfxParamPropGroupOpen", PropId::OfxParamPropGroupOpen, +{ "OfxParamPropGroupOpen", openfx::span(prop_type_arrays::OfxParamPropGroupOpen_types, 1), 1, openfx::span()}, -{ "OfxParamPropHasHostOverlayHandle", PropId::OfxParamPropHasHostOverlayHandle, +{ "OfxParamPropHasHostOverlayHandle", openfx::span(prop_type_arrays::OfxParamPropHasHostOverlayHandle_types, 1), 1, openfx::span()}, -{ "OfxParamPropHint", PropId::OfxParamPropHint, +{ "OfxParamPropHint", openfx::span(prop_type_arrays::OfxParamPropHint_types, 1), 1, openfx::span()}, -{ "OfxParamPropIncrement", PropId::OfxParamPropIncrement, +{ "OfxParamPropIncrement", openfx::span(prop_type_arrays::OfxParamPropIncrement_types, 1), 1, openfx::span()}, -{ "OfxParamPropInteractMinimumSize", PropId::OfxParamPropInteractMinimumSize, +{ "OfxParamPropInteractMinimumSize", openfx::span(prop_type_arrays::OfxParamPropInteractMinimumSize_types, 1), 2, openfx::span()}, -{ "OfxParamPropInteractPreferedSize", PropId::OfxParamPropInteractPreferedSize, +{ "OfxParamPropInteractPreferedSize", openfx::span(prop_type_arrays::OfxParamPropInteractPreferedSize_types, 1), 2, openfx::span()}, -{ "OfxParamPropInteractSize", PropId::OfxParamPropInteractSize, +{ "OfxParamPropInteractSize", openfx::span(prop_type_arrays::OfxParamPropInteractSize_types, 1), 2, openfx::span()}, -{ "OfxParamPropInteractSizeAspect", PropId::OfxParamPropInteractSizeAspect, +{ "OfxParamPropInteractSizeAspect", openfx::span(prop_type_arrays::OfxParamPropInteractSizeAspect_types, 1), 1, openfx::span()}, -{ "OfxParamPropInteractV1", PropId::OfxParamPropInteractV1, +{ "OfxParamPropInteractV1", openfx::span(prop_type_arrays::OfxParamPropInteractV1_types, 1), 1, openfx::span()}, -{ "OfxParamPropInterpolationAmount", PropId::OfxParamPropInterpolationAmount, +{ "OfxParamPropInterpolationAmount", openfx::span(prop_type_arrays::OfxParamPropInterpolationAmount_types, 1), 1, openfx::span()}, -{ "OfxParamPropInterpolationTime", PropId::OfxParamPropInterpolationTime, +{ "OfxParamPropInterpolationTime", openfx::span(prop_type_arrays::OfxParamPropInterpolationTime_types, 1), 2, openfx::span()}, -{ "OfxParamPropIsAnimating", PropId::OfxParamPropIsAnimating, +{ "OfxParamPropIsAnimating", openfx::span(prop_type_arrays::OfxParamPropIsAnimating_types, 1), 1, openfx::span()}, -{ "OfxParamPropIsAutoKeying", PropId::OfxParamPropIsAutoKeying, +{ "OfxParamPropIsAutoKeying", openfx::span(prop_type_arrays::OfxParamPropIsAutoKeying_types, 1), 1, openfx::span()}, -{ "OfxParamPropMax", PropId::OfxParamPropMax, +{ "OfxParamPropMax", openfx::span(prop_type_arrays::OfxParamPropMax_types, 2), 0, openfx::span()}, -{ "OfxParamPropMin", PropId::OfxParamPropMin, +{ "OfxParamPropMin", openfx::span(prop_type_arrays::OfxParamPropMin_types, 2), 0, openfx::span()}, -{ "OfxParamPropPageChild", PropId::OfxParamPropPageChild, +{ "OfxParamPropPageChild", openfx::span(prop_type_arrays::OfxParamPropPageChild_types, 1), 0, openfx::span()}, -{ "OfxParamPropParametricDimension", PropId::OfxParamPropParametricDimension, +{ "OfxParamPropParametricDimension", openfx::span(prop_type_arrays::OfxParamPropParametricDimension_types, 1), 1, openfx::span()}, -{ "OfxParamPropParametricInteractBackground", PropId::OfxParamPropParametricInteractBackground, +{ "OfxParamPropParametricInteractBackground", openfx::span(prop_type_arrays::OfxParamPropParametricInteractBackground_types, 1), 1, openfx::span()}, -{ "OfxParamPropParametricRange", PropId::OfxParamPropParametricRange, +{ "OfxParamPropParametricRange", openfx::span(prop_type_arrays::OfxParamPropParametricRange_types, 1), 2, openfx::span()}, -{ "OfxParamPropParametricUIColour", PropId::OfxParamPropParametricUIColour, +{ "OfxParamPropParametricUIColour", openfx::span(prop_type_arrays::OfxParamPropParametricUIColour_types, 1), 0, openfx::span()}, -{ "OfxParamPropParent", PropId::OfxParamPropParent, +{ "OfxParamPropParent", openfx::span(prop_type_arrays::OfxParamPropParent_types, 1), 1, openfx::span()}, -{ "OfxParamPropPersistant", PropId::OfxParamPropPersistant, +{ "OfxParamPropPersistant", openfx::span(prop_type_arrays::OfxParamPropPersistant_types, 1), 1, openfx::span()}, -{ "OfxParamPropPluginMayWrite", PropId::OfxParamPropPluginMayWrite, +{ "OfxParamPropPluginMayWrite", openfx::span(prop_type_arrays::OfxParamPropPluginMayWrite_types, 1), 1, openfx::span()}, -{ "OfxParamPropScriptName", PropId::OfxParamPropScriptName, +{ "OfxParamPropScriptName", openfx::span(prop_type_arrays::OfxParamPropScriptName_types, 1), 1, openfx::span()}, -{ "OfxParamPropSecret", PropId::OfxParamPropSecret, +{ "OfxParamPropSecret", openfx::span(prop_type_arrays::OfxParamPropSecret_types, 1), 1, openfx::span()}, -{ "OfxParamPropShowTimeMarker", PropId::OfxParamPropShowTimeMarker, +{ "OfxParamPropShowTimeMarker", openfx::span(prop_type_arrays::OfxParamPropShowTimeMarker_types, 1), 1, openfx::span()}, -{ "OfxParamPropStringFilePathExists", PropId::OfxParamPropStringFilePathExists, +{ "OfxParamPropStringFilePathExists", openfx::span(prop_type_arrays::OfxParamPropStringFilePathExists_types, 1), 1, openfx::span()}, -{ "OfxParamPropStringMode", PropId::OfxParamPropStringMode, +{ "OfxParamPropStringMode", openfx::span(prop_type_arrays::OfxParamPropStringMode_types, 1), 1, openfx::span(prop_enum_values::OfxParamPropStringMode.data(), prop_enum_values::OfxParamPropStringMode.size())}, -{ "OfxParamPropType", PropId::OfxParamPropType, +{ "OfxParamPropType", openfx::span(prop_type_arrays::OfxParamPropType_types, 1), 1, openfx::span()}, -{ "OfxPluginPropFilePath", PropId::OfxPluginPropFilePath, +{ "OfxPluginPropFilePath", openfx::span(prop_type_arrays::OfxPluginPropFilePath_types, 1), 1, openfx::span(prop_enum_values::OfxPluginPropFilePath.data(), prop_enum_values::OfxPluginPropFilePath.size())}, -{ "OfxPluginPropParamPageOrder", PropId::OfxPluginPropParamPageOrder, +{ "OfxPluginPropParamPageOrder", openfx::span(prop_type_arrays::OfxPluginPropParamPageOrder_types, 1), 0, openfx::span()}, -{ "OfxPropAPIVersion", PropId::OfxPropAPIVersion, +{ "OfxPropAPIVersion", openfx::span(prop_type_arrays::OfxPropAPIVersion_types, 1), 0, openfx::span()}, -{ "OfxPropChangeReason", PropId::OfxPropChangeReason, +{ "OfxPropChangeReason", openfx::span(prop_type_arrays::OfxPropChangeReason_types, 1), 1, openfx::span(prop_enum_values::OfxPropChangeReason.data(), prop_enum_values::OfxPropChangeReason.size())}, -{ "OfxPropEffectInstance", PropId::OfxPropEffectInstance, +{ "OfxPropEffectInstance", openfx::span(prop_type_arrays::OfxPropEffectInstance_types, 1), 1, openfx::span()}, -{ "OfxPropHostOSHandle", PropId::OfxPropHostOSHandle, +{ "OfxPropHostOSHandle", openfx::span(prop_type_arrays::OfxPropHostOSHandle_types, 1), 1, openfx::span()}, -{ "OfxPropIcon", PropId::OfxPropIcon, +{ "OfxPropIcon", openfx::span(prop_type_arrays::OfxPropIcon_types, 1), 2, openfx::span()}, -{ "OfxPropInstanceData", PropId::OfxPropInstanceData, +{ "OfxPropInstanceData", openfx::span(prop_type_arrays::OfxPropInstanceData_types, 1), 1, openfx::span()}, -{ "OfxPropIsInteractive", PropId::OfxPropIsInteractive, +{ "OfxPropIsInteractive", openfx::span(prop_type_arrays::OfxPropIsInteractive_types, 1), 1, openfx::span()}, -{ "OfxPropLabel", PropId::OfxPropLabel, +{ "OfxPropLabel", openfx::span(prop_type_arrays::OfxPropLabel_types, 1), 1, openfx::span()}, -{ "OfxPropLongLabel", PropId::OfxPropLongLabel, +{ "OfxPropLongLabel", openfx::span(prop_type_arrays::OfxPropLongLabel_types, 1), 1, openfx::span()}, -{ "OfxPropName", PropId::OfxPropName, +{ "OfxPropName", openfx::span(prop_type_arrays::OfxPropName_types, 1), 1, openfx::span()}, -{ "OfxPropParamSetNeedsSyncing", PropId::OfxPropParamSetNeedsSyncing, +{ "OfxPropParamSetNeedsSyncing", openfx::span(prop_type_arrays::OfxPropParamSetNeedsSyncing_types, 1), 1, openfx::span()}, -{ "OfxPropPluginDescription", PropId::OfxPropPluginDescription, +{ "OfxPropPluginDescription", openfx::span(prop_type_arrays::OfxPropPluginDescription_types, 1), 1, openfx::span()}, -{ "OfxPropShortLabel", PropId::OfxPropShortLabel, +{ "OfxPropShortLabel", openfx::span(prop_type_arrays::OfxPropShortLabel_types, 1), 1, openfx::span()}, -{ "OfxPropTime", PropId::OfxPropTime, +{ "OfxPropTime", openfx::span(prop_type_arrays::OfxPropTime_types, 1), 1, openfx::span()}, -{ "OfxPropType", PropId::OfxPropType, +{ "OfxPropType", openfx::span(prop_type_arrays::OfxPropType_types, 1), 1, openfx::span()}, -{ "OfxPropVersion", PropId::OfxPropVersion, +{ "OfxPropVersion", openfx::span(prop_type_arrays::OfxPropVersion_types, 1), 0, openfx::span()}, -{ "OfxPropVersionLabel", PropId::OfxPropVersionLabel, +{ "OfxPropVersionLabel", openfx::span(prop_type_arrays::OfxPropVersionLabel_types, 1), 1, openfx::span()}, -{ "kOfxParamPropUseHostOverlayHandle", PropId::OfxParamPropUseHostOverlayHandle, +{ "kOfxParamPropUseHostOverlayHandle", openfx::span(prop_type_arrays::kOfxParamPropUseHostOverlayHandle_types, 1), 1, openfx::span()}, -{ "kOfxPropKeyString", PropId::OfxPropKeyString, +{ "kOfxPropKeyString", openfx::span(prop_type_arrays::kOfxPropKeyString_types, 1), 1, openfx::span()}, -{ "kOfxPropKeySym", PropId::OfxPropKeySym, +{ "kOfxPropKeySym", openfx::span(prop_type_arrays::kOfxPropKeySym_types, 1), 1, openfx::span()}, }} }; diff --git a/scripts/gen-props.py b/scripts/gen-props.py index 7e3db09e..efa6e53e 100644 --- a/scripts/gen-props.py +++ b/scripts/gen-props.py @@ -337,7 +337,6 @@ def gen_props_metadata(props_metadata, outfile_path: Path): outfile.write(""" struct PropDef { const char* name; // Property name - PropId id; // ID for known props openfx::span supportedTypes; // Supported data types int dimension; // Property dimension (0 for variable) openfx::span enumValues; // Valid values for enum properties @@ -368,8 +367,8 @@ def gen_props_metadata(props_metadata, outfile_path: Path): for p in sorted(props_metadata): try: - # name and id - prop_def = f"{{ \"{p}\", PropId::{get_prop_id(p)},\n " + # name (id field removed - it was never used) + prop_def = f"{{ \"{p}\",\n " md = props_metadata[p] types = md.get('type') if isinstance(types, str): # make it always a list From aef99dea46300f50b58f9abaa2e78a29929ec048 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 4 Nov 2025 12:24:26 -0500 Subject: [PATCH 32/33] Test compliance for all props, & add propset accesssors To be extended to all standard prop sets Signed-off-by: Gary Oberbrunner --- Examples/TestProps/testProperties.cpp | 120 +- Support/Plugins/CMakeLists.txt | 2 +- Support/PropTester/CMakeLists.txt | 4 +- conanfile.py | 2 +- .../include/openfx/ofxPropSetAccessors.h | 2415 +++++++++++++++++ .../include/openfx/ofxPropSetAccessorsHost.h | 2415 +++++++++++++++++ scripts/gen-props.py | 266 ++ 7 files changed, 5218 insertions(+), 6 deletions(-) create mode 100644 openfx-cpp/include/openfx/ofxPropSetAccessors.h create mode 100644 openfx-cpp/include/openfx/ofxPropSetAccessorsHost.h diff --git a/Examples/TestProps/testProperties.cpp b/Examples/TestProps/testProperties.cpp index b2b19200..a9254dfa 100644 --- a/Examples/TestProps/testProperties.cpp +++ b/Examples/TestProps/testProperties.cpp @@ -13,6 +13,7 @@ #include "openfx/ofxPropsAccess.h" #include "openfx/ofxPropsBySet.h" #include "openfx/ofxPropsMetadata.h" +#include "openfx/ofxPropSetAccessors.h" // Type-safe property set accessor classes #include "../openfx-cpp/examples/host-specific-props/myhost/myhostPropsMetadata.h" // Ensure example compiles #include "spdlog/spdlog.h" #include // stl maps @@ -212,6 +213,92 @@ void logPropValues(const std::string_view setName, } } +/** + * Test property set compliance - verify all properties in a property set are accessible + * Returns number of failures + */ +int testPropertySetCompliance(PropertyAccessor &accessor, const char *propSetName) { + spdlog::info("========================================"); + spdlog::info("Testing property set compliance: {}", propSetName); + spdlog::info("========================================"); + + // Find the property set + auto setIt = prop_sets.find(propSetName); + if (setIt == prop_sets.end()) { + spdlog::error("Property set '{}' not found in prop_sets", propSetName); + return 1; + } + + int totalProps = 0; + int accessibleProps = 0; + int requiredMissing = 0; + int optionalMissing = 0; + int typeErrors = 0; + + // Test each property in the suite + for (const auto &prop : setIt->second) { + totalProps++; + const char* propName = prop.def.name; + + try { + // Try to get dimension first (this will fail if property doesn't exist) + int dimension = accessor.getDimensionRaw(propName); + + // Verify dimension matches spec (0 means variable dimension) + if (prop.def.dimension != 0 && dimension != prop.def.dimension) { + spdlog::warn(" ✗ {} - dimension mismatch: expected {}, got {}", + propName, prop.def.dimension, dimension); + } + + // Try to read the property based on its type + std::vector values; + try { + readProperty(accessor, prop.def, values); + accessibleProps++; + + // For optional properties that are present, log them + if (prop.host_optional) { + spdlog::info(" ✓ {} - accessible (optional, dimension={})", propName, dimension); + } else { + spdlog::debug(" ✓ {} - accessible (dimension={})", propName, dimension); + } + } catch (const std::exception& e) { + typeErrors++; + spdlog::error(" ✗ {} - type error: {}", propName, e.what()); + } + + } catch (...) { + // Property not accessible + if (prop.host_optional) { + optionalMissing++; + spdlog::debug(" - {} - not present (optional)", propName); + } else { + requiredMissing++; + spdlog::warn(" ✗ {} - NOT ACCESSIBLE (required!)", propName); + } + } + } + + // Summary + spdlog::info("----------------------------------------"); + spdlog::info("Property set '{}' compliance results:", propSetName); + spdlog::info(" Total properties defined: {}", totalProps); + spdlog::info(" Accessible: {}", accessibleProps); + spdlog::info(" Required missing: {}", requiredMissing); + spdlog::info(" Optional missing: {}", optionalMissing); + spdlog::info(" Type errors: {}", typeErrors); + + int failures = requiredMissing + typeErrors; + if (failures == 0) { + spdlog::info(" ✓ COMPLIANCE TEST PASSED"); + } else { + spdlog::error(" ✗ COMPLIANCE TEST FAILED ({} issues)", failures); + } + spdlog::info("========================================"); + + return failures; +} + // ======================================================================== //////////////////////////////////////////////////////////////////////////////// @@ -245,12 +332,15 @@ static OfxStatus actionLoad(void) { (OfxMultiThreadSuiteV1 *)fetchSuite(kOfxMultiThreadSuite, 1); gMessageSuite = (OfxMessageSuiteV1 *)fetchSuite(kOfxMessageSuite, 1); - // Get all host props, propset name "ImageEffectHost" - // (too bad prop sets don't know their own name) + // Get all host props, property set name "ImageEffectHost" + // (too bad property sets don't know their own name) PropertyAccessor accessor = PropertyAccessor(gHost->host, gPropSuite); const auto prop_values = getAllPropertiesOfSet(accessor, "ImageEffectHost"); logPropValues("ImageEffectHost", prop_values); + + // Test host property set compliance + testPropertySetCompliance(accessor, "ImageEffectHost"); } } @@ -371,11 +461,21 @@ static OfxStatus describeInContext(OfxImageEffectHandle effect, // simple param test gParamSuite->paramDefine(paramSet, kOfxParamTypeDouble, "scale", &props); accessor = PropertyAccessor(props, gPropSuite); + // Traditional API - note explicit type for multi-type property accessor.set(0) .set("Enables scales on individual components") .set("scale") .set("Scale Param"); + // NEW: Can also use type-safe property set accessor for multi-type properties + // The accessor class provides templated methods for multi-type properties + // Note: dimension=0 properties (like Min/Max/Default) still need index parameter + openfx::ParamDouble1D paramDesc(accessor); + paramDesc.setDefault(1.0); // dimension=0, so default index=0 + paramDesc.setMin(0.0, 0); // explicit index for dimension=0 + paramDesc.setMax(10.0, 0); // explicit index for dimension=0 + spdlog::info(" Using ParamDouble1D accessor with multi-type properties!"); + // Log all the effect descriptor's props OfxPropertySetHandle effectProps; gEffectSuite->getPropertySet(effect, &effectProps); @@ -407,6 +507,7 @@ static OfxStatus actionDescribe(OfxImageEffectHandle effect) { PropertyAccessor accessor = PropertyAccessor(effectProps, gPropSuite); + // Traditional PropertyAccessor API accessor.set("Property Tester") .set("1.0") .setAll({1, 0, 0}) @@ -420,6 +521,18 @@ static OfxStatus actionDescribe(OfxImageEffectHandle effect) { .setAll( supportedPixelDepths); + // NEW: Type-safe property set accessor API demo + spdlog::info("Testing property set accessor classes..."); + openfx::EffectDescriptor effectDesc(accessor); + + // Can also use setters via accessor class (same as above, but more convenient) + // Note: dimension=1 properties don't need index parameter - cleaner API! + effectDesc.setLabel("Property Tester (via accessor)"); + effectDesc.setVersionLabel("1.0"); + effectDesc.setPluginDescription("Sample plugin"); + + spdlog::info(" Using EffectDescriptor accessor class - clean API for dimension=1!"); + // Test host-specific property extensibility (will fail at runtime but compiles!) spdlog::info("Testing host-specific property extensibility..."); try { @@ -446,6 +559,9 @@ static OfxStatus actionDescribe(OfxImageEffectHandle effect) { const auto prop_values = getAllPropertiesOfSet(accessor, "EffectDescriptor"); logPropValues("EffectDescriptor", prop_values); + // Test effect descriptor property set compliance + testPropertySetCompliance(accessor, "EffectDescriptor"); + return kOfxStatOK; } diff --git a/Support/Plugins/CMakeLists.txt b/Support/Plugins/CMakeLists.txt index e50e01a8..a566e9b9 100644 --- a/Support/Plugins/CMakeLists.txt +++ b/Support/Plugins/CMakeLists.txt @@ -31,7 +31,7 @@ foreach(PLUGIN IN LISTS PLUGINS) set(TGT example-${PLUGIN}-support) add_ofx_plugin(${TGT} ${PLUGIN}) target_sources(${TGT} PUBLIC ${PLUGIN_SOURCES}) - target_link_libraries(${TGT} ${CONAN_LIBS} OfxSupport opengl::opengl) + target_link_libraries(${TGT} ${CONAN_LIBS} OfxSupport opengl::opengl tcb-span::tcb-span) target_include_directories(${TGT} PUBLIC ${OFX_HEADER_DIR} ${OFX_SUPPORT_HEADER_DIR} ${OFX_CPP_BINDINGS_HEADER_DIR}) if(APPLE) target_link_libraries(${TGT} "-framework Metal" "-framework Foundation" "-framework QuartzCore") diff --git a/Support/PropTester/CMakeLists.txt b/Support/PropTester/CMakeLists.txt index 44bb26f0..4f70446b 100644 --- a/Support/PropTester/CMakeLists.txt +++ b/Support/PropTester/CMakeLists.txt @@ -3,5 +3,5 @@ file(GLOB_RECURSE PLUGIN_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") set(TGT example-PropTester) add_ofx_plugin(${TGT} ${CMAKE_CURRENT_SOURCE_DIR}) target_sources(${TGT} PUBLIC ${PLUGIN_SOURCES}) -target_link_libraries(${TGT} ${CONAN_LIBS} OfxSupport opengl::opengl) -target_include_directories(${TGT} PUBLIC ${OFX_HEADER_DIR} ${OFX_SUPPORT_HEADER_DIR}) +target_link_libraries(${TGT} ${CONAN_LIBS} OfxSupport opengl::opengl tcb-span::tcb-span) +target_include_directories(${TGT} PUBLIC ${OFX_HEADER_DIR} ${OFX_SUPPORT_HEADER_DIR} ${OFX_CPP_BINDINGS_HEADER_DIR}) diff --git a/conanfile.py b/conanfile.py index 1fc3dc75..cb903368 100644 --- a/conanfile.py +++ b/conanfile.py @@ -87,7 +87,7 @@ def package_info(self): self.cpp_info.components["HostSupport"].requires = ["expat::expat"] self.cpp_info.components["Support"].libs = [i for i in libs if "OfxSupport" in i] self.cpp_info.components["Support"].includedirs = ["Support/include"] - self.cpp_info.components["Support"].requires = ["opengl::opengl", "cimg::cimg", "spdlog::spdlog"] + self.cpp_info.components["Support"].requires = ["opengl::opengl", "cimg::cimg", "spdlog::spdlog", "tcb-span::tcb-span"] if self.settings.os == "Windows": win_defines = ["WINDOWS", "NOMINMAX"] diff --git a/openfx-cpp/include/openfx/ofxPropSetAccessors.h b/openfx-cpp/include/openfx/ofxPropSetAccessors.h new file mode 100644 index 00000000..f733d8cf --- /dev/null +++ b/openfx-cpp/include/openfx/ofxPropSetAccessors.h @@ -0,0 +1,2415 @@ +// 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 "ofxPropsAccess.h" +#include "ofxPropsMetadata.h" + +namespace openfx { + +// Type-safe property set accessor classes for PLUGINS +// +// These wrapper classes provide convenient, type-safe access to property sets. +// - For plugins: getters for host-written properties, setters for plugin-written properties +// - For hosts: setters for host-written properties, getters for plugin-written properties +// +// Usage: +// PropertyAccessor accessor(handle, propSuite); +// EffectDescriptor desc(accessor); +// desc.setLabel("My Effect"); // Type-safe setter +// auto label = desc.label(); // Type-safe getter + +// Base class for property set accessors +class PropertySetAccessor { +protected: + PropertyAccessor& props_; +public: + explicit PropertySetAccessor(PropertyAccessor& p) : props_(p) {} + + // Access to underlying PropertyAccessor for advanced use + PropertyAccessor& props() { return props_; } + const PropertyAccessor& props() const { return props_; } +}; + +// Property set accessor for: ClipDescriptor +class ClipDescriptor : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void setType(const char* value) { + props_.set(value, 0); + } + + void setName(const char* value) { + props_.set(value, 0); + } + + void setLabel(const char* value) { + props_.set(value, 0); + } + + void setShortLabel(const char* value) { + props_.set(value, 0); + } + + void setLongLabel(const char* value) { + props_.set(value, 0); + } + + void setSupportedComponents(const char* value, int index = 0) { + props_.set(value, index); + } + + void setTemporalClipAccess(bool value) { + props_.set(value, 0); + } + + void setOptional(bool value) { + props_.set(value, 0); + } + + void setFieldExtraction(const char* value) { + props_.set(value, 0); + } + + void setIsMask(bool value) { + props_.set(value, 0); + } + + void setSupportsTiles(bool value) { + props_.set(value, 0); + } + +}; + +// Property set accessor for: ClipInstance +class ClipInstance : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + const char* type() const { + return props_.get(0); + } + + const char* name() const { + return props_.get(0); + } + + const char* label() const { + return props_.get(0); + } + + const char* shortLabel() const { + return props_.get(0); + } + + const char* longLabel() const { + return props_.get(0); + } + + const char* supportedComponents(int index = 0) const { + return props_.get(index); + } + + bool temporalClipAccess() const { + return props_.get(0); + } + + const char* colourspace() const { + return props_.get(0); + } + + const char* preferredColourspaces(int index = 0) const { + return props_.get(index); + } + + bool optional() const { + return props_.get(0); + } + + const char* fieldExtraction() const { + return props_.get(0); + } + + bool isMask() const { + return props_.get(0); + } + + bool supportsTiles() const { + return props_.get(0); + } + + const char* pixelDepth() const { + return props_.get(0); + } + + const char* components() const { + return props_.get(0); + } + + const char* unmappedPixelDepth() const { + return props_.get(0); + } + + const char* unmappedComponents() const { + return props_.get(0); + } + + const char* preMultiplication() const { + return props_.get(0); + } + + double pixelAspectRatio() const { + return props_.get(0); + } + + double frameRate() const { + return props_.get(0); + } + + std::array frameRange() const { + return props_.getAll(); + } + + const char* fieldOrder() const { + return props_.get(0); + } + + bool connected() const { + return props_.get(0); + } + + std::array unmappedFrameRange() const { + return props_.getAll(); + } + + double unmappedFrameRate() const { + return props_.get(0); + } + + bool continuousSamples() const { + return props_.get(0); + } + +}; + +// Property set accessor for: EffectDescriptor +class EffectDescriptor : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void setType(const char* value) { + props_.set(value, 0); + } + + void setLabel(const char* value) { + props_.set(value, 0); + } + + void setShortLabel(const char* value) { + props_.set(value, 0); + } + + void setLongLabel(const char* value) { + props_.set(value, 0); + } + + void setVersion(int value, int index = 0) { + props_.set(value, index); + } + + void setVersionLabel(const char* value) { + props_.set(value, 0); + } + + void setPluginDescription(const char* value) { + props_.set(value, 0); + } + + void setSupportedContexts(const char* value, int index = 0) { + props_.set(value, index); + } + + void setImageEffectPluginPropGrouping(const char* value) { + props_.set(value, 0); + } + + void setImageEffectPluginPropSingleInstance(bool value) { + props_.set(value, 0); + } + + void setImageEffectPluginRenderThreadSafety(const char* value) { + props_.set(value, 0); + } + + void setImageEffectPluginPropHostFrameThreading(bool value) { + props_.set(value, 0); + } + + void setImageEffectPluginPropOverlayInteractV1(void* value) { + props_.set(value, 0); + } + + void setOpenCLSupported(const char* value) { + props_.set(value, 0); + } + + void setSupportsMultiResolution(bool value) { + props_.set(value, 0); + } + + void setSupportsTiles(bool value) { + props_.set(value, 0); + } + + void setTemporalClipAccess(bool value) { + props_.set(value, 0); + } + + void setSupportedPixelDepths(const char* value, int index = 0) { + props_.set(value, index); + } + + void setImageEffectPluginPropFieldRenderTwiceAlways(bool value) { + props_.set(value, 0); + } + + void setMultipleClipDepths(bool value) { + props_.set(value, 0); + } + + void setSupportsMultipleClipPARs(bool value) { + props_.set(value, 0); + } + + void setClipPreferencesSlaveParam(const char* value, int index = 0) { + props_.set(value, index); + } + + void setOpenGLRenderSupported(const char* value) { + props_.set(value, 0); + } + + const char* filePath() const { + return props_.get(0); + } + + void setPixelDepth(const char* value, int index = 0) { + props_.set(value, index); + } + + void setImageEffectPluginPropOverlayInteractV2(void* value) { + props_.set(value, 0); + } + + void setColourManagementAvailableConfigs(const char* value, int index = 0) { + props_.set(value, index); + } + + void setColourManagementStyle(const char* value) { + props_.set(value, 0); + } + + void setNoSpatialAwareness(const char* value) { + props_.set(value, 0); + } + +}; + +// Property set accessor for: EffectInstance +class EffectInstance : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + const char* type() const { + return props_.get(0); + } + + const char* context() const { + return props_.get(0); + } + + void* instanceData() const { + return props_.get(0); + } + + std::array projectSize() const { + return props_.getAll(); + } + + std::array projectOffset() const { + return props_.getAll(); + } + + std::array projectExtent() const { + return props_.getAll(); + } + + double pixelAspectRatio() const { + return props_.get(0); + } + + double imageEffectInstancePropEffectDuration() const { + return props_.get(0); + } + + bool imageEffectInstancePropSequentialRender() const { + return props_.get(0); + } + + bool supportsTiles() const { + return props_.get(0); + } + + const char* openGLRenderSupported() const { + return props_.get(0); + } + + double frameRate() const { + return props_.get(0); + } + + bool isInteractive() const { + return props_.get(0); + } + + const char* oCIOConfig() const { + return props_.get(0); + } + + const char* oCIODisplay() const { + return props_.get(0); + } + + const char* oCIOView() const { + return props_.get(0); + } + + const char* colourManagementConfig() const { + return props_.get(0); + } + + const char* colourManagementStyle() const { + return props_.get(0); + } + + const char* displayColourspace() const { + return props_.get(0); + } + + void* pluginHandle() const { + return props_.get(0); + } + +}; + +// Property set accessor for: Image +class Image : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + const char* type() const { + return props_.get(0); + } + + const char* pixelDepth() const { + return props_.get(0); + } + + const char* components() const { + return props_.get(0); + } + + const char* preMultiplication() const { + return props_.get(0); + } + + std::array renderScale() const { + return props_.getAll(); + } + + double pixelAspectRatio() const { + return props_.get(0); + } + + void* data() const { + return props_.get(0); + } + + std::array bounds() const { + return props_.getAll(); + } + + std::array regionOfDefinition() const { + return props_.getAll(); + } + + int rowBytes() const { + return props_.get(0); + } + + const char* field() const { + return props_.get(0); + } + + const char* uniqueIdentifier() const { + return props_.get(0); + } + +}; + +// Property set accessor for: ImageEffectHost +class ImageEffectHost : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + int aPIVersion(int index = 0) const { + return props_.get(index); + } + + const char* type() const { + return props_.get(0); + } + + const char* name() const { + return props_.get(0); + } + + const char* label() const { + return props_.get(0); + } + + int version(int index = 0) const { + return props_.get(index); + } + + const char* versionLabel() const { + return props_.get(0); + } + + bool imageEffectHostPropIsBackground() const { + return props_.get(0); + } + + bool supportsOverlays() const { + return props_.get(0); + } + + bool supportsMultiResolution() const { + return props_.get(0); + } + + bool supportsTiles() const { + return props_.get(0); + } + + bool temporalClipAccess() const { + return props_.get(0); + } + + const char* supportedComponents(int index = 0) const { + return props_.get(index); + } + + const char* supportedContexts(int index = 0) const { + return props_.get(index); + } + + bool multipleClipDepths() const { + return props_.get(0); + } + + const char* openCLSupported() const { + return props_.get(0); + } + + bool supportsMultipleClipPARs() const { + return props_.get(0); + } + + bool setableFrameRate() const { + return props_.get(0); + } + + bool setableFielding() const { + return props_.get(0); + } + + bool paramHostPropSupportsCustomInteract() const { + return props_.get(0); + } + + bool paramHostPropSupportsStringAnimation() const { + return props_.get(0); + } + + bool paramHostPropSupportsChoiceAnimation() const { + return props_.get(0); + } + + bool paramHostPropSupportsBooleanAnimation() const { + return props_.get(0); + } + + bool paramHostPropSupportsCustomAnimation() const { + return props_.get(0); + } + + bool paramHostPropSupportsStrChoice() const { + return props_.get(0); + } + + bool paramHostPropSupportsStrChoiceAnimation() const { + return props_.get(0); + } + + int paramHostPropMaxParameters() const { + return props_.get(0); + } + + int paramHostPropMaxPages() const { + return props_.get(0); + } + + std::array paramHostPropPageRowColumnCount() const { + return props_.getAll(); + } + + void* hostOSHandle() const { + return props_.get(0); + } + + bool paramHostPropSupportsParametricAnimation() const { + return props_.get(0); + } + + bool imageEffectInstancePropSequentialRender() const { + return props_.get(0); + } + + const char* openGLRenderSupported() const { + return props_.get(0); + } + + bool renderQualityDraft() const { + return props_.get(0); + } + + const char* imageEffectHostPropNativeOrigin() const { + return props_.get(0); + } + + const char* colourManagementAvailableConfigs(int index = 0) const { + return props_.get(index); + } + + const char* colourManagementStyle() const { + return props_.get(0); + } + +}; + +// Property set accessor for: InteractDescriptor +class InteractDescriptor : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + bool interactPropHasAlpha() const { + return props_.get(0); + } + + int interactPropBitDepth() const { + return props_.get(0); + } + +}; + +// Property set accessor for: InteractInstance +class InteractInstance : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void* effectInstance() const { + return props_.get(0); + } + + void* instanceData() const { + return props_.get(0); + } + + std::array interactPropPixelScale() const { + return props_.getAll(); + } + + std::array interactPropBackgroundColour() const { + return props_.getAll(); + } + + bool interactPropHasAlpha() const { + return props_.get(0); + } + + int interactPropBitDepth() const { + return props_.get(0); + } + + const char* interactPropSlaveToParam(int index = 0) const { + return props_.get(index); + } + + std::array interactPropSuggestedColour() const { + return props_.getAll(); + } + +}; + +// Property set accessor for: ParamDouble1D +class ParamDouble1D : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void setShowTimeMarker(bool value) { + props_.set(value, 0); + } + + void setDoubleType(const char* value) { + props_.set(value, 0); + } + + void setType(const char* value) { + props_.set(value, 0); + } + + void setName(const char* value) { + props_.set(value, 0); + } + + void setLabel(const char* value) { + props_.set(value, 0); + } + + void setShortLabel(const char* value) { + props_.set(value, 0); + } + + void setLongLabel(const char* value) { + props_.set(value, 0); + } + + void setSecret(bool value) { + props_.set(value, 0); + } + + void setHint(const char* value) { + props_.set(value, 0); + } + + void setScriptName(const char* value) { + props_.set(value, 0); + } + + void setParent(const char* value) { + props_.set(value, 0); + } + + void setEnabled(bool value) { + props_.set(value, 0); + } + + void setDataPtr(void* value) { + props_.set(value, 0); + } + + void setIcon(const std::array& values) { + props_.setAll(values); + } + + void setInteractV1(void* value) { + props_.set(value, 0); + } + + void setInteractSize(const std::array& values) { + props_.setAll(values); + } + + void setInteractSizeAspect(double value) { + props_.set(value, 0); + } + + void setInteractMinimumSize(const std::array& values) { + props_.setAll(values); + } + + void setInteractPreferedSize(const std::array& values) { + props_.setAll(values); + } + + void setHasHostOverlayHandle(bool value) { + props_.set(value, 0); + } + + void setUseHostOverlayHandle(bool value) { + props_.set(value, 0); + } + + // Multi-type property (supports: int, double, string, pointer) + template + void setDefault(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDefaultAll(const std::vector& values) { + props_.setAll(values); + } + + void setAnimates(bool value) { + props_.set(value, 0); + } + + bool isAnimating() const { + return props_.get(0); + } + + bool isAutoKeying() const { + return props_.get(0); + } + + void setPersistant(bool value) { + props_.set(value, 0); + } + + void setEvaluateOnChange(bool value) { + props_.set(value, 0); + } + + void setPluginMayWrite(bool value) { + props_.set(value, 0); + } + + void setCacheInvalidation(const char* value) { + props_.set(value, 0); + } + + void setCanUndo(bool value) { + props_.set(value, 0); + } + + // Multi-type property (supports: int, double) + template + void setMin(T value, int index = 0) { + props_.set(value, index); + } + + template + void setMinAll(const std::vector& values) { + props_.setAll(values); + } + + // Multi-type property (supports: int, double) + template + void setMax(T value, int index = 0) { + props_.set(value, index); + } + + template + void setMaxAll(const std::vector& values) { + props_.setAll(values); + } + + // Multi-type property (supports: int, double) + template + void setDisplayMin(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDisplayMinAll(const std::vector& values) { + props_.setAll(values); + } + + // Multi-type property (supports: int, double) + template + void setDisplayMax(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDisplayMaxAll(const std::vector& values) { + props_.setAll(values); + } + + void setIncrement(double value) { + props_.set(value, 0); + } + + void setDigits(int value) { + props_.set(value, 0); + } + +}; + +// Property set accessor for: ParameterSet +class ParameterSet : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void setParamSetNeedsSyncing(bool value) { + props_.set(value, 0); + } + + void setParamPageOrder(const char* value, int index = 0) { + props_.set(value, index); + } + +}; + +// Property set accessor for: ParamsByte +class ParamsByte : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void setType(const char* value) { + props_.set(value, 0); + } + + void setName(const char* value) { + props_.set(value, 0); + } + + void setLabel(const char* value) { + props_.set(value, 0); + } + + void setShortLabel(const char* value) { + props_.set(value, 0); + } + + void setLongLabel(const char* value) { + props_.set(value, 0); + } + + void setSecret(bool value) { + props_.set(value, 0); + } + + void setHint(const char* value) { + props_.set(value, 0); + } + + void setScriptName(const char* value) { + props_.set(value, 0); + } + + void setParent(const char* value) { + props_.set(value, 0); + } + + void setEnabled(bool value) { + props_.set(value, 0); + } + + void setDataPtr(void* value) { + props_.set(value, 0); + } + + void setIcon(const std::array& values) { + props_.setAll(values); + } + + void setInteractV1(void* value) { + props_.set(value, 0); + } + + void setInteractSize(const std::array& values) { + props_.setAll(values); + } + + void setInteractSizeAspect(double value) { + props_.set(value, 0); + } + + void setInteractMinimumSize(const std::array& values) { + props_.setAll(values); + } + + void setInteractPreferedSize(const std::array& values) { + props_.setAll(values); + } + + void setHasHostOverlayHandle(bool value) { + props_.set(value, 0); + } + + void setUseHostOverlayHandle(bool value) { + props_.set(value, 0); + } + + // Multi-type property (supports: int, double, string, pointer) + template + void setDefault(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDefaultAll(const std::vector& values) { + props_.setAll(values); + } + + void setAnimates(bool value) { + props_.set(value, 0); + } + + bool isAnimating() const { + return props_.get(0); + } + + bool isAutoKeying() const { + return props_.get(0); + } + + void setPersistant(bool value) { + props_.set(value, 0); + } + + void setEvaluateOnChange(bool value) { + props_.set(value, 0); + } + + void setPluginMayWrite(bool value) { + props_.set(value, 0); + } + + void setCacheInvalidation(const char* value) { + props_.set(value, 0); + } + + void setCanUndo(bool value) { + props_.set(value, 0); + } + + // Multi-type property (supports: int, double) + template + void setMin(T value, int index = 0) { + props_.set(value, index); + } + + template + void setMinAll(const std::vector& values) { + props_.setAll(values); + } + + // Multi-type property (supports: int, double) + template + void setMax(T value, int index = 0) { + props_.set(value, index); + } + + template + void setMaxAll(const std::vector& values) { + props_.setAll(values); + } + + // Multi-type property (supports: int, double) + template + void setDisplayMin(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDisplayMinAll(const std::vector& values) { + props_.setAll(values); + } + + // Multi-type property (supports: int, double) + template + void setDisplayMax(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDisplayMaxAll(const std::vector& values) { + props_.setAll(values); + } + +}; + +// Property set accessor for: ParamsChoice +class ParamsChoice : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void setChoiceOption(const char* value, int index = 0) { + props_.set(value, index); + } + + void setChoiceOrder(int value, int index = 0) { + props_.set(value, index); + } + + void setType(const char* value) { + props_.set(value, 0); + } + + void setName(const char* value) { + props_.set(value, 0); + } + + void setLabel(const char* value) { + props_.set(value, 0); + } + + void setShortLabel(const char* value) { + props_.set(value, 0); + } + + void setLongLabel(const char* value) { + props_.set(value, 0); + } + + void setSecret(bool value) { + props_.set(value, 0); + } + + void setHint(const char* value) { + props_.set(value, 0); + } + + void setScriptName(const char* value) { + props_.set(value, 0); + } + + void setParent(const char* value) { + props_.set(value, 0); + } + + void setEnabled(bool value) { + props_.set(value, 0); + } + + void setDataPtr(void* value) { + props_.set(value, 0); + } + + void setIcon(const std::array& values) { + props_.setAll(values); + } + + void setInteractV1(void* value) { + props_.set(value, 0); + } + + void setInteractSize(const std::array& values) { + props_.setAll(values); + } + + void setInteractSizeAspect(double value) { + props_.set(value, 0); + } + + void setInteractMinimumSize(const std::array& values) { + props_.setAll(values); + } + + void setInteractPreferedSize(const std::array& values) { + props_.setAll(values); + } + + void setHasHostOverlayHandle(bool value) { + props_.set(value, 0); + } + + void setUseHostOverlayHandle(bool value) { + props_.set(value, 0); + } + + // Multi-type property (supports: int, double, string, pointer) + template + void setDefault(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDefaultAll(const std::vector& values) { + props_.setAll(values); + } + + void setAnimates(bool value) { + props_.set(value, 0); + } + + bool isAnimating() const { + return props_.get(0); + } + + bool isAutoKeying() const { + return props_.get(0); + } + + void setPersistant(bool value) { + props_.set(value, 0); + } + + void setEvaluateOnChange(bool value) { + props_.set(value, 0); + } + + void setPluginMayWrite(bool value) { + props_.set(value, 0); + } + + void setCacheInvalidation(const char* value) { + props_.set(value, 0); + } + + void setCanUndo(bool value) { + props_.set(value, 0); + } + +}; + +// Property set accessor for: ParamsCustom +class ParamsCustom : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void setCustomCallbackV1(void* value) { + props_.set(value, 0); + } + + void setType(const char* value) { + props_.set(value, 0); + } + + void setName(const char* value) { + props_.set(value, 0); + } + + void setLabel(const char* value) { + props_.set(value, 0); + } + + void setShortLabel(const char* value) { + props_.set(value, 0); + } + + void setLongLabel(const char* value) { + props_.set(value, 0); + } + + void setSecret(bool value) { + props_.set(value, 0); + } + + void setHint(const char* value) { + props_.set(value, 0); + } + + void setScriptName(const char* value) { + props_.set(value, 0); + } + + void setParent(const char* value) { + props_.set(value, 0); + } + + void setEnabled(bool value) { + props_.set(value, 0); + } + + void setDataPtr(void* value) { + props_.set(value, 0); + } + + void setIcon(const std::array& values) { + props_.setAll(values); + } + + void setInteractV1(void* value) { + props_.set(value, 0); + } + + void setInteractSize(const std::array& values) { + props_.setAll(values); + } + + void setInteractSizeAspect(double value) { + props_.set(value, 0); + } + + void setInteractMinimumSize(const std::array& values) { + props_.setAll(values); + } + + void setInteractPreferedSize(const std::array& values) { + props_.setAll(values); + } + + void setHasHostOverlayHandle(bool value) { + props_.set(value, 0); + } + + void setUseHostOverlayHandle(bool value) { + props_.set(value, 0); + } + + // Multi-type property (supports: int, double, string, pointer) + template + void setDefault(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDefaultAll(const std::vector& values) { + props_.setAll(values); + } + + void setAnimates(bool value) { + props_.set(value, 0); + } + + bool isAnimating() const { + return props_.get(0); + } + + bool isAutoKeying() const { + return props_.get(0); + } + + void setPersistant(bool value) { + props_.set(value, 0); + } + + void setEvaluateOnChange(bool value) { + props_.set(value, 0); + } + + void setPluginMayWrite(bool value) { + props_.set(value, 0); + } + + void setCacheInvalidation(const char* value) { + props_.set(value, 0); + } + + void setCanUndo(bool value) { + props_.set(value, 0); + } + +}; + +// Property set accessor for: ParamsDouble2D3D +class ParamsDouble2D3D : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void setDoubleType(const char* value) { + props_.set(value, 0); + } + + void setType(const char* value) { + props_.set(value, 0); + } + + void setName(const char* value) { + props_.set(value, 0); + } + + void setLabel(const char* value) { + props_.set(value, 0); + } + + void setShortLabel(const char* value) { + props_.set(value, 0); + } + + void setLongLabel(const char* value) { + props_.set(value, 0); + } + + void setSecret(bool value) { + props_.set(value, 0); + } + + void setHint(const char* value) { + props_.set(value, 0); + } + + void setScriptName(const char* value) { + props_.set(value, 0); + } + + void setParent(const char* value) { + props_.set(value, 0); + } + + void setEnabled(bool value) { + props_.set(value, 0); + } + + void setDataPtr(void* value) { + props_.set(value, 0); + } + + void setIcon(const std::array& values) { + props_.setAll(values); + } + + void setInteractV1(void* value) { + props_.set(value, 0); + } + + void setInteractSize(const std::array& values) { + props_.setAll(values); + } + + void setInteractSizeAspect(double value) { + props_.set(value, 0); + } + + void setInteractMinimumSize(const std::array& values) { + props_.setAll(values); + } + + void setInteractPreferedSize(const std::array& values) { + props_.setAll(values); + } + + void setHasHostOverlayHandle(bool value) { + props_.set(value, 0); + } + + void setUseHostOverlayHandle(bool value) { + props_.set(value, 0); + } + + // Multi-type property (supports: int, double, string, pointer) + template + void setDefault(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDefaultAll(const std::vector& values) { + props_.setAll(values); + } + + void setAnimates(bool value) { + props_.set(value, 0); + } + + bool isAnimating() const { + return props_.get(0); + } + + bool isAutoKeying() const { + return props_.get(0); + } + + void setPersistant(bool value) { + props_.set(value, 0); + } + + void setEvaluateOnChange(bool value) { + props_.set(value, 0); + } + + void setPluginMayWrite(bool value) { + props_.set(value, 0); + } + + void setCacheInvalidation(const char* value) { + props_.set(value, 0); + } + + void setCanUndo(bool value) { + props_.set(value, 0); + } + + // Multi-type property (supports: int, double) + template + void setMin(T value, int index = 0) { + props_.set(value, index); + } + + template + void setMinAll(const std::vector& values) { + props_.setAll(values); + } + + // Multi-type property (supports: int, double) + template + void setMax(T value, int index = 0) { + props_.set(value, index); + } + + template + void setMaxAll(const std::vector& values) { + props_.setAll(values); + } + + // Multi-type property (supports: int, double) + template + void setDisplayMin(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDisplayMinAll(const std::vector& values) { + props_.setAll(values); + } + + // Multi-type property (supports: int, double) + template + void setDisplayMax(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDisplayMaxAll(const std::vector& values) { + props_.setAll(values); + } + + void setIncrement(double value) { + props_.set(value, 0); + } + + void setDigits(int value) { + props_.set(value, 0); + } + +}; + +// Property set accessor for: ParamsGroup +class ParamsGroup : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void setGroupOpen(bool value) { + props_.set(value, 0); + } + + void setType(const char* value) { + props_.set(value, 0); + } + + void setName(const char* value) { + props_.set(value, 0); + } + + void setLabel(const char* value) { + props_.set(value, 0); + } + + void setShortLabel(const char* value) { + props_.set(value, 0); + } + + void setLongLabel(const char* value) { + props_.set(value, 0); + } + + void setSecret(bool value) { + props_.set(value, 0); + } + + void setHint(const char* value) { + props_.set(value, 0); + } + + void setScriptName(const char* value) { + props_.set(value, 0); + } + + void setParent(const char* value) { + props_.set(value, 0); + } + + void setEnabled(bool value) { + props_.set(value, 0); + } + + void setDataPtr(void* value) { + props_.set(value, 0); + } + + void setIcon(const std::array& values) { + props_.setAll(values); + } + +}; + +// Property set accessor for: ParamsInt2D3D +class ParamsInt2D3D : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void setDimensionLabel(const char* value) { + props_.set(value, 0); + } + + void setType(const char* value) { + props_.set(value, 0); + } + + void setName(const char* value) { + props_.set(value, 0); + } + + void setLabel(const char* value) { + props_.set(value, 0); + } + + void setShortLabel(const char* value) { + props_.set(value, 0); + } + + void setLongLabel(const char* value) { + props_.set(value, 0); + } + + void setSecret(bool value) { + props_.set(value, 0); + } + + void setHint(const char* value) { + props_.set(value, 0); + } + + void setScriptName(const char* value) { + props_.set(value, 0); + } + + void setParent(const char* value) { + props_.set(value, 0); + } + + void setEnabled(bool value) { + props_.set(value, 0); + } + + void setDataPtr(void* value) { + props_.set(value, 0); + } + + void setIcon(const std::array& values) { + props_.setAll(values); + } + + void setInteractV1(void* value) { + props_.set(value, 0); + } + + void setInteractSize(const std::array& values) { + props_.setAll(values); + } + + void setInteractSizeAspect(double value) { + props_.set(value, 0); + } + + void setInteractMinimumSize(const std::array& values) { + props_.setAll(values); + } + + void setInteractPreferedSize(const std::array& values) { + props_.setAll(values); + } + + void setHasHostOverlayHandle(bool value) { + props_.set(value, 0); + } + + void setUseHostOverlayHandle(bool value) { + props_.set(value, 0); + } + + // Multi-type property (supports: int, double, string, pointer) + template + void setDefault(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDefaultAll(const std::vector& values) { + props_.setAll(values); + } + + void setAnimates(bool value) { + props_.set(value, 0); + } + + bool isAnimating() const { + return props_.get(0); + } + + bool isAutoKeying() const { + return props_.get(0); + } + + void setPersistant(bool value) { + props_.set(value, 0); + } + + void setEvaluateOnChange(bool value) { + props_.set(value, 0); + } + + void setPluginMayWrite(bool value) { + props_.set(value, 0); + } + + void setCacheInvalidation(const char* value) { + props_.set(value, 0); + } + + void setCanUndo(bool value) { + props_.set(value, 0); + } + + // Multi-type property (supports: int, double) + template + void setMin(T value, int index = 0) { + props_.set(value, index); + } + + template + void setMinAll(const std::vector& values) { + props_.setAll(values); + } + + // Multi-type property (supports: int, double) + template + void setMax(T value, int index = 0) { + props_.set(value, index); + } + + template + void setMaxAll(const std::vector& values) { + props_.setAll(values); + } + + // Multi-type property (supports: int, double) + template + void setDisplayMin(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDisplayMinAll(const std::vector& values) { + props_.setAll(values); + } + + // Multi-type property (supports: int, double) + template + void setDisplayMax(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDisplayMaxAll(const std::vector& values) { + props_.setAll(values); + } + +}; + +// Property set accessor for: ParamsNormalizedSpatial +class ParamsNormalizedSpatial : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void setDefaultCoordinateSystem(const char* value) { + props_.set(value, 0); + } + + void setType(const char* value) { + props_.set(value, 0); + } + + void setName(const char* value) { + props_.set(value, 0); + } + + void setLabel(const char* value) { + props_.set(value, 0); + } + + void setShortLabel(const char* value) { + props_.set(value, 0); + } + + void setLongLabel(const char* value) { + props_.set(value, 0); + } + + void setSecret(bool value) { + props_.set(value, 0); + } + + void setHint(const char* value) { + props_.set(value, 0); + } + + void setScriptName(const char* value) { + props_.set(value, 0); + } + + void setParent(const char* value) { + props_.set(value, 0); + } + + void setEnabled(bool value) { + props_.set(value, 0); + } + + void setDataPtr(void* value) { + props_.set(value, 0); + } + + void setIcon(const std::array& values) { + props_.setAll(values); + } + + void setInteractV1(void* value) { + props_.set(value, 0); + } + + void setInteractSize(const std::array& values) { + props_.setAll(values); + } + + void setInteractSizeAspect(double value) { + props_.set(value, 0); + } + + void setInteractMinimumSize(const std::array& values) { + props_.setAll(values); + } + + void setInteractPreferedSize(const std::array& values) { + props_.setAll(values); + } + + void setHasHostOverlayHandle(bool value) { + props_.set(value, 0); + } + + void setUseHostOverlayHandle(bool value) { + props_.set(value, 0); + } + + // Multi-type property (supports: int, double, string, pointer) + template + void setDefault(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDefaultAll(const std::vector& values) { + props_.setAll(values); + } + + void setAnimates(bool value) { + props_.set(value, 0); + } + + bool isAnimating() const { + return props_.get(0); + } + + bool isAutoKeying() const { + return props_.get(0); + } + + void setPersistant(bool value) { + props_.set(value, 0); + } + + void setEvaluateOnChange(bool value) { + props_.set(value, 0); + } + + void setPluginMayWrite(bool value) { + props_.set(value, 0); + } + + void setCacheInvalidation(const char* value) { + props_.set(value, 0); + } + + void setCanUndo(bool value) { + props_.set(value, 0); + } + + // Multi-type property (supports: int, double) + template + void setMin(T value, int index = 0) { + props_.set(value, index); + } + + template + void setMinAll(const std::vector& values) { + props_.setAll(values); + } + + // Multi-type property (supports: int, double) + template + void setMax(T value, int index = 0) { + props_.set(value, index); + } + + template + void setMaxAll(const std::vector& values) { + props_.setAll(values); + } + + // Multi-type property (supports: int, double) + template + void setDisplayMin(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDisplayMinAll(const std::vector& values) { + props_.setAll(values); + } + + // Multi-type property (supports: int, double) + template + void setDisplayMax(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDisplayMaxAll(const std::vector& values) { + props_.setAll(values); + } + + void setIncrement(double value) { + props_.set(value, 0); + } + + void setDigits(int value) { + props_.set(value, 0); + } + +}; + +// Property set accessor for: ParamsPage +class ParamsPage : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void setPageChild(const char* value, int index = 0) { + props_.set(value, index); + } + + void setType(const char* value) { + props_.set(value, 0); + } + + void setName(const char* value) { + props_.set(value, 0); + } + + void setLabel(const char* value) { + props_.set(value, 0); + } + + void setShortLabel(const char* value) { + props_.set(value, 0); + } + + void setLongLabel(const char* value) { + props_.set(value, 0); + } + + void setSecret(bool value) { + props_.set(value, 0); + } + + void setHint(const char* value) { + props_.set(value, 0); + } + + void setScriptName(const char* value) { + props_.set(value, 0); + } + + void setParent(const char* value) { + props_.set(value, 0); + } + + void setEnabled(bool value) { + props_.set(value, 0); + } + + void setDataPtr(void* value) { + props_.set(value, 0); + } + + void setIcon(const std::array& values) { + props_.setAll(values); + } + +}; + +// Property set accessor for: ParamsParametric +class ParamsParametric : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void setAnimates(bool value) { + props_.set(value, 0); + } + + void setIsAnimating(bool value) { + props_.set(value, 0); + } + + void setIsAutoKeying(bool value) { + props_.set(value, 0); + } + + void setPersistant(bool value) { + props_.set(value, 0); + } + + void setEvaluateOnChange(bool value) { + props_.set(value, 0); + } + + void setPluginMayWrite(bool value) { + props_.set(value, 0); + } + + void setCacheInvalidation(const char* value) { + props_.set(value, 0); + } + + void setCanUndo(bool value) { + props_.set(value, 0); + } + + void setParametricDimension(int value) { + props_.set(value, 0); + } + + void setParametricUIColour(double value, int index = 0) { + props_.set(value, index); + } + + void setParametricInteractBackground(void* value) { + props_.set(value, 0); + } + + void setParametricRange(const std::array& values) { + props_.setAll(values); + } + + void setType(const char* value) { + props_.set(value, 0); + } + + void setName(const char* value) { + props_.set(value, 0); + } + + void setLabel(const char* value) { + props_.set(value, 0); + } + + void setShortLabel(const char* value) { + props_.set(value, 0); + } + + void setLongLabel(const char* value) { + props_.set(value, 0); + } + + void setSecret(bool value) { + props_.set(value, 0); + } + + void setHint(const char* value) { + props_.set(value, 0); + } + + void setScriptName(const char* value) { + props_.set(value, 0); + } + + void setParent(const char* value) { + props_.set(value, 0); + } + + void setEnabled(bool value) { + props_.set(value, 0); + } + + void setDataPtr(void* value) { + props_.set(value, 0); + } + + void setIcon(const std::array& values) { + props_.setAll(values); + } + + void setInteractV1(void* value) { + props_.set(value, 0); + } + + void setInteractSize(const std::array& values) { + props_.setAll(values); + } + + void setInteractSizeAspect(double value) { + props_.set(value, 0); + } + + void setInteractMinimumSize(const std::array& values) { + props_.setAll(values); + } + + void setInteractPreferedSize(const std::array& values) { + props_.setAll(values); + } + + void setHasHostOverlayHandle(bool value) { + props_.set(value, 0); + } + + void setUseHostOverlayHandle(bool value) { + props_.set(value, 0); + } + + // Multi-type property (supports: int, double, string, pointer) + template + void setDefault(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDefaultAll(const std::vector& values) { + props_.setAll(values); + } + +}; + +// Property set accessor for: ParamsStrChoice +class ParamsStrChoice : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void setChoiceOption(const char* value, int index = 0) { + props_.set(value, index); + } + + void setChoiceEnum(bool value) { + props_.set(value, 0); + } + + void setType(const char* value) { + props_.set(value, 0); + } + + void setName(const char* value) { + props_.set(value, 0); + } + + void setLabel(const char* value) { + props_.set(value, 0); + } + + void setShortLabel(const char* value) { + props_.set(value, 0); + } + + void setLongLabel(const char* value) { + props_.set(value, 0); + } + + void setSecret(bool value) { + props_.set(value, 0); + } + + void setHint(const char* value) { + props_.set(value, 0); + } + + void setScriptName(const char* value) { + props_.set(value, 0); + } + + void setParent(const char* value) { + props_.set(value, 0); + } + + void setEnabled(bool value) { + props_.set(value, 0); + } + + void setDataPtr(void* value) { + props_.set(value, 0); + } + + void setIcon(const std::array& values) { + props_.setAll(values); + } + + void setInteractV1(void* value) { + props_.set(value, 0); + } + + void setInteractSize(const std::array& values) { + props_.setAll(values); + } + + void setInteractSizeAspect(double value) { + props_.set(value, 0); + } + + void setInteractMinimumSize(const std::array& values) { + props_.setAll(values); + } + + void setInteractPreferedSize(const std::array& values) { + props_.setAll(values); + } + + void setHasHostOverlayHandle(bool value) { + props_.set(value, 0); + } + + void setUseHostOverlayHandle(bool value) { + props_.set(value, 0); + } + + // Multi-type property (supports: int, double, string, pointer) + template + void setDefault(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDefaultAll(const std::vector& values) { + props_.setAll(values); + } + + void setAnimates(bool value) { + props_.set(value, 0); + } + + bool isAnimating() const { + return props_.get(0); + } + + bool isAutoKeying() const { + return props_.get(0); + } + + void setPersistant(bool value) { + props_.set(value, 0); + } + + void setEvaluateOnChange(bool value) { + props_.set(value, 0); + } + + void setPluginMayWrite(bool value) { + props_.set(value, 0); + } + + void setCacheInvalidation(const char* value) { + props_.set(value, 0); + } + + void setCanUndo(bool value) { + props_.set(value, 0); + } + +}; + +// Property set accessor for: ParamsString +class ParamsString : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void setStringMode(const char* value) { + props_.set(value, 0); + } + + void setStringFilePathExists(bool value) { + props_.set(value, 0); + } + + void setType(const char* value) { + props_.set(value, 0); + } + + void setName(const char* value) { + props_.set(value, 0); + } + + void setLabel(const char* value) { + props_.set(value, 0); + } + + void setShortLabel(const char* value) { + props_.set(value, 0); + } + + void setLongLabel(const char* value) { + props_.set(value, 0); + } + + void setSecret(bool value) { + props_.set(value, 0); + } + + void setHint(const char* value) { + props_.set(value, 0); + } + + void setScriptName(const char* value) { + props_.set(value, 0); + } + + void setParent(const char* value) { + props_.set(value, 0); + } + + void setEnabled(bool value) { + props_.set(value, 0); + } + + void setDataPtr(void* value) { + props_.set(value, 0); + } + + void setIcon(const std::array& values) { + props_.setAll(values); + } + + void setInteractV1(void* value) { + props_.set(value, 0); + } + + void setInteractSize(const std::array& values) { + props_.setAll(values); + } + + void setInteractSizeAspect(double value) { + props_.set(value, 0); + } + + void setInteractMinimumSize(const std::array& values) { + props_.setAll(values); + } + + void setInteractPreferedSize(const std::array& values) { + props_.setAll(values); + } + + void setHasHostOverlayHandle(bool value) { + props_.set(value, 0); + } + + void setUseHostOverlayHandle(bool value) { + props_.set(value, 0); + } + + // Multi-type property (supports: int, double, string, pointer) + template + void setDefault(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDefaultAll(const std::vector& values) { + props_.setAll(values); + } + + void setAnimates(bool value) { + props_.set(value, 0); + } + + bool isAnimating() const { + return props_.get(0); + } + + bool isAutoKeying() const { + return props_.get(0); + } + + void setPersistant(bool value) { + props_.set(value, 0); + } + + void setEvaluateOnChange(bool value) { + props_.set(value, 0); + } + + void setPluginMayWrite(bool value) { + props_.set(value, 0); + } + + void setCacheInvalidation(const char* value) { + props_.set(value, 0); + } + + void setCanUndo(bool value) { + props_.set(value, 0); + } + + // Multi-type property (supports: int, double) + template + void setMin(T value, int index = 0) { + props_.set(value, index); + } + + template + void setMinAll(const std::vector& values) { + props_.setAll(values); + } + + // Multi-type property (supports: int, double) + template + void setMax(T value, int index = 0) { + props_.set(value, index); + } + + template + void setMaxAll(const std::vector& values) { + props_.setAll(values); + } + + // Multi-type property (supports: int, double) + template + void setDisplayMin(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDisplayMinAll(const std::vector& values) { + props_.setAll(values); + } + + // Multi-type property (supports: int, double) + template + void setDisplayMax(T value, int index = 0) { + props_.set(value, index); + } + + template + void setDisplayMaxAll(const std::vector& values) { + props_.setAll(values); + } + +}; + +} // namespace openfx diff --git a/openfx-cpp/include/openfx/ofxPropSetAccessorsHost.h b/openfx-cpp/include/openfx/ofxPropSetAccessorsHost.h new file mode 100644 index 00000000..37f6848b --- /dev/null +++ b/openfx-cpp/include/openfx/ofxPropSetAccessorsHost.h @@ -0,0 +1,2415 @@ +// 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 "ofxPropsAccess.h" +#include "ofxPropsMetadata.h" + +namespace openfx { + +// Type-safe property set accessor classes for HOSTS +// +// These wrapper classes provide convenient, type-safe access to property sets. +// - For plugins: getters for host-written properties, setters for plugin-written properties +// - For hosts: setters for host-written properties, getters for plugin-written properties +// +// Usage: +// PropertyAccessor accessor(handle, propSuite); +// EffectDescriptor desc(accessor); +// desc.setLabel("My Effect"); // Type-safe setter +// auto label = desc.label(); // Type-safe getter + +// Base class for property set accessors +class PropertySetAccessor { +protected: + PropertyAccessor& props_; +public: + explicit PropertySetAccessor(PropertyAccessor& p) : props_(p) {} + + // Access to underlying PropertyAccessor for advanced use + PropertyAccessor& props() { return props_; } + const PropertyAccessor& props() const { return props_; } +}; + +// Property set accessor for: ClipDescriptor +class ClipDescriptor : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + const char* type() const { + return props_.get(0); + } + + const char* name() const { + return props_.get(0); + } + + const char* label() const { + return props_.get(0); + } + + const char* shortLabel() const { + return props_.get(0); + } + + const char* longLabel() const { + return props_.get(0); + } + + const char* supportedComponents(int index = 0) const { + return props_.get(index); + } + + bool temporalClipAccess() const { + return props_.get(0); + } + + bool optional() const { + return props_.get(0); + } + + const char* fieldExtraction() const { + return props_.get(0); + } + + bool isMask() const { + return props_.get(0); + } + + bool supportsTiles() const { + return props_.get(0); + } + +}; + +// Property set accessor for: ClipInstance +class ClipInstance : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void setType(const char* value) { + props_.set(value, 0); + } + + void setName(const char* value) { + props_.set(value, 0); + } + + void setLabel(const char* value) { + props_.set(value, 0); + } + + void setShortLabel(const char* value) { + props_.set(value, 0); + } + + void setLongLabel(const char* value) { + props_.set(value, 0); + } + + void setSupportedComponents(const char* value, int index = 0) { + props_.set(value, index); + } + + void setTemporalClipAccess(bool value) { + props_.set(value, 0); + } + + void setColourspace(const char* value) { + props_.set(value, 0); + } + + void setPreferredColourspaces(const char* value, int index = 0) { + props_.set(value, index); + } + + void setOptional(bool value) { + props_.set(value, 0); + } + + void setFieldExtraction(const char* value) { + props_.set(value, 0); + } + + void setIsMask(bool value) { + props_.set(value, 0); + } + + void setSupportsTiles(bool value) { + props_.set(value, 0); + } + + void setPixelDepth(const char* value) { + props_.set(value, 0); + } + + void setComponents(const char* value) { + props_.set(value, 0); + } + + void setUnmappedPixelDepth(const char* value) { + props_.set(value, 0); + } + + void setUnmappedComponents(const char* value) { + props_.set(value, 0); + } + + void setPreMultiplication(const char* value) { + props_.set(value, 0); + } + + void setPixelAspectRatio(double value) { + props_.set(value, 0); + } + + void setFrameRate(double value) { + props_.set(value, 0); + } + + void setFrameRange(const std::array& values) { + props_.setAll(values); + } + + void setFieldOrder(const char* value) { + props_.set(value, 0); + } + + void setConnected(bool value) { + props_.set(value, 0); + } + + void setUnmappedFrameRange(const std::array& values) { + props_.setAll(values); + } + + void setUnmappedFrameRate(double value) { + props_.set(value, 0); + } + + void setContinuousSamples(bool value) { + props_.set(value, 0); + } + +}; + +// Property set accessor for: EffectDescriptor +class EffectDescriptor : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + const char* type() const { + return props_.get(0); + } + + const char* label() const { + return props_.get(0); + } + + const char* shortLabel() const { + return props_.get(0); + } + + const char* longLabel() const { + return props_.get(0); + } + + int version(int index = 0) const { + return props_.get(index); + } + + const char* versionLabel() const { + return props_.get(0); + } + + const char* pluginDescription() const { + return props_.get(0); + } + + const char* supportedContexts(int index = 0) const { + return props_.get(index); + } + + const char* imageEffectPluginPropGrouping() const { + return props_.get(0); + } + + bool imageEffectPluginPropSingleInstance() const { + return props_.get(0); + } + + const char* imageEffectPluginRenderThreadSafety() const { + return props_.get(0); + } + + bool imageEffectPluginPropHostFrameThreading() const { + return props_.get(0); + } + + void* imageEffectPluginPropOverlayInteractV1() const { + return props_.get(0); + } + + const char* openCLSupported() const { + return props_.get(0); + } + + bool supportsMultiResolution() const { + return props_.get(0); + } + + bool supportsTiles() const { + return props_.get(0); + } + + bool temporalClipAccess() const { + return props_.get(0); + } + + const char* supportedPixelDepths(int index = 0) const { + return props_.get(index); + } + + bool imageEffectPluginPropFieldRenderTwiceAlways() const { + return props_.get(0); + } + + bool multipleClipDepths() const { + return props_.get(0); + } + + bool supportsMultipleClipPARs() const { + return props_.get(0); + } + + const char* clipPreferencesSlaveParam(int index = 0) const { + return props_.get(index); + } + + const char* openGLRenderSupported() const { + return props_.get(0); + } + + void setFilePath(const char* value) { + props_.set(value, 0); + } + + const char* pixelDepth(int index = 0) const { + return props_.get(index); + } + + void* imageEffectPluginPropOverlayInteractV2() const { + return props_.get(0); + } + + const char* colourManagementAvailableConfigs(int index = 0) const { + return props_.get(index); + } + + const char* colourManagementStyle() const { + return props_.get(0); + } + + const char* noSpatialAwareness() const { + return props_.get(0); + } + +}; + +// Property set accessor for: EffectInstance +class EffectInstance : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void setType(const char* value) { + props_.set(value, 0); + } + + void setContext(const char* value) { + props_.set(value, 0); + } + + void setInstanceData(void* value) { + props_.set(value, 0); + } + + void setProjectSize(const std::array& values) { + props_.setAll(values); + } + + void setProjectOffset(const std::array& values) { + props_.setAll(values); + } + + void setProjectExtent(const std::array& values) { + props_.setAll(values); + } + + void setPixelAspectRatio(double value) { + props_.set(value, 0); + } + + void setImageEffectInstancePropEffectDuration(double value) { + props_.set(value, 0); + } + + void setImageEffectInstancePropSequentialRender(bool value) { + props_.set(value, 0); + } + + void setSupportsTiles(bool value) { + props_.set(value, 0); + } + + void setOpenGLRenderSupported(const char* value) { + props_.set(value, 0); + } + + void setFrameRate(double value) { + props_.set(value, 0); + } + + void setIsInteractive(bool value) { + props_.set(value, 0); + } + + void setOCIOConfig(const char* value) { + props_.set(value, 0); + } + + void setOCIODisplay(const char* value) { + props_.set(value, 0); + } + + void setOCIOView(const char* value) { + props_.set(value, 0); + } + + void setColourManagementConfig(const char* value) { + props_.set(value, 0); + } + + void setColourManagementStyle(const char* value) { + props_.set(value, 0); + } + + void setDisplayColourspace(const char* value) { + props_.set(value, 0); + } + + void setPluginHandle(void* value) { + props_.set(value, 0); + } + +}; + +// Property set accessor for: Image +class Image : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void setType(const char* value) { + props_.set(value, 0); + } + + void setPixelDepth(const char* value) { + props_.set(value, 0); + } + + void setComponents(const char* value) { + props_.set(value, 0); + } + + void setPreMultiplication(const char* value) { + props_.set(value, 0); + } + + void setRenderScale(const std::array& values) { + props_.setAll(values); + } + + void setPixelAspectRatio(double value) { + props_.set(value, 0); + } + + void setData(void* value) { + props_.set(value, 0); + } + + void setBounds(const std::array& values) { + props_.setAll(values); + } + + void setRegionOfDefinition(const std::array& values) { + props_.setAll(values); + } + + void setRowBytes(int value) { + props_.set(value, 0); + } + + void setField(const char* value) { + props_.set(value, 0); + } + + void setUniqueIdentifier(const char* value) { + props_.set(value, 0); + } + +}; + +// Property set accessor for: ImageEffectHost +class ImageEffectHost : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void setAPIVersion(int value, int index = 0) { + props_.set(value, index); + } + + void setType(const char* value) { + props_.set(value, 0); + } + + void setName(const char* value) { + props_.set(value, 0); + } + + void setLabel(const char* value) { + props_.set(value, 0); + } + + void setVersion(int value, int index = 0) { + props_.set(value, index); + } + + void setVersionLabel(const char* value) { + props_.set(value, 0); + } + + void setImageEffectHostPropIsBackground(bool value) { + props_.set(value, 0); + } + + void setSupportsOverlays(bool value) { + props_.set(value, 0); + } + + void setSupportsMultiResolution(bool value) { + props_.set(value, 0); + } + + void setSupportsTiles(bool value) { + props_.set(value, 0); + } + + void setTemporalClipAccess(bool value) { + props_.set(value, 0); + } + + void setSupportedComponents(const char* value, int index = 0) { + props_.set(value, index); + } + + void setSupportedContexts(const char* value, int index = 0) { + props_.set(value, index); + } + + void setMultipleClipDepths(bool value) { + props_.set(value, 0); + } + + void setOpenCLSupported(const char* value) { + props_.set(value, 0); + } + + void setSupportsMultipleClipPARs(bool value) { + props_.set(value, 0); + } + + void setSetableFrameRate(bool value) { + props_.set(value, 0); + } + + void setSetableFielding(bool value) { + props_.set(value, 0); + } + + void setParamHostPropSupportsCustomInteract(bool value) { + props_.set(value, 0); + } + + void setParamHostPropSupportsStringAnimation(bool value) { + props_.set(value, 0); + } + + void setParamHostPropSupportsChoiceAnimation(bool value) { + props_.set(value, 0); + } + + void setParamHostPropSupportsBooleanAnimation(bool value) { + props_.set(value, 0); + } + + void setParamHostPropSupportsCustomAnimation(bool value) { + props_.set(value, 0); + } + + void setParamHostPropSupportsStrChoice(bool value) { + props_.set(value, 0); + } + + void setParamHostPropSupportsStrChoiceAnimation(bool value) { + props_.set(value, 0); + } + + void setParamHostPropMaxParameters(int value) { + props_.set(value, 0); + } + + void setParamHostPropMaxPages(int value) { + props_.set(value, 0); + } + + void setParamHostPropPageRowColumnCount(const std::array& values) { + props_.setAll(values); + } + + void setHostOSHandle(void* value) { + props_.set(value, 0); + } + + void setParamHostPropSupportsParametricAnimation(bool value) { + props_.set(value, 0); + } + + void setImageEffectInstancePropSequentialRender(bool value) { + props_.set(value, 0); + } + + void setOpenGLRenderSupported(const char* value) { + props_.set(value, 0); + } + + void setRenderQualityDraft(bool value) { + props_.set(value, 0); + } + + void setImageEffectHostPropNativeOrigin(const char* value) { + props_.set(value, 0); + } + + void setColourManagementAvailableConfigs(const char* value, int index = 0) { + props_.set(value, index); + } + + void setColourManagementStyle(const char* value) { + props_.set(value, 0); + } + +}; + +// Property set accessor for: InteractDescriptor +class InteractDescriptor : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void setInteractPropHasAlpha(bool value) { + props_.set(value, 0); + } + + void setInteractPropBitDepth(int value) { + props_.set(value, 0); + } + +}; + +// Property set accessor for: InteractInstance +class InteractInstance : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void setEffectInstance(void* value) { + props_.set(value, 0); + } + + void setInstanceData(void* value) { + props_.set(value, 0); + } + + void setInteractPropPixelScale(const std::array& values) { + props_.setAll(values); + } + + void setInteractPropBackgroundColour(const std::array& values) { + props_.setAll(values); + } + + void setInteractPropHasAlpha(bool value) { + props_.set(value, 0); + } + + void setInteractPropBitDepth(int value) { + props_.set(value, 0); + } + + void setInteractPropSlaveToParam(const char* value, int index = 0) { + props_.set(value, index); + } + + void setInteractPropSuggestedColour(const std::array& values) { + props_.setAll(values); + } + +}; + +// Property set accessor for: ParamDouble1D +class ParamDouble1D : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + bool showTimeMarker() const { + return props_.get(0); + } + + const char* doubleType() const { + return props_.get(0); + } + + const char* type() const { + return props_.get(0); + } + + const char* name() const { + return props_.get(0); + } + + const char* label() const { + return props_.get(0); + } + + const char* shortLabel() const { + return props_.get(0); + } + + const char* longLabel() const { + return props_.get(0); + } + + bool secret() const { + return props_.get(0); + } + + const char* hint() const { + return props_.get(0); + } + + const char* scriptName() const { + return props_.get(0); + } + + const char* parent() const { + return props_.get(0); + } + + bool enabled() const { + return props_.get(0); + } + + void* dataPtr() const { + return props_.get(0); + } + + std::array icon() const { + return props_.getAll(); + } + + void* interactV1() const { + return props_.get(0); + } + + std::array interactSize() const { + return props_.getAll(); + } + + double interactSizeAspect() const { + return props_.get(0); + } + + std::array interactMinimumSize() const { + return props_.getAll(); + } + + std::array interactPreferedSize() const { + return props_.getAll(); + } + + bool hasHostOverlayHandle() const { + return props_.get(0); + } + + bool useHostOverlayHandle() const { + return props_.get(0); + } + + // Multi-type property (supports: int, double, string, pointer) + template + T default(int index = 0) const { + return props_.get(index); + } + + template + std::vector defaultAll() const { + return props_.getAll(); + } + + bool animates() const { + return props_.get(0); + } + + void setIsAnimating(bool value) { + props_.set(value, 0); + } + + void setIsAutoKeying(bool value) { + props_.set(value, 0); + } + + bool persistant() const { + return props_.get(0); + } + + bool evaluateOnChange() const { + return props_.get(0); + } + + bool pluginMayWrite() const { + return props_.get(0); + } + + const char* cacheInvalidation() const { + return props_.get(0); + } + + bool canUndo() const { + return props_.get(0); + } + + // Multi-type property (supports: int, double) + template + T min(int index = 0) const { + return props_.get(index); + } + + template + std::vector minAll() const { + return props_.getAll(); + } + + // Multi-type property (supports: int, double) + template + T max(int index = 0) const { + return props_.get(index); + } + + template + std::vector maxAll() const { + return props_.getAll(); + } + + // Multi-type property (supports: int, double) + template + T displayMin(int index = 0) const { + return props_.get(index); + } + + template + std::vector displayMinAll() const { + return props_.getAll(); + } + + // Multi-type property (supports: int, double) + template + T displayMax(int index = 0) const { + return props_.get(index); + } + + template + std::vector displayMaxAll() const { + return props_.getAll(); + } + + double increment() const { + return props_.get(0); + } + + int digits() const { + return props_.get(0); + } + +}; + +// Property set accessor for: ParameterSet +class ParameterSet : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + bool paramSetNeedsSyncing() const { + return props_.get(0); + } + + const char* paramPageOrder(int index = 0) const { + return props_.get(index); + } + +}; + +// Property set accessor for: ParamsByte +class ParamsByte : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + const char* type() const { + return props_.get(0); + } + + const char* name() const { + return props_.get(0); + } + + const char* label() const { + return props_.get(0); + } + + const char* shortLabel() const { + return props_.get(0); + } + + const char* longLabel() const { + return props_.get(0); + } + + bool secret() const { + return props_.get(0); + } + + const char* hint() const { + return props_.get(0); + } + + const char* scriptName() const { + return props_.get(0); + } + + const char* parent() const { + return props_.get(0); + } + + bool enabled() const { + return props_.get(0); + } + + void* dataPtr() const { + return props_.get(0); + } + + std::array icon() const { + return props_.getAll(); + } + + void* interactV1() const { + return props_.get(0); + } + + std::array interactSize() const { + return props_.getAll(); + } + + double interactSizeAspect() const { + return props_.get(0); + } + + std::array interactMinimumSize() const { + return props_.getAll(); + } + + std::array interactPreferedSize() const { + return props_.getAll(); + } + + bool hasHostOverlayHandle() const { + return props_.get(0); + } + + bool useHostOverlayHandle() const { + return props_.get(0); + } + + // Multi-type property (supports: int, double, string, pointer) + template + T default(int index = 0) const { + return props_.get(index); + } + + template + std::vector defaultAll() const { + return props_.getAll(); + } + + bool animates() const { + return props_.get(0); + } + + void setIsAnimating(bool value) { + props_.set(value, 0); + } + + void setIsAutoKeying(bool value) { + props_.set(value, 0); + } + + bool persistant() const { + return props_.get(0); + } + + bool evaluateOnChange() const { + return props_.get(0); + } + + bool pluginMayWrite() const { + return props_.get(0); + } + + const char* cacheInvalidation() const { + return props_.get(0); + } + + bool canUndo() const { + return props_.get(0); + } + + // Multi-type property (supports: int, double) + template + T min(int index = 0) const { + return props_.get(index); + } + + template + std::vector minAll() const { + return props_.getAll(); + } + + // Multi-type property (supports: int, double) + template + T max(int index = 0) const { + return props_.get(index); + } + + template + std::vector maxAll() const { + return props_.getAll(); + } + + // Multi-type property (supports: int, double) + template + T displayMin(int index = 0) const { + return props_.get(index); + } + + template + std::vector displayMinAll() const { + return props_.getAll(); + } + + // Multi-type property (supports: int, double) + template + T displayMax(int index = 0) const { + return props_.get(index); + } + + template + std::vector displayMaxAll() const { + return props_.getAll(); + } + +}; + +// Property set accessor for: ParamsChoice +class ParamsChoice : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + const char* choiceOption(int index = 0) const { + return props_.get(index); + } + + int choiceOrder(int index = 0) const { + return props_.get(index); + } + + const char* type() const { + return props_.get(0); + } + + const char* name() const { + return props_.get(0); + } + + const char* label() const { + return props_.get(0); + } + + const char* shortLabel() const { + return props_.get(0); + } + + const char* longLabel() const { + return props_.get(0); + } + + bool secret() const { + return props_.get(0); + } + + const char* hint() const { + return props_.get(0); + } + + const char* scriptName() const { + return props_.get(0); + } + + const char* parent() const { + return props_.get(0); + } + + bool enabled() const { + return props_.get(0); + } + + void* dataPtr() const { + return props_.get(0); + } + + std::array icon() const { + return props_.getAll(); + } + + void* interactV1() const { + return props_.get(0); + } + + std::array interactSize() const { + return props_.getAll(); + } + + double interactSizeAspect() const { + return props_.get(0); + } + + std::array interactMinimumSize() const { + return props_.getAll(); + } + + std::array interactPreferedSize() const { + return props_.getAll(); + } + + bool hasHostOverlayHandle() const { + return props_.get(0); + } + + bool useHostOverlayHandle() const { + return props_.get(0); + } + + // Multi-type property (supports: int, double, string, pointer) + template + T default(int index = 0) const { + return props_.get(index); + } + + template + std::vector defaultAll() const { + return props_.getAll(); + } + + bool animates() const { + return props_.get(0); + } + + void setIsAnimating(bool value) { + props_.set(value, 0); + } + + void setIsAutoKeying(bool value) { + props_.set(value, 0); + } + + bool persistant() const { + return props_.get(0); + } + + bool evaluateOnChange() const { + return props_.get(0); + } + + bool pluginMayWrite() const { + return props_.get(0); + } + + const char* cacheInvalidation() const { + return props_.get(0); + } + + bool canUndo() const { + return props_.get(0); + } + +}; + +// Property set accessor for: ParamsCustom +class ParamsCustom : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void* customCallbackV1() const { + return props_.get(0); + } + + const char* type() const { + return props_.get(0); + } + + const char* name() const { + return props_.get(0); + } + + const char* label() const { + return props_.get(0); + } + + const char* shortLabel() const { + return props_.get(0); + } + + const char* longLabel() const { + return props_.get(0); + } + + bool secret() const { + return props_.get(0); + } + + const char* hint() const { + return props_.get(0); + } + + const char* scriptName() const { + return props_.get(0); + } + + const char* parent() const { + return props_.get(0); + } + + bool enabled() const { + return props_.get(0); + } + + void* dataPtr() const { + return props_.get(0); + } + + std::array icon() const { + return props_.getAll(); + } + + void* interactV1() const { + return props_.get(0); + } + + std::array interactSize() const { + return props_.getAll(); + } + + double interactSizeAspect() const { + return props_.get(0); + } + + std::array interactMinimumSize() const { + return props_.getAll(); + } + + std::array interactPreferedSize() const { + return props_.getAll(); + } + + bool hasHostOverlayHandle() const { + return props_.get(0); + } + + bool useHostOverlayHandle() const { + return props_.get(0); + } + + // Multi-type property (supports: int, double, string, pointer) + template + T default(int index = 0) const { + return props_.get(index); + } + + template + std::vector defaultAll() const { + return props_.getAll(); + } + + bool animates() const { + return props_.get(0); + } + + void setIsAnimating(bool value) { + props_.set(value, 0); + } + + void setIsAutoKeying(bool value) { + props_.set(value, 0); + } + + bool persistant() const { + return props_.get(0); + } + + bool evaluateOnChange() const { + return props_.get(0); + } + + bool pluginMayWrite() const { + return props_.get(0); + } + + const char* cacheInvalidation() const { + return props_.get(0); + } + + bool canUndo() const { + return props_.get(0); + } + +}; + +// Property set accessor for: ParamsDouble2D3D +class ParamsDouble2D3D : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + const char* doubleType() const { + return props_.get(0); + } + + const char* type() const { + return props_.get(0); + } + + const char* name() const { + return props_.get(0); + } + + const char* label() const { + return props_.get(0); + } + + const char* shortLabel() const { + return props_.get(0); + } + + const char* longLabel() const { + return props_.get(0); + } + + bool secret() const { + return props_.get(0); + } + + const char* hint() const { + return props_.get(0); + } + + const char* scriptName() const { + return props_.get(0); + } + + const char* parent() const { + return props_.get(0); + } + + bool enabled() const { + return props_.get(0); + } + + void* dataPtr() const { + return props_.get(0); + } + + std::array icon() const { + return props_.getAll(); + } + + void* interactV1() const { + return props_.get(0); + } + + std::array interactSize() const { + return props_.getAll(); + } + + double interactSizeAspect() const { + return props_.get(0); + } + + std::array interactMinimumSize() const { + return props_.getAll(); + } + + std::array interactPreferedSize() const { + return props_.getAll(); + } + + bool hasHostOverlayHandle() const { + return props_.get(0); + } + + bool useHostOverlayHandle() const { + return props_.get(0); + } + + // Multi-type property (supports: int, double, string, pointer) + template + T default(int index = 0) const { + return props_.get(index); + } + + template + std::vector defaultAll() const { + return props_.getAll(); + } + + bool animates() const { + return props_.get(0); + } + + void setIsAnimating(bool value) { + props_.set(value, 0); + } + + void setIsAutoKeying(bool value) { + props_.set(value, 0); + } + + bool persistant() const { + return props_.get(0); + } + + bool evaluateOnChange() const { + return props_.get(0); + } + + bool pluginMayWrite() const { + return props_.get(0); + } + + const char* cacheInvalidation() const { + return props_.get(0); + } + + bool canUndo() const { + return props_.get(0); + } + + // Multi-type property (supports: int, double) + template + T min(int index = 0) const { + return props_.get(index); + } + + template + std::vector minAll() const { + return props_.getAll(); + } + + // Multi-type property (supports: int, double) + template + T max(int index = 0) const { + return props_.get(index); + } + + template + std::vector maxAll() const { + return props_.getAll(); + } + + // Multi-type property (supports: int, double) + template + T displayMin(int index = 0) const { + return props_.get(index); + } + + template + std::vector displayMinAll() const { + return props_.getAll(); + } + + // Multi-type property (supports: int, double) + template + T displayMax(int index = 0) const { + return props_.get(index); + } + + template + std::vector displayMaxAll() const { + return props_.getAll(); + } + + double increment() const { + return props_.get(0); + } + + int digits() const { + return props_.get(0); + } + +}; + +// Property set accessor for: ParamsGroup +class ParamsGroup : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + bool groupOpen() const { + return props_.get(0); + } + + const char* type() const { + return props_.get(0); + } + + const char* name() const { + return props_.get(0); + } + + const char* label() const { + return props_.get(0); + } + + const char* shortLabel() const { + return props_.get(0); + } + + const char* longLabel() const { + return props_.get(0); + } + + bool secret() const { + return props_.get(0); + } + + const char* hint() const { + return props_.get(0); + } + + const char* scriptName() const { + return props_.get(0); + } + + const char* parent() const { + return props_.get(0); + } + + bool enabled() const { + return props_.get(0); + } + + void* dataPtr() const { + return props_.get(0); + } + + std::array icon() const { + return props_.getAll(); + } + +}; + +// Property set accessor for: ParamsInt2D3D +class ParamsInt2D3D : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + const char* dimensionLabel() const { + return props_.get(0); + } + + const char* type() const { + return props_.get(0); + } + + const char* name() const { + return props_.get(0); + } + + const char* label() const { + return props_.get(0); + } + + const char* shortLabel() const { + return props_.get(0); + } + + const char* longLabel() const { + return props_.get(0); + } + + bool secret() const { + return props_.get(0); + } + + const char* hint() const { + return props_.get(0); + } + + const char* scriptName() const { + return props_.get(0); + } + + const char* parent() const { + return props_.get(0); + } + + bool enabled() const { + return props_.get(0); + } + + void* dataPtr() const { + return props_.get(0); + } + + std::array icon() const { + return props_.getAll(); + } + + void* interactV1() const { + return props_.get(0); + } + + std::array interactSize() const { + return props_.getAll(); + } + + double interactSizeAspect() const { + return props_.get(0); + } + + std::array interactMinimumSize() const { + return props_.getAll(); + } + + std::array interactPreferedSize() const { + return props_.getAll(); + } + + bool hasHostOverlayHandle() const { + return props_.get(0); + } + + bool useHostOverlayHandle() const { + return props_.get(0); + } + + // Multi-type property (supports: int, double, string, pointer) + template + T default(int index = 0) const { + return props_.get(index); + } + + template + std::vector defaultAll() const { + return props_.getAll(); + } + + bool animates() const { + return props_.get(0); + } + + void setIsAnimating(bool value) { + props_.set(value, 0); + } + + void setIsAutoKeying(bool value) { + props_.set(value, 0); + } + + bool persistant() const { + return props_.get(0); + } + + bool evaluateOnChange() const { + return props_.get(0); + } + + bool pluginMayWrite() const { + return props_.get(0); + } + + const char* cacheInvalidation() const { + return props_.get(0); + } + + bool canUndo() const { + return props_.get(0); + } + + // Multi-type property (supports: int, double) + template + T min(int index = 0) const { + return props_.get(index); + } + + template + std::vector minAll() const { + return props_.getAll(); + } + + // Multi-type property (supports: int, double) + template + T max(int index = 0) const { + return props_.get(index); + } + + template + std::vector maxAll() const { + return props_.getAll(); + } + + // Multi-type property (supports: int, double) + template + T displayMin(int index = 0) const { + return props_.get(index); + } + + template + std::vector displayMinAll() const { + return props_.getAll(); + } + + // Multi-type property (supports: int, double) + template + T displayMax(int index = 0) const { + return props_.get(index); + } + + template + std::vector displayMaxAll() const { + return props_.getAll(); + } + +}; + +// Property set accessor for: ParamsNormalizedSpatial +class ParamsNormalizedSpatial : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + const char* defaultCoordinateSystem() const { + return props_.get(0); + } + + const char* type() const { + return props_.get(0); + } + + const char* name() const { + return props_.get(0); + } + + const char* label() const { + return props_.get(0); + } + + const char* shortLabel() const { + return props_.get(0); + } + + const char* longLabel() const { + return props_.get(0); + } + + bool secret() const { + return props_.get(0); + } + + const char* hint() const { + return props_.get(0); + } + + const char* scriptName() const { + return props_.get(0); + } + + const char* parent() const { + return props_.get(0); + } + + bool enabled() const { + return props_.get(0); + } + + void* dataPtr() const { + return props_.get(0); + } + + std::array icon() const { + return props_.getAll(); + } + + void* interactV1() const { + return props_.get(0); + } + + std::array interactSize() const { + return props_.getAll(); + } + + double interactSizeAspect() const { + return props_.get(0); + } + + std::array interactMinimumSize() const { + return props_.getAll(); + } + + std::array interactPreferedSize() const { + return props_.getAll(); + } + + bool hasHostOverlayHandle() const { + return props_.get(0); + } + + bool useHostOverlayHandle() const { + return props_.get(0); + } + + // Multi-type property (supports: int, double, string, pointer) + template + T default(int index = 0) const { + return props_.get(index); + } + + template + std::vector defaultAll() const { + return props_.getAll(); + } + + bool animates() const { + return props_.get(0); + } + + void setIsAnimating(bool value) { + props_.set(value, 0); + } + + void setIsAutoKeying(bool value) { + props_.set(value, 0); + } + + bool persistant() const { + return props_.get(0); + } + + bool evaluateOnChange() const { + return props_.get(0); + } + + bool pluginMayWrite() const { + return props_.get(0); + } + + const char* cacheInvalidation() const { + return props_.get(0); + } + + bool canUndo() const { + return props_.get(0); + } + + // Multi-type property (supports: int, double) + template + T min(int index = 0) const { + return props_.get(index); + } + + template + std::vector minAll() const { + return props_.getAll(); + } + + // Multi-type property (supports: int, double) + template + T max(int index = 0) const { + return props_.get(index); + } + + template + std::vector maxAll() const { + return props_.getAll(); + } + + // Multi-type property (supports: int, double) + template + T displayMin(int index = 0) const { + return props_.get(index); + } + + template + std::vector displayMinAll() const { + return props_.getAll(); + } + + // Multi-type property (supports: int, double) + template + T displayMax(int index = 0) const { + return props_.get(index); + } + + template + std::vector displayMaxAll() const { + return props_.getAll(); + } + + double increment() const { + return props_.get(0); + } + + int digits() const { + return props_.get(0); + } + +}; + +// Property set accessor for: ParamsPage +class ParamsPage : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + const char* pageChild(int index = 0) const { + return props_.get(index); + } + + const char* type() const { + return props_.get(0); + } + + const char* name() const { + return props_.get(0); + } + + const char* label() const { + return props_.get(0); + } + + const char* shortLabel() const { + return props_.get(0); + } + + const char* longLabel() const { + return props_.get(0); + } + + bool secret() const { + return props_.get(0); + } + + const char* hint() const { + return props_.get(0); + } + + const char* scriptName() const { + return props_.get(0); + } + + const char* parent() const { + return props_.get(0); + } + + bool enabled() const { + return props_.get(0); + } + + void* dataPtr() const { + return props_.get(0); + } + + std::array icon() const { + return props_.getAll(); + } + +}; + +// Property set accessor for: ParamsParametric +class ParamsParametric : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + bool animates() const { + return props_.get(0); + } + + bool isAnimating() const { + return props_.get(0); + } + + bool isAutoKeying() const { + return props_.get(0); + } + + bool persistant() const { + return props_.get(0); + } + + bool evaluateOnChange() const { + return props_.get(0); + } + + bool pluginMayWrite() const { + return props_.get(0); + } + + const char* cacheInvalidation() const { + return props_.get(0); + } + + bool canUndo() const { + return props_.get(0); + } + + int parametricDimension() const { + return props_.get(0); + } + + double parametricUIColour(int index = 0) const { + return props_.get(index); + } + + void* parametricInteractBackground() const { + return props_.get(0); + } + + std::array parametricRange() const { + return props_.getAll(); + } + + const char* type() const { + return props_.get(0); + } + + const char* name() const { + return props_.get(0); + } + + const char* label() const { + return props_.get(0); + } + + const char* shortLabel() const { + return props_.get(0); + } + + const char* longLabel() const { + return props_.get(0); + } + + bool secret() const { + return props_.get(0); + } + + const char* hint() const { + return props_.get(0); + } + + const char* scriptName() const { + return props_.get(0); + } + + const char* parent() const { + return props_.get(0); + } + + bool enabled() const { + return props_.get(0); + } + + void* dataPtr() const { + return props_.get(0); + } + + std::array icon() const { + return props_.getAll(); + } + + void* interactV1() const { + return props_.get(0); + } + + std::array interactSize() const { + return props_.getAll(); + } + + double interactSizeAspect() const { + return props_.get(0); + } + + std::array interactMinimumSize() const { + return props_.getAll(); + } + + std::array interactPreferedSize() const { + return props_.getAll(); + } + + bool hasHostOverlayHandle() const { + return props_.get(0); + } + + bool useHostOverlayHandle() const { + return props_.get(0); + } + + // Multi-type property (supports: int, double, string, pointer) + template + T default(int index = 0) const { + return props_.get(index); + } + + template + std::vector defaultAll() const { + return props_.getAll(); + } + +}; + +// Property set accessor for: ParamsStrChoice +class ParamsStrChoice : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + const char* choiceOption(int index = 0) const { + return props_.get(index); + } + + bool choiceEnum() const { + return props_.get(0); + } + + const char* type() const { + return props_.get(0); + } + + const char* name() const { + return props_.get(0); + } + + const char* label() const { + return props_.get(0); + } + + const char* shortLabel() const { + return props_.get(0); + } + + const char* longLabel() const { + return props_.get(0); + } + + bool secret() const { + return props_.get(0); + } + + const char* hint() const { + return props_.get(0); + } + + const char* scriptName() const { + return props_.get(0); + } + + const char* parent() const { + return props_.get(0); + } + + bool enabled() const { + return props_.get(0); + } + + void* dataPtr() const { + return props_.get(0); + } + + std::array icon() const { + return props_.getAll(); + } + + void* interactV1() const { + return props_.get(0); + } + + std::array interactSize() const { + return props_.getAll(); + } + + double interactSizeAspect() const { + return props_.get(0); + } + + std::array interactMinimumSize() const { + return props_.getAll(); + } + + std::array interactPreferedSize() const { + return props_.getAll(); + } + + bool hasHostOverlayHandle() const { + return props_.get(0); + } + + bool useHostOverlayHandle() const { + return props_.get(0); + } + + // Multi-type property (supports: int, double, string, pointer) + template + T default(int index = 0) const { + return props_.get(index); + } + + template + std::vector defaultAll() const { + return props_.getAll(); + } + + bool animates() const { + return props_.get(0); + } + + void setIsAnimating(bool value) { + props_.set(value, 0); + } + + void setIsAutoKeying(bool value) { + props_.set(value, 0); + } + + bool persistant() const { + return props_.get(0); + } + + bool evaluateOnChange() const { + return props_.get(0); + } + + bool pluginMayWrite() const { + return props_.get(0); + } + + const char* cacheInvalidation() const { + return props_.get(0); + } + + bool canUndo() const { + return props_.get(0); + } + +}; + +// Property set accessor for: ParamsString +class ParamsString : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + const char* stringMode() const { + return props_.get(0); + } + + bool stringFilePathExists() const { + return props_.get(0); + } + + const char* type() const { + return props_.get(0); + } + + const char* name() const { + return props_.get(0); + } + + const char* label() const { + return props_.get(0); + } + + const char* shortLabel() const { + return props_.get(0); + } + + const char* longLabel() const { + return props_.get(0); + } + + bool secret() const { + return props_.get(0); + } + + const char* hint() const { + return props_.get(0); + } + + const char* scriptName() const { + return props_.get(0); + } + + const char* parent() const { + return props_.get(0); + } + + bool enabled() const { + return props_.get(0); + } + + void* dataPtr() const { + return props_.get(0); + } + + std::array icon() const { + return props_.getAll(); + } + + void* interactV1() const { + return props_.get(0); + } + + std::array interactSize() const { + return props_.getAll(); + } + + double interactSizeAspect() const { + return props_.get(0); + } + + std::array interactMinimumSize() const { + return props_.getAll(); + } + + std::array interactPreferedSize() const { + return props_.getAll(); + } + + bool hasHostOverlayHandle() const { + return props_.get(0); + } + + bool useHostOverlayHandle() const { + return props_.get(0); + } + + // Multi-type property (supports: int, double, string, pointer) + template + T default(int index = 0) const { + return props_.get(index); + } + + template + std::vector defaultAll() const { + return props_.getAll(); + } + + bool animates() const { + return props_.get(0); + } + + void setIsAnimating(bool value) { + props_.set(value, 0); + } + + void setIsAutoKeying(bool value) { + props_.set(value, 0); + } + + bool persistant() const { + return props_.get(0); + } + + bool evaluateOnChange() const { + return props_.get(0); + } + + bool pluginMayWrite() const { + return props_.get(0); + } + + const char* cacheInvalidation() const { + return props_.get(0); + } + + bool canUndo() const { + return props_.get(0); + } + + // Multi-type property (supports: int, double) + template + T min(int index = 0) const { + return props_.get(index); + } + + template + std::vector minAll() const { + return props_.getAll(); + } + + // Multi-type property (supports: int, double) + template + T max(int index = 0) const { + return props_.get(index); + } + + template + std::vector maxAll() const { + return props_.getAll(); + } + + // Multi-type property (supports: int, double) + template + T displayMin(int index = 0) const { + return props_.get(index); + } + + template + std::vector displayMinAll() const { + return props_.getAll(); + } + + // Multi-type property (supports: int, double) + template + T displayMax(int index = 0) const { + return props_.get(index); + } + + template + std::vector displayMaxAll() const { + return props_.getAll(); + } + +}; + +} // namespace openfx diff --git a/scripts/gen-props.py b/scripts/gen-props.py index efa6e53e..5bf7593a 100644 --- a/scripts/gen-props.py +++ b/scripts/gen-props.py @@ -524,6 +524,260 @@ def gen_props_by_set(props_by_set, props_by_action, outfile_path: Path): outfile.write("} // namespace openfx\n") +def gen_propset_accessors(props_by_set, props_metadata, outfile_path: Path, for_host=False): + """Generate type-safe accessor classes for each property set. + + Args: + for_host: If True, generate host accessors (setters for host_write, getters for plugin_write). + If False, generate plugin accessors (getters for host_write, setters for plugin_write). + """ + + def get_prop_id(propname): + """Get PropId enum name from property name.""" + if propname.startswith('k'): + # kOfxParamPropUseHostOverlayHandle -> OfxParamPropUseHostOverlayHandle + return propname[1:] + return propname + + def prop_to_method_name(propname): + """Convert property name to method name.""" + # Strip prefixes: OfxPropLabel -> Label, OfxImageEffectPropContext -> Context + name = propname + if name.startswith('Ofx'): + # Remove Ofx prefix + name = name[3:] + # Remove category prefixes like ImageEffect, ImageClip, Param, etc. + for prefix in ['ImageEffect', 'ImageClip', 'Param', 'Image', 'Plugin', 'OpenGL']: + if name.startswith(prefix + 'Prop'): + name = name[len(prefix) + 4:] # +4 for "Prop" + break + else: + # Just remove Prop if it's there + if name.startswith('Prop'): + name = name[4:] + elif name.startswith('kOfx'): + # Handle kOfxParamPropUseHostOverlayHandle -> UseHostOverlayHandle + name = name[1:] # Remove 'k' + name = prop_to_method_name(name) # Recursive call + + # Convert first letter to lowercase for getter + if name: + name = name[0].lower() + name[1:] + return name + + def get_cpp_type(prop_def, include_array=True): + """Get C++ type for a property.""" + types = prop_def.get('type') + if isinstance(types, str): + types = [types] + + dimension = prop_def['dimension'] + + # Map OpenFX types to C++ types + type_map = { + 'string': 'const char*', + 'int': 'int', + 'double': 'double', + 'pointer': 'void*', + 'bool': 'bool', + 'enum': 'const char*' + } + + cpp_type = type_map.get(types[0], 'void*') + + # If dimension > 1, return array type + if include_array and dimension > 1: + return f'std::array<{cpp_type}, {dimension}>' + + return cpp_type + + with open(outfile_path, 'w') as outfile: + outfile.write(generated_source_header) + target = "HOST" if for_host else "PLUGIN" + outfile.write(f""" +#pragma once + +#include +#include +#include "ofxPropsAccess.h" +#include "ofxPropsMetadata.h" + +namespace openfx {{ + +// Type-safe property set accessor classes for {target}S +// +// These wrapper classes provide convenient, type-safe access to property sets. +// - For plugins: getters for host-written properties, setters for plugin-written properties +// - For hosts: setters for host-written properties, getters for plugin-written properties +// +// Usage: +// PropertyAccessor accessor(handle, propSuite); +// EffectDescriptor desc(accessor); +// desc.setLabel("My Effect"); // Type-safe setter +// auto label = desc.label(); // Type-safe getter + +// Base class for property set accessors +class PropertySetAccessor {{ +protected: + PropertyAccessor& props_; +public: + explicit PropertySetAccessor(PropertyAccessor& p) : props_(p) {{}} + + // Access to underlying PropertyAccessor for advanced use + PropertyAccessor& props() {{ return props_; }} + const PropertyAccessor& props() const {{ return props_; }} +}}; + +""") + + # Generate a class for each property set + for pset_name in sorted(props_by_set.keys()): + # Derive class name from property set name + class_name = pset_name.replace(' ', '') + + outfile.write(f"// Property set accessor for: {pset_name}\n") + outfile.write(f"class {class_name} : public PropertySetAccessor {{\n") + outfile.write("public:\n") + outfile.write(f" using PropertySetAccessor::PropertySetAccessor;\n\n") + + # Track which methods we've generated to avoid duplicates + generated_methods = set() + + # Generate methods for each property + for prop in props_for_set(pset_name, props_by_set, name_only=False): + propname = prop['name'] + write_access = prop['write'] + + # Get property metadata + if propname not in props_metadata: + continue + + prop_def = props_metadata[propname] + method_name = prop_to_method_name(propname) + prop_id = get_prop_id(propname) + + # Skip if we've already generated this method + if method_name in generated_methods: + continue + generated_methods.add(method_name) + + # Check if this is a multi-type property + types = prop_def.get('type') + if isinstance(types, str): + types = [types] + is_multitype = len(types) > 1 + + dimension = prop_def['dimension'] + cpp_type = get_cpp_type(prop_def, include_array=False) if not is_multitype else None + + # Determine what to generate based on for_host flag + # For plugins: getters for host-written, setters for plugin-written + # For hosts: setters for host-written, getters for plugin-written + generate_getter = False + generate_setter = False + + if for_host: + # Host accessors: host sets, host reads plugin-written + if write_access in ('host', 'all'): + generate_setter = True + if write_access in ('plugin', 'all'): + generate_getter = True + else: + # Plugin accessors: plugin reads host-written, plugin sets + if write_access in ('host', 'all'): + generate_getter = True + if write_access in ('plugin', 'all'): + generate_setter = True + + # Generate getter + if generate_getter: + if is_multitype: + # Multi-type property - generate templated getter + outfile.write(f" // Multi-type property (supports: {', '.join(types)})\n") + outfile.write(f" template\n") + if dimension == 1: + # Dimension 1: exactly one value, no index needed + outfile.write(f" T {method_name}() const {{\n") + outfile.write(f" return props_.get(0);\n") + else: + # Dimension 0 or > 1: include index parameter + outfile.write(f" T {method_name}(int index = 0) const {{\n") + outfile.write(f" return props_.get(index);\n") + outfile.write(f" }}\n\n") + + # Also provide getAll for multi-type (returns vector) + if dimension != 1: # dimension 0 or > 1 + outfile.write(f" template\n") + outfile.write(f" std::vector {method_name}All() const {{\n") + outfile.write(f" return props_.getAll();\n") + outfile.write(f" }}\n\n") + else: + # Single-type property + if dimension == 1: + # Dimension 1: exactly one value, no index needed + outfile.write(f" {cpp_type} {method_name}() const {{\n") + outfile.write(f" return props_.get(0);\n") + outfile.write(f" }}\n\n") + elif dimension == 0: + # Dimension 0: variable dimension, include index + outfile.write(f" {cpp_type} {method_name}(int index = 0) const {{\n") + outfile.write(f" return props_.get(index);\n") + outfile.write(f" }}\n\n") + else: + # Dimension > 1: array getter + array_type = get_cpp_type(prop_def, include_array=True) + outfile.write(f" {array_type} {method_name}() const {{\n") + outfile.write(f" return props_.getAll();\n") + outfile.write(f" }}\n\n") + + # Generate setter + if generate_setter: + setter_name = 'set' + method_name[0].upper() + method_name[1:] + + if is_multitype: + # Multi-type property - generate templated setter + outfile.write(f" // Multi-type property (supports: {', '.join(types)})\n") + outfile.write(f" template\n") + if dimension == 1: + # Dimension 1: exactly one value, no index needed + outfile.write(f" void {setter_name}(T value) {{\n") + outfile.write(f" props_.set(value, 0);\n") + else: + # Dimension 0 or > 1: include index parameter + outfile.write(f" void {setter_name}(T value, int index = 0) {{\n") + outfile.write(f" props_.set(value, index);\n") + outfile.write(f" }}\n\n") + + # Also provide setAll for multi-type + if dimension != 1: # dimension 0 or > 1 + outfile.write(f" template\n") + outfile.write(f" void {setter_name}All(const std::vector& values) {{\n") + outfile.write(f" props_.setAll(values);\n") + outfile.write(f" }}\n\n") + else: + # Single-type property + if dimension == 1: + # Dimension 1: exactly one value, no index needed + outfile.write(f" void {setter_name}({cpp_type} value) {{\n") + outfile.write(f" props_.set(value, 0);\n") + outfile.write(f" }}\n\n") + elif dimension == 0: + # Dimension 0: variable dimension, include index + outfile.write(f" void {setter_name}({cpp_type} value, int index = 0) {{\n") + outfile.write(f" props_.set(value, index);\n") + outfile.write(f" }}\n\n") + else: + # Dimension > 1: array setter + array_type = get_cpp_type(prop_def, include_array=True) + outfile.write(f" void {setter_name}(const {array_type}& values) {{\n") + outfile.write(f" props_.setAll(values);\n") + outfile.write(f" }}\n\n") + + outfile.write("};\n\n") + + outfile.write("} // namespace openfx\n") + + def main(args): script_dir = os.path.dirname(os.path.abspath(__file__)) include_dir = Path(script_dir).parent / 'include' @@ -562,6 +816,14 @@ def main(args): print(f"=== Generating props by set header {args.props_by_set}") gen_props_by_set(props_by_set, props_by_action, dest_path / args.props_by_set) + if args.verbose: + print(f"=== Generating property set accessor classes for plugins: {args.propset_accessors}") + gen_propset_accessors(props_by_set, props_metadata, dest_path / args.propset_accessors, for_host=False) + + if args.verbose: + print(f"=== Generating property set accessor classes for hosts: {args.propset_accessors_host}") + gen_propset_accessors(props_by_set, props_metadata, dest_path / args.propset_accessors_host, for_host=True) + if __name__ == "__main__": script_dir = os.path.dirname(os.path.abspath(__file__)) dest_path = Path(script_dir).parent / 'openfx-cpp/include/openfx' @@ -574,6 +836,10 @@ def main(args): help="Generate property metadata into this file") parser.add_argument('--props-by-set', default=dest_path/"ofxPropsBySet.h", help="Generate props by set metadata into this file") + parser.add_argument('--propset-accessors', default=dest_path/"ofxPropSetAccessors.h", + help="Generate property set accessor classes for plugins into this file") + parser.add_argument('--propset-accessors-host', default=dest_path/"ofxPropSetAccessorsHost.h", + help="Generate property set accessor classes for hosts into this file") # Parse the arguments args = parser.parse_args() From 473aa3400d87aef101e04a2d259f46ed3a462342 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 4 Nov 2025 16:24:46 -0500 Subject: [PATCH 33/33] Work on testProperties: now tests compliance for many propsets Signed-off-by: Gary Oberbrunner --- Examples/TestProps/testProperties.cpp | 405 +- include/ofx-props.yml | 39 +- openfx-cpp/include/openfx/ofxLog.h | 42 +- .../include/openfx/ofxPropSetAccessors.h | 4167 ++++++++++++----- .../include/openfx/ofxPropSetAccessorsHost.h | 3336 +++++++++---- openfx-cpp/include/openfx/ofxPropsAccess.h | 10 +- openfx-cpp/include/openfx/ofxPropsBySet.h | 36 +- openfx-cpp/include/openfx/ofxPropsMetadata.h | 6 +- scripts/gen-props.py | 153 +- 9 files changed, 6007 insertions(+), 2187 deletions(-) diff --git a/Examples/TestProps/testProperties.cpp b/Examples/TestProps/testProperties.cpp index a9254dfa..04b269d8 100644 --- a/Examples/TestProps/testProperties.cpp +++ b/Examples/TestProps/testProperties.cpp @@ -4,7 +4,7 @@ /** @file testProperties.cpp OFX test plugin which logs all properties in various actions. - Uses spdlog and fmt to log all the info. + Uses openfx::Logger for logging. */ #include "ofxImageEffect.h" #include "ofxMemory.h" @@ -14,8 +14,8 @@ #include "openfx/ofxPropsBySet.h" #include "openfx/ofxPropsMetadata.h" #include "openfx/ofxPropSetAccessors.h" // Type-safe property set accessor classes +#include "openfx/ofxLog.h" // OpenFX logging #include "../openfx-cpp/examples/host-specific-props/myhost/myhostPropsMetadata.h" // Ensure example compiles -#include "spdlog/spdlog.h" #include // stl maps #include // stl strings #include @@ -31,6 +31,9 @@ using namespace openfx; // for props access +// Plugin identification +static constexpr const char* kPluginName = "PropertyTester"; + static OfxHost *gHost; static OfxImageEffectSuiteV1 *gEffectSuite; static OfxPropertySuiteV1 *gPropSuite; @@ -47,12 +50,10 @@ static const void *fetchSuite(const char *suiteName, int suiteVersion, const void *suite = gHost->fetchSuite(gHost->host, suiteName, suiteVersion); if (optional) { if (suite == 0) - spdlog::warn("Could not fetch the optional suite '{}' version {};", - suiteName, suiteVersion); + Logger::warn("Could not fetch the optional suite '{}' version {}", suiteName, suiteVersion); } else { if (suite == 0) - spdlog::error("Could not fetch the mandatory suite '{}' version {};", - suiteName, suiteVersion); + Logger::error("Could not fetch the mandatory suite '{}' version {}", suiteName, suiteVersion); } if (!optional && suite == 0) throw kOfxStatErrMissingHostFeature; @@ -110,8 +111,13 @@ struct PropRecord { std::vector values; }; -void readProperty(PropertyAccessor &accessor, const PropDef &def, +// Fills in values and returns true if property exists, false (and no values) otherwise +bool readProperty(PropertyAccessor &accessor, const PropDef &def, std::vector &values) { + if (!accessor.exists(def.name)) { + values.clear(); + return false; + } int dimension = accessor.getDimensionRaw(def.name); values.clear(); @@ -140,7 +146,7 @@ void readProperty(PropertyAccessor &accessor, const PropDef &def, } } if (!valid) { - spdlog::warn("Property '{}' has invalid enum value '{}' (not in spec)", + Logger::warn("Property '{}' has invalid enum value '{}' (not in spec)", def.name, strValue); // Log valid values for debugging std::string validValues; @@ -148,13 +154,14 @@ void readProperty(PropertyAccessor &accessor, const PropDef &def, if (j > 0) validValues += ", "; validValues += def.enumValues[j]; } - spdlog::warn(" Valid values are: {}", validValues); + Logger::warn(" Valid values are: {}", validValues); } } } else if (primaryType == PropType::Pointer) { values.push_back(accessor.getRaw(def.name, i)); } } + return true; } std::vector getAllPropertiesOfSet(PropertyAccessor &accessor, @@ -164,7 +171,7 @@ std::vector getAllPropertiesOfSet(PropertyAccessor &accessor, // Find the property set in the map auto setIt = prop_sets.find(propertySetName); if (setIt == prop_sets.end()) { - spdlog::error("Property set not found: {}", propertySetName); + Logger::error("Property set not found: {}", propertySetName); return {}; } @@ -172,8 +179,11 @@ std::vector getAllPropertiesOfSet(PropertyAccessor &accessor, for (const auto &prop : setIt->second) { // Use template dispatch to get property with correct type std::vector values; - readProperty(accessor, prop.def, values); - result.push_back({prop.def, std::move(values)}); + bool status = readProperty(accessor, prop.def, values); + if (status) + result.push_back({prop.def, std::move(values)}); + else + Logger::warn("Property not found: {}.{}", propertySetName, prop.def.name); } return result; } @@ -183,118 +193,185 @@ std::vector getAllPropertiesOfSet(PropertyAccessor &accessor, */ void logPropValues(const std::string_view setName, const std::vector &props) { - spdlog::info("Properties for {}:", setName); + Logger::info("Properties for {}", setName); for (const auto &[propDef, values] : props) { - // Build up the log string piecemeal - std::string buf; - fmt::format_to(std::back_inserter(buf), " {} ({}d) = [", propDef.name, - values.size()); + // Build up the log string with property values + std::ostringstream buf; + buf << " " << propDef.name << " (" << values.size() << "d) = ["; for (size_t i = 0; i < values.size(); ++i) { std::visit( [&buf](auto &&value) { using T = std::decay_t; if constexpr (std::is_same_v) { - fmt::format_to(std::back_inserter(buf), "{}", value); + buf << value; } else if constexpr (std::is_same_v) { - fmt::format_to(std::back_inserter(buf), "{}", value); + buf << value; } else if constexpr (std::is_same_v) { - fmt::format_to(std::back_inserter(buf), "{}", value); + buf << value; } else if constexpr (std::is_same_v) { - fmt::format_to(std::back_inserter(buf), "{:p}", value); + buf << value; } }, values[i]); if (i < values.size() - 1) - fmt::format_to(std::back_inserter(buf), ","); + buf << ","; } - fmt::format_to(std::back_inserter(buf), "]"); + buf << "]"; // log it - spdlog::info("{}", buf); + Logger::info("{}", buf.str()); } } /** * Test property set compliance - verify all properties in a property set are accessible * Returns number of failures + * + * Can test either: + * 1. Regular property sets: testPropertySetCompliance(accessor, "EffectDescriptor") + * 2. Action arguments: testPropertySetCompliance(accessor, kOfxActionRender, "inArgs") */ -int testPropertySetCompliance(PropertyAccessor &accessor, const char *propSetName) { - spdlog::info("========================================"); - spdlog::info("Testing property set compliance: {}", propSetName); - spdlog::info("========================================"); +int testPropertySetCompliance(PropertyAccessor &accessor, const char *setName, const char *argType = nullptr) { + std::string testName; + std::vector propNames; + std::vector propDefs; + std::vector propOptional; + + if (argType == nullptr) { + // Testing a regular property set + testName = std::string(setName); + Logger::info("========================================"); + Logger::info("Testing property set compliance: {}", testName); + Logger::info("========================================"); + + // Find the property set + auto setIt = prop_sets.find(setName); + if (setIt == prop_sets.end()) { + Logger::error("Property set '{}' not found in prop_sets", setName); + return 1; + } - // Find the property set - auto setIt = prop_sets.find(propSetName); - if (setIt == prop_sets.end()) { - spdlog::error("Property set '{}' not found in prop_sets", propSetName); - return 1; + // Build lists from prop_sets map + for (const auto &prop : setIt->second) { + propNames.push_back(prop.def.name); + propDefs.push_back(&prop.def); + propOptional.push_back(prop.host_optional); + } + } else { + // Testing action arguments + testName = std::string(setName) + "." + argType; + Logger::info("========================================"); + Logger::info("Testing action argument compliance: {}", testName); + Logger::info("========================================"); + + // Find the action's property list + std::array key = {setName, argType}; + auto setIt = action_props.find(key); + if (setIt == action_props.end()) { + Logger::error("Action argument '{}' not found in action_props", testName); + return 1; + } + + // Build lists from action_props map + for (const char* propName : setIt->second) { + propNames.push_back(propName); + + // Find property definition + auto propIt = std::find_if(prop_defs.data.begin(), prop_defs.data.end(), + [propName](const PropDef& def) { + return std::string_view(def.name) == std::string_view(propName); + }); + + if (propIt == prop_defs.data.end()) { + Logger::error(" ✗ {} - property definition not found", propName); + propDefs.push_back(nullptr); + propOptional.push_back(false); + continue; + } + + propDefs.push_back(&(*propIt)); + propOptional.push_back(false); // Action args are typically not marked as optional + } } + // Test each property int totalProps = 0; int accessibleProps = 0; int requiredMissing = 0; int optionalMissing = 0; int typeErrors = 0; - // Test each property in the suite - for (const auto &prop : setIt->second) { + for (size_t i = 0; i < propNames.size(); ++i) { totalProps++; - const char* propName = prop.def.name; + const char* propName = propNames[i]; + const PropDef* propDef = propDefs[i]; + bool isOptional = propOptional[i]; + + if (propDef == nullptr) { + typeErrors++; + continue; + } try { - // Try to get dimension first (this will fail if property doesn't exist) + bool exists = accessor.exists(propName); + if (!exists) + throw openfx::PropertyNotFoundException(-1); + + // Try to get dimension (this will fail if property doesn't exist) int dimension = accessor.getDimensionRaw(propName); // Verify dimension matches spec (0 means variable dimension) - if (prop.def.dimension != 0 && dimension != prop.def.dimension) { - spdlog::warn(" ✗ {} - dimension mismatch: expected {}, got {}", - propName, prop.def.dimension, dimension); + if (propDef->dimension != 0 && dimension != propDef->dimension) { + Logger::warn(" ✗ {} - dimension mismatch: expected {}, got {}", + propName, propDef->dimension, dimension); } // Try to read the property based on its type std::vector values; try { - readProperty(accessor, prop.def, values); + readProperty(accessor, *propDef, values); accessibleProps++; // For optional properties that are present, log them - if (prop.host_optional) { - spdlog::info(" ✓ {} - accessible (optional, dimension={})", propName, dimension); - } else { - spdlog::debug(" ✓ {} - accessible (dimension={})", propName, dimension); + if (isOptional) { + Logger::info(" ✓ {} - accessible (optional, dimension={})", propName, dimension); } } catch (const std::exception& e) { typeErrors++; - spdlog::error(" ✗ {} - type error: {}", propName, e.what()); + Logger::error(" ✗ {} - type error: {}", propName, e.what()); } } catch (...) { // Property not accessible - if (prop.host_optional) { + if (isOptional) { optionalMissing++; - spdlog::debug(" - {} - not present (optional)", propName); + // Silently skip optional missing properties } else { requiredMissing++; - spdlog::warn(" ✗ {} - NOT ACCESSIBLE (required!)", propName); + Logger::warn(" ✗ {} - NOT ACCESSIBLE{}", propName, argType ? "" : " (required!)"); } } } // Summary - spdlog::info("----------------------------------------"); - spdlog::info("Property set '{}' compliance results:", propSetName); - spdlog::info(" Total properties defined: {}", totalProps); - spdlog::info(" Accessible: {}", accessibleProps); - spdlog::info(" Required missing: {}", requiredMissing); - spdlog::info(" Optional missing: {}", optionalMissing); - spdlog::info(" Type errors: {}", typeErrors); + Logger::info("----------------------------------------"); + Logger::info("'{}' compliance results:", testName); + Logger::info(" Total properties defined: {}", totalProps); + Logger::info(" Accessible: {}", accessibleProps); + if (argType == nullptr) { + Logger::info(" Required missing: {}", requiredMissing); + Logger::info(" Optional missing: {}", optionalMissing); + } else { + Logger::info(" Missing: {}", requiredMissing + optionalMissing); + } + Logger::info(" Type errors: {}", typeErrors); int failures = requiredMissing + typeErrors; if (failures == 0) { - spdlog::info(" ✓ COMPLIANCE TEST PASSED"); + Logger::info(" ✓ COMPLIANCE TEST PASSED"); } else { - spdlog::error(" ✗ COMPLIANCE TEST FAILED ({} issues)", failures); + Logger::error(" ✗ COMPLIANCE TEST FAILED ({} issues)", failures); } - spdlog::info("========================================"); + Logger::info("========================================"); return failures; } @@ -307,10 +384,9 @@ static int gLoadCount = 0; /** @brief Called at load */ static OfxStatus actionLoad(void) { - spdlog::info("loadAction - start();\n{"); + Logger::info("loadAction()"); if (gLoadCount != 0) - spdlog::error( - "Load action called more than once without unload being called;"); + Logger::error("Load action called more than once without unload being called"); gLoadCount++; OfxStatus status = kOfxStatOK; @@ -318,11 +394,12 @@ static OfxStatus actionLoad(void) { try { // fetch the suites if (gHost == 0) - spdlog::error("Host pointer has not been set;"); + Logger::error("Host pointer has not been set"); if (!gHost) throw kOfxStatErrBadHandle; if (gLoadCount == 1) { + Logger::info("loadAction - loading suites"); gEffectSuite = (OfxImageEffectSuiteV1 *)fetchSuite(kOfxImageEffectSuite, 1); gPropSuite = (OfxPropertySuiteV1 *)fetchSuite(kOfxPropertySuite, 1); @@ -332,31 +409,37 @@ static OfxStatus actionLoad(void) { (OfxMultiThreadSuiteV1 *)fetchSuite(kOfxMultiThreadSuite, 1); gMessageSuite = (OfxMessageSuiteV1 *)fetchSuite(kOfxMessageSuite, 1); + Logger::info("loadAction - getting all props..."); // Get all host props, property set name "ImageEffectHost" - // (too bad property sets don't know their own name) PropertyAccessor accessor = PropertyAccessor(gHost->host, gPropSuite); const auto prop_values = getAllPropertiesOfSet(accessor, "ImageEffectHost"); + Logger::info("loadAction - got {} props", prop_values.size()); logPropValues("ImageEffectHost", prop_values); // Test host property set compliance + Logger::info("loadAction - testing compliance..."); testPropertySetCompliance(accessor, "ImageEffectHost"); } } catch (int err) { + Logger::error("loadAction - caught err {}", err); status = err; } + catch (...) { + Logger::error("loadAction - caught unknown err"); + status = kOfxStatErrFatal; + } - spdlog::info("}loadAction - stop;"); + Logger::info("loadAction returning {}", status); return status; } /** @brief Called before unload */ static OfxStatus unLoadAction(void) { if (gLoadCount <= 0) - spdlog::error("UnLoad action called without a corresponding load action " - "having been called;"); + Logger::error("UnLoad action called without a corresponding load action having been called"); gLoadCount--; // force these to null @@ -420,26 +503,78 @@ static OfxStatus isIdentity(OfxImageEffectHandle /*effect*/, //////////////////////////////////////////////////////////////////////////////// // function called when the instance has been changed by anything -static OfxStatus instanceChanged(OfxImageEffectHandle /*effect*/, - OfxPropertySetHandle /*inArgs*/, - OfxPropertySetHandle /*outArgs*/) { +static OfxStatus instanceChanged(OfxImageEffectHandle instance, + OfxPropertySetHandle inArgs, + OfxPropertySetHandle outArgs) { + // Test property set compliance + PropertyAccessor in_accessor = PropertyAccessor(inArgs, gPropSuite); + testPropertySetCompliance(in_accessor, kOfxActionInstanceChanged, "inArgs"); + PropertyAccessor out_accessor = PropertyAccessor(outArgs, gPropSuite); + testPropertySetCompliance(out_accessor, kOfxActionInstanceChanged, "outArgs"); + + auto accessor = PropertyAccessor(instance, gEffectSuite, gPropSuite); + testPropertySetCompliance(accessor, "EffectInstance"); + // don't trap any others return kOfxStatReplyDefault; } // the process code that the host sees -static OfxStatus render(OfxImageEffectHandle /*instance*/, - OfxPropertySetHandle /*inArgs*/, - OfxPropertySetHandle /*outArgs*/) { +static OfxStatus render(OfxImageEffectHandle instance, + OfxPropertySetHandle inArgs, + OfxPropertySetHandle outArgs) { + // Test property set compliance + PropertyAccessor in_accessor = PropertyAccessor(inArgs, gPropSuite); + testPropertySetCompliance(in_accessor, kOfxImageEffectActionRender, "inArgs"); + PropertyAccessor out_accessor = PropertyAccessor(outArgs, gPropSuite); + testPropertySetCompliance(out_accessor, kOfxImageEffectActionRender, "outArgs"); + + auto accessor = PropertyAccessor(instance, gEffectSuite, gPropSuite); + testPropertySetCompliance(accessor, "EffectInstance"); + return kOfxStatOK; } + +static OfxStatus getRegionOfDefinition(OfxImageEffectHandle instance, + OfxPropertySetHandle inArgs, + OfxPropertySetHandle outArgs) { + // Test property set compliance + PropertyAccessor in_accessor = PropertyAccessor(inArgs, gPropSuite); + testPropertySetCompliance(in_accessor, kOfxImageEffectActionGetRegionOfDefinition, "inArgs"); + PropertyAccessor out_accessor = PropertyAccessor(outArgs, gPropSuite); + testPropertySetCompliance(out_accessor, kOfxImageEffectActionGetRegionOfDefinition, "outArgs"); + + auto accessor = PropertyAccessor(instance, gEffectSuite, gPropSuite); + testPropertySetCompliance(accessor, "EffectInstance"); + + return kOfxStatReplyDefault; +} + +static OfxStatus getRegionsOfInterest(OfxImageEffectHandle instance, + OfxPropertySetHandle inArgs, + OfxPropertySetHandle outArgs) { + // Test property set compliance + PropertyAccessor in_accessor = PropertyAccessor(inArgs, gPropSuite); + testPropertySetCompliance(in_accessor, kOfxImageEffectActionGetRegionsOfInterest, "inArgs"); + // No outArgs here + // PropertyAccessor out_accessor = PropertyAccessor(outArgs, gPropSuite); + // testPropertySetCompliance(out_accessor, kOfxImageEffectActionGetRegionsOfInterest, "outArgs"); + + auto accessor = PropertyAccessor(instance, gEffectSuite, gPropSuite); + testPropertySetCompliance(accessor, "EffectInstance"); + + return kOfxStatReplyDefault; +} + // describe the plugin in context static OfxStatus describeInContext(OfxImageEffectHandle effect, OfxPropertySetHandle inArgs) { + // Test property set compliance PropertyAccessor accessor = PropertyAccessor(inArgs, gPropSuite); - spdlog::info("describeInContext: inArgs->context = {}", - accessor.get()); + testPropertySetCompliance(accessor, kOfxImageEffectActionDescribeInContext, "inArgs"); + accessor = PropertyAccessor(effect, gEffectSuite, gPropSuite); + testPropertySetCompliance(accessor, "EffectDescriptor"); OfxPropertySetHandle props; // define the output clip @@ -474,7 +609,7 @@ static OfxStatus describeInContext(OfxImageEffectHandle effect, paramDesc.setDefault(1.0); // dimension=0, so default index=0 paramDesc.setMin(0.0, 0); // explicit index for dimension=0 paramDesc.setMax(10.0, 0); // explicit index for dimension=0 - spdlog::info(" Using ParamDouble1D accessor with multi-type properties!"); + Logger::info(" Using ParamDouble1D accessor with multi-type properties!"); // Log all the effect descriptor's props OfxPropertySetHandle effectProps; @@ -505,63 +640,64 @@ static OfxStatus actionDescribe(OfxImageEffectHandle effect) { OfxPropertySetHandle effectProps; gEffectSuite->getPropertySet(effect, &effectProps); + PropertyAccessor accessor = PropertyAccessor(effectProps, gPropSuite); + // Test property set compliance + testPropertySetCompliance(accessor, "EffectDescriptor"); - // Traditional PropertyAccessor API - accessor.set("Property Tester") - .set("1.0") - .setAll({1, 0, 0}) - .set( - "Sample plugin which logs all actions and properties") - .set("OFX Examples") - .set(false) - .setAll( - {kOfxImageComponentRGBA, kOfxImageComponentAlpha}) - .setAll(supportedContexts) - .setAll( - supportedPixelDepths); - - // NEW: Type-safe property set accessor API demo - spdlog::info("Testing property set accessor classes..."); + // Low-level PropertyAccessor API + accessor.set("Property Tester v2") + .set("1.0", 0, false) + .setAll({1, 0, 0}, false) + .set( + "Sample plugin which logs all actions and properties", 0, false) + .set("OFX Examples") + .set(false) + .setAll(supportedContexts) + .setAll( + supportedPixelDepths); + + // OR: high-level, simpler (still type-safe) property set accessor API + Logger::info("Testing property set accessor classes..."); openfx::EffectDescriptor effectDesc(accessor); - // Can also use setters via accessor class (same as above, but more convenient) - // Note: dimension=1 properties don't need index parameter - cleaner API! - effectDesc.setLabel("Property Tester (via accessor)"); - effectDesc.setVersionLabel("1.0"); - effectDesc.setPluginDescription("Sample plugin"); - - spdlog::info(" Using EffectDescriptor accessor class - clean API for dimension=1!"); + // Simplified setters via property set class (same as above, but more convenient) + // Also chainable for fluent interface! + effectDesc.setLabel("Property Tester V2") + .setVersionLabel("1.0") + .setVersion({1,0,0}) + .setPluginDescription("Sample plugin, logging all actions & properties") + .setImageEffectPluginPropGrouping("OFX Examples") + .setMultipleClipDepths(false) + .setSupportedContexts(supportedContexts) + .setSupportedPixelDepths(supportedPixelDepths); // Test host-specific property extensibility (will fail at runtime but compiles!) - spdlog::info("Testing host-specific property extensibility..."); + Logger::info("Testing host-specific property extensibility..."); try { // Test myhost properties (from examples/host-specific-props) auto viewerProcess = accessor.get(0, false); - spdlog::info(" MyHost viewer process: {}", viewerProcess ? viewerProcess : "(not available)"); + Logger::info(" MyHost viewer process: {}", viewerProcess ? viewerProcess : "(not available)"); auto projectPath = accessor.get(0, false); - spdlog::info(" MyHost project path: {}", projectPath ? projectPath : "(not available)"); + Logger::info(" MyHost project path: {}", projectPath ? projectPath : "(not available)"); auto nodeColor = accessor.getAll(); - spdlog::info(" MyHost node color dimension: {}", nodeColor.size()); + Logger::info(" MyHost node color dimension: {}", nodeColor.size()); // Test setting host properties accessor.setAll({255, 128, 64}); } catch (const PropertyNotFoundException& e) { - spdlog::info(" Host properties not available (expected) - but compilation succeeded!"); + Logger::info(" Host properties not available (expected) - but compilation succeeded!"); } catch (...) { - spdlog::info(" Host properties failed (expected) - but compilation succeeded!"); + Logger::info(" Host properties failed (expected) - but compilation succeeded!"); } // After setting up, log all known props const auto prop_values = getAllPropertiesOfSet(accessor, "EffectDescriptor"); logPropValues("EffectDescriptor", prop_values); - // Test effect descriptor property set compliance - testPropertySetCompliance(accessor, "EffectDescriptor"); - return kOfxStatOK; } @@ -574,25 +710,25 @@ static void checkMainHandles(const char *action, const void *handle, bool outArgsCanBeNull) { if (handleCanBeNull) { if (handle != 0) { - spdlog::warn("Handle passed to '{}' is not null;", action); + Logger::warn("Handle passed to '{}' is not null", action); } else if (handle == 0) { - spdlog::error("'Handle passed to '{}' is null;", action); + Logger::error("'Handle passed to '{}' is null", action); } } if (inArgsCanBeNull) { if (inArgsHandle != 0) { - spdlog::warn("'inArgs' Handle passed to '{}' is not null;", action); + Logger::warn("'inArgs' Handle passed to '{}' is not null", action); } else if (inArgsHandle == 0) { - spdlog::error("'inArgs' handle passed to '{}' is null;", action); + Logger::error("'inArgs' handle passed to '{}' is null", action); } } if (outArgsCanBeNull) { if (outArgsHandle != 0) { - spdlog::warn("'outArgs' Handle passed to '{}' is not null;", action); + Logger::warn("'outArgs' Handle passed to '{}' is not null", action); } else if (outArgsHandle == 0) { - spdlog::error("'outArgs' handle passed to '{}' is null;", action); + Logger::error("'outArgs' handle passed to '{}' is null", action); } } @@ -609,8 +745,7 @@ static void checkMainHandles(const char *action, const void *handle, static OfxStatus pluginMain(const char *action, const void *handle, OfxPropertySetHandle inArgsHandle, OfxPropertySetHandle outArgsHandle) { - spdlog::info("pluginMain - start();\n{"); - spdlog::info(" action is '{}';", action); + Logger::info(">>> {}", action); OfxStatus stat = kOfxStatReplyDefault; try { @@ -646,13 +781,13 @@ static OfxStatus pluginMain(const char *action, const void *handle, } else if (!strcmp(action, kOfxActionInstanceChanged)) { checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, false, true); + stat = instanceChanged(effectHandle, inArgsHandle, outArgsHandle); } else if (!strcmp(action, kOfxActionBeginInstanceChanged)) { checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, false, true); } else if (!strcmp(action, kOfxActionEndInstanceChanged)) { checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, false, true); - stat = instanceChanged(effectHandle, inArgsHandle, outArgsHandle); } else if (!strcmp(action, kOfxActionBeginInstanceEdit)) { checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, true, true); @@ -662,9 +797,11 @@ static OfxStatus pluginMain(const char *action, const void *handle, } else if (!strcmp(action, kOfxImageEffectActionGetRegionOfDefinition)) { checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, false, false); + stat = getRegionOfDefinition(effectHandle, inArgsHandle, outArgsHandle); } else if (!strcmp(action, kOfxImageEffectActionGetRegionsOfInterest)) { checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, false, false); + stat = getRegionsOfInterest(effectHandle, inArgsHandle, outArgsHandle); } else if (!strcmp(action, kOfxImageEffectActionGetTimeDomain)) { checkMainHandles(action, handle, inArgsHandle, outArgsHandle, false, true, false); @@ -694,27 +831,27 @@ static OfxStatus pluginMain(const char *action, const void *handle, false, true); stat = describeInContext(effectHandle, inArgsHandle); } else { - spdlog::error("Unknown action '{}';", action); + Logger::error("Unknown action '{}'", action); } } catch (std::bad_alloc) { // catch memory - spdlog::error("OFX Plugin Memory error;"); + Logger::error("OFX Plugin Memory error"); stat = kOfxStatErrMemory; } catch (const std::exception &e) { // standard exceptions - spdlog::error("Plugin exception: '{}';", e.what()); + Logger::error("Plugin exception: '{}'", e.what()); stat = kOfxStatErrUnknown; } catch (int err) { // ho hum, gone wrong somehow - spdlog::error("Misc int plugin exception: '{}';", mapStatus(err)); + Logger::error("Misc int plugin exception: '{}'", mapStatus(err)); stat = err; } catch (...) { // everything else - spdlog::error("Uncaught misc plugin exception;"); + Logger::error("Uncaught misc plugin exception"); stat = kOfxStatErrUnknown; } - spdlog::info("}pluginMain - stop;"); + Logger::info("<<< {} = {}", action, stat); // other actions to take the default value return stat; @@ -722,11 +859,13 @@ static OfxStatus pluginMain(const char *action, const void *handle, // function to set the host structure static void setHostFunc(OfxHost *hostStruct) { - spdlog::info("setHostFunc - start();\n{"); + // Set the plugin name context for all logging + Logger::setContext(kPluginName); + + Logger::info("setHostFunc()"); if (hostStruct == 0) - spdlog::error("host is a null pointer;"); + Logger::error("host is a null pointer"); gHost = hostStruct; - spdlog::info("}setHostFunc - stop;"); } //////////////////////////////////////////////////////////////////////////////// @@ -741,13 +880,11 @@ static OfxPlugin basicPlugin = {kOfxImageEffectPluginApi, // the two mandated functions EXPORT OfxPlugin *OfxGetPlugin(int nth) { - spdlog::info("OfxGetPlugin - start();\n{"); - spdlog::info(" asking for {}th plugin;", nth); + Logger::info("OfxGetPlugin - start()"); + Logger::info(" asking for {}th plugin", nth); if (nth != 0) - spdlog::error( - "requested plugin {} is more than the number of plugins in the file;", - nth); - spdlog::info("}OfxGetPlugin - stop;"); + Logger::error("requested plugin {} is more than the number of plugins in the file", nth); + Logger::info("OfxGetPlugin - stop"); if (nth == 0) return &basicPlugin; @@ -755,8 +892,8 @@ EXPORT OfxPlugin *OfxGetPlugin(int nth) { } EXPORT int OfxGetNumberOfPlugins(void) { - spdlog::info("OfxGetNumberOfPlugins - start();\n{"); - spdlog::info("}OfxGetNumberOfPlugins - stop;"); + Logger::info("OfxGetNumberOfPlugins - start()"); + Logger::info("OfxGetNumberOfPlugins - stop"); return 1; } diff --git a/include/ofx-props.yml b/include/ofx-props.yml index 625bd42d..adbdf7d1 100644 --- a/include/ofx-props.yml +++ b/include/ofx-props.yml @@ -34,7 +34,7 @@ propertySets: - OfxImageEffectPropSupportedComponents - OfxImageEffectPropSupportedContexts - OfxImageEffectPropMultipleClipDepths - - OfxImageEffectPropOpenCLSupported + - OfxImageEffectPropOpenCLSupported | host_optional=true - OfxImageEffectPropSupportsMultipleClipPARs - OfxImageEffectPropSetableFrameRate - OfxImageEffectPropSetableFielding @@ -43,19 +43,19 @@ propertySets: - OfxParamHostPropSupportsChoiceAnimation - OfxParamHostPropSupportsBooleanAnimation - OfxParamHostPropSupportsCustomAnimation - - OfxParamHostPropSupportsStrChoice - - OfxParamHostPropSupportsStrChoiceAnimation + - OfxParamHostPropSupportsStrChoice | host_optional=true + - OfxParamHostPropSupportsStrChoiceAnimation | host_optional=true - OfxParamHostPropMaxParameters - OfxParamHostPropMaxPages - OfxParamHostPropPageRowColumnCount - - OfxPropHostOSHandle - - OfxParamHostPropSupportsParametricAnimation - - OfxImageEffectInstancePropSequentialRender + - OfxPropHostOSHandle | host_optional=true + - OfxParamHostPropSupportsParametricAnimation | host_optional=true + - OfxImageEffectInstancePropSequentialRender | host_optional=true - OfxImageEffectPropOpenGLRenderSupported - - OfxImageEffectPropRenderQualityDraft - - OfxImageEffectHostPropNativeOrigin - - OfxImageEffectPropColourManagementAvailableConfigs - - OfxImageEffectPropColourManagementStyle + - OfxImageEffectPropRenderQualityDraft | host_optional=true + - OfxImageEffectHostPropNativeOrigin | host_optional=true + - OfxImageEffectPropColourManagementAvailableConfigs | host_optional=true + - OfxImageEffectPropColourManagementStyle | host_optional=true EffectDescriptor: write: plugin props: @@ -63,16 +63,16 @@ propertySets: - OfxPropLabel - OfxPropShortLabel - OfxPropLongLabel - - OfxPropVersion - - OfxPropVersionLabel - - OfxPropPluginDescription + - OfxPropVersion | host_optional=true + - OfxPropVersionLabel | host_optional=true + - OfxPropPluginDescription | host_optional=true - OfxImageEffectPropSupportedContexts - OfxImageEffectPluginPropGrouping - OfxImageEffectPluginPropSingleInstance - OfxImageEffectPluginRenderThreadSafety - OfxImageEffectPluginPropHostFrameThreading - OfxImageEffectPluginPropOverlayInteractV1 - - OfxImageEffectPropOpenCLSupported + - OfxImageEffectPropOpenCLSupported | host_optional=true - OfxImageEffectPropSupportsMultiResolution - OfxImageEffectPropSupportsTiles - OfxImageEffectPropTemporalClipAccess @@ -84,11 +84,11 @@ propertySets: - OfxImageEffectPropClipPreferencesSlaveParam - OfxImageEffectPropOpenGLRenderSupported - OfxPluginPropFilePath | write=host - - OfxOpenGLPropPixelDepth + - OfxOpenGLPropPixelDepth | host_optional=true - OfxImageEffectPluginPropOverlayInteractV2 - - OfxImageEffectPropColourManagementAvailableConfigs - - OfxImageEffectPropColourManagementStyle - - OfxImageEffectPropNoSpatialAwareness + - OfxImageEffectPropColourManagementAvailableConfigs | host_optional=true + - OfxImageEffectPropColourManagementStyle | host_optional=true + - OfxImageEffectPropNoSpatialAwareness | host_optional=true EffectInstance: write: host props: @@ -735,9 +735,8 @@ properties: type: bool dimension: 1 OfxPluginPropFilePath: - type: enum + type: string dimension: 1 - values: ['false', 'true', 'needed'] OfxImageEffectPropOpenGLRenderSupported: type: enum dimension: 1 diff --git a/openfx-cpp/include/openfx/ofxLog.h b/openfx-cpp/include/openfx/ofxLog.h index fb52db96..f94568d4 100644 --- a/openfx-cpp/include/openfx/ofxLog.h +++ b/openfx-cpp/include/openfx/ofxLog.h @@ -54,6 +54,20 @@ class Logger { */ static void setLogHandler(LogHandler handler); + /** + * @brief Set a context string (e.g., plugin name) to prepend to all log messages + * + * @param context The context string (typically plugin name) + */ + static void setContext(const std::string& context); + + /** + * @brief Get the current context string + * + * @return The current context string + */ + static std::string getContext(); + /** * @brief Log an informational message * @@ -146,6 +160,7 @@ class Logger { // Static member variables (inline in C++17) static inline LogHandler g_logHandler = defaultLogHandler; static inline std::mutex g_logMutex; + static inline std::string g_context; }; // Inline implementations for non-template methods @@ -160,6 +175,16 @@ inline void Logger::setLogHandler(LogHandler handler) { } } +inline void Logger::setContext(const std::string& context) { + std::lock_guard lock(g_logMutex); + g_context = context; +} + +inline std::string Logger::getContext() { + std::lock_guard lock(g_logMutex); + return g_context; +} + inline void Logger::info(const std::string& message) { log(Level::Info, message); } inline void Logger::warn(const std::string& message) { log(Level::Warning, message); } @@ -170,7 +195,14 @@ inline void Logger::log(Level level, const std::string& message) { auto timestamp = std::chrono::system_clock::now(); std::lock_guard lock(g_logMutex); - g_logHandler(level, timestamp, message); + + // Prepend context if set + std::string finalMessage = message; + if (!g_context.empty()) { + finalMessage = "[" + g_context + "] " + message; + } + + g_logHandler(level, timestamp, finalMessage); } inline void Logger::defaultLogHandler(Level level, std::chrono::system_clock::time_point timestamp, @@ -186,9 +218,6 @@ inline void Logger::defaultLogHandler(Level level, std::chrono::system_clock::ti localtime_r(&time, &local_time); #endif - // Stream to write log message - std::ostream& os = (level == Level::Error) ? std::cerr : std::cout; - // Level prefix const char* levelStr = ""; switch (level) { @@ -203,8 +232,9 @@ inline void Logger::defaultLogHandler(Level level, std::chrono::system_clock::ti break; } - // Write formatted log message - os << "[" << std::put_time(&local_time, "%Y-%m-%d %H:%M:%S") << "][" << levelStr << "] " << message + // Write formatted log message to stdout (not stderr) + // In plugin contexts, stderr may not be captured by host applications + std::cout << "[" << std::put_time(&local_time, "%Y-%m-%d %H:%M:%S") << "][" << levelStr << "] " << message << std::endl; } diff --git a/openfx-cpp/include/openfx/ofxPropSetAccessors.h b/openfx-cpp/include/openfx/ofxPropSetAccessors.h index f733d8cf..a534a588 100644 --- a/openfx-cpp/include/openfx/ofxPropSetAccessors.h +++ b/openfx-cpp/include/openfx/ofxPropSetAccessors.h @@ -35,53 +35,128 @@ class PropertySetAccessor { const PropertyAccessor& props() const { return props_; } }; +// Property set accessor for: ActionBeginInstanceChanged_InArgs +class ActionBeginInstanceChanged_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + const char* changeReason(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + +}; + +// Property set accessor for: ActionEndInstanceChanged_InArgs +class ActionEndInstanceChanged_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + const char* changeReason(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + +}; + +// Property set accessor for: ActionInstanceChanged_InArgs +class ActionInstanceChanged_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + const char* type(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* name(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* changeReason(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + double time(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + std::array renderScale() const { + return props_.getAll(); + } + +}; + // Property set accessor for: ClipDescriptor class ClipDescriptor : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void setType(const char* value) { - props_.set(value, 0); + ClipDescriptor& setType(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setName(const char* value) { - props_.set(value, 0); + ClipDescriptor& setName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLabel(const char* value) { - props_.set(value, 0); + ClipDescriptor& setLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setShortLabel(const char* value) { - props_.set(value, 0); + ClipDescriptor& setShortLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLongLabel(const char* value) { - props_.set(value, 0); + ClipDescriptor& setLongLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSupportedComponents(const char* value, int index = 0) { - props_.set(value, index); + ClipDescriptor& setSupportedComponents(const char* value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } - void setTemporalClipAccess(bool value) { - props_.set(value, 0); + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ClipDescriptor& setSupportedComponents(const Container& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setOptional(bool value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2, 3}) + ClipDescriptor& setSupportedComponents(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setFieldExtraction(const char* value) { - props_.set(value, 0); + ClipDescriptor& setTemporalClipAccess(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setIsMask(bool value) { - props_.set(value, 0); + ClipDescriptor& setOptional(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSupportsTiles(bool value) { - props_.set(value, 0); + ClipDescriptor& setFieldExtraction(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ClipDescriptor& setIsMask(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ClipDescriptor& setSupportsTiles(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } }; @@ -91,108 +166,156 @@ class ClipInstance : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - const char* type() const { - return props_.get(0); + const char* type(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* name() const { - return props_.get(0); + const char* name(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* label() const { - return props_.get(0); + const char* label(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* shortLabel() const { - return props_.get(0); + const char* shortLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* longLabel() const { - return props_.get(0); + const char* longLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* supportedComponents(int index = 0) const { - return props_.get(index); + const char* supportedComponents(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } - bool temporalClipAccess() const { - return props_.get(0); + bool temporalClipAccess(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* colourspace() const { - return props_.get(0); + const char* colourspace(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* preferredColourspaces(int index = 0) const { - return props_.get(index); + const char* preferredColourspaces(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } - bool optional() const { - return props_.get(0); + bool optional(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* fieldExtraction() const { - return props_.get(0); + const char* fieldExtraction(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool isMask() const { - return props_.get(0); + bool isMask(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool supportsTiles() const { - return props_.get(0); + bool supportsTiles(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* pixelDepth() const { - return props_.get(0); + const char* pixelDepth(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* components() const { - return props_.get(0); + const char* components(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* unmappedPixelDepth() const { - return props_.get(0); + const char* unmappedPixelDepth(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* unmappedComponents() const { - return props_.get(0); + const char* unmappedComponents(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* preMultiplication() const { - return props_.get(0); + const char* preMultiplication(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - double pixelAspectRatio() const { - return props_.get(0); + double pixelAspectRatio(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - double frameRate() const { - return props_.get(0); + double frameRate(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array frameRange() const { return props_.getAll(); } - const char* fieldOrder() const { - return props_.get(0); + const char* fieldOrder(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool connected() const { - return props_.get(0); + bool connected(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array unmappedFrameRange() const { return props_.getAll(); } - double unmappedFrameRate() const { - return props_.get(0); + double unmappedFrameRate(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool continuousSamples(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + +}; + +// Property set accessor for: CustomParamInterpFunc_InArgs +class CustomParamInterpFunc_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + std::array customValue() const { + return props_.getAll(); + } + + std::array interpolationTime() const { + return props_.getAll(); } - bool continuousSamples() const { - return props_.get(0); + double interpolationAmount(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + +}; + +// Property set accessor for: CustomParamInterpFunc_OutArgs +class CustomParamInterpFunc_OutArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + CustomParamInterpFunc_OutArgs& setCustomValue(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + CustomParamInterpFunc_OutArgs& setCustomValue(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + CustomParamInterpFunc_OutArgs& setInterpolationTime(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + CustomParamInterpFunc_OutArgs& setInterpolationTime(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } }; @@ -202,120 +325,238 @@ class EffectDescriptor : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void setType(const char* value) { - props_.set(value, 0); + EffectDescriptor& setType(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + EffectDescriptor& setLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + EffectDescriptor& setShortLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLabel(const char* value) { - props_.set(value, 0); + EffectDescriptor& setLongLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setShortLabel(const char* value) { - props_.set(value, 0); + EffectDescriptor& setVersion(int value, int index = 0, bool error_if_missing = false) { + props_.set(value, index, error_if_missing); + return *this; } - void setLongLabel(const char* value) { - props_.set(value, 0); + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + EffectDescriptor& setVersion(const Container& values, bool error_if_missing = false) { + props_.setAll(values, error_if_missing); + return *this; } - void setVersion(int value, int index = 0) { - props_.set(value, index); + // Set all values from an initializer list (e.g., {1, 2, 3}) + EffectDescriptor& setVersion(std::initializer_list values, bool error_if_missing = false) { + props_.setAll(values, error_if_missing); + return *this; } - void setVersionLabel(const char* value) { - props_.set(value, 0); + EffectDescriptor& setVersionLabel(const char* value, bool error_if_missing = false) { + props_.set(value, 0, error_if_missing); + return *this; } - void setPluginDescription(const char* value) { - props_.set(value, 0); + EffectDescriptor& setPluginDescription(const char* value, bool error_if_missing = false) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSupportedContexts(const char* value, int index = 0) { - props_.set(value, index); + EffectDescriptor& setSupportedContexts(const char* value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } - void setImageEffectPluginPropGrouping(const char* value) { - props_.set(value, 0); + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + EffectDescriptor& setSupportedContexts(const Container& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setImageEffectPluginPropSingleInstance(bool value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2, 3}) + EffectDescriptor& setSupportedContexts(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setImageEffectPluginRenderThreadSafety(const char* value) { - props_.set(value, 0); + EffectDescriptor& setImageEffectPluginPropGrouping(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setImageEffectPluginPropHostFrameThreading(bool value) { - props_.set(value, 0); + EffectDescriptor& setImageEffectPluginPropSingleInstance(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setImageEffectPluginPropOverlayInteractV1(void* value) { - props_.set(value, 0); + EffectDescriptor& setImageEffectPluginRenderThreadSafety(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setOpenCLSupported(const char* value) { - props_.set(value, 0); + EffectDescriptor& setImageEffectPluginPropHostFrameThreading(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSupportsMultiResolution(bool value) { - props_.set(value, 0); + EffectDescriptor& setImageEffectPluginPropOverlayInteractV1(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSupportsTiles(bool value) { - props_.set(value, 0); + EffectDescriptor& setOpenCLSupported(const char* value, bool error_if_missing = false) { + props_.set(value, 0, error_if_missing); + return *this; } - void setTemporalClipAccess(bool value) { - props_.set(value, 0); + EffectDescriptor& setSupportsMultiResolution(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSupportedPixelDepths(const char* value, int index = 0) { - props_.set(value, index); + EffectDescriptor& setSupportsTiles(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setImageEffectPluginPropFieldRenderTwiceAlways(bool value) { - props_.set(value, 0); + EffectDescriptor& setTemporalClipAccess(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setMultipleClipDepths(bool value) { - props_.set(value, 0); + EffectDescriptor& setSupportedPixelDepths(const char* value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } - void setSupportsMultipleClipPARs(bool value) { - props_.set(value, 0); + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + EffectDescriptor& setSupportedPixelDepths(const Container& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setClipPreferencesSlaveParam(const char* value, int index = 0) { - props_.set(value, index); + // Set all values from an initializer list (e.g., {1, 2, 3}) + EffectDescriptor& setSupportedPixelDepths(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setOpenGLRenderSupported(const char* value) { - props_.set(value, 0); + EffectDescriptor& setImageEffectPluginPropFieldRenderTwiceAlways(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - const char* filePath() const { - return props_.get(0); + EffectDescriptor& setMultipleClipDepths(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setPixelDepth(const char* value, int index = 0) { - props_.set(value, index); + EffectDescriptor& setSupportsMultipleClipPARs(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setImageEffectPluginPropOverlayInteractV2(void* value) { - props_.set(value, 0); + EffectDescriptor& setClipPreferencesSlaveParam(const char* value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } - void setColourManagementAvailableConfigs(const char* value, int index = 0) { - props_.set(value, index); + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + EffectDescriptor& setClipPreferencesSlaveParam(const Container& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setColourManagementStyle(const char* value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2, 3}) + EffectDescriptor& setClipPreferencesSlaveParam(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setNoSpatialAwareness(const char* value) { - props_.set(value, 0); + EffectDescriptor& setOpenGLRenderSupported(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + const char* filePath(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + EffectDescriptor& setPixelDepth(const char* value, int index = 0, bool error_if_missing = false) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + EffectDescriptor& setPixelDepth(const Container& values, bool error_if_missing = false) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) + EffectDescriptor& setPixelDepth(std::initializer_list values, bool error_if_missing = false) { + props_.setAll(values, error_if_missing); + return *this; + } + + EffectDescriptor& setImageEffectPluginPropOverlayInteractV2(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + EffectDescriptor& setColourManagementAvailableConfigs(const char* value, int index = 0, bool error_if_missing = false) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + EffectDescriptor& setColourManagementAvailableConfigs(const Container& values, bool error_if_missing = false) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) + EffectDescriptor& setColourManagementAvailableConfigs(std::initializer_list values, bool error_if_missing = false) { + props_.setAll(values, error_if_missing); + return *this; + } + + EffectDescriptor& setColourManagementStyle(const char* value, bool error_if_missing = false) { + props_.set(value, 0, error_if_missing); + return *this; + } + + EffectDescriptor& setNoSpatialAwareness(const char* value, bool error_if_missing = false) { + props_.set(value, 0, error_if_missing); + return *this; } }; @@ -325,16 +566,16 @@ class EffectInstance : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - const char* type() const { - return props_.get(0); + const char* type(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* context() const { - return props_.get(0); + const char* context(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void* instanceData() const { - return props_.get(0); + void* instanceData(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array projectSize() const { @@ -349,266 +590,1010 @@ class EffectInstance : public PropertySetAccessor { return props_.getAll(); } - double pixelAspectRatio() const { - return props_.get(0); + double pixelAspectRatio(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + double imageEffectInstancePropEffectDuration(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool imageEffectInstancePropSequentialRender(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool supportsTiles(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* openGLRenderSupported(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + double frameRate(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool isInteractive(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* oCIOConfig(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* oCIODisplay(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* oCIOView(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* colourManagementConfig(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* colourManagementStyle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* displayColourspace(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + void* pluginHandle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + +}; + +// Property set accessor for: Image +class Image : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + const char* type(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* pixelDepth(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* components(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* preMultiplication(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + std::array renderScale() const { + return props_.getAll(); + } + + double pixelAspectRatio(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + void* data(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + std::array bounds() const { + return props_.getAll(); + } + + std::array regionOfDefinition() const { + return props_.getAll(); + } + + int rowBytes(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* field(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* uniqueIdentifier(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + +}; + +// Property set accessor for: ImageEffectActionBeginSequenceRender_InArgs +class ImageEffectActionBeginSequenceRender_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + std::array frameRange() const { + return props_.getAll(); + } + + double frameStep(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool isInteractive(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + std::array renderScale() const { + return props_.getAll(); + } + + bool sequentialRenderStatus(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool interactiveRenderStatus(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool cudaEnabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* cudaRenderSupported(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + void* cudaStream(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* cudaStreamSupported(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + void* metalCommandQueue(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool metalEnabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* metalRenderSupported(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + void* openCLCommandQueue(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool openCLEnabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + void* openCLImage(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* openCLRenderSupported(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* openCLSupported(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool openGLEnabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + int openGLTextureIndex(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + int openGLTextureTarget(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* noSpatialAwareness(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + +}; + +// Property set accessor for: ImageEffectActionDescribeInContext_InArgs +class ImageEffectActionDescribeInContext_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + const char* context(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + +}; + +// Property set accessor for: ImageEffectActionEndSequenceRender_InArgs +class ImageEffectActionEndSequenceRender_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + std::array frameRange() const { + return props_.getAll(); + } + + double frameStep(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool isInteractive(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + std::array renderScale() const { + return props_.getAll(); + } + + bool sequentialRenderStatus(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool interactiveRenderStatus(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool cudaEnabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* cudaRenderSupported(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + void* cudaStream(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* cudaStreamSupported(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + void* metalCommandQueue(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool metalEnabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* metalRenderSupported(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + void* openCLCommandQueue(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool openCLEnabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + void* openCLImage(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* openCLRenderSupported(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* openCLSupported(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool openGLEnabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + int openGLTextureIndex(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + int openGLTextureTarget(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + +}; + +// Property set accessor for: ImageEffectActionGetClipPreferences_OutArgs +class ImageEffectActionGetClipPreferences_OutArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + ImageEffectActionGetClipPreferences_OutArgs& setFrameRate(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionGetClipPreferences_OutArgs& setFieldOrder(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionGetClipPreferences_OutArgs& setPreMultiplication(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionGetClipPreferences_OutArgs& setContinuousSamples(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionGetClipPreferences_OutArgs& setImageEffectFrameVarying(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: ImageEffectActionGetFramesNeeded_InArgs +class ImageEffectActionGetFramesNeeded_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + double time(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + +}; + +// Property set accessor for: ImageEffectActionGetFramesNeeded_OutArgs +class ImageEffectActionGetFramesNeeded_OutArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + ImageEffectActionGetFramesNeeded_OutArgs& setFrameRange(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ImageEffectActionGetFramesNeeded_OutArgs& setFrameRange(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: ImageEffectActionGetOutputColourspace_InArgs +class ImageEffectActionGetOutputColourspace_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + const char* preferredColourspaces(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); + } + +}; + +// Property set accessor for: ImageEffectActionGetOutputColourspace_OutArgs +class ImageEffectActionGetOutputColourspace_OutArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + ImageEffectActionGetOutputColourspace_OutArgs& setColourspace(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: ImageEffectActionGetRegionOfDefinition_InArgs +class ImageEffectActionGetRegionOfDefinition_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + double time(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + std::array renderScale() const { + return props_.getAll(); + } + +}; + +// Property set accessor for: ImageEffectActionGetRegionOfDefinition_OutArgs +class ImageEffectActionGetRegionOfDefinition_OutArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + ImageEffectActionGetRegionOfDefinition_OutArgs& setRegionOfDefinition(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ImageEffectActionGetRegionOfDefinition_OutArgs& setRegionOfDefinition(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: ImageEffectActionGetRegionsOfInterest_InArgs +class ImageEffectActionGetRegionsOfInterest_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + double time(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + std::array renderScale() const { + return props_.getAll(); + } + + std::array regionOfInterest() const { + return props_.getAll(); + } + +}; + +// Property set accessor for: ImageEffectActionGetTimeDomain_OutArgs +class ImageEffectActionGetTimeDomain_OutArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + ImageEffectActionGetTimeDomain_OutArgs& setFrameRange(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ImageEffectActionGetTimeDomain_OutArgs& setFrameRange(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: ImageEffectActionIsIdentity_InArgs +class ImageEffectActionIsIdentity_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + double time(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* fieldToRender(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + std::array renderWindow() const { + return props_.getAll(); + } + + std::array renderScale() const { + return props_.getAll(); + } + +}; + +// Property set accessor for: ImageEffectActionRender_InArgs +class ImageEffectActionRender_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + double time(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool sequentialRenderStatus(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool interactiveRenderStatus(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool renderQualityDraft(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool cudaEnabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* cudaRenderSupported(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + void* cudaStream(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* cudaStreamSupported(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + void* metalCommandQueue(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool metalEnabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* metalRenderSupported(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + void* openCLCommandQueue(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool openCLEnabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + void* openCLImage(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* openCLRenderSupported(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* openCLSupported(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool openGLEnabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + int openGLTextureIndex(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + int openGLTextureTarget(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* noSpatialAwareness(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + +}; + +// Property set accessor for: ImageEffectHost +class ImageEffectHost : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + int aPIVersion(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); + } + + const char* type(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* name(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* label(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + int version(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); + } + + const char* versionLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool imageEffectHostPropIsBackground(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool supportsOverlays(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool supportsMultiResolution(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool supportsTiles(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool temporalClipAccess(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* supportedComponents(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); + } + + const char* supportedContexts(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); + } + + bool multipleClipDepths(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* openCLSupported(bool error_if_missing = false) const { + return props_.get(0, error_if_missing); + } + + bool supportsMultipleClipPARs(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool setableFrameRate(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool setableFielding(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool paramHostPropSupportsCustomInteract(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool paramHostPropSupportsStringAnimation(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool paramHostPropSupportsChoiceAnimation(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool paramHostPropSupportsBooleanAnimation(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool paramHostPropSupportsCustomAnimation(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool paramHostPropSupportsStrChoice(bool error_if_missing = false) const { + return props_.get(0, error_if_missing); + } + + bool paramHostPropSupportsStrChoiceAnimation(bool error_if_missing = false) const { + return props_.get(0, error_if_missing); + } + + int paramHostPropMaxParameters(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + int paramHostPropMaxPages(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + std::array paramHostPropPageRowColumnCount() const { + return props_.getAll(); + } + + void* hostOSHandle(bool error_if_missing = false) const { + return props_.get(0, error_if_missing); + } + + bool paramHostPropSupportsParametricAnimation(bool error_if_missing = false) const { + return props_.get(0, error_if_missing); + } + + bool imageEffectInstancePropSequentialRender(bool error_if_missing = false) const { + return props_.get(0, error_if_missing); + } + + const char* openGLRenderSupported(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool renderQualityDraft(bool error_if_missing = false) const { + return props_.get(0, error_if_missing); + } + + const char* imageEffectHostPropNativeOrigin(bool error_if_missing = false) const { + return props_.get(0, error_if_missing); + } + + const char* colourManagementAvailableConfigs(int index = 0, bool error_if_missing = false) const { + return props_.get(index, error_if_missing); + } + + const char* colourManagementStyle(bool error_if_missing = false) const { + return props_.get(0, error_if_missing); + } + +}; + +// Property set accessor for: InteractActionDraw_InArgs +class InteractActionDraw_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void* effectInstance(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + void* interactPropDrawContext(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + std::array interactPropPixelScale() const { + return props_.getAll(); + } + + std::array interactPropBackgroundColour() const { + return props_.getAll(); + } + + double time(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - double imageEffectInstancePropEffectDuration() const { - return props_.get(0); + std::array renderScale() const { + return props_.getAll(); } - bool imageEffectInstancePropSequentialRender() const { - return props_.get(0); - } +}; - bool supportsTiles() const { - return props_.get(0); - } +// Property set accessor for: InteractActionGainFocus_InArgs +class InteractActionGainFocus_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; - const char* openGLRenderSupported() const { - return props_.get(0); + void* effectInstance(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - double frameRate() const { - return props_.get(0); + std::array interactPropPixelScale() const { + return props_.getAll(); } - bool isInteractive() const { - return props_.get(0); + std::array interactPropBackgroundColour() const { + return props_.getAll(); } - const char* oCIOConfig() const { - return props_.get(0); + double time(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* oCIODisplay() const { - return props_.get(0); + std::array renderScale() const { + return props_.getAll(); } - const char* oCIOView() const { - return props_.get(0); +}; + +// Property set accessor for: InteractActionKeyDown_InArgs +class InteractActionKeyDown_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + void* effectInstance(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* colourManagementConfig() const { - return props_.get(0); + int keySym(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* colourManagementStyle() const { - return props_.get(0); + const char* keyString(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* displayColourspace() const { - return props_.get(0); + double time(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void* pluginHandle() const { - return props_.get(0); + std::array renderScale() const { + return props_.getAll(); } }; -// Property set accessor for: Image -class Image : public PropertySetAccessor { +// Property set accessor for: InteractActionKeyRepeat_InArgs +class InteractActionKeyRepeat_InArgs : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - const char* type() const { - return props_.get(0); + void* effectInstance(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* pixelDepth() const { - return props_.get(0); + int keySym(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* components() const { - return props_.get(0); + const char* keyString(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* preMultiplication() const { - return props_.get(0); + double time(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array renderScale() const { return props_.getAll(); } - double pixelAspectRatio() const { - return props_.get(0); - } +}; - void* data() const { - return props_.get(0); - } +// Property set accessor for: InteractActionKeyUp_InArgs +class InteractActionKeyUp_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; - std::array bounds() const { - return props_.getAll(); + void* effectInstance(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - std::array regionOfDefinition() const { - return props_.getAll(); + int keySym(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - int rowBytes() const { - return props_.get(0); + const char* keyString(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* field() const { - return props_.get(0); + double time(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* uniqueIdentifier() const { - return props_.get(0); + std::array renderScale() const { + return props_.getAll(); } }; -// Property set accessor for: ImageEffectHost -class ImageEffectHost : public PropertySetAccessor { +// Property set accessor for: InteractActionLoseFocus_InArgs +class InteractActionLoseFocus_InArgs : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - int aPIVersion(int index = 0) const { - return props_.get(index); - } - - const char* type() const { - return props_.get(0); + void* effectInstance(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* name() const { - return props_.get(0); + std::array interactPropPixelScale() const { + return props_.getAll(); } - const char* label() const { - return props_.get(0); + std::array interactPropBackgroundColour() const { + return props_.getAll(); } - int version(int index = 0) const { - return props_.get(index); + double time(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* versionLabel() const { - return props_.get(0); + std::array renderScale() const { + return props_.getAll(); } - bool imageEffectHostPropIsBackground() const { - return props_.get(0); - } +}; - bool supportsOverlays() const { - return props_.get(0); - } +// Property set accessor for: InteractActionPenDown_InArgs +class InteractActionPenDown_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; - bool supportsMultiResolution() const { - return props_.get(0); + void* effectInstance(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool supportsTiles() const { - return props_.get(0); + std::array interactPropPixelScale() const { + return props_.getAll(); } - bool temporalClipAccess() const { - return props_.get(0); + std::array interactPropBackgroundColour() const { + return props_.getAll(); } - const char* supportedComponents(int index = 0) const { - return props_.get(index); + double time(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* supportedContexts(int index = 0) const { - return props_.get(index); + std::array renderScale() const { + return props_.getAll(); } - bool multipleClipDepths() const { - return props_.get(0); + std::array interactPropPenPosition() const { + return props_.getAll(); } - const char* openCLSupported() const { - return props_.get(0); + std::array interactPropPenViewportPosition() const { + return props_.getAll(); } - bool supportsMultipleClipPARs() const { - return props_.get(0); + double interactPropPenPressure(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool setableFrameRate() const { - return props_.get(0); - } +}; - bool setableFielding() const { - return props_.get(0); - } +// Property set accessor for: InteractActionPenMotion_InArgs +class InteractActionPenMotion_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; - bool paramHostPropSupportsCustomInteract() const { - return props_.get(0); + void* effectInstance(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool paramHostPropSupportsStringAnimation() const { - return props_.get(0); + std::array interactPropPixelScale() const { + return props_.getAll(); } - bool paramHostPropSupportsChoiceAnimation() const { - return props_.get(0); + std::array interactPropBackgroundColour() const { + return props_.getAll(); } - bool paramHostPropSupportsBooleanAnimation() const { - return props_.get(0); + double time(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool paramHostPropSupportsCustomAnimation() const { - return props_.get(0); + std::array renderScale() const { + return props_.getAll(); } - bool paramHostPropSupportsStrChoice() const { - return props_.get(0); + std::array interactPropPenPosition() const { + return props_.getAll(); } - bool paramHostPropSupportsStrChoiceAnimation() const { - return props_.get(0); + std::array interactPropPenViewportPosition() const { + return props_.getAll(); } - int paramHostPropMaxParameters() const { - return props_.get(0); + double interactPropPenPressure(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - int paramHostPropMaxPages() const { - return props_.get(0); - } +}; - std::array paramHostPropPageRowColumnCount() const { - return props_.getAll(); - } +// Property set accessor for: InteractActionPenUp_InArgs +class InteractActionPenUp_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; - void* hostOSHandle() const { - return props_.get(0); + void* effectInstance(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool paramHostPropSupportsParametricAnimation() const { - return props_.get(0); + std::array interactPropPixelScale() const { + return props_.getAll(); } - bool imageEffectInstancePropSequentialRender() const { - return props_.get(0); + std::array interactPropBackgroundColour() const { + return props_.getAll(); } - const char* openGLRenderSupported() const { - return props_.get(0); + double time(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool renderQualityDraft() const { - return props_.get(0); + std::array renderScale() const { + return props_.getAll(); } - const char* imageEffectHostPropNativeOrigin() const { - return props_.get(0); + std::array interactPropPenPosition() const { + return props_.getAll(); } - const char* colourManagementAvailableConfigs(int index = 0) const { - return props_.get(index); + std::array interactPropPenViewportPosition() const { + return props_.getAll(); } - const char* colourManagementStyle() const { - return props_.get(0); + double interactPropPenPressure(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } }; @@ -618,12 +1603,12 @@ class InteractDescriptor : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - bool interactPropHasAlpha() const { - return props_.get(0); + bool interactPropHasAlpha(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - int interactPropBitDepth() const { - return props_.get(0); + int interactPropBitDepth(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } }; @@ -633,12 +1618,12 @@ class InteractInstance : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void* effectInstance() const { - return props_.get(0); + void* effectInstance(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void* instanceData() const { - return props_.get(0); + void* instanceData(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array interactPropPixelScale() const { @@ -649,16 +1634,16 @@ class InteractInstance : public PropertySetAccessor { return props_.getAll(); } - bool interactPropHasAlpha() const { - return props_.get(0); + bool interactPropHasAlpha(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - int interactPropBitDepth() const { - return props_.get(0); + int interactPropBitDepth(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* interactPropSlaveToParam(int index = 0) const { - return props_.get(index); + const char* interactPropSlaveToParam(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } std::array interactPropSuggestedColour() const { @@ -672,183 +1657,296 @@ class ParamDouble1D : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void setShowTimeMarker(bool value) { - props_.set(value, 0); + ParamDouble1D& setShowTimeMarker(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamDouble1D& setDoubleType(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setDoubleType(const char* value) { - props_.set(value, 0); + ParamDouble1D& setType(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setType(const char* value) { - props_.set(value, 0); + ParamDouble1D& setName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setName(const char* value) { - props_.set(value, 0); + ParamDouble1D& setLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLabel(const char* value) { - props_.set(value, 0); + ParamDouble1D& setShortLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setShortLabel(const char* value) { - props_.set(value, 0); + ParamDouble1D& setLongLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLongLabel(const char* value) { - props_.set(value, 0); + ParamDouble1D& setSecret(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSecret(bool value) { - props_.set(value, 0); + ParamDouble1D& setHint(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setHint(const char* value) { - props_.set(value, 0); + ParamDouble1D& setScriptName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setScriptName(const char* value) { - props_.set(value, 0); + ParamDouble1D& setParent(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParent(const char* value) { - props_.set(value, 0); + ParamDouble1D& setEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setEnabled(bool value) { - props_.set(value, 0); + ParamDouble1D& setDataPtr(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setDataPtr(void* value) { - props_.set(value, 0); + ParamDouble1D& setIcon(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setIcon(const std::array& values) { - props_.setAll(values); + // Set all values from an initializer list (e.g., {1, 2}) + ParamDouble1D& setIcon(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractV1(void* value) { - props_.set(value, 0); + ParamDouble1D& setInteractV1(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setInteractSize(const std::array& values) { - props_.setAll(values); + ParamDouble1D& setInteractSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractSizeAspect(double value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ParamDouble1D& setInteractSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractMinimumSize(const std::array& values) { - props_.setAll(values); + ParamDouble1D& setInteractSizeAspect(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setInteractPreferedSize(const std::array& values) { - props_.setAll(values); + ParamDouble1D& setInteractMinimumSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setHasHostOverlayHandle(bool value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ParamDouble1D& setInteractMinimumSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setUseHostOverlayHandle(bool value) { - props_.set(value, 0); + ParamDouble1D& setInteractPreferedSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ParamDouble1D& setInteractPreferedSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ParamDouble1D& setHasHostOverlayHandle(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamDouble1D& setUseHostOverlayHandle(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } // Multi-type property (supports: int, double, string, pointer) template - void setDefault(T value, int index = 0) { - props_.set(value, index); + ParamDouble1D& setDefault(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamDouble1D& setDefault(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDefaultAll(const std::vector& values) { - props_.setAll(values); + ParamDouble1D& setDefault(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } - void setAnimates(bool value) { - props_.set(value, 0); + ParamDouble1D& setAnimates(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - bool isAnimating() const { - return props_.get(0); + bool isAnimating(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool isAutoKeying() const { - return props_.get(0); + bool isAutoKeying(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void setPersistant(bool value) { - props_.set(value, 0); + ParamDouble1D& setPersistant(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setEvaluateOnChange(bool value) { - props_.set(value, 0); + ParamDouble1D& setEvaluateOnChange(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setPluginMayWrite(bool value) { - props_.set(value, 0); + ParamDouble1D& setPluginMayWrite(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setCacheInvalidation(const char* value) { - props_.set(value, 0); + ParamDouble1D& setCacheInvalidation(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setCanUndo(bool value) { - props_.set(value, 0); + ParamDouble1D& setCanUndo(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setMin(T value, int index = 0) { - props_.set(value, index); + ParamDouble1D& setMin(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamDouble1D& setMin(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setMinAll(const std::vector& values) { - props_.setAll(values); + ParamDouble1D& setMin(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setMax(T value, int index = 0) { - props_.set(value, index); + ParamDouble1D& setMax(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamDouble1D& setMax(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setMaxAll(const std::vector& values) { - props_.setAll(values); + ParamDouble1D& setMax(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setDisplayMin(T value, int index = 0) { - props_.set(value, index); + ParamDouble1D& setDisplayMin(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamDouble1D& setDisplayMin(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDisplayMinAll(const std::vector& values) { - props_.setAll(values); + ParamDouble1D& setDisplayMin(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setDisplayMax(T value, int index = 0) { - props_.set(value, index); + ParamDouble1D& setDisplayMax(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamDouble1D& setDisplayMax(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDisplayMaxAll(const std::vector& values) { - props_.setAll(values); + ParamDouble1D& setDisplayMax(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } - void setIncrement(double value) { - props_.set(value, 0); + ParamDouble1D& setIncrement(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setDigits(int value) { - props_.set(value, 0); + ParamDouble1D& setDigits(int value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } }; @@ -858,12 +1956,29 @@ class ParameterSet : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void setParamSetNeedsSyncing(bool value) { - props_.set(value, 0); + ParameterSet& setParamSetNeedsSyncing(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParamPageOrder(const char* value, int index = 0) { - props_.set(value, index); + ParameterSet& setParamPageOrder(const char* value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParameterSet& setParamPageOrder(const Container& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) + ParameterSet& setParamPageOrder(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } }; @@ -873,167 +1988,276 @@ class ParamsByte : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void setType(const char* value) { - props_.set(value, 0); + ParamsByte& setType(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsByte& setName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsByte& setLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setName(const char* value) { - props_.set(value, 0); + ParamsByte& setShortLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLabel(const char* value) { - props_.set(value, 0); + ParamsByte& setLongLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setShortLabel(const char* value) { - props_.set(value, 0); + ParamsByte& setSecret(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLongLabel(const char* value) { - props_.set(value, 0); + ParamsByte& setHint(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSecret(bool value) { - props_.set(value, 0); + ParamsByte& setScriptName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setHint(const char* value) { - props_.set(value, 0); + ParamsByte& setParent(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setScriptName(const char* value) { - props_.set(value, 0); + ParamsByte& setEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParent(const char* value) { - props_.set(value, 0); + ParamsByte& setDataPtr(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setEnabled(bool value) { - props_.set(value, 0); + ParamsByte& setIcon(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setDataPtr(void* value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsByte& setIcon(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setIcon(const std::array& values) { - props_.setAll(values); + ParamsByte& setInteractV1(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setInteractV1(void* value) { - props_.set(value, 0); + ParamsByte& setInteractSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractSize(const std::array& values) { - props_.setAll(values); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsByte& setInteractSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractSizeAspect(double value) { - props_.set(value, 0); + ParamsByte& setInteractSizeAspect(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setInteractMinimumSize(const std::array& values) { - props_.setAll(values); + ParamsByte& setInteractMinimumSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractPreferedSize(const std::array& values) { - props_.setAll(values); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsByte& setInteractMinimumSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setHasHostOverlayHandle(bool value) { - props_.set(value, 0); + ParamsByte& setInteractPreferedSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setUseHostOverlayHandle(bool value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsByte& setInteractPreferedSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ParamsByte& setHasHostOverlayHandle(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsByte& setUseHostOverlayHandle(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } // Multi-type property (supports: int, double, string, pointer) template - void setDefault(T value, int index = 0) { - props_.set(value, index); + ParamsByte& setDefault(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsByte& setDefault(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDefaultAll(const std::vector& values) { - props_.setAll(values); + ParamsByte& setDefault(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } - void setAnimates(bool value) { - props_.set(value, 0); + ParamsByte& setAnimates(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - bool isAnimating() const { - return props_.get(0); + bool isAnimating(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool isAutoKeying() const { - return props_.get(0); + bool isAutoKeying(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void setPersistant(bool value) { - props_.set(value, 0); + ParamsByte& setPersistant(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setEvaluateOnChange(bool value) { - props_.set(value, 0); + ParamsByte& setEvaluateOnChange(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setPluginMayWrite(bool value) { - props_.set(value, 0); + ParamsByte& setPluginMayWrite(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setCacheInvalidation(const char* value) { - props_.set(value, 0); + ParamsByte& setCacheInvalidation(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setCanUndo(bool value) { - props_.set(value, 0); + ParamsByte& setCanUndo(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setMin(T value, int index = 0) { - props_.set(value, index); + ParamsByte& setMin(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsByte& setMin(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setMinAll(const std::vector& values) { - props_.setAll(values); + ParamsByte& setMin(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setMax(T value, int index = 0) { - props_.set(value, index); + ParamsByte& setMax(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsByte& setMax(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setMaxAll(const std::vector& values) { - props_.setAll(values); + ParamsByte& setMax(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setDisplayMin(T value, int index = 0) { - props_.set(value, index); + ParamsByte& setDisplayMin(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsByte& setDisplayMin(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDisplayMinAll(const std::vector& values) { - props_.setAll(values); + ParamsByte& setDisplayMin(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setDisplayMax(T value, int index = 0) { - props_.set(value, index); + ParamsByte& setDisplayMax(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsByte& setDisplayMax(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDisplayMaxAll(const std::vector& values) { - props_.setAll(values); + ParamsByte& setDisplayMax(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } }; @@ -1043,131 +2267,224 @@ class ParamsChoice : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void setChoiceOption(const char* value, int index = 0) { - props_.set(value, index); + ParamsChoice& setChoiceOption(const char* value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsChoice& setChoiceOption(const Container& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) + ParamsChoice& setChoiceOption(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ParamsChoice& setChoiceOrder(int value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsChoice& setChoiceOrder(const Container& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) + ParamsChoice& setChoiceOrder(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setChoiceOrder(int value, int index = 0) { - props_.set(value, index); + ParamsChoice& setType(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setType(const char* value) { - props_.set(value, 0); + ParamsChoice& setName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setName(const char* value) { - props_.set(value, 0); + ParamsChoice& setLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLabel(const char* value) { - props_.set(value, 0); + ParamsChoice& setShortLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setShortLabel(const char* value) { - props_.set(value, 0); + ParamsChoice& setLongLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLongLabel(const char* value) { - props_.set(value, 0); + ParamsChoice& setSecret(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSecret(bool value) { - props_.set(value, 0); + ParamsChoice& setHint(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setHint(const char* value) { - props_.set(value, 0); + ParamsChoice& setScriptName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setScriptName(const char* value) { - props_.set(value, 0); + ParamsChoice& setParent(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParent(const char* value) { - props_.set(value, 0); + ParamsChoice& setEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setEnabled(bool value) { - props_.set(value, 0); + ParamsChoice& setDataPtr(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setDataPtr(void* value) { - props_.set(value, 0); + ParamsChoice& setIcon(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setIcon(const std::array& values) { - props_.setAll(values); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsChoice& setIcon(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractV1(void* value) { - props_.set(value, 0); + ParamsChoice& setInteractV1(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setInteractSize(const std::array& values) { - props_.setAll(values); + ParamsChoice& setInteractSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractSizeAspect(double value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsChoice& setInteractSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractMinimumSize(const std::array& values) { - props_.setAll(values); + ParamsChoice& setInteractSizeAspect(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setInteractPreferedSize(const std::array& values) { - props_.setAll(values); + ParamsChoice& setInteractMinimumSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setHasHostOverlayHandle(bool value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsChoice& setInteractMinimumSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setUseHostOverlayHandle(bool value) { - props_.set(value, 0); + ParamsChoice& setInteractPreferedSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ParamsChoice& setInteractPreferedSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ParamsChoice& setHasHostOverlayHandle(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsChoice& setUseHostOverlayHandle(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } // Multi-type property (supports: int, double, string, pointer) template - void setDefault(T value, int index = 0) { - props_.set(value, index); + ParamsChoice& setDefault(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsChoice& setDefault(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDefaultAll(const std::vector& values) { - props_.setAll(values); + ParamsChoice& setDefault(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } - void setAnimates(bool value) { - props_.set(value, 0); + ParamsChoice& setAnimates(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - bool isAnimating() const { - return props_.get(0); + bool isAnimating(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool isAutoKeying() const { - return props_.get(0); + bool isAutoKeying(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void setPersistant(bool value) { - props_.set(value, 0); + ParamsChoice& setPersistant(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setEvaluateOnChange(bool value) { - props_.set(value, 0); + ParamsChoice& setEvaluateOnChange(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setPluginMayWrite(bool value) { - props_.set(value, 0); + ParamsChoice& setPluginMayWrite(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setCacheInvalidation(const char* value) { - props_.set(value, 0); + ParamsChoice& setCacheInvalidation(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setCanUndo(bool value) { - props_.set(value, 0); + ParamsChoice& setCanUndo(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } }; @@ -1177,127 +2494,189 @@ class ParamsCustom : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void setCustomCallbackV1(void* value) { - props_.set(value, 0); + ParamsCustom& setCustomCallbackV1(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsCustom& setType(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsCustom& setName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsCustom& setLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsCustom& setShortLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setType(const char* value) { - props_.set(value, 0); + ParamsCustom& setLongLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setName(const char* value) { - props_.set(value, 0); + ParamsCustom& setSecret(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLabel(const char* value) { - props_.set(value, 0); + ParamsCustom& setHint(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setShortLabel(const char* value) { - props_.set(value, 0); + ParamsCustom& setScriptName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLongLabel(const char* value) { - props_.set(value, 0); + ParamsCustom& setParent(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSecret(bool value) { - props_.set(value, 0); + ParamsCustom& setEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setHint(const char* value) { - props_.set(value, 0); + ParamsCustom& setDataPtr(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setScriptName(const char* value) { - props_.set(value, 0); + ParamsCustom& setIcon(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setParent(const char* value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsCustom& setIcon(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setEnabled(bool value) { - props_.set(value, 0); + ParamsCustom& setInteractV1(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setDataPtr(void* value) { - props_.set(value, 0); + ParamsCustom& setInteractSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setIcon(const std::array& values) { - props_.setAll(values); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsCustom& setInteractSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractV1(void* value) { - props_.set(value, 0); + ParamsCustom& setInteractSizeAspect(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setInteractSize(const std::array& values) { - props_.setAll(values); + ParamsCustom& setInteractMinimumSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractSizeAspect(double value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsCustom& setInteractMinimumSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractMinimumSize(const std::array& values) { - props_.setAll(values); + ParamsCustom& setInteractPreferedSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractPreferedSize(const std::array& values) { - props_.setAll(values); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsCustom& setInteractPreferedSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setHasHostOverlayHandle(bool value) { - props_.set(value, 0); + ParamsCustom& setHasHostOverlayHandle(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setUseHostOverlayHandle(bool value) { - props_.set(value, 0); + ParamsCustom& setUseHostOverlayHandle(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } // Multi-type property (supports: int, double, string, pointer) template - void setDefault(T value, int index = 0) { - props_.set(value, index); + ParamsCustom& setDefault(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsCustom& setDefault(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDefaultAll(const std::vector& values) { - props_.setAll(values); + ParamsCustom& setDefault(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } - void setAnimates(bool value) { - props_.set(value, 0); + ParamsCustom& setAnimates(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - bool isAnimating() const { - return props_.get(0); + bool isAnimating(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool isAutoKeying() const { - return props_.get(0); + bool isAutoKeying(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void setPersistant(bool value) { - props_.set(value, 0); + ParamsCustom& setPersistant(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setEvaluateOnChange(bool value) { - props_.set(value, 0); + ParamsCustom& setEvaluateOnChange(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setPluginMayWrite(bool value) { - props_.set(value, 0); + ParamsCustom& setPluginMayWrite(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setCacheInvalidation(const char* value) { - props_.set(value, 0); + ParamsCustom& setCacheInvalidation(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setCanUndo(bool value) { - props_.set(value, 0); + ParamsCustom& setCanUndo(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } }; @@ -1307,179 +2686,291 @@ class ParamsDouble2D3D : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void setDoubleType(const char* value) { - props_.set(value, 0); + ParamsDouble2D3D& setDoubleType(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsDouble2D3D& setType(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsDouble2D3D& setName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsDouble2D3D& setLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setType(const char* value) { - props_.set(value, 0); + ParamsDouble2D3D& setShortLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setName(const char* value) { - props_.set(value, 0); + ParamsDouble2D3D& setLongLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLabel(const char* value) { - props_.set(value, 0); + ParamsDouble2D3D& setSecret(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setShortLabel(const char* value) { - props_.set(value, 0); + ParamsDouble2D3D& setHint(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLongLabel(const char* value) { - props_.set(value, 0); + ParamsDouble2D3D& setScriptName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSecret(bool value) { - props_.set(value, 0); + ParamsDouble2D3D& setParent(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setHint(const char* value) { - props_.set(value, 0); + ParamsDouble2D3D& setEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setScriptName(const char* value) { - props_.set(value, 0); + ParamsDouble2D3D& setDataPtr(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParent(const char* value) { - props_.set(value, 0); + ParamsDouble2D3D& setIcon(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setEnabled(bool value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsDouble2D3D& setIcon(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setDataPtr(void* value) { - props_.set(value, 0); + ParamsDouble2D3D& setInteractV1(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setIcon(const std::array& values) { - props_.setAll(values); + ParamsDouble2D3D& setInteractSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractV1(void* value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsDouble2D3D& setInteractSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractSize(const std::array& values) { - props_.setAll(values); + ParamsDouble2D3D& setInteractSizeAspect(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setInteractSizeAspect(double value) { - props_.set(value, 0); + ParamsDouble2D3D& setInteractMinimumSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractMinimumSize(const std::array& values) { - props_.setAll(values); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsDouble2D3D& setInteractMinimumSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractPreferedSize(const std::array& values) { - props_.setAll(values); + ParamsDouble2D3D& setInteractPreferedSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setHasHostOverlayHandle(bool value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsDouble2D3D& setInteractPreferedSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setUseHostOverlayHandle(bool value) { - props_.set(value, 0); + ParamsDouble2D3D& setHasHostOverlayHandle(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsDouble2D3D& setUseHostOverlayHandle(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } // Multi-type property (supports: int, double, string, pointer) template - void setDefault(T value, int index = 0) { - props_.set(value, index); + ParamsDouble2D3D& setDefault(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsDouble2D3D& setDefault(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDefaultAll(const std::vector& values) { - props_.setAll(values); + ParamsDouble2D3D& setDefault(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } - void setAnimates(bool value) { - props_.set(value, 0); + ParamsDouble2D3D& setAnimates(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - bool isAnimating() const { - return props_.get(0); + bool isAnimating(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool isAutoKeying() const { - return props_.get(0); + bool isAutoKeying(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void setPersistant(bool value) { - props_.set(value, 0); + ParamsDouble2D3D& setPersistant(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setEvaluateOnChange(bool value) { - props_.set(value, 0); + ParamsDouble2D3D& setEvaluateOnChange(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setPluginMayWrite(bool value) { - props_.set(value, 0); + ParamsDouble2D3D& setPluginMayWrite(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setCacheInvalidation(const char* value) { - props_.set(value, 0); + ParamsDouble2D3D& setCacheInvalidation(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setCanUndo(bool value) { - props_.set(value, 0); + ParamsDouble2D3D& setCanUndo(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setMin(T value, int index = 0) { - props_.set(value, index); + ParamsDouble2D3D& setMin(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsDouble2D3D& setMin(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setMinAll(const std::vector& values) { - props_.setAll(values); + ParamsDouble2D3D& setMin(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setMax(T value, int index = 0) { - props_.set(value, index); + ParamsDouble2D3D& setMax(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsDouble2D3D& setMax(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setMaxAll(const std::vector& values) { - props_.setAll(values); + ParamsDouble2D3D& setMax(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setDisplayMin(T value, int index = 0) { - props_.set(value, index); + ParamsDouble2D3D& setDisplayMin(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsDouble2D3D& setDisplayMin(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDisplayMinAll(const std::vector& values) { - props_.setAll(values); + ParamsDouble2D3D& setDisplayMin(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setDisplayMax(T value, int index = 0) { - props_.set(value, index); + ParamsDouble2D3D& setDisplayMax(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsDouble2D3D& setDisplayMax(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDisplayMaxAll(const std::vector& values) { - props_.setAll(values); + ParamsDouble2D3D& setDisplayMax(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } - void setIncrement(double value) { - props_.set(value, 0); + ParamsDouble2D3D& setIncrement(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setDigits(int value) { - props_.set(value, 0); + ParamsDouble2D3D& setDigits(int value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } }; @@ -1489,56 +2980,75 @@ class ParamsGroup : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void setGroupOpen(bool value) { - props_.set(value, 0); + ParamsGroup& setGroupOpen(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setType(const char* value) { - props_.set(value, 0); + ParamsGroup& setType(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setName(const char* value) { - props_.set(value, 0); + ParamsGroup& setName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLabel(const char* value) { - props_.set(value, 0); + ParamsGroup& setLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setShortLabel(const char* value) { - props_.set(value, 0); + ParamsGroup& setShortLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLongLabel(const char* value) { - props_.set(value, 0); + ParamsGroup& setLongLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSecret(bool value) { - props_.set(value, 0); + ParamsGroup& setSecret(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setHint(const char* value) { - props_.set(value, 0); + ParamsGroup& setHint(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setScriptName(const char* value) { - props_.set(value, 0); + ParamsGroup& setScriptName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParent(const char* value) { - props_.set(value, 0); + ParamsGroup& setParent(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setEnabled(bool value) { - props_.set(value, 0); + ParamsGroup& setEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setDataPtr(void* value) { - props_.set(value, 0); + ParamsGroup& setDataPtr(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setIcon(const std::array& values) { - props_.setAll(values); + ParamsGroup& setIcon(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ParamsGroup& setIcon(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } }; @@ -1548,171 +3058,281 @@ class ParamsInt2D3D : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void setDimensionLabel(const char* value) { - props_.set(value, 0); + ParamsInt2D3D& setDimensionLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsInt2D3D& setType(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setType(const char* value) { - props_.set(value, 0); + ParamsInt2D3D& setName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setName(const char* value) { - props_.set(value, 0); + ParamsInt2D3D& setLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLabel(const char* value) { - props_.set(value, 0); + ParamsInt2D3D& setShortLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setShortLabel(const char* value) { - props_.set(value, 0); + ParamsInt2D3D& setLongLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLongLabel(const char* value) { - props_.set(value, 0); + ParamsInt2D3D& setSecret(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSecret(bool value) { - props_.set(value, 0); + ParamsInt2D3D& setHint(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setHint(const char* value) { - props_.set(value, 0); + ParamsInt2D3D& setScriptName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setScriptName(const char* value) { - props_.set(value, 0); + ParamsInt2D3D& setParent(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParent(const char* value) { - props_.set(value, 0); + ParamsInt2D3D& setEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setEnabled(bool value) { - props_.set(value, 0); + ParamsInt2D3D& setDataPtr(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setDataPtr(void* value) { - props_.set(value, 0); + ParamsInt2D3D& setIcon(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setIcon(const std::array& values) { - props_.setAll(values); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsInt2D3D& setIcon(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractV1(void* value) { - props_.set(value, 0); + ParamsInt2D3D& setInteractV1(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setInteractSize(const std::array& values) { - props_.setAll(values); + ParamsInt2D3D& setInteractSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractSizeAspect(double value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsInt2D3D& setInteractSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractMinimumSize(const std::array& values) { - props_.setAll(values); + ParamsInt2D3D& setInteractSizeAspect(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setInteractPreferedSize(const std::array& values) { - props_.setAll(values); + ParamsInt2D3D& setInteractMinimumSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setHasHostOverlayHandle(bool value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsInt2D3D& setInteractMinimumSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setUseHostOverlayHandle(bool value) { - props_.set(value, 0); + ParamsInt2D3D& setInteractPreferedSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ParamsInt2D3D& setInteractPreferedSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ParamsInt2D3D& setHasHostOverlayHandle(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsInt2D3D& setUseHostOverlayHandle(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } // Multi-type property (supports: int, double, string, pointer) template - void setDefault(T value, int index = 0) { - props_.set(value, index); + ParamsInt2D3D& setDefault(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsInt2D3D& setDefault(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDefaultAll(const std::vector& values) { - props_.setAll(values); + ParamsInt2D3D& setDefault(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } - void setAnimates(bool value) { - props_.set(value, 0); + ParamsInt2D3D& setAnimates(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - bool isAnimating() const { - return props_.get(0); + bool isAnimating(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool isAutoKeying() const { - return props_.get(0); + bool isAutoKeying(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void setPersistant(bool value) { - props_.set(value, 0); + ParamsInt2D3D& setPersistant(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setEvaluateOnChange(bool value) { - props_.set(value, 0); + ParamsInt2D3D& setEvaluateOnChange(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setPluginMayWrite(bool value) { - props_.set(value, 0); + ParamsInt2D3D& setPluginMayWrite(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setCacheInvalidation(const char* value) { - props_.set(value, 0); + ParamsInt2D3D& setCacheInvalidation(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setCanUndo(bool value) { - props_.set(value, 0); + ParamsInt2D3D& setCanUndo(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setMin(T value, int index = 0) { - props_.set(value, index); + ParamsInt2D3D& setMin(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsInt2D3D& setMin(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setMinAll(const std::vector& values) { - props_.setAll(values); + ParamsInt2D3D& setMin(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setMax(T value, int index = 0) { - props_.set(value, index); + ParamsInt2D3D& setMax(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsInt2D3D& setMax(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setMaxAll(const std::vector& values) { - props_.setAll(values); + ParamsInt2D3D& setMax(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setDisplayMin(T value, int index = 0) { - props_.set(value, index); + ParamsInt2D3D& setDisplayMin(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsInt2D3D& setDisplayMin(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDisplayMinAll(const std::vector& values) { - props_.setAll(values); + ParamsInt2D3D& setDisplayMin(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setDisplayMax(T value, int index = 0) { - props_.set(value, index); + ParamsInt2D3D& setDisplayMax(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsInt2D3D& setDisplayMax(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDisplayMaxAll(const std::vector& values) { - props_.setAll(values); + ParamsInt2D3D& setDisplayMax(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } }; @@ -1722,179 +3342,291 @@ class ParamsNormalizedSpatial : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void setDefaultCoordinateSystem(const char* value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setDefaultCoordinateSystem(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsNormalizedSpatial& setType(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsNormalizedSpatial& setName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsNormalizedSpatial& setLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsNormalizedSpatial& setShortLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setType(const char* value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setLongLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setName(const char* value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setSecret(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLabel(const char* value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setHint(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setShortLabel(const char* value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setScriptName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLongLabel(const char* value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setParent(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSecret(bool value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setHint(const char* value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setDataPtr(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setScriptName(const char* value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setIcon(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setParent(const char* value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsNormalizedSpatial& setIcon(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setEnabled(bool value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setInteractV1(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setDataPtr(void* value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setInteractSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setIcon(const std::array& values) { - props_.setAll(values); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsNormalizedSpatial& setInteractSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractV1(void* value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setInteractSizeAspect(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setInteractSize(const std::array& values) { - props_.setAll(values); + ParamsNormalizedSpatial& setInteractMinimumSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractSizeAspect(double value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsNormalizedSpatial& setInteractMinimumSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractMinimumSize(const std::array& values) { - props_.setAll(values); + ParamsNormalizedSpatial& setInteractPreferedSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractPreferedSize(const std::array& values) { - props_.setAll(values); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsNormalizedSpatial& setInteractPreferedSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setHasHostOverlayHandle(bool value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setHasHostOverlayHandle(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setUseHostOverlayHandle(bool value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setUseHostOverlayHandle(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } // Multi-type property (supports: int, double, string, pointer) template - void setDefault(T value, int index = 0) { - props_.set(value, index); + ParamsNormalizedSpatial& setDefault(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsNormalizedSpatial& setDefault(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDefaultAll(const std::vector& values) { - props_.setAll(values); + ParamsNormalizedSpatial& setDefault(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } - void setAnimates(bool value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setAnimates(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - bool isAnimating() const { - return props_.get(0); + bool isAnimating(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool isAutoKeying() const { - return props_.get(0); + bool isAutoKeying(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void setPersistant(bool value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setPersistant(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setEvaluateOnChange(bool value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setEvaluateOnChange(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setPluginMayWrite(bool value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setPluginMayWrite(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setCacheInvalidation(const char* value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setCacheInvalidation(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setCanUndo(bool value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setCanUndo(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setMin(T value, int index = 0) { - props_.set(value, index); + ParamsNormalizedSpatial& setMin(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsNormalizedSpatial& setMin(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setMinAll(const std::vector& values) { - props_.setAll(values); + ParamsNormalizedSpatial& setMin(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setMax(T value, int index = 0) { - props_.set(value, index); + ParamsNormalizedSpatial& setMax(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsNormalizedSpatial& setMax(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setMaxAll(const std::vector& values) { - props_.setAll(values); + ParamsNormalizedSpatial& setMax(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setDisplayMin(T value, int index = 0) { - props_.set(value, index); + ParamsNormalizedSpatial& setDisplayMin(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsNormalizedSpatial& setDisplayMin(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDisplayMinAll(const std::vector& values) { - props_.setAll(values); + ParamsNormalizedSpatial& setDisplayMin(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setDisplayMax(T value, int index = 0) { - props_.set(value, index); + ParamsNormalizedSpatial& setDisplayMax(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsNormalizedSpatial& setDisplayMax(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDisplayMaxAll(const std::vector& values) { - props_.setAll(values); + ParamsNormalizedSpatial& setDisplayMax(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } - void setIncrement(double value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setIncrement(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setDigits(int value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setDigits(int value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } }; @@ -1904,56 +3636,90 @@ class ParamsPage : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void setPageChild(const char* value, int index = 0) { - props_.set(value, index); + ParamsPage& setPageChild(const char* value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsPage& setPageChild(const Container& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) + ParamsPage& setPageChild(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ParamsPage& setType(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setType(const char* value) { - props_.set(value, 0); + ParamsPage& setName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setName(const char* value) { - props_.set(value, 0); + ParamsPage& setLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLabel(const char* value) { - props_.set(value, 0); + ParamsPage& setShortLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setShortLabel(const char* value) { - props_.set(value, 0); + ParamsPage& setLongLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLongLabel(const char* value) { - props_.set(value, 0); + ParamsPage& setSecret(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSecret(bool value) { - props_.set(value, 0); + ParamsPage& setHint(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setHint(const char* value) { - props_.set(value, 0); + ParamsPage& setScriptName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setScriptName(const char* value) { - props_.set(value, 0); + ParamsPage& setParent(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParent(const char* value) { - props_.set(value, 0); + ParamsPage& setEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setEnabled(bool value) { - props_.set(value, 0); + ParamsPage& setDataPtr(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setDataPtr(void* value) { - props_.set(value, 0); + ParamsPage& setIcon(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setIcon(const std::array& values) { - props_.setAll(values); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsPage& setIcon(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } }; @@ -1963,139 +3729,227 @@ class ParamsParametric : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void setAnimates(bool value) { - props_.set(value, 0); + ParamsParametric& setAnimates(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setIsAnimating(bool value) { - props_.set(value, 0); + ParamsParametric& setIsAnimating(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setIsAutoKeying(bool value) { - props_.set(value, 0); + ParamsParametric& setIsAutoKeying(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setPersistant(bool value) { - props_.set(value, 0); + ParamsParametric& setPersistant(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setEvaluateOnChange(bool value) { - props_.set(value, 0); + ParamsParametric& setEvaluateOnChange(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setPluginMayWrite(bool value) { - props_.set(value, 0); + ParamsParametric& setPluginMayWrite(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setCacheInvalidation(const char* value) { - props_.set(value, 0); + ParamsParametric& setCacheInvalidation(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setCanUndo(bool value) { - props_.set(value, 0); + ParamsParametric& setCanUndo(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParametricDimension(int value) { - props_.set(value, 0); + ParamsParametric& setParametricDimension(int value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParametricUIColour(double value, int index = 0) { - props_.set(value, index); + ParamsParametric& setParametricUIColour(double value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } - void setParametricInteractBackground(void* value) { - props_.set(value, 0); + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsParametric& setParametricUIColour(const Container& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setParametricRange(const std::array& values) { - props_.setAll(values); + // Set all values from an initializer list (e.g., {1, 2, 3}) + ParamsParametric& setParametricUIColour(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setType(const char* value) { - props_.set(value, 0); + ParamsParametric& setParametricInteractBackground(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setName(const char* value) { - props_.set(value, 0); + ParamsParametric& setParametricRange(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setLabel(const char* value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsParametric& setParametricRange(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setShortLabel(const char* value) { - props_.set(value, 0); + ParamsParametric& setType(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLongLabel(const char* value) { - props_.set(value, 0); + ParamsParametric& setName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSecret(bool value) { - props_.set(value, 0); + ParamsParametric& setLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setHint(const char* value) { - props_.set(value, 0); + ParamsParametric& setShortLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setScriptName(const char* value) { - props_.set(value, 0); + ParamsParametric& setLongLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParent(const char* value) { - props_.set(value, 0); + ParamsParametric& setSecret(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setEnabled(bool value) { - props_.set(value, 0); + ParamsParametric& setHint(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setDataPtr(void* value) { - props_.set(value, 0); + ParamsParametric& setScriptName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setIcon(const std::array& values) { - props_.setAll(values); + ParamsParametric& setParent(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setInteractV1(void* value) { - props_.set(value, 0); + ParamsParametric& setEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setInteractSize(const std::array& values) { - props_.setAll(values); + ParamsParametric& setDataPtr(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setInteractSizeAspect(double value) { - props_.set(value, 0); + ParamsParametric& setIcon(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractMinimumSize(const std::array& values) { - props_.setAll(values); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsParametric& setIcon(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractPreferedSize(const std::array& values) { - props_.setAll(values); + ParamsParametric& setInteractV1(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setHasHostOverlayHandle(bool value) { - props_.set(value, 0); + ParamsParametric& setInteractSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setUseHostOverlayHandle(bool value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsParametric& setInteractSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ParamsParametric& setInteractSizeAspect(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsParametric& setInteractMinimumSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ParamsParametric& setInteractMinimumSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ParamsParametric& setInteractPreferedSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ParamsParametric& setInteractPreferedSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ParamsParametric& setHasHostOverlayHandle(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsParametric& setUseHostOverlayHandle(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } // Multi-type property (supports: int, double, string, pointer) template - void setDefault(T value, int index = 0) { - props_.set(value, index); + ParamsParametric& setDefault(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsParametric& setDefault(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDefaultAll(const std::vector& values) { - props_.setAll(values); + ParamsParametric& setDefault(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } }; @@ -2105,131 +3959,209 @@ class ParamsStrChoice : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void setChoiceOption(const char* value, int index = 0) { - props_.set(value, index); + ParamsStrChoice& setChoiceOption(const char* value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } - void setChoiceEnum(bool value) { - props_.set(value, 0); + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsStrChoice& setChoiceOption(const Container& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setType(const char* value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2, 3}) + ParamsStrChoice& setChoiceOption(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setName(const char* value) { - props_.set(value, 0); + ParamsStrChoice& setChoiceEnum(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLabel(const char* value) { - props_.set(value, 0); + ParamsStrChoice& setType(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setShortLabel(const char* value) { - props_.set(value, 0); + ParamsStrChoice& setName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLongLabel(const char* value) { - props_.set(value, 0); + ParamsStrChoice& setLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSecret(bool value) { - props_.set(value, 0); + ParamsStrChoice& setShortLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setHint(const char* value) { - props_.set(value, 0); + ParamsStrChoice& setLongLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setScriptName(const char* value) { - props_.set(value, 0); + ParamsStrChoice& setSecret(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParent(const char* value) { - props_.set(value, 0); + ParamsStrChoice& setHint(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setEnabled(bool value) { - props_.set(value, 0); + ParamsStrChoice& setScriptName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setDataPtr(void* value) { - props_.set(value, 0); + ParamsStrChoice& setParent(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setIcon(const std::array& values) { - props_.setAll(values); + ParamsStrChoice& setEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setInteractV1(void* value) { - props_.set(value, 0); + ParamsStrChoice& setDataPtr(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setInteractSize(const std::array& values) { - props_.setAll(values); + ParamsStrChoice& setIcon(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractSizeAspect(double value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsStrChoice& setIcon(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractMinimumSize(const std::array& values) { - props_.setAll(values); + ParamsStrChoice& setInteractV1(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setInteractPreferedSize(const std::array& values) { - props_.setAll(values); + ParamsStrChoice& setInteractSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setHasHostOverlayHandle(bool value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsStrChoice& setInteractSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setUseHostOverlayHandle(bool value) { - props_.set(value, 0); + ParamsStrChoice& setInteractSizeAspect(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsStrChoice& setInteractMinimumSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ParamsStrChoice& setInteractMinimumSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ParamsStrChoice& setInteractPreferedSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ParamsStrChoice& setInteractPreferedSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ParamsStrChoice& setHasHostOverlayHandle(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsStrChoice& setUseHostOverlayHandle(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } // Multi-type property (supports: int, double, string, pointer) template - void setDefault(T value, int index = 0) { - props_.set(value, index); + ParamsStrChoice& setDefault(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsStrChoice& setDefault(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDefaultAll(const std::vector& values) { - props_.setAll(values); + ParamsStrChoice& setDefault(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } - void setAnimates(bool value) { - props_.set(value, 0); + ParamsStrChoice& setAnimates(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - bool isAnimating() const { - return props_.get(0); + bool isAnimating(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool isAutoKeying() const { - return props_.get(0); + bool isAutoKeying(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void setPersistant(bool value) { - props_.set(value, 0); + ParamsStrChoice& setPersistant(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setEvaluateOnChange(bool value) { - props_.set(value, 0); + ParamsStrChoice& setEvaluateOnChange(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setPluginMayWrite(bool value) { - props_.set(value, 0); + ParamsStrChoice& setPluginMayWrite(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setCacheInvalidation(const char* value) { - props_.set(value, 0); + ParamsStrChoice& setCacheInvalidation(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setCanUndo(bool value) { - props_.set(value, 0); + ParamsStrChoice& setCanUndo(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } }; @@ -2239,175 +4171,286 @@ class ParamsString : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void setStringMode(const char* value) { - props_.set(value, 0); + ParamsString& setStringMode(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsString& setStringFilePathExists(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setStringFilePathExists(bool value) { - props_.set(value, 0); + ParamsString& setType(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setType(const char* value) { - props_.set(value, 0); + ParamsString& setName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setName(const char* value) { - props_.set(value, 0); + ParamsString& setLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLabel(const char* value) { - props_.set(value, 0); + ParamsString& setShortLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setShortLabel(const char* value) { - props_.set(value, 0); + ParamsString& setLongLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLongLabel(const char* value) { - props_.set(value, 0); + ParamsString& setSecret(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSecret(bool value) { - props_.set(value, 0); + ParamsString& setHint(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setHint(const char* value) { - props_.set(value, 0); + ParamsString& setScriptName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setScriptName(const char* value) { - props_.set(value, 0); + ParamsString& setParent(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParent(const char* value) { - props_.set(value, 0); + ParamsString& setEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setEnabled(bool value) { - props_.set(value, 0); + ParamsString& setDataPtr(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setDataPtr(void* value) { - props_.set(value, 0); + ParamsString& setIcon(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setIcon(const std::array& values) { - props_.setAll(values); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsString& setIcon(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractV1(void* value) { - props_.set(value, 0); + ParamsString& setInteractV1(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setInteractSize(const std::array& values) { - props_.setAll(values); + ParamsString& setInteractSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractSizeAspect(double value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsString& setInteractSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractMinimumSize(const std::array& values) { - props_.setAll(values); + ParamsString& setInteractSizeAspect(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setInteractPreferedSize(const std::array& values) { - props_.setAll(values); + ParamsString& setInteractMinimumSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setHasHostOverlayHandle(bool value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ParamsString& setInteractMinimumSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setUseHostOverlayHandle(bool value) { - props_.set(value, 0); + ParamsString& setInteractPreferedSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ParamsString& setInteractPreferedSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ParamsString& setHasHostOverlayHandle(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ParamsString& setUseHostOverlayHandle(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } // Multi-type property (supports: int, double, string, pointer) template - void setDefault(T value, int index = 0) { - props_.set(value, index); + ParamsString& setDefault(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsString& setDefault(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDefaultAll(const std::vector& values) { - props_.setAll(values); + ParamsString& setDefault(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } - void setAnimates(bool value) { - props_.set(value, 0); + ParamsString& setAnimates(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - bool isAnimating() const { - return props_.get(0); + bool isAnimating(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool isAutoKeying() const { - return props_.get(0); + bool isAutoKeying(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void setPersistant(bool value) { - props_.set(value, 0); + ParamsString& setPersistant(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setEvaluateOnChange(bool value) { - props_.set(value, 0); + ParamsString& setEvaluateOnChange(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setPluginMayWrite(bool value) { - props_.set(value, 0); + ParamsString& setPluginMayWrite(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setCacheInvalidation(const char* value) { - props_.set(value, 0); + ParamsString& setCacheInvalidation(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setCanUndo(bool value) { - props_.set(value, 0); + ParamsString& setCanUndo(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setMin(T value, int index = 0) { - props_.set(value, index); + ParamsString& setMin(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsString& setMin(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setMinAll(const std::vector& values) { - props_.setAll(values); + ParamsString& setMin(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setMax(T value, int index = 0) { - props_.set(value, index); + ParamsString& setMax(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsString& setMax(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setMaxAll(const std::vector& values) { - props_.setAll(values); + ParamsString& setMax(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setDisplayMin(T value, int index = 0) { - props_.set(value, index); + ParamsString& setDisplayMin(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsString& setDisplayMin(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDisplayMinAll(const std::vector& values) { - props_.setAll(values); + ParamsString& setDisplayMin(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } // Multi-type property (supports: int, double) template - void setDisplayMax(T value, int index = 0) { - props_.set(value, index); + ParamsString& setDisplayMax(T value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ParamsString& setDisplayMax(const Container& values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } + // Set all values from an initializer list (e.g., {1, 2, 3}) template - void setDisplayMaxAll(const std::vector& values) { - props_.setAll(values); + ParamsString& setDisplayMax(std::initializer_list values, bool error_if_missing = true) { + props_.setAllTyped(values, error_if_missing); + return *this; } }; diff --git a/openfx-cpp/include/openfx/ofxPropSetAccessorsHost.h b/openfx-cpp/include/openfx/ofxPropSetAccessorsHost.h index 37f6848b..05f69526 100644 --- a/openfx-cpp/include/openfx/ofxPropSetAccessorsHost.h +++ b/openfx-cpp/include/openfx/ofxPropSetAccessorsHost.h @@ -35,53 +35,115 @@ class PropertySetAccessor { const PropertyAccessor& props() const { return props_; } }; +// Property set accessor for: ActionBeginInstanceChanged_InArgs +class ActionBeginInstanceChanged_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + ActionBeginInstanceChanged_InArgs& setChangeReason(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: ActionEndInstanceChanged_InArgs +class ActionEndInstanceChanged_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + ActionEndInstanceChanged_InArgs& setChangeReason(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: ActionInstanceChanged_InArgs +class ActionInstanceChanged_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + ActionInstanceChanged_InArgs& setType(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ActionInstanceChanged_InArgs& setName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ActionInstanceChanged_InArgs& setChangeReason(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ActionInstanceChanged_InArgs& setTime(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ActionInstanceChanged_InArgs& setRenderScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ActionInstanceChanged_InArgs& setRenderScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + +}; + // Property set accessor for: ClipDescriptor class ClipDescriptor : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - const char* type() const { - return props_.get(0); + const char* type(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* name() const { - return props_.get(0); + const char* name(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* label() const { - return props_.get(0); + const char* label(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* shortLabel() const { - return props_.get(0); + const char* shortLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* longLabel() const { - return props_.get(0); + const char* longLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* supportedComponents(int index = 0) const { - return props_.get(index); + const char* supportedComponents(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } - bool temporalClipAccess() const { - return props_.get(0); + bool temporalClipAccess(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool optional() const { - return props_.get(0); + bool optional(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* fieldExtraction() const { - return props_.get(0); + const char* fieldExtraction(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool isMask() const { - return props_.get(0); + bool isMask(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool supportsTiles() const { - return props_.get(0); + bool supportsTiles(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } }; @@ -91,108 +153,225 @@ class ClipInstance : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void setType(const char* value) { - props_.set(value, 0); + ClipInstance& setType(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ClipInstance& setName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ClipInstance& setLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ClipInstance& setShortLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ClipInstance& setLongLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ClipInstance& setSupportedComponents(const char* value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ClipInstance& setSupportedComponents(const Container& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) + ClipInstance& setSupportedComponents(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ClipInstance& setTemporalClipAccess(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ClipInstance& setColourspace(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ClipInstance& setPreferredColourspaces(const char* value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ClipInstance& setPreferredColourspaces(const Container& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) + ClipInstance& setPreferredColourspaces(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ClipInstance& setOptional(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setName(const char* value) { - props_.set(value, 0); + ClipInstance& setFieldExtraction(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLabel(const char* value) { - props_.set(value, 0); + ClipInstance& setIsMask(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setShortLabel(const char* value) { - props_.set(value, 0); + ClipInstance& setSupportsTiles(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLongLabel(const char* value) { - props_.set(value, 0); + ClipInstance& setPixelDepth(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSupportedComponents(const char* value, int index = 0) { - props_.set(value, index); + ClipInstance& setComponents(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setTemporalClipAccess(bool value) { - props_.set(value, 0); + ClipInstance& setUnmappedPixelDepth(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setColourspace(const char* value) { - props_.set(value, 0); + ClipInstance& setUnmappedComponents(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setPreferredColourspaces(const char* value, int index = 0) { - props_.set(value, index); + ClipInstance& setPreMultiplication(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setOptional(bool value) { - props_.set(value, 0); + ClipInstance& setPixelAspectRatio(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setFieldExtraction(const char* value) { - props_.set(value, 0); + ClipInstance& setFrameRate(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setIsMask(bool value) { - props_.set(value, 0); + ClipInstance& setFrameRange(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setSupportsTiles(bool value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ClipInstance& setFrameRange(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setPixelDepth(const char* value) { - props_.set(value, 0); + ClipInstance& setFieldOrder(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setComponents(const char* value) { - props_.set(value, 0); + ClipInstance& setConnected(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setUnmappedPixelDepth(const char* value) { - props_.set(value, 0); + ClipInstance& setUnmappedFrameRange(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setUnmappedComponents(const char* value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ClipInstance& setUnmappedFrameRange(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setPreMultiplication(const char* value) { - props_.set(value, 0); + ClipInstance& setUnmappedFrameRate(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setPixelAspectRatio(double value) { - props_.set(value, 0); + ClipInstance& setContinuousSamples(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setFrameRate(double value) { - props_.set(value, 0); +}; + +// Property set accessor for: CustomParamInterpFunc_InArgs +class CustomParamInterpFunc_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + CustomParamInterpFunc_InArgs& setCustomValue(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setFrameRange(const std::array& values) { - props_.setAll(values); + // Set all values from an initializer list (e.g., {1, 2}) + CustomParamInterpFunc_InArgs& setCustomValue(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setFieldOrder(const char* value) { - props_.set(value, 0); + CustomParamInterpFunc_InArgs& setInterpolationTime(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setConnected(bool value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + CustomParamInterpFunc_InArgs& setInterpolationTime(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setUnmappedFrameRange(const std::array& values) { - props_.setAll(values); + CustomParamInterpFunc_InArgs& setInterpolationAmount(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setUnmappedFrameRate(double value) { - props_.set(value, 0); +}; + +// Property set accessor for: CustomParamInterpFunc_OutArgs +class CustomParamInterpFunc_OutArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + std::array customValue() const { + return props_.getAll(); } - void setContinuousSamples(bool value) { - props_.set(value, 0); + std::array interpolationTime() const { + return props_.getAll(); } }; @@ -202,120 +381,121 @@ class EffectDescriptor : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - const char* type() const { - return props_.get(0); + const char* type(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* label() const { - return props_.get(0); + const char* label(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* shortLabel() const { - return props_.get(0); + const char* shortLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* longLabel() const { - return props_.get(0); + const char* longLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - int version(int index = 0) const { - return props_.get(index); + int version(int index = 0, bool error_if_missing = false) const { + return props_.get(index, error_if_missing); } - const char* versionLabel() const { - return props_.get(0); + const char* versionLabel(bool error_if_missing = false) const { + return props_.get(0, error_if_missing); } - const char* pluginDescription() const { - return props_.get(0); + const char* pluginDescription(bool error_if_missing = false) const { + return props_.get(0, error_if_missing); } - const char* supportedContexts(int index = 0) const { - return props_.get(index); + const char* supportedContexts(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } - const char* imageEffectPluginPropGrouping() const { - return props_.get(0); + const char* imageEffectPluginPropGrouping(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool imageEffectPluginPropSingleInstance() const { - return props_.get(0); + bool imageEffectPluginPropSingleInstance(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* imageEffectPluginRenderThreadSafety() const { - return props_.get(0); + const char* imageEffectPluginRenderThreadSafety(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool imageEffectPluginPropHostFrameThreading() const { - return props_.get(0); + bool imageEffectPluginPropHostFrameThreading(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void* imageEffectPluginPropOverlayInteractV1() const { - return props_.get(0); + void* imageEffectPluginPropOverlayInteractV1(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* openCLSupported() const { - return props_.get(0); + const char* openCLSupported(bool error_if_missing = false) const { + return props_.get(0, error_if_missing); } - bool supportsMultiResolution() const { - return props_.get(0); + bool supportsMultiResolution(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool supportsTiles() const { - return props_.get(0); + bool supportsTiles(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool temporalClipAccess() const { - return props_.get(0); + bool temporalClipAccess(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* supportedPixelDepths(int index = 0) const { - return props_.get(index); + const char* supportedPixelDepths(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } - bool imageEffectPluginPropFieldRenderTwiceAlways() const { - return props_.get(0); + bool imageEffectPluginPropFieldRenderTwiceAlways(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool multipleClipDepths() const { - return props_.get(0); + bool multipleClipDepths(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool supportsMultipleClipPARs() const { - return props_.get(0); + bool supportsMultipleClipPARs(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* clipPreferencesSlaveParam(int index = 0) const { - return props_.get(index); + const char* clipPreferencesSlaveParam(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } - const char* openGLRenderSupported() const { - return props_.get(0); + const char* openGLRenderSupported(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void setFilePath(const char* value) { - props_.set(value, 0); + EffectDescriptor& setFilePath(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - const char* pixelDepth(int index = 0) const { - return props_.get(index); + const char* pixelDepth(int index = 0, bool error_if_missing = false) const { + return props_.get(index, error_if_missing); } - void* imageEffectPluginPropOverlayInteractV2() const { - return props_.get(0); + void* imageEffectPluginPropOverlayInteractV2(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* colourManagementAvailableConfigs(int index = 0) const { - return props_.get(index); + const char* colourManagementAvailableConfigs(int index = 0, bool error_if_missing = false) const { + return props_.get(index, error_if_missing); } - const char* colourManagementStyle() const { - return props_.get(0); + const char* colourManagementStyle(bool error_if_missing = false) const { + return props_.get(0, error_if_missing); } - const char* noSpatialAwareness() const { - return props_.get(0); + const char* noSpatialAwareness(bool error_if_missing = false) const { + return props_.get(0, error_if_missing); } }; @@ -325,84 +505,122 @@ class EffectInstance : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void setType(const char* value) { - props_.set(value, 0); + EffectInstance& setType(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + EffectInstance& setContext(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + EffectInstance& setInstanceData(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + EffectInstance& setProjectSize(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setContext(const char* value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + EffectInstance& setProjectSize(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInstanceData(void* value) { - props_.set(value, 0); + EffectInstance& setProjectOffset(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setProjectSize(const std::array& values) { - props_.setAll(values); + // Set all values from an initializer list (e.g., {1, 2}) + EffectInstance& setProjectOffset(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setProjectOffset(const std::array& values) { - props_.setAll(values); + EffectInstance& setProjectExtent(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setProjectExtent(const std::array& values) { - props_.setAll(values); + // Set all values from an initializer list (e.g., {1, 2}) + EffectInstance& setProjectExtent(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setPixelAspectRatio(double value) { - props_.set(value, 0); + EffectInstance& setPixelAspectRatio(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setImageEffectInstancePropEffectDuration(double value) { - props_.set(value, 0); + EffectInstance& setImageEffectInstancePropEffectDuration(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setImageEffectInstancePropSequentialRender(bool value) { - props_.set(value, 0); + EffectInstance& setImageEffectInstancePropSequentialRender(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSupportsTiles(bool value) { - props_.set(value, 0); + EffectInstance& setSupportsTiles(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setOpenGLRenderSupported(const char* value) { - props_.set(value, 0); + EffectInstance& setOpenGLRenderSupported(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setFrameRate(double value) { - props_.set(value, 0); + EffectInstance& setFrameRate(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setIsInteractive(bool value) { - props_.set(value, 0); + EffectInstance& setIsInteractive(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setOCIOConfig(const char* value) { - props_.set(value, 0); + EffectInstance& setOCIOConfig(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setOCIODisplay(const char* value) { - props_.set(value, 0); + EffectInstance& setOCIODisplay(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setOCIOView(const char* value) { - props_.set(value, 0); + EffectInstance& setOCIOView(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setColourManagementConfig(const char* value) { - props_.set(value, 0); + EffectInstance& setColourManagementConfig(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setColourManagementStyle(const char* value) { - props_.set(value, 0); + EffectInstance& setColourManagementStyle(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setDisplayColourspace(const char* value) { - props_.set(value, 0); + EffectInstance& setDisplayColourspace(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setPluginHandle(void* value) { - props_.set(value, 0); + EffectInstance& setPluginHandle(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } }; @@ -412,257 +630,1525 @@ class Image : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void setType(const char* value) { - props_.set(value, 0); + Image& setType(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + Image& setPixelDepth(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + Image& setComponents(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + Image& setPreMultiplication(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setPixelDepth(const char* value) { - props_.set(value, 0); + Image& setRenderScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setComponents(const char* value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + Image& setRenderScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setPreMultiplication(const char* value) { - props_.set(value, 0); + Image& setPixelAspectRatio(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setRenderScale(const std::array& values) { - props_.setAll(values); + Image& setData(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setPixelAspectRatio(double value) { - props_.set(value, 0); + Image& setBounds(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setData(void* value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + Image& setBounds(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setBounds(const std::array& values) { - props_.setAll(values); + Image& setRegionOfDefinition(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setRegionOfDefinition(const std::array& values) { - props_.setAll(values); + // Set all values from an initializer list (e.g., {1, 2}) + Image& setRegionOfDefinition(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setRowBytes(int value) { - props_.set(value, 0); + Image& setRowBytes(int value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setField(const char* value) { - props_.set(value, 0); + Image& setField(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setUniqueIdentifier(const char* value) { - props_.set(value, 0); + Image& setUniqueIdentifier(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } }; -// Property set accessor for: ImageEffectHost -class ImageEffectHost : public PropertySetAccessor { +// Property set accessor for: ImageEffectActionBeginSequenceRender_InArgs +class ImageEffectActionBeginSequenceRender_InArgs : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void setAPIVersion(int value, int index = 0) { - props_.set(value, index); + ImageEffectActionBeginSequenceRender_InArgs& setFrameRange(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ImageEffectActionBeginSequenceRender_InArgs& setFrameRange(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ImageEffectActionBeginSequenceRender_InArgs& setFrameStep(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionBeginSequenceRender_InArgs& setIsInteractive(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionBeginSequenceRender_InArgs& setRenderScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ImageEffectActionBeginSequenceRender_InArgs& setRenderScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ImageEffectActionBeginSequenceRender_InArgs& setSequentialRenderStatus(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionBeginSequenceRender_InArgs& setInteractiveRenderStatus(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionBeginSequenceRender_InArgs& setCudaEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionBeginSequenceRender_InArgs& setCudaRenderSupported(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionBeginSequenceRender_InArgs& setCudaStream(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionBeginSequenceRender_InArgs& setCudaStreamSupported(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionBeginSequenceRender_InArgs& setMetalCommandQueue(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setType(const char* value) { - props_.set(value, 0); + ImageEffectActionBeginSequenceRender_InArgs& setMetalEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setName(const char* value) { - props_.set(value, 0); + ImageEffectActionBeginSequenceRender_InArgs& setMetalRenderSupported(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setLabel(const char* value) { - props_.set(value, 0); + ImageEffectActionBeginSequenceRender_InArgs& setOpenCLCommandQueue(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setVersion(int value, int index = 0) { - props_.set(value, index); + ImageEffectActionBeginSequenceRender_InArgs& setOpenCLEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setVersionLabel(const char* value) { - props_.set(value, 0); + ImageEffectActionBeginSequenceRender_InArgs& setOpenCLImage(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setImageEffectHostPropIsBackground(bool value) { - props_.set(value, 0); + ImageEffectActionBeginSequenceRender_InArgs& setOpenCLRenderSupported(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSupportsOverlays(bool value) { - props_.set(value, 0); + ImageEffectActionBeginSequenceRender_InArgs& setOpenCLSupported(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSupportsMultiResolution(bool value) { - props_.set(value, 0); + ImageEffectActionBeginSequenceRender_InArgs& setOpenGLEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSupportsTiles(bool value) { - props_.set(value, 0); + ImageEffectActionBeginSequenceRender_InArgs& setOpenGLTextureIndex(int value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setTemporalClipAccess(bool value) { - props_.set(value, 0); + ImageEffectActionBeginSequenceRender_InArgs& setOpenGLTextureTarget(int value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSupportedComponents(const char* value, int index = 0) { - props_.set(value, index); + ImageEffectActionBeginSequenceRender_InArgs& setNoSpatialAwareness(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSupportedContexts(const char* value, int index = 0) { - props_.set(value, index); +}; + +// Property set accessor for: ImageEffectActionDescribeInContext_InArgs +class ImageEffectActionDescribeInContext_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + ImageEffectActionDescribeInContext_InArgs& setContext(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setMultipleClipDepths(bool value) { - props_.set(value, 0); +}; + +// Property set accessor for: ImageEffectActionEndSequenceRender_InArgs +class ImageEffectActionEndSequenceRender_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + ImageEffectActionEndSequenceRender_InArgs& setFrameRange(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setOpenCLSupported(const char* value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ImageEffectActionEndSequenceRender_InArgs& setFrameRange(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setSupportsMultipleClipPARs(bool value) { - props_.set(value, 0); + ImageEffectActionEndSequenceRender_InArgs& setFrameStep(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSetableFrameRate(bool value) { - props_.set(value, 0); + ImageEffectActionEndSequenceRender_InArgs& setIsInteractive(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setSetableFielding(bool value) { - props_.set(value, 0); + ImageEffectActionEndSequenceRender_InArgs& setRenderScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setParamHostPropSupportsCustomInteract(bool value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2}) + ImageEffectActionEndSequenceRender_InArgs& setRenderScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setParamHostPropSupportsStringAnimation(bool value) { - props_.set(value, 0); + ImageEffectActionEndSequenceRender_InArgs& setSequentialRenderStatus(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParamHostPropSupportsChoiceAnimation(bool value) { - props_.set(value, 0); + ImageEffectActionEndSequenceRender_InArgs& setInteractiveRenderStatus(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParamHostPropSupportsBooleanAnimation(bool value) { - props_.set(value, 0); + ImageEffectActionEndSequenceRender_InArgs& setCudaEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParamHostPropSupportsCustomAnimation(bool value) { - props_.set(value, 0); + ImageEffectActionEndSequenceRender_InArgs& setCudaRenderSupported(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParamHostPropSupportsStrChoice(bool value) { - props_.set(value, 0); + ImageEffectActionEndSequenceRender_InArgs& setCudaStream(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParamHostPropSupportsStrChoiceAnimation(bool value) { - props_.set(value, 0); + ImageEffectActionEndSequenceRender_InArgs& setCudaStreamSupported(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParamHostPropMaxParameters(int value) { - props_.set(value, 0); + ImageEffectActionEndSequenceRender_InArgs& setMetalCommandQueue(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParamHostPropMaxPages(int value) { - props_.set(value, 0); + ImageEffectActionEndSequenceRender_InArgs& setMetalEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParamHostPropPageRowColumnCount(const std::array& values) { - props_.setAll(values); + ImageEffectActionEndSequenceRender_InArgs& setMetalRenderSupported(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setHostOSHandle(void* value) { - props_.set(value, 0); + ImageEffectActionEndSequenceRender_InArgs& setOpenCLCommandQueue(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setParamHostPropSupportsParametricAnimation(bool value) { - props_.set(value, 0); + ImageEffectActionEndSequenceRender_InArgs& setOpenCLEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setImageEffectInstancePropSequentialRender(bool value) { - props_.set(value, 0); + ImageEffectActionEndSequenceRender_InArgs& setOpenCLImage(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setOpenGLRenderSupported(const char* value) { - props_.set(value, 0); + ImageEffectActionEndSequenceRender_InArgs& setOpenCLRenderSupported(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setRenderQualityDraft(bool value) { - props_.set(value, 0); + ImageEffectActionEndSequenceRender_InArgs& setOpenCLSupported(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setImageEffectHostPropNativeOrigin(const char* value) { - props_.set(value, 0); + ImageEffectActionEndSequenceRender_InArgs& setOpenGLEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setColourManagementAvailableConfigs(const char* value, int index = 0) { - props_.set(value, index); + ImageEffectActionEndSequenceRender_InArgs& setOpenGLTextureIndex(int value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setColourManagementStyle(const char* value) { - props_.set(value, 0); + ImageEffectActionEndSequenceRender_InArgs& setOpenGLTextureTarget(int value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } }; -// Property set accessor for: InteractDescriptor -class InteractDescriptor : public PropertySetAccessor { +// Property set accessor for: ImageEffectActionGetClipPreferences_OutArgs +class ImageEffectActionGetClipPreferences_OutArgs : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void setInteractPropHasAlpha(bool value) { - props_.set(value, 0); + double frameRate(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* fieldOrder(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + const char* preMultiplication(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + bool continuousSamples(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void setInteractPropBitDepth(int value) { - props_.set(value, 0); + bool imageEffectFrameVarying(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } }; -// Property set accessor for: InteractInstance -class InteractInstance : public PropertySetAccessor { +// Property set accessor for: ImageEffectActionGetFramesNeeded_InArgs +class ImageEffectActionGetFramesNeeded_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + ImageEffectActionGetFramesNeeded_InArgs& setTime(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: ImageEffectActionGetFramesNeeded_OutArgs +class ImageEffectActionGetFramesNeeded_OutArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + std::array frameRange() const { + return props_.getAll(); + } + +}; + +// Property set accessor for: ImageEffectActionGetOutputColourspace_InArgs +class ImageEffectActionGetOutputColourspace_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + ImageEffectActionGetOutputColourspace_InArgs& setPreferredColourspaces(const char* value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ImageEffectActionGetOutputColourspace_InArgs& setPreferredColourspaces(const Container& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) + ImageEffectActionGetOutputColourspace_InArgs& setPreferredColourspaces(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: ImageEffectActionGetOutputColourspace_OutArgs +class ImageEffectActionGetOutputColourspace_OutArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + const char* colourspace(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + +}; + +// Property set accessor for: ImageEffectActionGetRegionOfDefinition_InArgs +class ImageEffectActionGetRegionOfDefinition_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + ImageEffectActionGetRegionOfDefinition_InArgs& setTime(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionGetRegionOfDefinition_InArgs& setRenderScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ImageEffectActionGetRegionOfDefinition_InArgs& setRenderScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: ImageEffectActionGetRegionOfDefinition_OutArgs +class ImageEffectActionGetRegionOfDefinition_OutArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + std::array regionOfDefinition() const { + return props_.getAll(); + } + +}; + +// Property set accessor for: ImageEffectActionGetRegionsOfInterest_InArgs +class ImageEffectActionGetRegionsOfInterest_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + ImageEffectActionGetRegionsOfInterest_InArgs& setTime(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionGetRegionsOfInterest_InArgs& setRenderScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ImageEffectActionGetRegionsOfInterest_InArgs& setRenderScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ImageEffectActionGetRegionsOfInterest_InArgs& setRegionOfInterest(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ImageEffectActionGetRegionsOfInterest_InArgs& setRegionOfInterest(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: ImageEffectActionGetTimeDomain_OutArgs +class ImageEffectActionGetTimeDomain_OutArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + std::array frameRange() const { + return props_.getAll(); + } + +}; + +// Property set accessor for: ImageEffectActionIsIdentity_InArgs +class ImageEffectActionIsIdentity_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + ImageEffectActionIsIdentity_InArgs& setTime(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionIsIdentity_InArgs& setFieldToRender(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionIsIdentity_InArgs& setRenderWindow(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ImageEffectActionIsIdentity_InArgs& setRenderWindow(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ImageEffectActionIsIdentity_InArgs& setRenderScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ImageEffectActionIsIdentity_InArgs& setRenderScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: ImageEffectActionRender_InArgs +class ImageEffectActionRender_InArgs : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void setEffectInstance(void* value) { - props_.set(value, 0); + ImageEffectActionRender_InArgs& setTime(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionRender_InArgs& setSequentialRenderStatus(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionRender_InArgs& setInteractiveRenderStatus(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionRender_InArgs& setRenderQualityDraft(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionRender_InArgs& setCudaEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionRender_InArgs& setCudaRenderSupported(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionRender_InArgs& setCudaStream(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionRender_InArgs& setCudaStreamSupported(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionRender_InArgs& setMetalCommandQueue(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionRender_InArgs& setMetalEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionRender_InArgs& setMetalRenderSupported(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionRender_InArgs& setOpenCLCommandQueue(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionRender_InArgs& setOpenCLEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionRender_InArgs& setOpenCLImage(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionRender_InArgs& setOpenCLRenderSupported(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionRender_InArgs& setOpenCLSupported(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionRender_InArgs& setOpenGLEnabled(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionRender_InArgs& setOpenGLTextureIndex(int value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionRender_InArgs& setOpenGLTextureTarget(int value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionRender_InArgs& setNoSpatialAwareness(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: ImageEffectHost +class ImageEffectHost : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + ImageEffectHost& setAPIVersion(int value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ImageEffectHost& setAPIVersion(const Container& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) + ImageEffectHost& setAPIVersion(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ImageEffectHost& setType(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setVersion(int value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ImageEffectHost& setVersion(const Container& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) + ImageEffectHost& setVersion(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ImageEffectHost& setVersionLabel(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setImageEffectHostPropIsBackground(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setSupportsOverlays(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setSupportsMultiResolution(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setSupportsTiles(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setTemporalClipAccess(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setSupportedComponents(const char* value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ImageEffectHost& setSupportedComponents(const Container& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) + ImageEffectHost& setSupportedComponents(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ImageEffectHost& setSupportedContexts(const char* value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ImageEffectHost& setSupportedContexts(const Container& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) + ImageEffectHost& setSupportedContexts(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ImageEffectHost& setMultipleClipDepths(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setOpenCLSupported(const char* value, bool error_if_missing = false) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setSupportsMultipleClipPARs(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setSetableFrameRate(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setSetableFielding(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setParamHostPropSupportsCustomInteract(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setParamHostPropSupportsStringAnimation(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setParamHostPropSupportsChoiceAnimation(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setParamHostPropSupportsBooleanAnimation(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setParamHostPropSupportsCustomAnimation(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setParamHostPropSupportsStrChoice(bool value, bool error_if_missing = false) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setParamHostPropSupportsStrChoiceAnimation(bool value, bool error_if_missing = false) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setParamHostPropMaxParameters(int value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setParamHostPropMaxPages(int value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setParamHostPropPageRowColumnCount(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ImageEffectHost& setParamHostPropPageRowColumnCount(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ImageEffectHost& setHostOSHandle(void* value, bool error_if_missing = false) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setParamHostPropSupportsParametricAnimation(bool value, bool error_if_missing = false) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setImageEffectInstancePropSequentialRender(bool value, bool error_if_missing = false) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setOpenGLRenderSupported(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setRenderQualityDraft(bool value, bool error_if_missing = false) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setImageEffectHostPropNativeOrigin(const char* value, bool error_if_missing = false) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectHost& setColourManagementAvailableConfigs(const char* value, int index = 0, bool error_if_missing = false) { + props_.set(value, index, error_if_missing); + return *this; + } + + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + ImageEffectHost& setColourManagementAvailableConfigs(const Container& values, bool error_if_missing = false) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2, 3}) + ImageEffectHost& setColourManagementAvailableConfigs(std::initializer_list values, bool error_if_missing = false) { + props_.setAll(values, error_if_missing); + return *this; + } + + ImageEffectHost& setColourManagementStyle(const char* value, bool error_if_missing = false) { + props_.set(value, 0, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: InteractActionDraw_InArgs +class InteractActionDraw_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + InteractActionDraw_InArgs& setEffectInstance(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionDraw_InArgs& setInteractPropDrawContext(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionDraw_InArgs& setInteractPropPixelScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionDraw_InArgs& setInteractPropPixelScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractActionDraw_InArgs& setInteractPropBackgroundColour(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionDraw_InArgs& setInteractPropBackgroundColour(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractActionDraw_InArgs& setTime(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionDraw_InArgs& setRenderScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionDraw_InArgs& setRenderScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: InteractActionGainFocus_InArgs +class InteractActionGainFocus_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + InteractActionGainFocus_InArgs& setEffectInstance(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionGainFocus_InArgs& setInteractPropPixelScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionGainFocus_InArgs& setInteractPropPixelScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractActionGainFocus_InArgs& setInteractPropBackgroundColour(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionGainFocus_InArgs& setInteractPropBackgroundColour(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractActionGainFocus_InArgs& setTime(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionGainFocus_InArgs& setRenderScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionGainFocus_InArgs& setRenderScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: InteractActionKeyDown_InArgs +class InteractActionKeyDown_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + InteractActionKeyDown_InArgs& setEffectInstance(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionKeyDown_InArgs& setKeySym(int value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionKeyDown_InArgs& setKeyString(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionKeyDown_InArgs& setTime(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionKeyDown_InArgs& setRenderScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionKeyDown_InArgs& setRenderScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: InteractActionKeyRepeat_InArgs +class InteractActionKeyRepeat_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + InteractActionKeyRepeat_InArgs& setEffectInstance(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionKeyRepeat_InArgs& setKeySym(int value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionKeyRepeat_InArgs& setKeyString(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionKeyRepeat_InArgs& setTime(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionKeyRepeat_InArgs& setRenderScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionKeyRepeat_InArgs& setRenderScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: InteractActionKeyUp_InArgs +class InteractActionKeyUp_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + InteractActionKeyUp_InArgs& setEffectInstance(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionKeyUp_InArgs& setKeySym(int value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionKeyUp_InArgs& setKeyString(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionKeyUp_InArgs& setTime(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionKeyUp_InArgs& setRenderScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionKeyUp_InArgs& setRenderScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: InteractActionLoseFocus_InArgs +class InteractActionLoseFocus_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + InteractActionLoseFocus_InArgs& setEffectInstance(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionLoseFocus_InArgs& setInteractPropPixelScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionLoseFocus_InArgs& setInteractPropPixelScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractActionLoseFocus_InArgs& setInteractPropBackgroundColour(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionLoseFocus_InArgs& setInteractPropBackgroundColour(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractActionLoseFocus_InArgs& setTime(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionLoseFocus_InArgs& setRenderScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionLoseFocus_InArgs& setRenderScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: InteractActionPenDown_InArgs +class InteractActionPenDown_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + InteractActionPenDown_InArgs& setEffectInstance(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionPenDown_InArgs& setInteractPropPixelScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionPenDown_InArgs& setInteractPropPixelScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractActionPenDown_InArgs& setInteractPropBackgroundColour(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionPenDown_InArgs& setInteractPropBackgroundColour(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractActionPenDown_InArgs& setTime(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionPenDown_InArgs& setRenderScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionPenDown_InArgs& setRenderScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractActionPenDown_InArgs& setInteractPropPenPosition(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionPenDown_InArgs& setInteractPropPenPosition(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractActionPenDown_InArgs& setInteractPropPenViewportPosition(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionPenDown_InArgs& setInteractPropPenViewportPosition(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractActionPenDown_InArgs& setInteractPropPenPressure(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: InteractActionPenMotion_InArgs +class InteractActionPenMotion_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + InteractActionPenMotion_InArgs& setEffectInstance(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionPenMotion_InArgs& setInteractPropPixelScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionPenMotion_InArgs& setInteractPropPixelScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractActionPenMotion_InArgs& setInteractPropBackgroundColour(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionPenMotion_InArgs& setInteractPropBackgroundColour(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractActionPenMotion_InArgs& setTime(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionPenMotion_InArgs& setRenderScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionPenMotion_InArgs& setRenderScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractActionPenMotion_InArgs& setInteractPropPenPosition(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionPenMotion_InArgs& setInteractPropPenPosition(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractActionPenMotion_InArgs& setInteractPropPenViewportPosition(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionPenMotion_InArgs& setInteractPropPenViewportPosition(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractActionPenMotion_InArgs& setInteractPropPenPressure(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: InteractActionPenUp_InArgs +class InteractActionPenUp_InArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + InteractActionPenUp_InArgs& setEffectInstance(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionPenUp_InArgs& setInteractPropPixelScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionPenUp_InArgs& setInteractPropPixelScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractActionPenUp_InArgs& setInteractPropBackgroundColour(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionPenUp_InArgs& setInteractPropBackgroundColour(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractActionPenUp_InArgs& setTime(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractActionPenUp_InArgs& setRenderScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionPenUp_InArgs& setRenderScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractActionPenUp_InArgs& setInteractPropPenPosition(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionPenUp_InArgs& setInteractPropPenPosition(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractActionPenUp_InArgs& setInteractPropPenViewportPosition(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractActionPenUp_InArgs& setInteractPropPenViewportPosition(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractActionPenUp_InArgs& setInteractPropPenPressure(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: InteractDescriptor +class InteractDescriptor : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + InteractDescriptor& setInteractPropHasAlpha(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractDescriptor& setInteractPropBitDepth(int value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + +}; + +// Property set accessor for: InteractInstance +class InteractInstance : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + InteractInstance& setEffectInstance(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractInstance& setInstanceData(void* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + InteractInstance& setInteractPropPixelScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractInstance& setInteractPropPixelScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + InteractInstance& setInteractPropBackgroundColour(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + InteractInstance& setInteractPropBackgroundColour(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInstanceData(void* value) { - props_.set(value, 0); + InteractInstance& setInteractPropHasAlpha(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setInteractPropPixelScale(const std::array& values) { - props_.setAll(values); + InteractInstance& setInteractPropBitDepth(int value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setInteractPropBackgroundColour(const std::array& values) { - props_.setAll(values); + InteractInstance& setInteractPropSlaveToParam(const char* value, int index = 0, bool error_if_missing = true) { + props_.set(value, index, error_if_missing); + return *this; } - void setInteractPropHasAlpha(bool value) { - props_.set(value, 0); + // Set all values from a container (vector, array, span, etc.) + // SFINAE: only enabled for container types (not scalars) + template && !std::is_pointer_v>> + InteractInstance& setInteractPropSlaveToParam(const Container& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractPropBitDepth(int value) { - props_.set(value, 0); + // Set all values from an initializer list (e.g., {1, 2, 3}) + InteractInstance& setInteractPropSlaveToParam(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractPropSlaveToParam(const char* value, int index = 0) { - props_.set(value, index); + InteractInstance& setInteractPropSuggestedColour(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } - void setInteractPropSuggestedColour(const std::array& values) { - props_.setAll(values); + // Set all values from an initializer list (e.g., {1, 2}) + InteractInstance& setInteractPropSuggestedColour(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; } }; @@ -672,72 +2158,72 @@ class ParamDouble1D : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - bool showTimeMarker() const { - return props_.get(0); + bool showTimeMarker(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* doubleType() const { - return props_.get(0); + const char* doubleType(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* type() const { - return props_.get(0); + const char* type(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* name() const { - return props_.get(0); + const char* name(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* label() const { - return props_.get(0); + const char* label(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* shortLabel() const { - return props_.get(0); + const char* shortLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* longLabel() const { - return props_.get(0); + const char* longLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool secret() const { - return props_.get(0); + bool secret(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* hint() const { - return props_.get(0); + const char* hint(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* scriptName() const { - return props_.get(0); + const char* scriptName(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* parent() const { - return props_.get(0); + const char* parent(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool enabled() const { - return props_.get(0); + bool enabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void* dataPtr() const { - return props_.get(0); + void* dataPtr(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array icon() const { return props_.getAll(); } - void* interactV1() const { - return props_.get(0); + void* interactV1(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array interactSize() const { return props_.getAll(); } - double interactSizeAspect() const { - return props_.get(0); + double interactSizeAspect(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array interactMinimumSize() const { @@ -748,18 +2234,18 @@ class ParamDouble1D : public PropertySetAccessor { return props_.getAll(); } - bool hasHostOverlayHandle() const { - return props_.get(0); + bool hasHostOverlayHandle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool useHostOverlayHandle() const { - return props_.get(0); + bool useHostOverlayHandle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } // Multi-type property (supports: int, double, string, pointer) template - T default(int index = 0) const { - return props_.get(index); + T default(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -767,42 +2253,44 @@ class ParamDouble1D : public PropertySetAccessor { return props_.getAll(); } - bool animates() const { - return props_.get(0); + bool animates(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void setIsAnimating(bool value) { - props_.set(value, 0); + ParamDouble1D& setIsAnimating(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setIsAutoKeying(bool value) { - props_.set(value, 0); + ParamDouble1D& setIsAutoKeying(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - bool persistant() const { - return props_.get(0); + bool persistant(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool evaluateOnChange() const { - return props_.get(0); + bool evaluateOnChange(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool pluginMayWrite() const { - return props_.get(0); + bool pluginMayWrite(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* cacheInvalidation() const { - return props_.get(0); + const char* cacheInvalidation(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool canUndo() const { - return props_.get(0); + bool canUndo(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } // Multi-type property (supports: int, double) template - T min(int index = 0) const { - return props_.get(index); + T min(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -812,8 +2300,8 @@ class ParamDouble1D : public PropertySetAccessor { // Multi-type property (supports: int, double) template - T max(int index = 0) const { - return props_.get(index); + T max(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -823,8 +2311,8 @@ class ParamDouble1D : public PropertySetAccessor { // Multi-type property (supports: int, double) template - T displayMin(int index = 0) const { - return props_.get(index); + T displayMin(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -834,8 +2322,8 @@ class ParamDouble1D : public PropertySetAccessor { // Multi-type property (supports: int, double) template - T displayMax(int index = 0) const { - return props_.get(index); + T displayMax(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -843,12 +2331,12 @@ class ParamDouble1D : public PropertySetAccessor { return props_.getAll(); } - double increment() const { - return props_.get(0); + double increment(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - int digits() const { - return props_.get(0); + int digits(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } }; @@ -858,12 +2346,12 @@ class ParameterSet : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - bool paramSetNeedsSyncing() const { - return props_.get(0); + bool paramSetNeedsSyncing(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* paramPageOrder(int index = 0) const { - return props_.get(index); + const char* paramPageOrder(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } }; @@ -873,64 +2361,64 @@ class ParamsByte : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - const char* type() const { - return props_.get(0); + const char* type(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* name() const { - return props_.get(0); + const char* name(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* label() const { - return props_.get(0); + const char* label(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* shortLabel() const { - return props_.get(0); + const char* shortLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* longLabel() const { - return props_.get(0); + const char* longLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool secret() const { - return props_.get(0); + bool secret(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* hint() const { - return props_.get(0); + const char* hint(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* scriptName() const { - return props_.get(0); + const char* scriptName(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* parent() const { - return props_.get(0); + const char* parent(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool enabled() const { - return props_.get(0); + bool enabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void* dataPtr() const { - return props_.get(0); + void* dataPtr(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array icon() const { return props_.getAll(); } - void* interactV1() const { - return props_.get(0); + void* interactV1(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array interactSize() const { return props_.getAll(); } - double interactSizeAspect() const { - return props_.get(0); + double interactSizeAspect(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array interactMinimumSize() const { @@ -941,18 +2429,18 @@ class ParamsByte : public PropertySetAccessor { return props_.getAll(); } - bool hasHostOverlayHandle() const { - return props_.get(0); + bool hasHostOverlayHandle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool useHostOverlayHandle() const { - return props_.get(0); + bool useHostOverlayHandle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } // Multi-type property (supports: int, double, string, pointer) template - T default(int index = 0) const { - return props_.get(index); + T default(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -960,42 +2448,44 @@ class ParamsByte : public PropertySetAccessor { return props_.getAll(); } - bool animates() const { - return props_.get(0); + bool animates(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void setIsAnimating(bool value) { - props_.set(value, 0); + ParamsByte& setIsAnimating(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setIsAutoKeying(bool value) { - props_.set(value, 0); + ParamsByte& setIsAutoKeying(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - bool persistant() const { - return props_.get(0); + bool persistant(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool evaluateOnChange() const { - return props_.get(0); + bool evaluateOnChange(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool pluginMayWrite() const { - return props_.get(0); + bool pluginMayWrite(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* cacheInvalidation() const { - return props_.get(0); + const char* cacheInvalidation(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool canUndo() const { - return props_.get(0); + bool canUndo(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } // Multi-type property (supports: int, double) template - T min(int index = 0) const { - return props_.get(index); + T min(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -1005,8 +2495,8 @@ class ParamsByte : public PropertySetAccessor { // Multi-type property (supports: int, double) template - T max(int index = 0) const { - return props_.get(index); + T max(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -1016,8 +2506,8 @@ class ParamsByte : public PropertySetAccessor { // Multi-type property (supports: int, double) template - T displayMin(int index = 0) const { - return props_.get(index); + T displayMin(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -1027,8 +2517,8 @@ class ParamsByte : public PropertySetAccessor { // Multi-type property (supports: int, double) template - T displayMax(int index = 0) const { - return props_.get(index); + T displayMax(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -1043,72 +2533,72 @@ class ParamsChoice : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - const char* choiceOption(int index = 0) const { - return props_.get(index); + const char* choiceOption(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } - int choiceOrder(int index = 0) const { - return props_.get(index); + int choiceOrder(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } - const char* type() const { - return props_.get(0); + const char* type(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* name() const { - return props_.get(0); + const char* name(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* label() const { - return props_.get(0); + const char* label(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* shortLabel() const { - return props_.get(0); + const char* shortLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* longLabel() const { - return props_.get(0); + const char* longLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool secret() const { - return props_.get(0); + bool secret(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* hint() const { - return props_.get(0); + const char* hint(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* scriptName() const { - return props_.get(0); + const char* scriptName(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* parent() const { - return props_.get(0); + const char* parent(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool enabled() const { - return props_.get(0); + bool enabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void* dataPtr() const { - return props_.get(0); + void* dataPtr(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array icon() const { return props_.getAll(); } - void* interactV1() const { - return props_.get(0); + void* interactV1(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array interactSize() const { return props_.getAll(); } - double interactSizeAspect() const { - return props_.get(0); + double interactSizeAspect(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array interactMinimumSize() const { @@ -1119,18 +2609,18 @@ class ParamsChoice : public PropertySetAccessor { return props_.getAll(); } - bool hasHostOverlayHandle() const { - return props_.get(0); + bool hasHostOverlayHandle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool useHostOverlayHandle() const { - return props_.get(0); + bool useHostOverlayHandle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } // Multi-type property (supports: int, double, string, pointer) template - T default(int index = 0) const { - return props_.get(index); + T default(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -1138,36 +2628,38 @@ class ParamsChoice : public PropertySetAccessor { return props_.getAll(); } - bool animates() const { - return props_.get(0); + bool animates(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void setIsAnimating(bool value) { - props_.set(value, 0); + ParamsChoice& setIsAnimating(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setIsAutoKeying(bool value) { - props_.set(value, 0); + ParamsChoice& setIsAutoKeying(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - bool persistant() const { - return props_.get(0); + bool persistant(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool evaluateOnChange() const { - return props_.get(0); + bool evaluateOnChange(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool pluginMayWrite() const { - return props_.get(0); + bool pluginMayWrite(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* cacheInvalidation() const { - return props_.get(0); + const char* cacheInvalidation(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool canUndo() const { - return props_.get(0); + bool canUndo(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } }; @@ -1177,68 +2669,68 @@ class ParamsCustom : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - void* customCallbackV1() const { - return props_.get(0); + void* customCallbackV1(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* type() const { - return props_.get(0); + const char* type(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* name() const { - return props_.get(0); + const char* name(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* label() const { - return props_.get(0); + const char* label(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* shortLabel() const { - return props_.get(0); + const char* shortLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* longLabel() const { - return props_.get(0); + const char* longLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool secret() const { - return props_.get(0); + bool secret(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* hint() const { - return props_.get(0); + const char* hint(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* scriptName() const { - return props_.get(0); + const char* scriptName(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* parent() const { - return props_.get(0); + const char* parent(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool enabled() const { - return props_.get(0); + bool enabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void* dataPtr() const { - return props_.get(0); + void* dataPtr(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array icon() const { return props_.getAll(); } - void* interactV1() const { - return props_.get(0); + void* interactV1(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array interactSize() const { return props_.getAll(); } - double interactSizeAspect() const { - return props_.get(0); + double interactSizeAspect(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array interactMinimumSize() const { @@ -1249,18 +2741,18 @@ class ParamsCustom : public PropertySetAccessor { return props_.getAll(); } - bool hasHostOverlayHandle() const { - return props_.get(0); + bool hasHostOverlayHandle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool useHostOverlayHandle() const { - return props_.get(0); + bool useHostOverlayHandle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } // Multi-type property (supports: int, double, string, pointer) template - T default(int index = 0) const { - return props_.get(index); + T default(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -1268,36 +2760,38 @@ class ParamsCustom : public PropertySetAccessor { return props_.getAll(); } - bool animates() const { - return props_.get(0); + bool animates(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void setIsAnimating(bool value) { - props_.set(value, 0); + ParamsCustom& setIsAnimating(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setIsAutoKeying(bool value) { - props_.set(value, 0); + ParamsCustom& setIsAutoKeying(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - bool persistant() const { - return props_.get(0); + bool persistant(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool evaluateOnChange() const { - return props_.get(0); + bool evaluateOnChange(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool pluginMayWrite() const { - return props_.get(0); + bool pluginMayWrite(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* cacheInvalidation() const { - return props_.get(0); + const char* cacheInvalidation(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool canUndo() const { - return props_.get(0); + bool canUndo(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } }; @@ -1307,68 +2801,68 @@ class ParamsDouble2D3D : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - const char* doubleType() const { - return props_.get(0); + const char* doubleType(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* type() const { - return props_.get(0); + const char* type(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* name() const { - return props_.get(0); + const char* name(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* label() const { - return props_.get(0); + const char* label(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* shortLabel() const { - return props_.get(0); + const char* shortLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* longLabel() const { - return props_.get(0); + const char* longLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool secret() const { - return props_.get(0); + bool secret(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* hint() const { - return props_.get(0); + const char* hint(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* scriptName() const { - return props_.get(0); + const char* scriptName(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* parent() const { - return props_.get(0); + const char* parent(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool enabled() const { - return props_.get(0); + bool enabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void* dataPtr() const { - return props_.get(0); + void* dataPtr(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array icon() const { return props_.getAll(); } - void* interactV1() const { - return props_.get(0); + void* interactV1(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array interactSize() const { return props_.getAll(); } - double interactSizeAspect() const { - return props_.get(0); + double interactSizeAspect(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array interactMinimumSize() const { @@ -1379,18 +2873,18 @@ class ParamsDouble2D3D : public PropertySetAccessor { return props_.getAll(); } - bool hasHostOverlayHandle() const { - return props_.get(0); + bool hasHostOverlayHandle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool useHostOverlayHandle() const { - return props_.get(0); + bool useHostOverlayHandle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } // Multi-type property (supports: int, double, string, pointer) template - T default(int index = 0) const { - return props_.get(index); + T default(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -1398,42 +2892,44 @@ class ParamsDouble2D3D : public PropertySetAccessor { return props_.getAll(); } - bool animates() const { - return props_.get(0); + bool animates(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void setIsAnimating(bool value) { - props_.set(value, 0); + ParamsDouble2D3D& setIsAnimating(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setIsAutoKeying(bool value) { - props_.set(value, 0); + ParamsDouble2D3D& setIsAutoKeying(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - bool persistant() const { - return props_.get(0); + bool persistant(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool evaluateOnChange() const { - return props_.get(0); + bool evaluateOnChange(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool pluginMayWrite() const { - return props_.get(0); + bool pluginMayWrite(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* cacheInvalidation() const { - return props_.get(0); + const char* cacheInvalidation(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool canUndo() const { - return props_.get(0); + bool canUndo(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } // Multi-type property (supports: int, double) template - T min(int index = 0) const { - return props_.get(index); + T min(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -1443,8 +2939,8 @@ class ParamsDouble2D3D : public PropertySetAccessor { // Multi-type property (supports: int, double) template - T max(int index = 0) const { - return props_.get(index); + T max(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -1454,8 +2950,8 @@ class ParamsDouble2D3D : public PropertySetAccessor { // Multi-type property (supports: int, double) template - T displayMin(int index = 0) const { - return props_.get(index); + T displayMin(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -1465,8 +2961,8 @@ class ParamsDouble2D3D : public PropertySetAccessor { // Multi-type property (supports: int, double) template - T displayMax(int index = 0) const { - return props_.get(index); + T displayMax(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -1474,12 +2970,12 @@ class ParamsDouble2D3D : public PropertySetAccessor { return props_.getAll(); } - double increment() const { - return props_.get(0); + double increment(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - int digits() const { - return props_.get(0); + int digits(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } }; @@ -1489,52 +2985,52 @@ class ParamsGroup : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - bool groupOpen() const { - return props_.get(0); + bool groupOpen(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* type() const { - return props_.get(0); + const char* type(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* name() const { - return props_.get(0); + const char* name(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* label() const { - return props_.get(0); + const char* label(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* shortLabel() const { - return props_.get(0); + const char* shortLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* longLabel() const { - return props_.get(0); + const char* longLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool secret() const { - return props_.get(0); + bool secret(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* hint() const { - return props_.get(0); + const char* hint(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* scriptName() const { - return props_.get(0); + const char* scriptName(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* parent() const { - return props_.get(0); + const char* parent(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool enabled() const { - return props_.get(0); + bool enabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void* dataPtr() const { - return props_.get(0); + void* dataPtr(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array icon() const { @@ -1548,68 +3044,68 @@ class ParamsInt2D3D : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - const char* dimensionLabel() const { - return props_.get(0); + const char* dimensionLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* type() const { - return props_.get(0); + const char* type(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* name() const { - return props_.get(0); + const char* name(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* label() const { - return props_.get(0); + const char* label(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* shortLabel() const { - return props_.get(0); + const char* shortLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* longLabel() const { - return props_.get(0); + const char* longLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool secret() const { - return props_.get(0); + bool secret(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* hint() const { - return props_.get(0); + const char* hint(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* scriptName() const { - return props_.get(0); + const char* scriptName(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* parent() const { - return props_.get(0); + const char* parent(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool enabled() const { - return props_.get(0); + bool enabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void* dataPtr() const { - return props_.get(0); + void* dataPtr(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array icon() const { return props_.getAll(); } - void* interactV1() const { - return props_.get(0); + void* interactV1(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array interactSize() const { return props_.getAll(); } - double interactSizeAspect() const { - return props_.get(0); + double interactSizeAspect(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array interactMinimumSize() const { @@ -1620,18 +3116,18 @@ class ParamsInt2D3D : public PropertySetAccessor { return props_.getAll(); } - bool hasHostOverlayHandle() const { - return props_.get(0); + bool hasHostOverlayHandle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool useHostOverlayHandle() const { - return props_.get(0); + bool useHostOverlayHandle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } // Multi-type property (supports: int, double, string, pointer) template - T default(int index = 0) const { - return props_.get(index); + T default(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -1639,42 +3135,44 @@ class ParamsInt2D3D : public PropertySetAccessor { return props_.getAll(); } - bool animates() const { - return props_.get(0); + bool animates(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void setIsAnimating(bool value) { - props_.set(value, 0); + ParamsInt2D3D& setIsAnimating(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setIsAutoKeying(bool value) { - props_.set(value, 0); + ParamsInt2D3D& setIsAutoKeying(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - bool persistant() const { - return props_.get(0); + bool persistant(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool evaluateOnChange() const { - return props_.get(0); + bool evaluateOnChange(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool pluginMayWrite() const { - return props_.get(0); + bool pluginMayWrite(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* cacheInvalidation() const { - return props_.get(0); + const char* cacheInvalidation(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool canUndo() const { - return props_.get(0); + bool canUndo(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } // Multi-type property (supports: int, double) template - T min(int index = 0) const { - return props_.get(index); + T min(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -1684,8 +3182,8 @@ class ParamsInt2D3D : public PropertySetAccessor { // Multi-type property (supports: int, double) template - T max(int index = 0) const { - return props_.get(index); + T max(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -1695,8 +3193,8 @@ class ParamsInt2D3D : public PropertySetAccessor { // Multi-type property (supports: int, double) template - T displayMin(int index = 0) const { - return props_.get(index); + T displayMin(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -1706,8 +3204,8 @@ class ParamsInt2D3D : public PropertySetAccessor { // Multi-type property (supports: int, double) template - T displayMax(int index = 0) const { - return props_.get(index); + T displayMax(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -1722,68 +3220,68 @@ class ParamsNormalizedSpatial : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - const char* defaultCoordinateSystem() const { - return props_.get(0); + const char* defaultCoordinateSystem(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* type() const { - return props_.get(0); + const char* type(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* name() const { - return props_.get(0); + const char* name(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* label() const { - return props_.get(0); + const char* label(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* shortLabel() const { - return props_.get(0); + const char* shortLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* longLabel() const { - return props_.get(0); + const char* longLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool secret() const { - return props_.get(0); + bool secret(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* hint() const { - return props_.get(0); + const char* hint(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* scriptName() const { - return props_.get(0); + const char* scriptName(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* parent() const { - return props_.get(0); + const char* parent(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool enabled() const { - return props_.get(0); + bool enabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void* dataPtr() const { - return props_.get(0); + void* dataPtr(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array icon() const { return props_.getAll(); } - void* interactV1() const { - return props_.get(0); + void* interactV1(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array interactSize() const { return props_.getAll(); } - double interactSizeAspect() const { - return props_.get(0); + double interactSizeAspect(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array interactMinimumSize() const { @@ -1794,18 +3292,18 @@ class ParamsNormalizedSpatial : public PropertySetAccessor { return props_.getAll(); } - bool hasHostOverlayHandle() const { - return props_.get(0); + bool hasHostOverlayHandle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool useHostOverlayHandle() const { - return props_.get(0); + bool useHostOverlayHandle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } // Multi-type property (supports: int, double, string, pointer) template - T default(int index = 0) const { - return props_.get(index); + T default(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -1813,42 +3311,44 @@ class ParamsNormalizedSpatial : public PropertySetAccessor { return props_.getAll(); } - bool animates() const { - return props_.get(0); + bool animates(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void setIsAnimating(bool value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setIsAnimating(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setIsAutoKeying(bool value) { - props_.set(value, 0); + ParamsNormalizedSpatial& setIsAutoKeying(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - bool persistant() const { - return props_.get(0); + bool persistant(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool evaluateOnChange() const { - return props_.get(0); + bool evaluateOnChange(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool pluginMayWrite() const { - return props_.get(0); + bool pluginMayWrite(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* cacheInvalidation() const { - return props_.get(0); + const char* cacheInvalidation(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool canUndo() const { - return props_.get(0); + bool canUndo(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } // Multi-type property (supports: int, double) template - T min(int index = 0) const { - return props_.get(index); + T min(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -1858,8 +3358,8 @@ class ParamsNormalizedSpatial : public PropertySetAccessor { // Multi-type property (supports: int, double) template - T max(int index = 0) const { - return props_.get(index); + T max(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -1869,8 +3369,8 @@ class ParamsNormalizedSpatial : public PropertySetAccessor { // Multi-type property (supports: int, double) template - T displayMin(int index = 0) const { - return props_.get(index); + T displayMin(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -1880,8 +3380,8 @@ class ParamsNormalizedSpatial : public PropertySetAccessor { // Multi-type property (supports: int, double) template - T displayMax(int index = 0) const { - return props_.get(index); + T displayMax(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -1889,12 +3389,12 @@ class ParamsNormalizedSpatial : public PropertySetAccessor { return props_.getAll(); } - double increment() const { - return props_.get(0); + double increment(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - int digits() const { - return props_.get(0); + int digits(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } }; @@ -1904,52 +3404,52 @@ class ParamsPage : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - const char* pageChild(int index = 0) const { - return props_.get(index); + const char* pageChild(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } - const char* type() const { - return props_.get(0); + const char* type(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* name() const { - return props_.get(0); + const char* name(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* label() const { - return props_.get(0); + const char* label(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* shortLabel() const { - return props_.get(0); + const char* shortLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* longLabel() const { - return props_.get(0); + const char* longLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool secret() const { - return props_.get(0); + bool secret(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* hint() const { - return props_.get(0); + const char* hint(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* scriptName() const { - return props_.get(0); + const char* scriptName(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* parent() const { - return props_.get(0); + const char* parent(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool enabled() const { - return props_.get(0); + bool enabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void* dataPtr() const { - return props_.get(0); + void* dataPtr(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array icon() const { @@ -1963,112 +3463,112 @@ class ParamsParametric : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - bool animates() const { - return props_.get(0); + bool animates(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool isAnimating() const { - return props_.get(0); + bool isAnimating(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool isAutoKeying() const { - return props_.get(0); + bool isAutoKeying(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool persistant() const { - return props_.get(0); + bool persistant(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool evaluateOnChange() const { - return props_.get(0); + bool evaluateOnChange(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool pluginMayWrite() const { - return props_.get(0); + bool pluginMayWrite(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* cacheInvalidation() const { - return props_.get(0); + const char* cacheInvalidation(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool canUndo() const { - return props_.get(0); + bool canUndo(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - int parametricDimension() const { - return props_.get(0); + int parametricDimension(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - double parametricUIColour(int index = 0) const { - return props_.get(index); + double parametricUIColour(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } - void* parametricInteractBackground() const { - return props_.get(0); + void* parametricInteractBackground(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array parametricRange() const { return props_.getAll(); } - const char* type() const { - return props_.get(0); + const char* type(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* name() const { - return props_.get(0); + const char* name(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* label() const { - return props_.get(0); + const char* label(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* shortLabel() const { - return props_.get(0); + const char* shortLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* longLabel() const { - return props_.get(0); + const char* longLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool secret() const { - return props_.get(0); + bool secret(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* hint() const { - return props_.get(0); + const char* hint(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* scriptName() const { - return props_.get(0); + const char* scriptName(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* parent() const { - return props_.get(0); + const char* parent(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool enabled() const { - return props_.get(0); + bool enabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void* dataPtr() const { - return props_.get(0); + void* dataPtr(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array icon() const { return props_.getAll(); } - void* interactV1() const { - return props_.get(0); + void* interactV1(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array interactSize() const { return props_.getAll(); } - double interactSizeAspect() const { - return props_.get(0); + double interactSizeAspect(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array interactMinimumSize() const { @@ -2079,18 +3579,18 @@ class ParamsParametric : public PropertySetAccessor { return props_.getAll(); } - bool hasHostOverlayHandle() const { - return props_.get(0); + bool hasHostOverlayHandle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool useHostOverlayHandle() const { - return props_.get(0); + bool useHostOverlayHandle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } // Multi-type property (supports: int, double, string, pointer) template - T default(int index = 0) const { - return props_.get(index); + T default(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -2105,72 +3605,72 @@ class ParamsStrChoice : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - const char* choiceOption(int index = 0) const { - return props_.get(index); + const char* choiceOption(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } - bool choiceEnum() const { - return props_.get(0); + bool choiceEnum(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* type() const { - return props_.get(0); + const char* type(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* name() const { - return props_.get(0); + const char* name(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* label() const { - return props_.get(0); + const char* label(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* shortLabel() const { - return props_.get(0); + const char* shortLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* longLabel() const { - return props_.get(0); + const char* longLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool secret() const { - return props_.get(0); + bool secret(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* hint() const { - return props_.get(0); + const char* hint(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* scriptName() const { - return props_.get(0); + const char* scriptName(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* parent() const { - return props_.get(0); + const char* parent(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool enabled() const { - return props_.get(0); + bool enabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void* dataPtr() const { - return props_.get(0); + void* dataPtr(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array icon() const { return props_.getAll(); } - void* interactV1() const { - return props_.get(0); + void* interactV1(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array interactSize() const { return props_.getAll(); } - double interactSizeAspect() const { - return props_.get(0); + double interactSizeAspect(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array interactMinimumSize() const { @@ -2181,18 +3681,18 @@ class ParamsStrChoice : public PropertySetAccessor { return props_.getAll(); } - bool hasHostOverlayHandle() const { - return props_.get(0); + bool hasHostOverlayHandle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool useHostOverlayHandle() const { - return props_.get(0); + bool useHostOverlayHandle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } // Multi-type property (supports: int, double, string, pointer) template - T default(int index = 0) const { - return props_.get(index); + T default(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -2200,36 +3700,38 @@ class ParamsStrChoice : public PropertySetAccessor { return props_.getAll(); } - bool animates() const { - return props_.get(0); + bool animates(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void setIsAnimating(bool value) { - props_.set(value, 0); + ParamsStrChoice& setIsAnimating(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setIsAutoKeying(bool value) { - props_.set(value, 0); + ParamsStrChoice& setIsAutoKeying(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - bool persistant() const { - return props_.get(0); + bool persistant(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool evaluateOnChange() const { - return props_.get(0); + bool evaluateOnChange(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool pluginMayWrite() const { - return props_.get(0); + bool pluginMayWrite(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* cacheInvalidation() const { - return props_.get(0); + const char* cacheInvalidation(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool canUndo() const { - return props_.get(0); + bool canUndo(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } }; @@ -2239,72 +3741,72 @@ class ParamsString : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; - const char* stringMode() const { - return props_.get(0); + const char* stringMode(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool stringFilePathExists() const { - return props_.get(0); + bool stringFilePathExists(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* type() const { - return props_.get(0); + const char* type(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* name() const { - return props_.get(0); + const char* name(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* label() const { - return props_.get(0); + const char* label(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* shortLabel() const { - return props_.get(0); + const char* shortLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* longLabel() const { - return props_.get(0); + const char* longLabel(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool secret() const { - return props_.get(0); + bool secret(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* hint() const { - return props_.get(0); + const char* hint(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* scriptName() const { - return props_.get(0); + const char* scriptName(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* parent() const { - return props_.get(0); + const char* parent(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool enabled() const { - return props_.get(0); + bool enabled(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void* dataPtr() const { - return props_.get(0); + void* dataPtr(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array icon() const { return props_.getAll(); } - void* interactV1() const { - return props_.get(0); + void* interactV1(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array interactSize() const { return props_.getAll(); } - double interactSizeAspect() const { - return props_.get(0); + double interactSizeAspect(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } std::array interactMinimumSize() const { @@ -2315,18 +3817,18 @@ class ParamsString : public PropertySetAccessor { return props_.getAll(); } - bool hasHostOverlayHandle() const { - return props_.get(0); + bool hasHostOverlayHandle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool useHostOverlayHandle() const { - return props_.get(0); + bool useHostOverlayHandle(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } // Multi-type property (supports: int, double, string, pointer) template - T default(int index = 0) const { - return props_.get(index); + T default(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -2334,42 +3836,44 @@ class ParamsString : public PropertySetAccessor { return props_.getAll(); } - bool animates() const { - return props_.get(0); + bool animates(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - void setIsAnimating(bool value) { - props_.set(value, 0); + ParamsString& setIsAnimating(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - void setIsAutoKeying(bool value) { - props_.set(value, 0); + ParamsString& setIsAutoKeying(bool value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; } - bool persistant() const { - return props_.get(0); + bool persistant(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool evaluateOnChange() const { - return props_.get(0); + bool evaluateOnChange(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool pluginMayWrite() const { - return props_.get(0); + bool pluginMayWrite(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - const char* cacheInvalidation() const { - return props_.get(0); + const char* cacheInvalidation(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } - bool canUndo() const { - return props_.get(0); + bool canUndo(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); } // Multi-type property (supports: int, double) template - T min(int index = 0) const { - return props_.get(index); + T min(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -2379,8 +3883,8 @@ class ParamsString : public PropertySetAccessor { // Multi-type property (supports: int, double) template - T max(int index = 0) const { - return props_.get(index); + T max(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -2390,8 +3894,8 @@ class ParamsString : public PropertySetAccessor { // Multi-type property (supports: int, double) template - T displayMin(int index = 0) const { - return props_.get(index); + T displayMin(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template @@ -2401,8 +3905,8 @@ class ParamsString : public PropertySetAccessor { // Multi-type property (supports: int, double) template - T displayMax(int index = 0) const { - return props_.get(index); + T displayMax(int index = 0, bool error_if_missing = true) const { + return props_.get(index, error_if_missing); } template diff --git a/openfx-cpp/include/openfx/ofxPropsAccess.h b/openfx-cpp/include/openfx/ofxPropsAccess.h index ecc7df98..92362623 100644 --- a/openfx-cpp/include/openfx/ofxPropsAccess.h +++ b/openfx-cpp/include/openfx/ofxPropsAccess.h @@ -784,11 +784,19 @@ class PropertyAccessor { // Get raw dimension of a property int getDimensionRaw(const char *name, bool error_if_missing = true) const { assert(propset_ != nullptr); - int dimension = 0; + int dimension = -1; _OPENFX_CHECK(propSuite_->propGetDimension(propset_, name, &dimension), name, error_if_missing); return dimension; } + // Does the prop exist? Checks for its dimension. + int exists(const char *name) const { + assert(propset_ != nullptr); + int dimension = 0; + OfxStatus status = propSuite_->propGetDimension(propset_, name, &dimension); + return (status == kOfxStatOK); + } + private: OfxPropertySetHandle propset_; const OfxPropertySuiteV1 *propSuite_; diff --git a/openfx-cpp/include/openfx/ofxPropsBySet.h b/openfx-cpp/include/openfx/ofxPropsBySet.h index befdc1c9..9b3a0e79 100644 --- a/openfx-cpp/include/openfx/ofxPropsBySet.h +++ b/openfx-cpp/include/openfx/ofxPropsBySet.h @@ -79,16 +79,16 @@ static inline const std::map> prop_sets { { "OfxPropLabel", prop_defs[PropId::OfxPropLabel], false, true, false }, { "OfxPropShortLabel", prop_defs[PropId::OfxPropShortLabel], false, true, false }, { "OfxPropLongLabel", prop_defs[PropId::OfxPropLongLabel], false, true, false }, - { "OfxPropVersion", prop_defs[PropId::OfxPropVersion], false, true, false }, - { "OfxPropVersionLabel", prop_defs[PropId::OfxPropVersionLabel], false, true, false }, - { "OfxPropPluginDescription", prop_defs[PropId::OfxPropPluginDescription], false, true, false }, + { "OfxPropVersion", prop_defs[PropId::OfxPropVersion], false, true, true }, + { "OfxPropVersionLabel", prop_defs[PropId::OfxPropVersionLabel], false, true, true }, + { "OfxPropPluginDescription", prop_defs[PropId::OfxPropPluginDescription], false, true, true }, { "OfxImageEffectPropSupportedContexts", prop_defs[PropId::OfxImageEffectPropSupportedContexts], false, true, false }, { "OfxImageEffectPluginPropGrouping", prop_defs[PropId::OfxImageEffectPluginPropGrouping], false, true, false }, { "OfxImageEffectPluginPropSingleInstance", prop_defs[PropId::OfxImageEffectPluginPropSingleInstance], false, true, false }, { "OfxImageEffectPluginRenderThreadSafety", prop_defs[PropId::OfxImageEffectPluginRenderThreadSafety], false, true, false }, { "OfxImageEffectPluginPropHostFrameThreading", prop_defs[PropId::OfxImageEffectPluginPropHostFrameThreading], false, true, false }, { "OfxImageEffectPluginPropOverlayInteractV1", prop_defs[PropId::OfxImageEffectPluginPropOverlayInteractV1], false, true, false }, - { "OfxImageEffectPropOpenCLSupported", prop_defs[PropId::OfxImageEffectPropOpenCLSupported], false, true, false }, + { "OfxImageEffectPropOpenCLSupported", prop_defs[PropId::OfxImageEffectPropOpenCLSupported], false, true, true }, { "OfxImageEffectPropSupportsMultiResolution", prop_defs[PropId::OfxImageEffectPropSupportsMultiResolution], false, true, false }, { "OfxImageEffectPropSupportsTiles", prop_defs[PropId::OfxImageEffectPropSupportsTiles], false, true, false }, { "OfxImageEffectPropTemporalClipAccess", prop_defs[PropId::OfxImageEffectPropTemporalClipAccess], false, true, false }, @@ -100,11 +100,11 @@ static inline const std::map> prop_sets { { "OfxImageEffectPropClipPreferencesSlaveParam", prop_defs[PropId::OfxImageEffectPropClipPreferencesSlaveParam], false, true, false }, { "OfxImageEffectPropOpenGLRenderSupported", prop_defs[PropId::OfxImageEffectPropOpenGLRenderSupported], false, true, false }, { "OfxPluginPropFilePath", prop_defs[PropId::OfxPluginPropFilePath], true, false, false }, - { "OfxOpenGLPropPixelDepth", prop_defs[PropId::OfxOpenGLPropPixelDepth], false, true, false }, + { "OfxOpenGLPropPixelDepth", prop_defs[PropId::OfxOpenGLPropPixelDepth], false, true, true }, { "OfxImageEffectPluginPropOverlayInteractV2", prop_defs[PropId::OfxImageEffectPluginPropOverlayInteractV2], false, true, false }, - { "OfxImageEffectPropColourManagementAvailableConfigs", prop_defs[PropId::OfxImageEffectPropColourManagementAvailableConfigs], false, true, false }, - { "OfxImageEffectPropColourManagementStyle", prop_defs[PropId::OfxImageEffectPropColourManagementStyle], false, true, false }, - { "OfxImageEffectPropNoSpatialAwareness", prop_defs[PropId::OfxImageEffectPropNoSpatialAwareness], false, true, false } } }, + { "OfxImageEffectPropColourManagementAvailableConfigs", prop_defs[PropId::OfxImageEffectPropColourManagementAvailableConfigs], false, true, true }, + { "OfxImageEffectPropColourManagementStyle", prop_defs[PropId::OfxImageEffectPropColourManagementStyle], false, true, true }, + { "OfxImageEffectPropNoSpatialAwareness", prop_defs[PropId::OfxImageEffectPropNoSpatialAwareness], false, true, true } } }, // EffectInstance { "EffectInstance", { { "OfxPropType", prop_defs[PropId::OfxPropType], true, false, false }, @@ -157,7 +157,7 @@ static inline const std::map> prop_sets { { "OfxImageEffectPropSupportedComponents", prop_defs[PropId::OfxImageEffectPropSupportedComponents], true, false, false }, { "OfxImageEffectPropSupportedContexts", prop_defs[PropId::OfxImageEffectPropSupportedContexts], true, false, false }, { "OfxImageEffectPropMultipleClipDepths", prop_defs[PropId::OfxImageEffectPropMultipleClipDepths], true, false, false }, - { "OfxImageEffectPropOpenCLSupported", prop_defs[PropId::OfxImageEffectPropOpenCLSupported], true, false, false }, + { "OfxImageEffectPropOpenCLSupported", prop_defs[PropId::OfxImageEffectPropOpenCLSupported], true, false, true }, { "OfxImageEffectPropSupportsMultipleClipPARs", prop_defs[PropId::OfxImageEffectPropSupportsMultipleClipPARs], true, false, false }, { "OfxImageEffectPropSetableFrameRate", prop_defs[PropId::OfxImageEffectPropSetableFrameRate], true, false, false }, { "OfxImageEffectPropSetableFielding", prop_defs[PropId::OfxImageEffectPropSetableFielding], true, false, false }, @@ -166,19 +166,19 @@ static inline const std::map> prop_sets { { "OfxParamHostPropSupportsChoiceAnimation", prop_defs[PropId::OfxParamHostPropSupportsChoiceAnimation], true, false, false }, { "OfxParamHostPropSupportsBooleanAnimation", prop_defs[PropId::OfxParamHostPropSupportsBooleanAnimation], true, false, false }, { "OfxParamHostPropSupportsCustomAnimation", prop_defs[PropId::OfxParamHostPropSupportsCustomAnimation], true, false, false }, - { "OfxParamHostPropSupportsStrChoice", prop_defs[PropId::OfxParamHostPropSupportsStrChoice], true, false, false }, - { "OfxParamHostPropSupportsStrChoiceAnimation", prop_defs[PropId::OfxParamHostPropSupportsStrChoiceAnimation], true, false, false }, + { "OfxParamHostPropSupportsStrChoice", prop_defs[PropId::OfxParamHostPropSupportsStrChoice], true, false, true }, + { "OfxParamHostPropSupportsStrChoiceAnimation", prop_defs[PropId::OfxParamHostPropSupportsStrChoiceAnimation], true, false, true }, { "OfxParamHostPropMaxParameters", prop_defs[PropId::OfxParamHostPropMaxParameters], true, false, false }, { "OfxParamHostPropMaxPages", prop_defs[PropId::OfxParamHostPropMaxPages], true, false, false }, { "OfxParamHostPropPageRowColumnCount", prop_defs[PropId::OfxParamHostPropPageRowColumnCount], true, false, false }, - { "OfxPropHostOSHandle", prop_defs[PropId::OfxPropHostOSHandle], true, false, false }, - { "OfxParamHostPropSupportsParametricAnimation", prop_defs[PropId::OfxParamHostPropSupportsParametricAnimation], true, false, false }, - { "OfxImageEffectInstancePropSequentialRender", prop_defs[PropId::OfxImageEffectInstancePropSequentialRender], true, false, false }, + { "OfxPropHostOSHandle", prop_defs[PropId::OfxPropHostOSHandle], true, false, true }, + { "OfxParamHostPropSupportsParametricAnimation", prop_defs[PropId::OfxParamHostPropSupportsParametricAnimation], true, false, true }, + { "OfxImageEffectInstancePropSequentialRender", prop_defs[PropId::OfxImageEffectInstancePropSequentialRender], true, false, true }, { "OfxImageEffectPropOpenGLRenderSupported", prop_defs[PropId::OfxImageEffectPropOpenGLRenderSupported], true, false, false }, - { "OfxImageEffectPropRenderQualityDraft", prop_defs[PropId::OfxImageEffectPropRenderQualityDraft], true, false, false }, - { "OfxImageEffectHostPropNativeOrigin", prop_defs[PropId::OfxImageEffectHostPropNativeOrigin], true, false, false }, - { "OfxImageEffectPropColourManagementAvailableConfigs", prop_defs[PropId::OfxImageEffectPropColourManagementAvailableConfigs], true, false, false }, - { "OfxImageEffectPropColourManagementStyle", prop_defs[PropId::OfxImageEffectPropColourManagementStyle], true, false, false } } }, + { "OfxImageEffectPropRenderQualityDraft", prop_defs[PropId::OfxImageEffectPropRenderQualityDraft], true, false, true }, + { "OfxImageEffectHostPropNativeOrigin", prop_defs[PropId::OfxImageEffectHostPropNativeOrigin], true, false, true }, + { "OfxImageEffectPropColourManagementAvailableConfigs", prop_defs[PropId::OfxImageEffectPropColourManagementAvailableConfigs], true, false, true }, + { "OfxImageEffectPropColourManagementStyle", prop_defs[PropId::OfxImageEffectPropColourManagementStyle], true, false, true } } }, // InteractDescriptor { "InteractDescriptor", { { "OfxInteractPropHasAlpha", prop_defs[PropId::OfxInteractPropHasAlpha], true, false, false }, diff --git a/openfx-cpp/include/openfx/ofxPropsMetadata.h b/openfx-cpp/include/openfx/ofxPropsMetadata.h index 790565f4..c81dbd69 100644 --- a/openfx-cpp/include/openfx/ofxPropsMetadata.h +++ b/openfx-cpp/include/openfx/ofxPropsMetadata.h @@ -273,8 +273,6 @@ constexpr std::array OfxParamPropDoubleType = {"OfxParamDoubleTypePlain","OfxParamDoubleTypeAngle","OfxParamDoubleTypeScale","OfxParamDoubleTypeTime","OfxParamDoubleTypeAbsoluteTime","OfxParamDoubleTypeX","OfxParamDoubleTypeXAbsolute","OfxParamDoubleTypeY","OfxParamDoubleTypeYAbsolute","OfxParamDoubleTypeXY","OfxParamDoubleTypeXYAbsolute"}; constexpr std::array OfxParamPropStringMode = {"OfxParamStringIsSingleLine","OfxParamStringIsMultiLine","OfxParamStringIsFilePath","OfxParamStringIsDirectoryPath","OfxParamStringIsLabel","OfxParamStringIsRichTextFormat"}; -constexpr std::array OfxPluginPropFilePath = - {"false","true","needed"}; constexpr std::array OfxPropChangeReason = {"OfxChangeUserEdited","OfxChangePluginEdited","OfxChangeTime"}; } // namespace prop_enum_values @@ -440,7 +438,7 @@ static constexpr PropType OfxParamPropShowTimeMarker_types[] = {PropType::Bool}; static constexpr PropType OfxParamPropStringFilePathExists_types[] = {PropType::Bool}; static constexpr PropType OfxParamPropStringMode_types[] = {PropType::Enum}; static constexpr PropType OfxParamPropType_types[] = {PropType::String}; -static constexpr PropType OfxPluginPropFilePath_types[] = {PropType::Enum}; +static constexpr PropType OfxPluginPropFilePath_types[] = {PropType::String}; static constexpr PropType OfxPluginPropParamPageOrder_types[] = {PropType::String}; static constexpr PropType OfxPropAPIVersion_types[] = {PropType::Int}; static constexpr PropType OfxPropChangeReason_types[] = {PropType::Enum}; @@ -810,7 +808,7 @@ static inline constexpr PropDefsArray prop_defs = { { "OfxParamPropType", openfx::span(prop_type_arrays::OfxParamPropType_types, 1), 1, openfx::span()}, { "OfxPluginPropFilePath", - openfx::span(prop_type_arrays::OfxPluginPropFilePath_types, 1), 1, openfx::span(prop_enum_values::OfxPluginPropFilePath.data(), prop_enum_values::OfxPluginPropFilePath.size())}, + openfx::span(prop_type_arrays::OfxPluginPropFilePath_types, 1), 1, openfx::span()}, { "OfxPluginPropParamPageOrder", openfx::span(prop_type_arrays::OfxPluginPropParamPageOrder_types, 1), 0, openfx::span()}, { "OfxPropAPIVersion", diff --git a/scripts/gen-props.py b/scripts/gen-props.py index 5bf7593a..89161b9e 100644 --- a/scripts/gen-props.py +++ b/scripts/gen-props.py @@ -124,6 +124,49 @@ def expand_set_props(props_by_set): for item in get_def(element, defs)] return sets +def actions_to_propsets(props_by_action): + """Convert action argument property sets to the same format as regular property sets. + + Actions have the structure: + ActionName: + inArgs: [prop1, prop2, ...] + outArgs: [prop3, prop4, ...] + + We convert this to property sets named like: + ImageEffectActionDescribeInContext_InArgs: {props: [prop1, prop2, ...], write: 'host'} + ImageEffectActionDescribeInContext_OutArgs: {props: [prop3, prop4, ...], write: 'plugin'} + + The class names are full action names minus "Ofx" prefix, matching C API names. + """ + result = {} + + for action_name, args in props_by_action.items(): + # Remove "Ofx" prefix to get class-friendly name that matches C API + # OfxImageEffectActionDescribeInContext -> ImageEffectActionDescribeInContext + # OfxActionLoad -> ActionLoad + # OfxInteractActionDraw -> InteractActionDraw + simple_name = action_name + if simple_name.startswith('Ofx'): + simple_name = simple_name[3:] # Remove "Ofx" prefix + + # Generate InArgs property set + if 'inArgs' in args and args['inArgs']: + key = f"{simple_name}_InArgs" + result[key] = { + 'props': args['inArgs'], + 'write': 'host' # inArgs are written by host, read by plugin + } + + # Generate OutArgs property set + if 'outArgs' in args and args['outArgs']: + key = f"{simple_name}_OutArgs" + result[key] = { + 'props': args['outArgs'], + 'write': 'plugin' # outArgs are written by plugin, read by host + } + + return result + def get_cname(propname, props_metadata): """Get the C `#define` name for a property name. @@ -201,12 +244,17 @@ def props_for_set(pset, props_by_set, name_only=True): yield name else: # parse key/value pairs, apply defaults, and include name - key_values_str = match.group(2) + key_values_str = match.group(2).strip() if not key_values_str: options = {} else: - key_value_pattern = r'(\w+)=([\w-]+)' - options = dict(re.findall(key_value_pattern, key_values_str)) + # Handle both "optional" shorthand and "key=value" format + # "optional" is shorthand for "host_optional=true" + if key_values_str == 'optional': + options = {'host_optional': 'true'} + 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): @@ -484,7 +532,8 @@ def gen_props_by_set(props_by_set, props_by_action, outfile_path: Path): 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']}\", prop_defs[PropId::{get_prop_id(p['name'])}], {host_write}, {plugin_write}, false }}") + host_optional = 'true' if p.get('host_optional') == 'true' else 'false' + propdefs.append(f"{{ \"{p['name']}\", prop_defs[PropId::{get_prop_id(p['name'])}], {host_write}, {plugin_write}, {host_optional} }}") propdefs_str = ",\n ".join(propdefs) outfile.write(f"// {pset}\n{{ \"{pset}\", {{\n {propdefs_str} }} }},\n") outfile.write("};\n\n") @@ -647,6 +696,7 @@ class PropertySetAccessor {{ for prop in props_for_set(pset_name, props_by_set, name_only=False): propname = prop['name'] write_access = prop['write'] + is_host_optional = prop.get('host_optional') == 'true' # Get property metadata if propname not in props_metadata: @@ -661,6 +711,10 @@ class PropertySetAccessor {{ continue generated_methods.add(method_name) + # Default for error_if_missing based on whether property is optional + # Optional properties default to not erroring, required ones do + error_default = 'false' if is_host_optional else 'true' + # Check if this is a multi-type property types = prop_def.get('type') if isinstance(types, str): @@ -697,12 +751,12 @@ class PropertySetAccessor {{ outfile.write(f" template\n") if dimension == 1: # Dimension 1: exactly one value, no index needed - outfile.write(f" T {method_name}() const {{\n") - outfile.write(f" return props_.get(0);\n") + outfile.write(f" T {method_name}(bool error_if_missing = {error_default}) const {{\n") + outfile.write(f" return props_.get(0, error_if_missing);\n") else: # Dimension 0 or > 1: include index parameter - outfile.write(f" T {method_name}(int index = 0) const {{\n") - outfile.write(f" return props_.get(index);\n") + outfile.write(f" T {method_name}(int index = 0, bool error_if_missing = {error_default}) const {{\n") + outfile.write(f" return props_.get(index, error_if_missing);\n") outfile.write(f" }}\n\n") # Also provide getAll for multi-type (returns vector) @@ -715,13 +769,13 @@ class PropertySetAccessor {{ # Single-type property if dimension == 1: # Dimension 1: exactly one value, no index needed - outfile.write(f" {cpp_type} {method_name}() const {{\n") - outfile.write(f" return props_.get(0);\n") + outfile.write(f" {cpp_type} {method_name}(bool error_if_missing = {error_default}) const {{\n") + outfile.write(f" return props_.get(0, error_if_missing);\n") outfile.write(f" }}\n\n") elif dimension == 0: # Dimension 0: variable dimension, include index - outfile.write(f" {cpp_type} {method_name}(int index = 0) const {{\n") - outfile.write(f" return props_.get(index);\n") + outfile.write(f" {cpp_type} {method_name}(int index = 0, bool error_if_missing = {error_default}) const {{\n") + outfile.write(f" return props_.get(index, error_if_missing);\n") outfile.write(f" }}\n\n") else: # Dimension > 1: array getter @@ -740,37 +794,78 @@ class PropertySetAccessor {{ outfile.write(f" template\n") if dimension == 1: # Dimension 1: exactly one value, no index needed - outfile.write(f" void {setter_name}(T value) {{\n") - outfile.write(f" props_.set(value, 0);\n") + outfile.write(f" {class_name}& {setter_name}(T value, bool error_if_missing = {error_default}) {{\n") + outfile.write(f" props_.set(value, 0, error_if_missing);\n") + outfile.write(f" return *this;\n") else: # Dimension 0 or > 1: include index parameter - outfile.write(f" void {setter_name}(T value, int index = 0) {{\n") - outfile.write(f" props_.set(value, index);\n") + outfile.write(f" {class_name}& {setter_name}(T value, int index = 0, bool error_if_missing = {error_default}) {{\n") + outfile.write(f" props_.set(value, index, error_if_missing);\n") + outfile.write(f" return *this;\n") outfile.write(f" }}\n\n") # Also provide setAll for multi-type if dimension != 1: # dimension 0 or > 1 + outfile.write(f" // Set all values from a container (vector, array, span, etc.)\n") + outfile.write(f" // SFINAE: only enabled for container types (not scalars)\n") + outfile.write(f" template && !std::is_pointer_v>>\n") + outfile.write(f" {class_name}& {setter_name}(const Container& values, bool error_if_missing = {error_default}) {{\n") + outfile.write(f" props_.setAllTyped(values, error_if_missing);\n") + outfile.write(f" return *this;\n") + outfile.write(f" }}\n\n") + + # Also provide initializer_list overload for multi-type + outfile.write(f" // Set all values from an initializer list (e.g., {{1, 2, 3}})\n") outfile.write(f" template\n") - outfile.write(f" void {setter_name}All(const std::vector& values) {{\n") - outfile.write(f" props_.setAll(values);\n") + outfile.write(f" {class_name}& {setter_name}(std::initializer_list values, bool error_if_missing = {error_default}) {{\n") + outfile.write(f" props_.setAllTyped(values, error_if_missing);\n") + outfile.write(f" return *this;\n") outfile.write(f" }}\n\n") else: # Single-type property if dimension == 1: # Dimension 1: exactly one value, no index needed - outfile.write(f" void {setter_name}({cpp_type} value) {{\n") - outfile.write(f" props_.set(value, 0);\n") + outfile.write(f" {class_name}& {setter_name}({cpp_type} value, bool error_if_missing = {error_default}) {{\n") + outfile.write(f" props_.set(value, 0, error_if_missing);\n") + outfile.write(f" return *this;\n") outfile.write(f" }}\n\n") elif dimension == 0: # Dimension 0: variable dimension, include index - outfile.write(f" void {setter_name}({cpp_type} value, int index = 0) {{\n") - outfile.write(f" props_.set(value, index);\n") + outfile.write(f" {class_name}& {setter_name}({cpp_type} value, int index = 0, bool error_if_missing = {error_default}) {{\n") + outfile.write(f" props_.set(value, index, error_if_missing);\n") + outfile.write(f" return *this;\n") + outfile.write(f" }}\n\n") + + # Also generate a container/span setter for dimension 0 + outfile.write(f" // Set all values from a container (vector, array, span, etc.)\n") + outfile.write(f" // SFINAE: only enabled for container types (not scalars)\n") + outfile.write(f" template && !std::is_pointer_v>>\n") + outfile.write(f" {class_name}& {setter_name}(const Container& values, bool error_if_missing = {error_default}) {{\n") + outfile.write(f" props_.setAll(values, error_if_missing);\n") + outfile.write(f" return *this;\n") + outfile.write(f" }}\n\n") + + # Also generate an initializer_list overload for dimension 0 + outfile.write(f" // Set all values from an initializer list (e.g., {{1, 2, 3}})\n") + outfile.write(f" {class_name}& {setter_name}(std::initializer_list<{cpp_type}> values, bool error_if_missing = {error_default}) {{\n") + outfile.write(f" props_.setAll(values, error_if_missing);\n") + outfile.write(f" return *this;\n") outfile.write(f" }}\n\n") else: # Dimension > 1: array setter array_type = get_cpp_type(prop_def, include_array=True) - outfile.write(f" void {setter_name}(const {array_type}& values) {{\n") - outfile.write(f" props_.setAll(values);\n") + outfile.write(f" {class_name}& {setter_name}(const {array_type}& values, bool error_if_missing = {error_default}) {{\n") + outfile.write(f" props_.setAll(values, error_if_missing);\n") + outfile.write(f" return *this;\n") + outfile.write(f" }}\n\n") + + # Also generate an initializer_list overload for dimension > 1 + outfile.write(f" // Set all values from an initializer list (e.g., {{1, 2}})\n") + outfile.write(f" {class_name}& {setter_name}(std::initializer_list<{cpp_type}> values, bool error_if_missing = {error_default}) {{\n") + outfile.write(f" props_.setAll(values, error_if_missing);\n") + outfile.write(f" return *this;\n") outfile.write(f" }}\n\n") outfile.write("};\n\n") @@ -790,6 +885,12 @@ def main(args): props_by_action = props_data['Actions'] props_metadata = props_data['properties'] + # Convert action argument property sets to the same format as regular property sets + action_propsets = actions_to_propsets(props_by_action) + + # Merge action property sets with regular property sets for accessor generation + all_propsets = {**props_by_set, **action_propsets} + 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) @@ -818,11 +919,11 @@ def main(args): if args.verbose: print(f"=== Generating property set accessor classes for plugins: {args.propset_accessors}") - gen_propset_accessors(props_by_set, props_metadata, dest_path / args.propset_accessors, for_host=False) + gen_propset_accessors(all_propsets, props_metadata, dest_path / args.propset_accessors, for_host=False) if args.verbose: print(f"=== Generating property set accessor classes for hosts: {args.propset_accessors_host}") - gen_propset_accessors(props_by_set, props_metadata, dest_path / args.propset_accessors_host, for_host=True) + gen_propset_accessors(all_propsets, props_metadata, dest_path / args.propset_accessors_host, for_host=True) if __name__ == "__main__": script_dir = os.path.dirname(os.path.abspath(__file__))