diff --git a/meshroom/core/utils.py b/meshroom/core/utils.py new file mode 100644 index 0000000000..edd1c25789 --- /dev/null +++ b/meshroom/core/utils.py @@ -0,0 +1,5 @@ +COLORSPACES = ["AUTO", "sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "Linear ARRI Wide Gamut 3", + "ARRI LogC3 (EI800)", "Linear ARRI Wide Gamut 4", "ARRI LogC4", "Linear BMD WideGamut Gen5", + "BMDFilm WideGamut Gen5", "CanonLog2 CinemaGamut D55", "CanonLog3 CinemaGamut D55", + "Linear CinemaGamut D55", "Linear V-Gamut", "V-Log V-Gamut", "Linear REDWideGamutRGB", + "Log3G10 REDWideGamutRGB", "Linear Venice S-Gamut3.Cine", "S-Log3 Venice S-Gamut3.Cine", "no_conversion"] diff --git a/meshroom/nodes/aliceVision/FeatureExtraction.py b/meshroom/nodes/aliceVision/FeatureExtraction.py index 16f87081f6..2dc1326031 100644 --- a/meshroom/nodes/aliceVision/FeatureExtraction.py +++ b/meshroom/nodes/aliceVision/FeatureExtraction.py @@ -1,6 +1,7 @@ __version__ = "1.3" from meshroom.core import desc +from meshroom.core.utils import COLORSPACES class FeatureExtraction(desc.AVCommandLineNode): @@ -140,8 +141,8 @@ class FeatureExtraction(desc.AVCommandLineNode): name="workingColorSpace", label="Working Color Space", description="Allows you to choose the color space in which the data are processed.", + values=COLORSPACES, value="sRGB", - values=["sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], ), diff --git a/meshroom/nodes/aliceVision/ImageProcessing.py b/meshroom/nodes/aliceVision/ImageProcessing.py index 9d795176c5..8c22e39fa6 100644 --- a/meshroom/nodes/aliceVision/ImageProcessing.py +++ b/meshroom/nodes/aliceVision/ImageProcessing.py @@ -1,6 +1,7 @@ __version__ = "3.3" from meshroom.core import desc +from meshroom.core.utils import COLORSPACES import os.path @@ -497,8 +498,8 @@ class ImageProcessing(desc.AVCommandLineNode): name="inputColorSpace", label="Input Color Space", description="Allows you to force the color space of the input image.", + values=COLORSPACES, value="AUTO", - values=["AUTO", "sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], ), @@ -506,8 +507,8 @@ class ImageProcessing(desc.AVCommandLineNode): name="outputColorSpace", label="Output Color Space", description="Allows you to choose the color space of the output image.", + values=COLORSPACES, value="AUTO", - values=["AUTO", "sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], ), @@ -515,8 +516,8 @@ class ImageProcessing(desc.AVCommandLineNode): name="workingColorSpace", label="Working Color Space", description="Allows you to choose the color space in which the data are processed.", + values=COLORSPACES, value="Linear", - values=["sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], enabled=lambda node: not node.applyDcpMetadata.value, diff --git a/meshroom/nodes/aliceVision/LdrToHdrCalibration.py b/meshroom/nodes/aliceVision/LdrToHdrCalibration.py index 2c070a2793..a467b16737 100644 --- a/meshroom/nodes/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/nodes/aliceVision/LdrToHdrCalibration.py @@ -6,6 +6,7 @@ from collections import Counter from meshroom.core import desc +from meshroom.core.utils import COLORSPACES def findMetadata(d, keys, defaultValue): v = None @@ -126,8 +127,8 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): label="Working Color Space", description="Color space in which the data are processed.\n" "If 'auto' is selected, the working color space will be 'Linear' if RAW images are detected; otherwise, it will be set to 'sRGB'.", - value="auto", - values=["auto", "sRGB", "Linear", "ACES2065-1", "ACEScg"], + values=COLORSPACES, + value="AUTO", exclusive=True, uid=[], group="user", # not used directly on the command line diff --git a/meshroom/nodes/aliceVision/LdrToHdrMerge.py b/meshroom/nodes/aliceVision/LdrToHdrMerge.py index 3e5ca2c19f..564484606d 100644 --- a/meshroom/nodes/aliceVision/LdrToHdrMerge.py +++ b/meshroom/nodes/aliceVision/LdrToHdrMerge.py @@ -6,6 +6,7 @@ from collections import Counter from meshroom.core import desc +from meshroom.core.utils import COLORSPACES def findMetadata(d, keys, defaultValue): v = None @@ -169,8 +170,8 @@ class LdrToHdrMerge(desc.AVCommandLineNode): label="Working Color Space", description="Color space in which the data are processed.\n" "If 'auto' is selected, the working color space will be 'Linear' if RAW images are detected; otherwise, it will be set to 'sRGB'.", - value="auto", - values=["auto", "sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], + values=COLORSPACES, + value="AUTO", exclusive=True, uid=[0], enabled=lambda node: node.byPass.enabled and not node.byPass.value, diff --git a/meshroom/nodes/aliceVision/LdrToHdrSampling.py b/meshroom/nodes/aliceVision/LdrToHdrSampling.py index 2ce8fa1567..9ab5c1f968 100644 --- a/meshroom/nodes/aliceVision/LdrToHdrSampling.py +++ b/meshroom/nodes/aliceVision/LdrToHdrSampling.py @@ -6,6 +6,7 @@ from collections import Counter from meshroom.core import desc +from meshroom.core.utils import COLORSPACES def findMetadata(d, keys, defaultValue): @@ -126,8 +127,8 @@ class LdrToHdrSampling(desc.AVCommandLineNode): label="Working Color Space", description="Color space in which the data are processed.\n" "If 'auto' is selected, the working color space will be 'Linear' if RAW images are detected; otherwise, it will be set to 'sRGB'.", - value="auto", - values=["auto", "sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], + values=COLORSPACES, + value="AUTO", exclusive=True, uid=[0], enabled=lambda node: node.byPass.enabled and not node.byPass.value, diff --git a/meshroom/nodes/aliceVision/PanoramaPostProcessing.py b/meshroom/nodes/aliceVision/PanoramaPostProcessing.py index 909eb96bd1..81a975aa78 100644 --- a/meshroom/nodes/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/nodes/aliceVision/PanoramaPostProcessing.py @@ -4,6 +4,7 @@ import os from meshroom.core import desc +from meshroom.core.utils import COLORSPACES class PanoramaPostProcessing(desc.CommandLineNode): @@ -58,8 +59,8 @@ class PanoramaPostProcessing(desc.CommandLineNode): name="outputColorSpace", label="Output Color Space", description="The color space of the output image.", + values=COLORSPACES, value="Linear", - values=["sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg"], exclusive=True, uid=[0], ), diff --git a/meshroom/nodes/aliceVision/PanoramaWarping.py b/meshroom/nodes/aliceVision/PanoramaWarping.py index cc29771d9b..be70ce9f0c 100644 --- a/meshroom/nodes/aliceVision/PanoramaWarping.py +++ b/meshroom/nodes/aliceVision/PanoramaWarping.py @@ -4,6 +4,7 @@ import os from meshroom.core import desc +from meshroom.core.utils import COLORSPACES class PanoramaWarping(desc.AVCommandLineNode): @@ -69,8 +70,8 @@ class PanoramaWarping(desc.AVCommandLineNode): name="workingColorSpace", label="Working Color Space", description="Colorspace in which the panorama warping will be performed.", + values=COLORSPACES, value="Linear", - values=["Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], ), diff --git a/meshroom/nodes/aliceVision/Texturing.py b/meshroom/nodes/aliceVision/Texturing.py index df5aa1234b..ed0b491b6f 100644 --- a/meshroom/nodes/aliceVision/Texturing.py +++ b/meshroom/nodes/aliceVision/Texturing.py @@ -1,6 +1,7 @@ __version__ = "6.0" from meshroom.core import desc, Version +from meshroom.core.utils import COLORSPACES import logging @@ -259,8 +260,8 @@ class Texturing(desc.AVCommandLineNode): name="workingColorSpace", label="Working Color Space", description="Color space for the texturing internal computation (does not impact the output file color space).", + values=COLORSPACES, value="sRGB", - values=("sRGB", "Linear", "ACES2065-1", "ACEScg"), exclusive=True, uid=[0], advanced=True, @@ -269,8 +270,8 @@ class Texturing(desc.AVCommandLineNode): name="outputColorSpace", label="Output Color Space", description="Color space for the output texture files.", + values=COLORSPACES, value="AUTO", - values=("sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "AUTO"), exclusive=True, uid=[0], ),