From 78a927ea2b2b65ad129e407f197f1a7a1e05a4dc Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Thu, 29 Aug 2024 06:58:07 -0400 Subject: [PATCH 01/10] Add proper license IDs to all `.rst` doc files and others All doc files should use CC-BY-4.0, and sources should use BSD-3-CLAUSE. This commit adds parseable SPDX-LICENSE-IDENTIFIER tags to all `.rst` files and some others identified during a recent license scan by ASWF. Signed-off-by: Gary Oberbrunner --- Documentation/genPropertiesReference.py | 2 ++ Documentation/sources/Guide/index.rst | 1 + .../sources/Guide/ofxExample1_Basics.rst | 1 + .../sources/Guide/ofxExample2_Invert.rst | 1 + .../sources/Guide/ofxExample3_Gain.rst | 1 + .../sources/Guide/ofxExample4_Saturation.rst | 1 + .../sources/Guide/ofxExample5_Circle.rst | 1 + Documentation/sources/Guide/ofxExamples.rst | 1 + .../sources/Reference/DoxygenIndex.rst | 1 + .../Reference/apiChanges_1_2_Chapter.rst | 1 + Documentation/sources/Reference/index.rst | 1 + .../sources/Reference/ofxClipPreferences.rst | 1 + .../sources/Reference/ofxCoordSystem.rst | 1 + .../sources/Reference/ofxCoreAPI.rst | 1 + .../sources/Reference/ofxHostStruct.rst | 3 +- .../sources/Reference/ofxImageClip.rst | 1 + .../sources/Reference/ofxImageEffectAPI.rst | 1 + .../Reference/ofxImageEffectActions.rst | 1 + .../Reference/ofxImageEffectContexts.rst | 1 + .../sources/Reference/ofxInteractActions.rst | 1 + .../sources/Reference/ofxInteracts.rst | 1 + .../sources/Reference/ofxLoadingSequence.rst | 1 + .../sources/Reference/ofxPackaging.rst | 1 + .../sources/Reference/ofxParameter.rst | 1 + .../sources/Reference/ofxPluginStruct.rst | 1 + .../sources/Reference/ofxProcessingArch.rst | 1 + .../Reference/ofxPropertiesByObject.rst | 1 + .../Reference/ofxPropertiesReference.rst | 28 +++++++++++++++++++ .../sources/Reference/ofxRendering.rst | 1 + .../sources/Reference/ofxStatusCodes.rst | 1 + .../sources/Reference/ofxStructure.rst | 1 + .../sources/Reference/ofxThreadSafety.rst | 1 + .../suites/ofxDrawSuiteReference.rst | 1 + .../suites/ofxImageEffectSuiteReference.rst | 1 + .../suites/ofxInteractSuiteReference.rst | 1 + .../suites/ofxMemorySuiteReference.rst | 1 + .../suites/ofxMessageSuiteV1Reference.rst | 1 + .../suites/ofxMessageSuiteV2Reference.rst | 1 + .../suites/ofxOpenGLRenderSuiteReference.rst | 1 + .../suites/ofxParametersSuiteReference.rst | 1 + .../suites/ofxParametricParamReference.rst | 1 + .../suites/ofxProgressSuiteReference.rst | 1 + .../suites/ofxPropertySuiteReference.rst | 1 + .../Reference/suites/ofxSuiteReference.rst | 1 + .../suites/ofxThreadingSuiteReference.rst | 1 + .../suites/ofxTimeLineSuiteReference.rst | 1 + Documentation/sources/ReleaseNotes/index.rst | 1 + .../sources/ReleaseNotes/relnotes-1.4.rst | 3 +- .../sources/ReleaseNotes/relnotes-1.5.rst | 1 + Documentation/sources/conf.py | 2 ++ Documentation/sources/index.rst | 9 ++---- HostSupport/README | 3 ++ cmake/OpenFX.cmake | 2 ++ include/ofx-native-v1.5_aces-v1.3_ocio-v2.3.h | 2 +- install.md | 5 ++++ readme.md | 1 + scripts/build-cmake.sh | 1 + 57 files changed, 97 insertions(+), 9 deletions(-) mode change 100755 => 100644 Documentation/sources/Reference/ofxClipPreferences.rst mode change 100755 => 100644 Documentation/sources/Reference/ofxPackaging.rst diff --git a/Documentation/genPropertiesReference.py b/Documentation/genPropertiesReference.py index 13451b790..01075e10d 100755 --- a/Documentation/genPropertiesReference.py +++ b/Documentation/genPropertiesReference.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: BSD-3-Clause + import os,sys, getopt,re badlyNamedProperties = ["kOfxImageEffectFrameVarying", "kOfxImageEffectPluginRenderThreadSafety"] diff --git a/Documentation/sources/Guide/index.rst b/Documentation/sources/Guide/index.rst index c97139d04..4bfdd2def 100644 --- a/Documentation/sources/Guide/index.rst +++ b/Documentation/sources/Guide/index.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 OpenFX Programming Guide ======================== diff --git a/Documentation/sources/Guide/ofxExample1_Basics.rst b/Documentation/sources/Guide/ofxExample1_Basics.rst index c8ef30052..4f5714642 100644 --- a/Documentation/sources/Guide/ofxExample1_Basics.rst +++ b/Documentation/sources/Guide/ofxExample1_Basics.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _basicExample: This is a guide to the basic machinery an OFX plugin uses to communicate diff --git a/Documentation/sources/Guide/ofxExample2_Invert.rst b/Documentation/sources/Guide/ofxExample2_Invert.rst index 79bda5666..755e78de4 100644 --- a/Documentation/sources/Guide/ofxExample2_Invert.rst +++ b/Documentation/sources/Guide/ofxExample2_Invert.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _invertExample: This guide will take you through the fundamentals of processing images diff --git a/Documentation/sources/Guide/ofxExample3_Gain.rst b/Documentation/sources/Guide/ofxExample3_Gain.rst index 23fe00f80..b723191f1 100644 --- a/Documentation/sources/Guide/ofxExample3_Gain.rst +++ b/Documentation/sources/Guide/ofxExample3_Gain.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _gainExample: This guide will take you through the basics of creating and using diff --git a/Documentation/sources/Guide/ofxExample4_Saturation.rst b/Documentation/sources/Guide/ofxExample4_Saturation.rst index 679aa7764..b6a3d4bb0 100644 --- a/Documentation/sources/Guide/ofxExample4_Saturation.rst +++ b/Documentation/sources/Guide/ofxExample4_Saturation.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _saturationExample: This guide will take you through the basics of creating effects that can diff --git a/Documentation/sources/Guide/ofxExample5_Circle.rst b/Documentation/sources/Guide/ofxExample5_Circle.rst index dab3f2577..99462ae1d 100644 --- a/Documentation/sources/Guide/ofxExample5_Circle.rst +++ b/Documentation/sources/Guide/ofxExample5_Circle.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _circleExample: This guide will introduce the spatial coordinate system used by OFX and diff --git a/Documentation/sources/Guide/ofxExamples.rst b/Documentation/sources/Guide/ofxExamples.rst index c0fb00f28..ae444cc9c 100644 --- a/Documentation/sources/Guide/ofxExamples.rst +++ b/Documentation/sources/Guide/ofxExamples.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 Foreword ======== diff --git a/Documentation/sources/Reference/DoxygenIndex.rst b/Documentation/sources/Reference/DoxygenIndex.rst index 28ef46eab..a2dec0120 100644 --- a/Documentation/sources/Reference/DoxygenIndex.rst +++ b/Documentation/sources/Reference/DoxygenIndex.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _doxygenIndex: ============================== diff --git a/Documentation/sources/Reference/apiChanges_1_2_Chapter.rst b/Documentation/sources/Reference/apiChanges_1_2_Chapter.rst index 41ac410b7..6395e1d10 100644 --- a/Documentation/sources/Reference/apiChanges_1_2_Chapter.rst +++ b/Documentation/sources/Reference/apiChanges_1_2_Chapter.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 Changes to the API for 1.2 ========================== diff --git a/Documentation/sources/Reference/index.rst b/Documentation/sources/Reference/index.rst index ae7c0b0b4..f531ab81a 100644 --- a/Documentation/sources/Reference/index.rst +++ b/Documentation/sources/Reference/index.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 OpenFX reference ================ diff --git a/Documentation/sources/Reference/ofxClipPreferences.rst b/Documentation/sources/Reference/ofxClipPreferences.rst old mode 100755 new mode 100644 index bafa47f8a..104e4f2c0 --- a/Documentation/sources/Reference/ofxClipPreferences.rst +++ b/Documentation/sources/Reference/ofxClipPreferences.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _ImageEffectClipPreferences: Image Effect Clip Preferences diff --git a/Documentation/sources/Reference/ofxCoordSystem.rst b/Documentation/sources/Reference/ofxCoordSystem.rst index ac21c28a5..a680279fb 100644 --- a/Documentation/sources/Reference/ofxCoordSystem.rst +++ b/Documentation/sources/Reference/ofxCoordSystem.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. CoordinateSystems: Coordinate Systems ================== diff --git a/Documentation/sources/Reference/ofxCoreAPI.rst b/Documentation/sources/Reference/ofxCoreAPI.rst index 8710aa9c4..411a96973 100644 --- a/Documentation/sources/Reference/ofxCoreAPI.rst +++ b/Documentation/sources/Reference/ofxCoreAPI.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 The Generic Core API ==================== diff --git a/Documentation/sources/Reference/ofxHostStruct.rst b/Documentation/sources/Reference/ofxHostStruct.rst index 81e7f870b..67ec514ca 100644 --- a/Documentation/sources/Reference/ofxHostStruct.rst +++ b/Documentation/sources/Reference/ofxHostStruct.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _OfxHost: The OfxHost Struct @@ -32,4 +33,4 @@ suite, or NULL if it does not support it. Please note that a suite cannot be fetched until the very first action is called on the plug-in, which is the load action. -.. doxygenstruct:: OfxHost \ No newline at end of file +.. doxygenstruct:: OfxHost diff --git a/Documentation/sources/Reference/ofxImageClip.rst b/Documentation/sources/Reference/ofxImageClip.rst index cbf788753..87cf211ae 100644 --- a/Documentation/sources/Reference/ofxImageClip.rst +++ b/Documentation/sources/Reference/ofxImageClip.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _imageClip: Images and Clips ================ diff --git a/Documentation/sources/Reference/ofxImageEffectAPI.rst b/Documentation/sources/Reference/ofxImageEffectAPI.rst index 7a81d6d9b..c0909161a 100644 --- a/Documentation/sources/Reference/ofxImageEffectAPI.rst +++ b/Documentation/sources/Reference/ofxImageEffectAPI.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 The Image Effect API ==================== diff --git a/Documentation/sources/Reference/ofxImageEffectActions.rst b/Documentation/sources/Reference/ofxImageEffectActions.rst index 96d49fd37..cdea2ac88 100644 --- a/Documentation/sources/Reference/ofxImageEffectActions.rst +++ b/Documentation/sources/Reference/ofxImageEffectActions.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _ImageEffectActions: Actions Passed to An Image Effect diff --git a/Documentation/sources/Reference/ofxImageEffectContexts.rst b/Documentation/sources/Reference/ofxImageEffectContexts.rst index bd96f32e6..dcd95d613 100644 --- a/Documentation/sources/Reference/ofxImageEffectContexts.rst +++ b/Documentation/sources/Reference/ofxImageEffectContexts.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _imageEffectContexts: Image Effect Contexts ===================== diff --git a/Documentation/sources/Reference/ofxInteractActions.rst b/Documentation/sources/Reference/ofxInteractActions.rst index 0a146620e..7b72ceac3 100644 --- a/Documentation/sources/Reference/ofxInteractActions.rst +++ b/Documentation/sources/Reference/ofxInteractActions.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. InteractActions: Actions Passed to an Interact diff --git a/Documentation/sources/Reference/ofxInteracts.rst b/Documentation/sources/Reference/ofxInteracts.rst index 662a28c83..d5add773e 100644 --- a/Documentation/sources/Reference/ofxInteracts.rst +++ b/Documentation/sources/Reference/ofxInteracts.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 Interacts ========= diff --git a/Documentation/sources/Reference/ofxLoadingSequence.rst b/Documentation/sources/Reference/ofxLoadingSequence.rst index aa6e01588..75684cca9 100644 --- a/Documentation/sources/Reference/ofxLoadingSequence.rst +++ b/Documentation/sources/Reference/ofxLoadingSequence.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 Sequences of Operations Required to Load a Plug-in --------------------------------------------------- diff --git a/Documentation/sources/Reference/ofxPackaging.rst b/Documentation/sources/Reference/ofxPackaging.rst old mode 100755 new mode 100644 index 7ffba855c..9581662c1 --- a/Documentation/sources/Reference/ofxPackaging.rst +++ b/Documentation/sources/Reference/ofxPackaging.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 Packaging OFX Plug-ins ====================== diff --git a/Documentation/sources/Reference/ofxParameter.rst b/Documentation/sources/Reference/ofxParameter.rst index 00058076c..66796c8d6 100644 --- a/Documentation/sources/Reference/ofxParameter.rst +++ b/Documentation/sources/Reference/ofxParameter.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 Effect Parameters ================= diff --git a/Documentation/sources/Reference/ofxPluginStruct.rst b/Documentation/sources/Reference/ofxPluginStruct.rst index b44f6079f..e6f79f24c 100644 --- a/Documentation/sources/Reference/ofxPluginStruct.rst +++ b/Documentation/sources/Reference/ofxPluginStruct.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _OfxPlugin: The OfxPlugin Struct diff --git a/Documentation/sources/Reference/ofxProcessingArch.rst b/Documentation/sources/Reference/ofxProcessingArch.rst index a9616a8f4..428df7247 100644 --- a/Documentation/sources/Reference/ofxProcessingArch.rst +++ b/Documentation/sources/Reference/ofxProcessingArch.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 Image Processing Architectures ============================== diff --git a/Documentation/sources/Reference/ofxPropertiesByObject.rst b/Documentation/sources/Reference/ofxPropertiesByObject.rst index bf18441ea..aa950c65b 100644 --- a/Documentation/sources/Reference/ofxPropertiesByObject.rst +++ b/Documentation/sources/Reference/ofxPropertiesByObject.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. warning:: This section is outdated and should be properly generated automatically from source code instead diff --git a/Documentation/sources/Reference/ofxPropertiesReference.rst b/Documentation/sources/Reference/ofxPropertiesReference.rst index c38454c28..72e97375c 100644 --- a/Documentation/sources/Reference/ofxPropertiesReference.rst +++ b/Documentation/sources/Reference/ofxPropertiesReference.rst @@ -1,6 +1,8 @@ .. _propertiesReference: Properties Reference ===================== +.. doxygendefine:: kOfxImageClipPropColourspace + .. doxygendefine:: kOfxImageClipPropConnected .. doxygendefine:: kOfxImageClipPropContinuousSamples @@ -13,6 +15,8 @@ Properties Reference .. doxygendefine:: kOfxImageClipPropOptional +.. doxygendefine:: kOfxImageClipPropPreferredColourspaces + .. doxygendefine:: kOfxImageClipPropUnmappedComponents .. doxygendefine:: kOfxImageClipPropUnmappedPixelDepth @@ -41,6 +45,22 @@ Properties Reference .. doxygendefine:: kOfxImageEffectPropClipPreferencesSlaveParam +.. doxygendefine:: kOfxImageEffectPropColourManagementAvailableConfigs + +.. doxygendefine:: kOfxImageEffectPropColourManagementBasic + +.. doxygendefine:: kOfxImageEffectPropColourManagementConfig + +.. doxygendefine:: kOfxImageEffectPropColourManagementCore + +.. doxygendefine:: kOfxImageEffectPropColourManagementFull + +.. doxygendefine:: kOfxImageEffectPropColourManagementNone + +.. doxygendefine:: kOfxImageEffectPropColourManagementOCIO + +.. doxygendefine:: kOfxImageEffectPropColourManagementStyle + .. doxygendefine:: kOfxImageEffectPropComponents .. doxygendefine:: kOfxImageEffectPropContext @@ -53,6 +73,8 @@ Properties Reference .. doxygendefine:: kOfxImageEffectPropCudaStreamSupported +.. doxygendefine:: kOfxImageEffectPropDisplayColourspace + .. doxygendefine:: kOfxImageEffectPropFieldToRender .. doxygendefine:: kOfxImageEffectPropFrameRange @@ -71,6 +93,12 @@ Properties Reference .. doxygendefine:: kOfxImageEffectPropMetalRenderSupported +.. doxygendefine:: kOfxImageEffectPropOCIOConfig + +.. doxygendefine:: kOfxImageEffectPropOCIODisplay + +.. doxygendefine:: kOfxImageEffectPropOCIOView + .. doxygendefine:: kOfxImageEffectPropOpenCLCommandQueue .. doxygendefine:: kOfxImageEffectPropOpenCLEnabled diff --git a/Documentation/sources/Reference/ofxRendering.rst b/Documentation/sources/Reference/ofxRendering.rst index f33d1d30d..44dc6454d 100644 --- a/Documentation/sources/Reference/ofxRendering.rst +++ b/Documentation/sources/Reference/ofxRendering.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 Rendering ========= diff --git a/Documentation/sources/Reference/ofxStatusCodes.rst b/Documentation/sources/Reference/ofxStatusCodes.rst index 9a5b71077..cb966d27d 100644 --- a/Documentation/sources/Reference/ofxStatusCodes.rst +++ b/Documentation/sources/Reference/ofxStatusCodes.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _statusCodes: Status Codes diff --git a/Documentation/sources/Reference/ofxStructure.rst b/Documentation/sources/Reference/ofxStructure.rst index 6f456bddb..7c358be8e 100644 --- a/Documentation/sources/Reference/ofxStructure.rst +++ b/Documentation/sources/Reference/ofxStructure.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 Structure of The OFX and the Image Effect API ============================================= diff --git a/Documentation/sources/Reference/ofxThreadSafety.rst b/Documentation/sources/Reference/ofxThreadSafety.rst index 8eb21a7a2..788073a2d 100644 --- a/Documentation/sources/Reference/ofxThreadSafety.rst +++ b/Documentation/sources/Reference/ofxThreadSafety.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _threadRecursionSafety: Thread and Recursion Safety =========================== diff --git a/Documentation/sources/Reference/suites/ofxDrawSuiteReference.rst b/Documentation/sources/Reference/suites/ofxDrawSuiteReference.rst index 34414d7f4..e2a9937f5 100644 --- a/Documentation/sources/Reference/suites/ofxDrawSuiteReference.rst +++ b/Documentation/sources/Reference/suites/ofxDrawSuiteReference.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _OfxDrawSuiteV1: OfxDrawSuiteV1: Drawing Overlays ================================ diff --git a/Documentation/sources/Reference/suites/ofxImageEffectSuiteReference.rst b/Documentation/sources/Reference/suites/ofxImageEffectSuiteReference.rst index e16da919d..9d8f846e4 100644 --- a/Documentation/sources/Reference/suites/ofxImageEffectSuiteReference.rst +++ b/Documentation/sources/Reference/suites/ofxImageEffectSuiteReference.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _OfxImageEffectSuiteV1: OfxImageEffectSuiteV1 ===================== diff --git a/Documentation/sources/Reference/suites/ofxInteractSuiteReference.rst b/Documentation/sources/Reference/suites/ofxInteractSuiteReference.rst index 97599802f..0857f8c1a 100644 --- a/Documentation/sources/Reference/suites/ofxInteractSuiteReference.rst +++ b/Documentation/sources/Reference/suites/ofxInteractSuiteReference.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _OfxInteractSuiteV1: OfxInteractSuiteV1 ================== diff --git a/Documentation/sources/Reference/suites/ofxMemorySuiteReference.rst b/Documentation/sources/Reference/suites/ofxMemorySuiteReference.rst index e4b9237e1..67627ff29 100644 --- a/Documentation/sources/Reference/suites/ofxMemorySuiteReference.rst +++ b/Documentation/sources/Reference/suites/ofxMemorySuiteReference.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _OfxMemorySuiteV1: OfxMemorySuiteV1 ================ diff --git a/Documentation/sources/Reference/suites/ofxMessageSuiteV1Reference.rst b/Documentation/sources/Reference/suites/ofxMessageSuiteV1Reference.rst index 9e83b4bb2..140ecc69b 100644 --- a/Documentation/sources/Reference/suites/ofxMessageSuiteV1Reference.rst +++ b/Documentation/sources/Reference/suites/ofxMessageSuiteV1Reference.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _OfxMessageSuiteV1: OfxMessageSuiteV1 ================= diff --git a/Documentation/sources/Reference/suites/ofxMessageSuiteV2Reference.rst b/Documentation/sources/Reference/suites/ofxMessageSuiteV2Reference.rst index 653b89e7f..7780dc1d7 100644 --- a/Documentation/sources/Reference/suites/ofxMessageSuiteV2Reference.rst +++ b/Documentation/sources/Reference/suites/ofxMessageSuiteV2Reference.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _OfxMessageSuiteV2: OfxMessageSuiteV2 ================= diff --git a/Documentation/sources/Reference/suites/ofxOpenGLRenderSuiteReference.rst b/Documentation/sources/Reference/suites/ofxOpenGLRenderSuiteReference.rst index 76cb6912c..93460b8be 100644 --- a/Documentation/sources/Reference/suites/ofxOpenGLRenderSuiteReference.rst +++ b/Documentation/sources/Reference/suites/ofxOpenGLRenderSuiteReference.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _OfxImageEffectOpenGLRenderSuiteV1: OfxImageEffectOpenGLRenderSuiteV1 ================================= diff --git a/Documentation/sources/Reference/suites/ofxParametersSuiteReference.rst b/Documentation/sources/Reference/suites/ofxParametersSuiteReference.rst index 5b10c7882..559975c6f 100644 --- a/Documentation/sources/Reference/suites/ofxParametersSuiteReference.rst +++ b/Documentation/sources/Reference/suites/ofxParametersSuiteReference.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _OfxParameterSuiteV1: OfxParameterSuiteV1 =================== diff --git a/Documentation/sources/Reference/suites/ofxParametricParamReference.rst b/Documentation/sources/Reference/suites/ofxParametricParamReference.rst index 969650f60..9437323cf 100644 --- a/Documentation/sources/Reference/suites/ofxParametricParamReference.rst +++ b/Documentation/sources/Reference/suites/ofxParametricParamReference.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _OfxParametricParameterSuiteV1: OfxParametricParameterSuiteV1 ============================= diff --git a/Documentation/sources/Reference/suites/ofxProgressSuiteReference.rst b/Documentation/sources/Reference/suites/ofxProgressSuiteReference.rst index 9e9893350..d27ff8c32 100644 --- a/Documentation/sources/Reference/suites/ofxProgressSuiteReference.rst +++ b/Documentation/sources/Reference/suites/ofxProgressSuiteReference.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _OfxProgressSuiteV1: OfxProgressSuiteV1 ================== diff --git a/Documentation/sources/Reference/suites/ofxPropertySuiteReference.rst b/Documentation/sources/Reference/suites/ofxPropertySuiteReference.rst index 922a82b56..6844d6740 100644 --- a/Documentation/sources/Reference/suites/ofxPropertySuiteReference.rst +++ b/Documentation/sources/Reference/suites/ofxPropertySuiteReference.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _OfxPropertySuiteV1: OfxPropertySuiteV1 ================== diff --git a/Documentation/sources/Reference/suites/ofxSuiteReference.rst b/Documentation/sources/Reference/suites/ofxSuiteReference.rst index c050f9885..55e4b3f0c 100644 --- a/Documentation/sources/Reference/suites/ofxSuiteReference.rst +++ b/Documentation/sources/Reference/suites/ofxSuiteReference.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _suitesReference: OpenFX suites reference diff --git a/Documentation/sources/Reference/suites/ofxThreadingSuiteReference.rst b/Documentation/sources/Reference/suites/ofxThreadingSuiteReference.rst index a2a5742fa..ed386a3d2 100644 --- a/Documentation/sources/Reference/suites/ofxThreadingSuiteReference.rst +++ b/Documentation/sources/Reference/suites/ofxThreadingSuiteReference.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _OfxMultiThreadSuiteV1: OfxMultiThreadSuiteV1 ===================== diff --git a/Documentation/sources/Reference/suites/ofxTimeLineSuiteReference.rst b/Documentation/sources/Reference/suites/ofxTimeLineSuiteReference.rst index 485a49fdc..b3da9804c 100644 --- a/Documentation/sources/Reference/suites/ofxTimeLineSuiteReference.rst +++ b/Documentation/sources/Reference/suites/ofxTimeLineSuiteReference.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. _OfxTimeLineSuiteV1: OfxTimeLineSuiteV1 ================== diff --git a/Documentation/sources/ReleaseNotes/index.rst b/Documentation/sources/ReleaseNotes/index.rst index 1bcbe79fa..59a083cee 100644 --- a/Documentation/sources/ReleaseNotes/index.rst +++ b/Documentation/sources/ReleaseNotes/index.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 OpenFX Release Notes ==================== diff --git a/Documentation/sources/ReleaseNotes/relnotes-1.4.rst b/Documentation/sources/ReleaseNotes/relnotes-1.4.rst index 0b24a9b1e..3629ae496 100644 --- a/Documentation/sources/ReleaseNotes/relnotes-1.4.rst +++ b/Documentation/sources/ReleaseNotes/relnotes-1.4.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 OpenFX Release Notes for V1.4 ============================= @@ -43,5 +44,5 @@ Removals - :c:macro:`kOfxInteractPropViewportSize` - :c:macro:`kOfxParamPropPluginMayWrite` - :c:macro:`kOfxImageEffectPropInAnalysis` -- :c:macro:`kOfxParamDoubleTypeNormalised*` - removed in favor of :c:macro:`kOfxParamDoubleType*` +- :c:macro:`kOfxParamDoubleTypeNormalised` - removed in favor of :c:macro:`kOfxParamDoubleType` diff --git a/Documentation/sources/ReleaseNotes/relnotes-1.5.rst b/Documentation/sources/ReleaseNotes/relnotes-1.5.rst index c67723779..d1073cfd1 100644 --- a/Documentation/sources/ReleaseNotes/relnotes-1.5.rst +++ b/Documentation/sources/ReleaseNotes/relnotes-1.5.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 OpenFX Release Notes for V1.5 ============================= diff --git a/Documentation/sources/conf.py b/Documentation/sources/conf.py index 35bd06d8d..d37a40048 100755 --- a/Documentation/sources/conf.py +++ b/Documentation/sources/conf.py @@ -7,6 +7,8 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information +# SPDX-License-Identifier: BSD-3-Clause + import subprocess, os, shutil project = 'OpenFX' copyright = '2024, Contributors to the OpenFX Project' diff --git a/Documentation/sources/index.rst b/Documentation/sources/index.rst index 25a16286f..0d991c633 100644 --- a/Documentation/sources/index.rst +++ b/Documentation/sources/index.rst @@ -1,3 +1,4 @@ +.. SPDX-License-Identifier: CC-BY-4.0 .. OpenFX documentation master file, created by sphinx-quickstart on Tue Mar 29 18:02:16 2016. You can adapt this file completely to your liking, but it should at least @@ -15,15 +16,11 @@ The OpenFX documentation is organized as follows: - The :doc:`release notes` contains release notes, documenting changes in recent OpenFX releases. This documentation is also -`available online `__ -and can be downloaded as a -`PDF `_ or -`HTML zip `__ -file. +`available online `__. This manual is maintained largely by volunteers. -The `Creative Commons Attribution-ShareAlike 4.0 International License (CC-BY-SA 4.0) `_ is used for this manual, which is a free and open license. Though there are certain restrictions that come with this license you may in general freely reproduce it and even make changes to it. However, rather than distribute your own version of this manual, we would much prefer if you would send any corrections or changes to the OpenFX association. +The `Creative Commons Attribution 4.0 International License (CC-BY 4.0) `_ is used for this manual, which is a free and open license. Though there are certain restrictions that come with this license you may in general freely reproduce it and even make changes to it. However, rather than distribute your own version of this manual, we would much prefer if you would send any corrections or changes to the OpenFX maintainers. .. toctree:: :maxdepth: 1 diff --git a/HostSupport/README b/HostSupport/README index 4df057211..83d00609f 100644 --- a/HostSupport/README +++ b/HostSupport/README @@ -64,3 +64,6 @@ Major overhaul of the thing, - a factory, - a filter for constructed objects, - a description of the host application to the plugin. + +# SPDX-License-Identifier: BSD-3-Clause + diff --git a/cmake/OpenFX.cmake b/cmake/OpenFX.cmake index df4b09ab4..ce85dcd62 100644 --- a/cmake/OpenFX.cmake +++ b/cmake/OpenFX.cmake @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: BSD-3-Clause + if(NOT PLUGIN_INSTALLDIR) if(APPLE) set(PLUGIN_INSTALLDIR "/Library/OFX/Plugins/OpenFX Examples") diff --git a/include/ofx-native-v1.5_aces-v1.3_ocio-v2.3.h b/include/ofx-native-v1.5_aces-v1.3_ocio-v2.3.h index c4cb01d60..0d13520c3 100644 --- a/include/ofx-native-v1.5_aces-v1.3_ocio-v2.3.h +++ b/include/ofx-native-v1.5_aces-v1.3_ocio-v2.3.h @@ -8,7 +8,7 @@ extern "C" { #endif -/** @file ofxColourspaceList.h +/** @file ofx-native-v1.5_aces-v1.3_ocio-v2.3.h Contains the list of supported colourspaces. This file was auto-generated by scripts/genColour from ofx-native-v1.5_aces-v1.3_ocio-v2.3. */ diff --git a/install.md b/install.md index 594d8a00a..0003c7a01 100644 --- a/install.md +++ b/install.md @@ -1,3 +1,5 @@ + + # Building OpenFX: Libs and Plugins OpenFX itself is only a set of C header files, the ones in @@ -81,3 +83,6 @@ _Linux dependencies you may need (but conan should provide these):_ ```sh sudo apt install pkg-config libgl-dev ``` + + + diff --git a/readme.md b/readme.md index e6775cd87..ae68a9906 100644 --- a/readme.md +++ b/readme.md @@ -1,3 +1,4 @@ + ![Build](https://github.com/AcademySoftwareFoundation/openfx/actions/workflows/build.yml/badge.svg) # OpenFX image processing plug-in standard diff --git a/scripts/build-cmake.sh b/scripts/build-cmake.sh index 2ac1f58b8..f7b39f51f 100755 --- a/scripts/build-cmake.sh +++ b/scripts/build-cmake.sh @@ -3,6 +3,7 @@ set -e # Build everything with Conan and CMake +# SPDX-License-Identifier: BSD-3-Clause BUILDTYPE=Release # "Release" or "Debug" VERBOSE="" From 24589b2fd5befb8ff2901b83cabc057feea23f6d Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 10 Sep 2024 12:12:36 -0400 Subject: [PATCH 02/10] Update GOVERNANCE.md: replace TSC member Signed-off-by: Gary Oberbrunner --- GOVERNANCE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 89c1a1532..1efc1bc69 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -117,7 +117,7 @@ delegate this responsibility as needed. * John-Paul Smith - Boris FX * Dennis Adams - Sony Creative Software Inc. * Phil Barrett - FilmLight -* Peter Huisma - Assimilate BV +* Guido Veldkamp - Assimilate BV * John Mertic - The Linux Foundation ### TSC Nomination and Succession From f65e9738539c77ecc444577e10aaac89f26487dc Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Wed, 25 Sep 2024 15:47:08 -0400 Subject: [PATCH 03/10] Add release-signing github workflow Signed-off-by: Gary Oberbrunner --- .github/workflows/release-sign.yml | 68 ++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/release-sign.yml diff --git a/.github/workflows/release-sign.yml b/.github/workflows/release-sign.yml new file mode 100644 index 000000000..db0a00ed3 --- /dev/null +++ b/.github/workflows/release-sign.yml @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright (c) Contributors to the OpenFX Project. + +# +# Releases are signed via https://github.com/sigstore/sigstore-python. +# See https://docs.sigstore.dev for information about sigstore. +# +# This action creates a .tar.gz of the complete OpenFX source tree at +# the given release tag, signs it via sigstore, and uploads the +# .tar.gz and the associated .tar.gz.sigstore credential bundle. +# +# To verify a downloaded release at a given tag: +# +# % pip install sigstore +# % sigstore verify github --cert-identity https://github.com/AcademySoftwareFoundation/openfx/.github/workflows/release-sign.yml@refs/tags/ openfx-.tar.gz +# + +name: Sign Release + +on: + release: + types: [published] + workflow_dispatch: + +permissions: + contents: read + +jobs: + release: + name: Sign & upload release artifacts + runs-on: ubuntu-latest + + env: + TAG: ${{ github.ref_name }} + permissions: + contents: write + id-token: write + repository-projects: write + + steps: + + - name: Set Prefix + # The tag name begins with a 'v', e.g. "v3.2.4", but the prefix + # should omit the 'v', so the tarball "openfx-3.2.4.tar.gz" + # extracts files into "openfx-v3.2.4/...". This matches + # the GitHub release page autogenerated artifact conventions. + run: | + echo OPENFX_PREFIX=openfx-${TAG//OFX_Release_}/ >> $GITHUB_ENV + echo OPENFX_TARBALL=openfx-${TAG//OFX_Release_}.tar.gz >> $GITHUB_ENV + shell: bash + + - name: Checkout + uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 + + - name: Create archive + run: git archive --format=tar.gz -o ${OPENFX_TARBALL} --prefix ${OPENFX_PREFIX} ${TAG} + + - name: Sign archive with Sigstore + uses: sigstore/gh-action-sigstore-python@f514d46b907ebcd5bedc05145c03b69c1edd8b46 # v3.0.0 + with: + inputs: ${{ env.OPENFX_TARBALL }} + upload-signing-artifacts: false + release-signing-artifacts: false + + - name: Upload release archive + env: + GH_TOKEN: ${{ github.token }} + run: gh release upload ${TAG} ${OPENFX_TARBALL} ${OPENFX_TARBALL}.sigstore.json From 475f32ad3f912cfd21e9ba87d9f11dfc838228de Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Wed, 25 Sep 2024 16:53:29 -0400 Subject: [PATCH 04/10] Test release-signing workflow Signed-off-by: Gary Oberbrunner --- .github/workflows/release-sign.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-sign.yml b/.github/workflows/release-sign.yml index db0a00ed3..6e11b65ff 100644 --- a/.github/workflows/release-sign.yml +++ b/.github/workflows/release-sign.yml @@ -31,7 +31,7 @@ jobs: runs-on: ubuntu-latest env: - TAG: ${{ github.ref_name }} + TAG: ${{ github.ref_name == 'main' && '1.5' || github.ref_name }} permissions: contents: write id-token: write From 76ed0159c29d5458e2f87f7827f41f8937bc49cd Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Wed, 25 Sep 2024 16:57:08 -0400 Subject: [PATCH 05/10] More CI testing Signed-off-by: Gary Oberbrunner --- .github/workflows/release-sign.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-sign.yml b/.github/workflows/release-sign.yml index 6e11b65ff..37eb38a88 100644 --- a/.github/workflows/release-sign.yml +++ b/.github/workflows/release-sign.yml @@ -31,7 +31,7 @@ jobs: runs-on: ubuntu-latest env: - TAG: ${{ github.ref_name == 'main' && '1.5' || github.ref_name }} + TAG: ${{ github.ref_name == 'main' && 'OFX_Release_1.5' || github.ref_name }} permissions: contents: write id-token: write From 3a1eb527ca76dc480db65b0a50bb294b3a82375d Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Wed, 25 Sep 2024 17:01:02 -0400 Subject: [PATCH 06/10] More CI testing Signed-off-by: Gary Oberbrunner --- .github/workflows/release-sign.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release-sign.yml b/.github/workflows/release-sign.yml index 37eb38a88..b40bcb10d 100644 --- a/.github/workflows/release-sign.yml +++ b/.github/workflows/release-sign.yml @@ -51,6 +51,8 @@ jobs: - name: Checkout uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 + fetch-depth: 10 # use this if tag is older than current head + fetch-tags: true - name: Create archive run: git archive --format=tar.gz -o ${OPENFX_TARBALL} --prefix ${OPENFX_PREFIX} ${TAG} From 78b1884867bb6caefd26649d23cad6709a71eae6 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Wed, 25 Sep 2024 17:03:04 -0400 Subject: [PATCH 07/10] More CI testing Signed-off-by: Gary Oberbrunner --- .github/workflows/release-sign.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-sign.yml b/.github/workflows/release-sign.yml index b40bcb10d..08e248ed4 100644 --- a/.github/workflows/release-sign.yml +++ b/.github/workflows/release-sign.yml @@ -50,7 +50,7 @@ jobs: shell: bash - name: Checkout - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 + uses: actions/checkout@v4.2.0 fetch-depth: 10 # use this if tag is older than current head fetch-tags: true From 33ff9a19691823ed5bcabe5a12f336e440d0bda2 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Wed, 25 Sep 2024 17:04:22 -0400 Subject: [PATCH 08/10] More CI testing Signed-off-by: Gary Oberbrunner --- .github/workflows/release-sign.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-sign.yml b/.github/workflows/release-sign.yml index 08e248ed4..f4ad8fe17 100644 --- a/.github/workflows/release-sign.yml +++ b/.github/workflows/release-sign.yml @@ -51,8 +51,9 @@ jobs: - name: Checkout uses: actions/checkout@v4.2.0 - fetch-depth: 10 # use this if tag is older than current head - fetch-tags: true + with: + fetch-depth: 10 # use this if tag is older than current head + fetch-tags: true - name: Create archive run: git archive --format=tar.gz -o ${OPENFX_TARBALL} --prefix ${OPENFX_PREFIX} ${TAG} From 973144b8e0fa314c7d2a01c2e3ad549da841f6d2 Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Fri, 6 Sep 2024 11:08:33 +0100 Subject: [PATCH 09/10] Rename colour management style defs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The colour management style definitions contained the string ‘Prop’ which was incorrect because they aren’t properties. This complicated the introspection project so has been corrected. #168 Signed-off-by: John-Paul Smith --- Examples/ColourSpace/colourspace.cpp | 8 ++++---- include/ofxColour.h | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Examples/ColourSpace/colourspace.cpp b/Examples/ColourSpace/colourspace.cpp index 57354e487..7639b88ed 100644 --- a/Examples/ColourSpace/colourspace.cpp +++ b/Examples/ColourSpace/colourspace.cpp @@ -402,7 +402,7 @@ getClipPreferences( OfxImageEffectHandle effect, OfxPropertySetHandle /*inArgs // Colour management -- preferred colour spaces, in order (most preferred first) #define PREFER_COLOURSPACES #ifdef PREFER_COLOURSPACES - if (gHostColourManagementStyle != kOfxImageEffectPropColourManagementNone) { + if (gHostColourManagementStyle != kOfxImageEffectColourManagementNone) { spdlog::info("Specifying preferred colourspaces since host style={}", gHostColourManagementStyle); if(!preferredInputSpace.empty()) { const char* colourSpaces[] = { @@ -647,7 +647,7 @@ describe(OfxImageEffectHandle effect) spdlog::info("describe: host says its colour management style is '{}'", gHostColourManagementStyle); } else { spdlog::info("describe: host does not support colour management (err={})", errMsg(stat)); - gHostColourManagementStyle = kOfxImageEffectPropColourManagementNone; + gHostColourManagementStyle = kOfxImageEffectColourManagementNone; } // get the property handle for the plugin @@ -674,13 +674,13 @@ describe(OfxImageEffectHandle effect) gPropHost->propSetString(effectProps, kOfxImageEffectPropSupportedContexts, 0, kOfxImageEffectContextFilter); gPropHost->propSetString(effectProps, kOfxImageEffectPropSupportedContexts, 1, kOfxImageEffectContextGeneral); - if (gHostColourManagementStyle != kOfxImageEffectPropColourManagementNone) { + if (gHostColourManagementStyle != kOfxImageEffectColourManagementNone) { // host supports colour management, either OCIO or Core (or others; see the spec). // OCIO implies core, so here we can assume it supports Core. // Tell it we support Core. stat = gPropHost->propSetString(effectProps, kOfxImageEffectPropColourManagementStyle, 0, - kOfxImageEffectPropColourManagementCore); + kOfxImageEffectColourManagementCore); if (stat != kOfxStatOK) { spdlog::error("setting kOfxImageEffectPropColourManagementStyle prop: stat={}", errMsg(stat)); } diff --git a/include/ofxColour.h b/include/ofxColour.h index 9296ad704..7275b133f 100644 --- a/include/ofxColour.h +++ b/include/ofxColour.h @@ -24,13 +24,13 @@ extern "C" { - Type - string X 1 - Property Set - host descriptor (read only), plugin descriptor (read/write), image effect instance (read only) - - Default - kOfxImageEffectPropColourManagementStyleNone + - Default - kOfxImageEffectColourManagementStyleNone - Valid Values - This must be one of - - ::kOfxImageEffectPropColourManagementNone - no colour management - - ::kOfxImageEffectPropColourManagementBasic - only basic colourspaces from the config header may be used - - ::kOfxImageEffectPropColourManagementCore - only core colourspaces from the config header may be used - - ::kOfxImageEffectPropColourManagementFull - any colourspace from the config header may be used - - ::kOfxImageEffectPropColourManagementOCIO - any OCIO config may be used (implies use of the OCIO library) + - ::kOfxImageEffectColourManagementNone - no colour management + - ::kOfxImageEffectColourManagementBasic - only basic colourspaces from the config header may be used + - ::kOfxImageEffectColourManagementCore - only core colourspaces from the config header may be used + - ::kOfxImageEffectColourManagementFull - any colourspace from the config header may be used + - ::kOfxImageEffectColourManagementOCIO - any OCIO config may be used (implies use of the OCIO library) Hosts should set this property if they will provide colourspace information to plug-ins. @@ -58,15 +58,15 @@ effect instance. #define kOfxImageEffectPropColourManagementStyle "OfxImageEffectPropColourManagementStyle" /* String used to indicate that no colour management is available. */ -#define kOfxImageEffectPropColourManagementNone "OfxImageEffectPropColourManagementNone" +#define kOfxImageEffectColourManagementNone "OfxImageEffectColourManagementNone" /* String used to indicate that basic colour management is available. */ -#define kOfxImageEffectPropColourManagementBasic "OfxImageEffectPropColourManagementBasic" +#define kOfxImageEffectColourManagementBasic "OfxImageEffectColourManagementBasic" /* String used to indicate that core colour management is available. */ -#define kOfxImageEffectPropColourManagementCore "OfxImageEffectPropColourManagementCore" +#define kOfxImageEffectColourManagementCore "OfxImageEffectColourManagementCore" /* String used to indicate that Full colour management is available. */ -#define kOfxImageEffectPropColourManagementFull "OfxImageEffectPropColourManagementFull" +#define kOfxImageEffectColourManagementFull "OfxImageEffectColourManagementFull" /* String used to indicate that OCIO colour management is available. */ -#define kOfxImageEffectPropColourManagementOCIO "OfxImageEffectPropColourManagementOCIO" +#define kOfxImageEffectColourManagementOCIO "OfxImageEffectColourManagementOCIO" /** @brief What native mode configs are supported? @@ -102,7 +102,7 @@ set this even in OCIO mode, to define the basic colourspaces. - Valid Values - Filesystem path to the config or URI starting ocio:// A host must set this property on any effect instances where it has negotiated -OCIO colour management (kOfxImageEffectPropColourManagementOCIO). +OCIO colour management (kOfxImageEffectColourManagementOCIO). Use of URIs for built-in configs, such as ocio://default is permitted. */ #define kOfxImageEffectPropOCIOConfig "OfxImageEffectPropOCIOConfig" From a8f10e16ff03978084c2a7d92bb012b5ad27359c Mon Sep 17 00:00:00 2001 From: "Guido (Assimilate)" <121864985+Guido-assim@users.noreply.github.com> Date: Mon, 23 Sep 2024 14:08:33 +0200 Subject: [PATCH 10/10] Update colourspace.cpp Do not set kOfxImageClipPropPreferredColourspaces for the output clip. Handle kOfxImageEffectActionGetOutputColourspace to set the output colourspace. Signed-off-by: Guido Veldkamp --- Examples/ColourSpace/colourspace.cpp | 80 ++++++++++++++++++++-------- 1 file changed, 58 insertions(+), 22 deletions(-) diff --git a/Examples/ColourSpace/colourspace.cpp b/Examples/ColourSpace/colourspace.cpp index 7639b88ed..61ec49e52 100644 --- a/Examples/ColourSpace/colourspace.cpp +++ b/Examples/ColourSpace/colourspace.cpp @@ -358,11 +358,8 @@ getClipPreferences( OfxImageEffectHandle effect, OfxPropertySetHandle /*inArgs const char *componentStr = isRGBA ? kOfxImageComponentRGBA : kOfxImageComponentAlpha; std::string preferredInputSpace; - std::string preferredOutputSpace; int preferredInputSpaceIndex; - int preferredOutputSpaceIndex; gParamHost->paramGetValue(myData->inputSpaceParam, &preferredInputSpaceIndex); - gParamHost->paramGetValue(myData->outputSpaceParam, &preferredOutputSpaceIndex); switch (preferredInputSpaceIndex) { case 0: @@ -379,21 +376,6 @@ getClipPreferences( OfxImageEffectHandle effect, OfxPropertySetHandle /*inArgs break; } - switch (preferredOutputSpaceIndex) { - case 0: - preferredOutputSpace = kOfxColourspaceACEScg; - break; - case 1: - preferredOutputSpace = kOfxColourspaceLinRec2020; - break; - case 2: - preferredOutputSpace = kOfxColourspaceSrgbTx; - break; - case 3: - preferredOutputSpace = kOfxColourspaceACEScct; - break; - } - // set our output to be the same same as the input, component and bitdepth gPropHost->propSetString(outArgs, "OfxImageClipPropComponents_Output", 0, componentStr); if(gHostSupportsMultipleBitDepths) @@ -415,10 +397,6 @@ getClipPreferences( OfxImageEffectHandle effect, OfxPropertySetHandle /*inArgs i, colourSpaces[i]); } } - - if (!preferredOutputSpace.empty()) - gPropHost->propSetString(outArgs, kOfxImageClipPropPreferredColourspaces "_Output", 0, preferredOutputSpace.c_str()); - } else { spdlog::info("Host does not support colour management (this example won't be very interesting)"); } @@ -427,6 +405,60 @@ getClipPreferences( OfxImageEffectHandle effect, OfxPropertySetHandle /*inArgs return kOfxStatOK; } +static void setClipColourspace(const OfxImageClipHandle clip, const std::string &colourspace) { + OfxPropertySetHandle clipProps; + gEffectHost->clipGetPropertySet(clip, &clipProps); + gPropHost->propSetString(clipProps, kOfxImageClipPropColourspace, 0, colourspace.c_str()); +} + +static OfxStatus +getOutputColourspace( OfxImageEffectHandle effect, OfxPropertySetHandle /*inArgs*/, OfxPropertySetHandle outArgs) +{ + // retrieve any instance data associated with this effect + MyInstanceData *myData = getMyInstanceData(effect); + + OfxStatus status = kOfxStatReplyDefault; + + if (gHostColourManagementStyle != kOfxImageEffectPropColourManagementNone) { + + // We could check kOfxImageClipPropPreferredColourspaces from inArgs here + + // Get the colourspace from the parameter + std::string preferredOutputSpace; + int preferredOutputSpaceIndex; + gParamHost->paramGetValue(myData->outputSpaceParam, &preferredOutputSpaceIndex); + + switch (preferredOutputSpaceIndex) { + case 0: + preferredOutputSpace = kOfxColourspaceACEScg; + break; + case 1: + preferredOutputSpace = kOfxColourspaceLinRec2020; + break; + case 2: + preferredOutputSpace = kOfxColourspaceSrgbTx; + break; + case 3: + preferredOutputSpace = kOfxColourspaceACEScct; + break; + } + + if (!preferredOutputSpace.empty()) { + spdlog::info("Specifying output colourspaces since ={}", preferredOutputSpace); + // Set the selected colourspace in outArgs + gPropHost->propSetString(outArgs, kOfxImageClipPropColourspace, 0, preferredOutputSpace.c_str()); + // Set the selected colourspace in the clip properties to have it available in the render action + setClipColourspace(myData->outputClip, preferredOutputSpace); + status = kOfxStatOK; + } + } else { + spdlog::info("Host does not support colour management (this example won't be very interesting)"); + status = kOfxStatFailed; + } + + return status; +} + // are the settings of the effect performing an identity operation static OfxStatus isIdentity( OfxImageEffectHandle effect, @@ -744,6 +776,10 @@ pluginMain(const char *action, const void *handle, OfxPropertySetHandle inArgs, else if(strcmp(action, kOfxImageEffectActionGetTimeDomain) == 0) { stat = getTemporalDomain(effect, inArgs, outArgs); } + else if(strcmp(action, kOfxImageEffectActionGetOutputColourspace) == 0) { + stat = getOutputColourspace(effect, inArgs, outArgs); + } + } catch (const std::bad_alloc&) { // catch memory spdlog::error("Caught OFX Plugin Memory error");