[nodes] Replace the list of colorspaces with the utilitary constant

This commit is contained in:
Fabien Castan 2024-02-01 18:18:55 +01:00
parent a7fc167512
commit 092dcfe722
9 changed files with 27 additions and 14 deletions

5
meshroom/core/utils.py Normal file
View file

@ -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"]

View file

@ -1,6 +1,7 @@
__version__ = "1.3" __version__ = "1.3"
from meshroom.core import desc from meshroom.core import desc
from meshroom.core.utils import COLORSPACES
class FeatureExtraction(desc.AVCommandLineNode): class FeatureExtraction(desc.AVCommandLineNode):
@ -140,8 +141,8 @@ It is robust to motion-blur, depth-of-field, occlusion. Be careful to have enoug
name="workingColorSpace", name="workingColorSpace",
label="Working Color Space", label="Working Color Space",
description="Allows you to choose the color space in which the data are processed.", description="Allows you to choose the color space in which the data are processed.",
values=COLORSPACES,
value="sRGB", value="sRGB",
values=["sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),

View file

@ -1,6 +1,7 @@
__version__ = "3.3" __version__ = "3.3"
from meshroom.core import desc from meshroom.core import desc
from meshroom.core.utils import COLORSPACES
import os.path import os.path
@ -497,8 +498,8 @@ Convert or apply filtering to the input images.
name="inputColorSpace", name="inputColorSpace",
label="Input Color Space", label="Input Color Space",
description="Allows you to force the color space of the input image.", description="Allows you to force the color space of the input image.",
values=COLORSPACES,
value="AUTO", value="AUTO",
values=["AUTO", "sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "no_conversion"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
@ -506,8 +507,8 @@ Convert or apply filtering to the input images.
name="outputColorSpace", name="outputColorSpace",
label="Output Color Space", label="Output Color Space",
description="Allows you to choose the color space of the output image.", description="Allows you to choose the color space of the output image.",
values=COLORSPACES,
value="AUTO", value="AUTO",
values=["AUTO", "sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "no_conversion"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
@ -515,8 +516,8 @@ Convert or apply filtering to the input images.
name="workingColorSpace", name="workingColorSpace",
label="Working Color Space", label="Working Color Space",
description="Allows you to choose the color space in which the data are processed.", description="Allows you to choose the color space in which the data are processed.",
values=COLORSPACES,
value="Linear", value="Linear",
values=["sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "no_conversion"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
enabled=lambda node: not node.applyDcpMetadata.value, enabled=lambda node: not node.applyDcpMetadata.value,

View file

@ -6,6 +6,7 @@ import os
from collections import Counter from collections import Counter
from meshroom.core import desc from meshroom.core import desc
from meshroom.core.utils import COLORSPACES
def findMetadata(d, keys, defaultValue): def findMetadata(d, keys, defaultValue):
v = None v = None
@ -126,8 +127,8 @@ Calibrate LDR to HDR response curve from samples.
label="Working Color Space", label="Working Color Space",
description="Color space in which the data are processed.\n" 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'.", "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=COLORSPACES,
values=["auto", "sRGB", "Linear", "ACES2065-1", "ACEScg"], value="AUTO",
exclusive=True, exclusive=True,
uid=[], uid=[],
group="user", # not used directly on the command line group="user", # not used directly on the command line

View file

@ -6,6 +6,7 @@ import math
from collections import Counter from collections import Counter
from meshroom.core import desc from meshroom.core import desc
from meshroom.core.utils import COLORSPACES
def findMetadata(d, keys, defaultValue): def findMetadata(d, keys, defaultValue):
v = None v = None
@ -169,8 +170,8 @@ Merge LDR images into HDR images.
label="Working Color Space", label="Working Color Space",
description="Color space in which the data are processed.\n" 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'.", "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=COLORSPACES,
values=["auto", "sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], value="AUTO",
exclusive=True, exclusive=True,
uid=[0], uid=[0],
enabled=lambda node: node.byPass.enabled and not node.byPass.value, enabled=lambda node: node.byPass.enabled and not node.byPass.value,

View file

@ -6,6 +6,7 @@ import os
from collections import Counter from collections import Counter
from meshroom.core import desc from meshroom.core import desc
from meshroom.core.utils import COLORSPACES
def findMetadata(d, keys, defaultValue): def findMetadata(d, keys, defaultValue):
@ -126,8 +127,8 @@ Sample pixels from Low range images for HDR creation.
label="Working Color Space", label="Working Color Space",
description="Color space in which the data are processed.\n" 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'.", "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=COLORSPACES,
values=["auto", "sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], value="AUTO",
exclusive=True, exclusive=True,
uid=[0], uid=[0],
enabled=lambda node: node.byPass.enabled and not node.byPass.value, enabled=lambda node: node.byPass.enabled and not node.byPass.value,

View file

@ -4,6 +4,7 @@ import json
import os import os
from meshroom.core import desc from meshroom.core import desc
from meshroom.core.utils import COLORSPACES
class PanoramaPostProcessing(desc.CommandLineNode): class PanoramaPostProcessing(desc.CommandLineNode):
@ -58,8 +59,8 @@ Post process the panorama.
name="outputColorSpace", name="outputColorSpace",
label="Output Color Space", label="Output Color Space",
description="The color space of the output image.", description="The color space of the output image.",
values=COLORSPACES,
value="Linear", value="Linear",
values=["sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),

View file

@ -4,6 +4,7 @@ import json
import os import os
from meshroom.core import desc from meshroom.core import desc
from meshroom.core.utils import COLORSPACES
class PanoramaWarping(desc.AVCommandLineNode): class PanoramaWarping(desc.AVCommandLineNode):
@ -69,8 +70,8 @@ Compute the image warping for each input image in the panorama coordinate system
name="workingColorSpace", name="workingColorSpace",
label="Working Color Space", label="Working Color Space",
description="Colorspace in which the panorama warping will be performed.", description="Colorspace in which the panorama warping will be performed.",
values=COLORSPACES,
value="Linear", value="Linear",
values=["Linear", "ACES2065-1", "ACEScg", "no_conversion"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),

View file

@ -1,6 +1,7 @@
__version__ = "6.0" __version__ = "6.0"
from meshroom.core import desc, Version from meshroom.core import desc, Version
from meshroom.core.utils import COLORSPACES
import logging import logging
@ -259,8 +260,8 @@ Many cameras are contributing to the low frequencies and only the best ones cont
name="workingColorSpace", name="workingColorSpace",
label="Working Color Space", label="Working Color Space",
description="Color space for the texturing internal computation (does not impact the output file color space).", description="Color space for the texturing internal computation (does not impact the output file color space).",
values=COLORSPACES,
value="sRGB", value="sRGB",
values=("sRGB", "Linear", "ACES2065-1", "ACEScg"),
exclusive=True, exclusive=True,
uid=[0], uid=[0],
advanced=True, advanced=True,
@ -269,8 +270,8 @@ Many cameras are contributing to the low frequencies and only the best ones cont
name="outputColorSpace", name="outputColorSpace",
label="Output Color Space", label="Output Color Space",
description="Color space for the output texture files.", description="Color space for the output texture files.",
values=COLORSPACES,
value="AUTO", value="AUTO",
values=("sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "AUTO"),
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),