From 0f06f044bf94b3ca670ce74824f94cd462622086 Mon Sep 17 00:00:00 2001 From: Seif Ashraf Date: Sun, 8 Dec 2024 02:17:46 +0200 Subject: [PATCH] Fixed range function error in nuke colorlookup examples (#2096) * Error found: ocio_to_colorlookup_all.py Signed-off-by: Seif Ashraf * Update colorlookup_to_spi1d.py Signed-off-by: Seif Ashraf * Update ocio_to_colorlookup_rgb.py Signed-off-by: Seif Ashraf --------- Signed-off-by: Seif Ashraf Co-authored-by: Doug Walker --- share/nuke/examples/colorlookup_to_spi1d.py | 2 +- share/nuke/examples/ocio_to_colorlookup_all.py | 2 +- share/nuke/examples/ocio_to_colorlookup_rgb.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/share/nuke/examples/colorlookup_to_spi1d.py b/share/nuke/examples/colorlookup_to_spi1d.py index c5e9814ee9..241dd24a54 100644 --- a/share/nuke/examples/colorlookup_to_spi1d.py +++ b/share/nuke/examples/colorlookup_to_spi1d.py @@ -19,7 +19,7 @@ def WriteSPI1D(filename, fromMin, fromMax, data): SIZE = 2**10 data = [] -for i in xrange(SIZE): +for i in range(SIZE): x = i/(SIZE-1.0) data.append(knob.getValueAt(x)) diff --git a/share/nuke/examples/ocio_to_colorlookup_all.py b/share/nuke/examples/ocio_to_colorlookup_all.py index 83d15c7430..69f19bd58f 100644 --- a/share/nuke/examples/ocio_to_colorlookup_all.py +++ b/share/nuke/examples/ocio_to_colorlookup_all.py @@ -27,7 +27,7 @@ def Fit(value, fromMin, fromMax, toMin, toMax): return (value - fromMin) / (fromMax - fromMin) * (toMax - toMin) + toMin SIZE = 2**10 -for i in xrange(SIZE): +for i in range(SIZE): x = i/(SIZE-1.0) x = Fit(x, 0.0, 1.0, -0.125, 1.5) diff --git a/share/nuke/examples/ocio_to_colorlookup_rgb.py b/share/nuke/examples/ocio_to_colorlookup_rgb.py index af847d6b4f..e5016d8e08 100644 --- a/share/nuke/examples/ocio_to_colorlookup_rgb.py +++ b/share/nuke/examples/ocio_to_colorlookup_rgb.py @@ -21,7 +21,7 @@ SIZE = 11 -for i in xrange(SIZE): +for i in range(SIZE): x = i/(SIZE-1.0) y = processor.applyRGB((x,x,x))