Skip to content

Commit 23df8f0

Browse files
committed
[nodes] Replace the list of colorspaces with the utilitary constant
1 parent de7e056 commit 23df8f0

File tree

8 files changed

+22
-14
lines changed

8 files changed

+22
-14
lines changed

meshroom/nodes/aliceVision/FeatureExtraction.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
__version__ = "1.3"
22

33
from meshroom.core import desc
4+
from meshroom.core.utils import COLORSPACES
45

56

67
class FeatureExtraction(desc.AVCommandLineNode):
@@ -140,8 +141,8 @@ class FeatureExtraction(desc.AVCommandLineNode):
140141
name="workingColorSpace",
141142
label="Working Color Space",
142143
description="Allows you to choose the color space in which the data are processed.",
144+
values=COLORSPACES,
143145
value="sRGB",
144-
values=["sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"],
145146
exclusive=True,
146147
uid=[0],
147148
),

meshroom/nodes/aliceVision/ImageProcessing.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
__version__ = "3.3"
22

33
from meshroom.core import desc
4+
from meshroom.core.utils import COLORSPACES
45

56
import os.path
67

@@ -497,26 +498,26 @@ class ImageProcessing(desc.AVCommandLineNode):
497498
name="inputColorSpace",
498499
label="Input Color Space",
499500
description="Allows you to force the color space of the input image.",
501+
values=COLORSPACES,
500502
value="AUTO",
501-
values=["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"],
502503
exclusive=True,
503504
uid=[0],
504505
),
505506
desc.ChoiceParam(
506507
name="outputColorSpace",
507508
label="Output Color Space",
508509
description="Allows you to choose the color space of the output image.",
510+
values=COLORSPACES,
509511
value="AUTO",
510-
values=["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"],
511512
exclusive=True,
512513
uid=[0],
513514
),
514515
desc.ChoiceParam(
515516
name="workingColorSpace",
516517
label="Working Color Space",
517518
description="Allows you to choose the color space in which the data are processed.",
519+
values=COLORSPACES,
518520
value="Linear",
519-
values=["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"],
520521
exclusive=True,
521522
uid=[0],
522523
enabled=lambda node: not node.applyDcpMetadata.value,

meshroom/nodes/aliceVision/LdrToHdrCalibration.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from collections import Counter
77

88
from meshroom.core import desc
9+
from meshroom.core.utils import COLORSPACES
910

1011
def findMetadata(d, keys, defaultValue):
1112
v = None
@@ -126,8 +127,8 @@ class LdrToHdrCalibration(desc.AVCommandLineNode):
126127
label="Working Color Space",
127128
description="Color space in which the data are processed.\n"
128129
"If 'auto' is selected, the working color space will be 'Linear' if RAW images are detected; otherwise, it will be set to 'sRGB'.",
129-
value="auto",
130-
values=["auto", "sRGB", "Linear", "ACES2065-1", "ACEScg"],
130+
values=COLORSPACES,
131+
value="AUTO",
131132
exclusive=True,
132133
uid=[],
133134
group="user", # not used directly on the command line

meshroom/nodes/aliceVision/LdrToHdrMerge.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from collections import Counter
77

88
from meshroom.core import desc
9+
from meshroom.core.utils import COLORSPACES
910

1011
def findMetadata(d, keys, defaultValue):
1112
v = None
@@ -169,8 +170,8 @@ class LdrToHdrMerge(desc.AVCommandLineNode):
169170
label="Working Color Space",
170171
description="Color space in which the data are processed.\n"
171172
"If 'auto' is selected, the working color space will be 'Linear' if RAW images are detected; otherwise, it will be set to 'sRGB'.",
172-
value="auto",
173-
values=["auto", "sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"],
173+
values=COLORSPACES,
174+
value="AUTO",
174175
exclusive=True,
175176
uid=[0],
176177
enabled=lambda node: node.byPass.enabled and not node.byPass.value,

meshroom/nodes/aliceVision/LdrToHdrSampling.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from collections import Counter
77

88
from meshroom.core import desc
9+
from meshroom.core.utils import COLORSPACES
910

1011

1112
def findMetadata(d, keys, defaultValue):
@@ -126,8 +127,8 @@ class LdrToHdrSampling(desc.AVCommandLineNode):
126127
label="Working Color Space",
127128
description="Color space in which the data are processed.\n"
128129
"If 'auto' is selected, the working color space will be 'Linear' if RAW images are detected; otherwise, it will be set to 'sRGB'.",
129-
value="auto",
130-
values=["auto", "sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"],
130+
values=COLORSPACES,
131+
value="AUTO",
131132
exclusive=True,
132133
uid=[0],
133134
enabled=lambda node: node.byPass.enabled and not node.byPass.value,

meshroom/nodes/aliceVision/PanoramaPostProcessing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import os
55

66
from meshroom.core import desc
7+
from meshroom.core.utils import COLORSPACES
78

89

910
class PanoramaPostProcessing(desc.CommandLineNode):
@@ -58,8 +59,8 @@ class PanoramaPostProcessing(desc.CommandLineNode):
5859
name="outputColorSpace",
5960
label="Output Color Space",
6061
description="The color space of the output image.",
62+
values=COLORSPACES,
6163
value="Linear",
62-
values=["sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg"],
6364
exclusive=True,
6465
uid=[0],
6566
),

meshroom/nodes/aliceVision/PanoramaWarping.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import os
55

66
from meshroom.core import desc
7+
from meshroom.core.utils import COLORSPACES
78

89

910
class PanoramaWarping(desc.AVCommandLineNode):
@@ -69,8 +70,8 @@ class PanoramaWarping(desc.AVCommandLineNode):
6970
name="workingColorSpace",
7071
label="Working Color Space",
7172
description="Colorspace in which the panorama warping will be performed.",
73+
values=COLORSPACES,
7274
value="Linear",
73-
values=["Linear", "ACES2065-1", "ACEScg", "no_conversion"],
7475
exclusive=True,
7576
uid=[0],
7677
),

meshroom/nodes/aliceVision/Texturing.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
__version__ = "6.0"
22

33
from meshroom.core import desc, Version
4+
from meshroom.core.utils import COLORSPACES
45
import logging
56

67

@@ -259,8 +260,8 @@ class Texturing(desc.AVCommandLineNode):
259260
name="workingColorSpace",
260261
label="Working Color Space",
261262
description="Color space for the texturing internal computation (does not impact the output file color space).",
263+
values=COLORSPACES,
262264
value="sRGB",
263-
values=("sRGB", "Linear", "ACES2065-1", "ACEScg"),
264265
exclusive=True,
265266
uid=[0],
266267
advanced=True,
@@ -269,8 +270,8 @@ class Texturing(desc.AVCommandLineNode):
269270
name="outputColorSpace",
270271
label="Output Color Space",
271272
description="Color space for the output texture files.",
273+
values=COLORSPACES,
272274
value="AUTO",
273-
values=("sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "AUTO"),
274275
exclusive=True,
275276
uid=[0],
276277
),

0 commit comments

Comments
 (0)