From 0db386cfeb6f5bb65624968ef4f005fdae1585b7 Mon Sep 17 00:00:00 2001 From: Larry Gritz Date: Mon, 7 Oct 2024 11:26:11 -0700 Subject: [PATCH] Get rid of deprecations Signed-off-by: Larry Gritz --- docs/Deprecations-3.0.md | 2 +- src/include/OpenImageIO/argparse.h | 7 +- src/include/OpenImageIO/imagebufalgo.h | 199 +------------ src/include/OpenImageIO/imagecache.h | 14 +- src/include/OpenImageIO/platform.h | 8 + src/include/OpenImageIO/ustring.h | 10 - src/libutil/strutil.cpp | 11 - testsuite/oiiotool-deep/run.py | 2 +- testsuite/python-deep/src/test_deep.py | 12 +- .../python-imagebuf/src/test_imagebuf.py | 2 +- .../ref/out-python2-alt.txt | 224 --------------- .../python-imagespec/src/test_imagespec.py | 12 +- testsuite/python-typedesc/ref/out-python2.txt | 264 ------------------ testsuite/python-typedesc/ref/out.txt | 41 --- .../python-typedesc/src/test_typedesc.py | 23 -- 15 files changed, 48 insertions(+), 783 deletions(-) delete mode 100644 testsuite/python-imagebufalgo/ref/out-python2-alt.txt delete mode 100644 testsuite/python-typedesc/ref/out-python2.txt diff --git a/docs/Deprecations-3.0.md b/docs/Deprecations-3.0.md index a327427bef..9be6201473 100644 --- a/docs/Deprecations-3.0.md +++ b/docs/Deprecations-3.0.md @@ -218,7 +218,7 @@ about being deprecated will be removed in the final 3.0 release. ## ustring.h * Removed old `ustringHash` (which was just an alias for `std::hash`, - which should be used instead. + which should be used instead). ## varyingref.h diff --git a/src/include/OpenImageIO/argparse.h b/src/include/OpenImageIO/argparse.h index 1ed924f832..47afc3e5c8 100644 --- a/src/include/OpenImageIO/argparse.h +++ b/src/include/OpenImageIO/argparse.h @@ -760,20 +760,25 @@ class OIIO_UTIL_API ArgParse { // The format string is followed by a list of pointers to the argument // variables, just like scanf. A NULL terminates the list. Multiple // calls to options() will append additional options. + OIIO_DEPRECATED_EXTERNAL("(2.2)") int options(const char* intro, ...); // old name - // DEPRECATED(2.2) + OIIO_DEPRECATED_EXTERNAL("(2.2)") int parse(int argc, const char** argv) { return parse_args(argc, argv); } // Type for a callback that writes something to the output stream. + OIIO_DEPRECATED_EXTERNAL("(2.2)") typedef std::function callback_t; // Set callbacks to run that will print any matter you want as part // of the verbose usage, before and after the options are detailed. + OIIO_DEPRECATED_EXTERNAL("(2.2)") void set_preoption_help(callback_t callback); + OIIO_DEPRECATED_EXTERNAL("(2.2)") void set_postoption_help(callback_t callback); // DEPRECATED(2.2) synonym for `print_help()`. + OIIO_DEPRECATED_EXTERNAL("(2.2)") void usage() const { print_help(); } }; diff --git a/src/include/OpenImageIO/imagebufalgo.h b/src/include/OpenImageIO/imagebufalgo.h index 41b24b2570..9c7d7b6cd4 100644 --- a/src/include/OpenImageIO/imagebufalgo.h +++ b/src/include/OpenImageIO/imagebufalgo.h @@ -2483,164 +2483,6 @@ bool OIIO_API deep_holdout (ImageBuf &dst, const ImageBuf &src, #ifndef DOXYGEN_SHOULD_SKIP_THIS -// DEPRECATED(1.9): These are all functions that take raw pointers, -// which we are deprecating as of 1.9, replaced by new versions that -// take span<> for length safety. - -OIIO_DEPRECATED("use version that takes cspan<> instead of raw pointer (2.0)") -inline bool fill (ImageBuf &dst, const float *values, - ROI roi={}, int nthreads=0) { - int nc (roi.defined() ? roi.nchannels() : dst.nchannels()); - return fill (dst, {values, span_size_t(nc)}, roi, nthreads); -} -OIIO_DEPRECATED("use version that takes cspan<> instead of raw pointer (2.0)") -inline bool fill (ImageBuf &dst, const float *top, const float *bottom, - ROI roi={}, int nthreads=0) { - int nc (roi.defined() ? roi.nchannels() : dst.nchannels()); - return fill (dst, {top, span_size_t(nc)}, {bottom, span_size_t(nc)}, roi, nthreads); -} -OIIO_DEPRECATED("use version that takes cspan<> instead of raw pointer (2.0)") -inline bool fill (ImageBuf &dst, const float *topleft, const float *topright, - const float *bottomleft, const float *bottomright, - ROI roi={}, int nthreads=0) { - int nc (roi.defined() ? roi.nchannels() : dst.nchannels()); - return fill (dst, {topleft, span_size_t(nc)}, {topright, span_size_t(nc)}, {bottomleft, span_size_t(nc)}, - {bottomright, span_size_t(nc)}, roi, nthreads); -} - -OIIO_DEPRECATED("use version that takes cspan<> instead of raw pointer (2.0)") -inline bool checker (ImageBuf &dst, int width, int height, int depth, - const float *color1, const float *color2, - int xoffset=0, int yoffset=0, int zoffset=0, - ROI roi={}, int nthreads=0) { - int nc (roi.defined() ? roi.nchannels() : dst.nchannels()); - return checker (dst, width, height, depth, - {color1,span_size_t(nc)}, {color2,span_size_t(nc)}, - xoffset, yoffset, zoffset, roi, nthreads); -} - -OIIO_DEPRECATED("use version that takes cspan<> instead of raw pointer (2.0)") -inline bool add (ImageBuf &dst, const ImageBuf &A, const float *B, - ROI roi={}, int nthreads=0) { - return add (dst, A, {B,A.nchannels()}, roi, nthreads); -} -OIIO_DEPRECATED("use version that takes cspan<> instead of raw pointer (2.0)") -inline bool sub (ImageBuf &dst, const ImageBuf &A, const float *B, - ROI roi={}, int nthreads=0) { - return sub (dst, A, {B,A.nchannels()}, roi, nthreads); -} -OIIO_DEPRECATED("use version that takes cspan<> instead of raw pointer (2.0)") -inline bool absdiff (ImageBuf &dst, const ImageBuf &A, const float *B, - ROI roi={}, int nthreads=0) { - return absdiff (dst, A, cspan(B,span_size_t(A.nchannels())), roi, nthreads); -} -OIIO_DEPRECATED("use version that takes cspan<> instead of raw pointer (2.0)") -inline bool mul (ImageBuf &dst, const ImageBuf &A, const float *B, - ROI roi={}, int nthreads=0) { - return mul (dst, A, {B, int(A.nchannels())}, roi, nthreads); -} -OIIO_DEPRECATED("use version that takes cspan<> instead of raw pointer (2.0)") -inline bool div (ImageBuf &dst, const ImageBuf &A, const float *B, - ROI roi={}, int nthreads=0) { - return div (dst, A, {B, int(A.nchannels())}, roi, nthreads); -} -OIIO_DEPRECATED("use version that takes cspan<> instead of raw pointer (2.0)") -inline bool mad (ImageBuf &dst, const ImageBuf &A, const float *B, - const ImageBuf &C, ROI roi={}, int nthreads=0) { - return mad (dst, A, {B, int(A.nchannels())}, C, roi, nthreads); -} -OIIO_DEPRECATED("use version that takes cspan<> instead of raw pointer (2.0)") -inline bool mad (ImageBuf &dst, const ImageBuf &A, const ImageBuf &B, - const float *C, ROI roi={}, int nthreads=0) { - return mad (dst, A, {C, int(A.nchannels())}, B, roi, nthreads); -} -OIIO_DEPRECATED("use version that takes cspan<> instead of raw pointer (2.0)") -inline bool mad (ImageBuf &dst, const ImageBuf &A, const float *B, - const float *C, ROI roi={}, int nthreads=0) { - return mad (dst, A, {B, int(A.nchannels())}, {C, int(A.nchannels())}, roi, nthreads); -} - -OIIO_DEPRECATED("use version that takes cspan<> instead of raw pointer (2.0)") -inline bool pow (ImageBuf &dst, const ImageBuf &A, const float *B, - ROI roi={}, int nthreads=0) { - return pow (dst, A, {B, span_size_t(A.nchannels())}, roi, nthreads); -} - -OIIO_DEPRECATED("use version that takes cspan<> instead of raw pointer (2.0)") -inline bool channel_sum (ImageBuf &dst, const ImageBuf &src, - const float *weights=nullptr, ROI roi={}, - int nthreads=0) { - return channel_sum (dst, src, {weights, span_size_t(src.nchannels())}, - roi, nthreads); -} - -OIIO_DEPRECATED("use version that takes cspan<> instead of raw pointer (2.0)") -inline bool channels (ImageBuf &dst, const ImageBuf &src, - int nchannels, const int *channelorder, - const float *channelvalues=nullptr, - const std::string *newchannelnames=nullptr, - bool shuffle_channel_names=false, int nthreads=0) { - return channels (dst, src, nchannels, - { channelorder, span_size_t(channelorder?nchannels:0) }, - { channelvalues, span_size_t(channelvalues?nchannels:0) }, - { newchannelnames, span_size_t(newchannelnames?nchannels:0) }, - shuffle_channel_names, nthreads); -} - -OIIO_DEPRECATED("use version that takes cspan<> instead of raw pointer (2.0)") -inline bool clamp (ImageBuf &dst, const ImageBuf &src, - const float *min=nullptr, const float *max=nullptr, - bool clampalpha01 = false, - ROI roi={}, int nthreads=0) { - return clamp (dst, src, { min, span_size_t(min ? src.nchannels() : 0) }, - { max, span_size_t(max ? src.nchannels() : 0) }, clampalpha01, - roi, nthreads); -} - -OIIO_DEPRECATED("use version that takes span<> instead of raw pointer (2.0)") -inline bool isConstantColor (const ImageBuf &src, float *color, - ROI roi={}, int nthreads=0) { - int nc = roi.defined() ? std::min(roi.chend,src.nchannels()) : src.nchannels(); - return isConstantColor (src, 0.0f, {color, span_size_t(color ? nc : 0) }, - roi, nthreads); -} - -OIIO_DEPRECATED("use version that takes cspan<> instead of raw pointer (2.0)") -inline bool color_count (const ImageBuf &src, imagesize_t *count, - int ncolors, const float *color, - const float *eps=nullptr, - ROI roi={}, int nthreads=0) { - return color_count (src, count, ncolors, - { color, span_size_t(ncolors*src.nchannels()) }, - eps ? cspan(eps,span_size_t(src.nchannels())) : cspan(), - roi, nthreads); -} - -OIIO_DEPRECATED("use version that takes span<> instead of raw pointer (2.0)") -inline bool color_range_check (const ImageBuf &src, imagesize_t *lowcount, - imagesize_t *highcount, imagesize_t *inrangecount, - const float *low, const float *high, - ROI roi={}, int nthreads=0) { - return color_range_check (src, lowcount, highcount, inrangecount, - {low,span_size_t(src.nchannels())}, {high,span_size_t(src.nchannels())}, - roi, nthreads); -} - -OIIO_DEPRECATED("use version that takes cspan<> instead of raw pointer (2.0)") -inline bool render_text (ImageBuf &dst, int x, int y, string_view text, - int fontsize, string_view fontname, - const float *textcolor) { - return render_text (dst, x, y, text, fontsize, fontname, - {textcolor, textcolor?span_size_t(dst.nchannels()):0}); -} - -OIIO_DEPRECATED("Use the that takes a span. [2.1]") -inline bool colorconvert (float *color, int nchannels, - const ColorProcessor *processor, bool unpremult) { - return colorconvert ({color,span_size_t(nchannels)}, processor, unpremult); -} - - OIIO_DEPRECATED("prefer the kind that takes an `inverse` parameter (2.5)") inline ImageBuf ociodisplay (const ImageBuf &src, string_view display, string_view view, @@ -2688,7 +2530,7 @@ bool OIIO_API warp (ImageBuf &dst, const ImageBuf &src, M33fParam M, const Filter2D *filter, bool recompute_roi = false, ImageBuf::WrapMode wrap = ImageBuf::WrapDefault, ROI roi = {}, int nthreads=0); -OIIO_DEPRECATED("prefer the kind that takes keyword args (2.6)") +OIIO_DEPRECATED("prefer the kind that takes keyword args (3.0)") inline ImageBuf resize(const ImageBuf &src, string_view filtername, float filterwidth=0.0f, ROI roi={}, int nthreads=0) { @@ -2696,12 +2538,12 @@ inline ImageBuf resize(const ImageBuf &src, { "filterwidth", filterwidth } }, roi, nthreads); } -OIIO_DEPRECATED("prefer the kind that takes keyword args (2.6)") +OIIO_DEPRECATED("prefer the kind that takes keyword args (3.0)") inline ImageBuf resize(const ImageBuf &src, Filter2D *filter, ROI roi={}, int nthreads=0) { return resize(src, { make_pv("filterptr", filter) }, roi, nthreads); } -OIIO_DEPRECATED("prefer the kind that takes keyword args (2.6)") +OIIO_DEPRECATED("prefer the kind that takes keyword args (3.0)") inline bool resize (ImageBuf &dst, const ImageBuf &src, string_view filtername, float filterwidth, ROI roi={}, int nthreads=0) { @@ -2709,13 +2551,13 @@ inline bool resize (ImageBuf &dst, const ImageBuf &src, { "filterwidth", filterwidth } }, roi, nthreads); } -OIIO_DEPRECATED("prefer the kind that takes keyword args (2.6)") +OIIO_DEPRECATED("prefer the kind that takes keyword args (3.0)") inline bool resize(ImageBuf &dst, const ImageBuf &src, Filter2D *filter, ROI roi={}, int nthreads=0) { return resize(dst, src, { make_pv("filterptr", filter) }, roi, nthreads); } -OIIO_DEPRECATED("prefer the kind that takes keyword args (2.6)") +OIIO_DEPRECATED("prefer the kind that takes keyword args (3.0)") inline ImageBuf fit(const ImageBuf &src, string_view filtername = "", float filterwidth=0.0f, string_view fillmode="letterbox", bool exact=false, @@ -2725,7 +2567,7 @@ inline ImageBuf fit(const ImageBuf &src, { "fillmode", fillmode }, { "exact", int(exact) } }, roi, nthreads); } -OIIO_DEPRECATED("prefer the kind that takes keyword args (2.6)") +OIIO_DEPRECATED("prefer the kind that takes keyword args (3.0)") inline ImageBuf fit(const ImageBuf &src, Filter2D *filter, string_view fillmode="letterbox", bool exact=false, ROI roi={}, int nthreads=0) { @@ -2733,7 +2575,7 @@ inline ImageBuf fit(const ImageBuf &src, Filter2D *filter, { "exact", int(exact) } }, roi, nthreads); } -OIIO_DEPRECATED("prefer the kind that takes keyword args (2.6)") +OIIO_DEPRECATED("prefer the kind that takes keyword args (3.0)") inline bool fit(ImageBuf &dst, const ImageBuf &src, string_view filtername = "", float filterwidth=0.0f, string_view fillmode="letterbox", bool exact=false, @@ -2743,7 +2585,7 @@ inline bool fit(ImageBuf &dst, const ImageBuf &src, { "fillmode", fillmode }, { "exact", int(exact) } }, roi, nthreads); } -OIIO_DEPRECATED("prefer the kind that takes keyword args (2.6)") +OIIO_DEPRECATED("prefer the kind that takes keyword args (3.0)") inline bool fit(ImageBuf &dst, const ImageBuf &src, Filter2D *filter, string_view fillmode="letterbox", bool exact=false, ROI roi={}, int nthreads=0) { @@ -2753,7 +2595,7 @@ inline bool fit(ImageBuf &dst, const ImageBuf &src, Filter2D *filter, } // DEPRECATED(2.3): old versions lacking the "fillmode" parameter -OIIO_DEPRECATED("prefer the kind that takes keyword args (2.6)") +OIIO_DEPRECATED("prefer the kind that takes keyword args (3.0)") inline ImageBuf fit(const ImageBuf &src, string_view filtername, float filterwidth, bool exact, ROI roi={}, int nthreads=0) @@ -2763,14 +2605,14 @@ inline ImageBuf fit(const ImageBuf &src, { "fillmode", "letterbox" }, { "exact", int(exact) } }, roi, nthreads); } -OIIO_DEPRECATED("prefer the kind that takes keyword args (2.3)") +OIIO_DEPRECATED("prefer the kind that takes keyword args (3.0)") inline ImageBuf fit(const ImageBuf &src, Filter2D *filter, bool exact, ROI roi={}, int nthreads=0) { return fit(src, { make_pv("filterptr", filter), { "fillmode", "letterbox" }, { "exact", int(exact) } }, roi, nthreads); } -OIIO_DEPRECATED("prefer the kind that takes keyword args (2.3)") +OIIO_DEPRECATED("prefer the kind that takes keyword args (3.0)") inline bool fit(ImageBuf &dst, const ImageBuf &src, string_view filtername, float filterwidth, bool exact, ROI roi={}, int nthreads=0) { @@ -2779,7 +2621,7 @@ inline bool fit(ImageBuf &dst, const ImageBuf &src, { "fillmode", "letterbox" }, { "exact", int(exact) } }, roi, nthreads); } -OIIO_DEPRECATED("prefer the kind that takes keyword args (2.3)") +OIIO_DEPRECATED("prefer the kind that takes keyword args (3.0)") inline bool fit(ImageBuf &dst, const ImageBuf &src, Filter2D *filter, bool exact, ROI roi={}, int nthreads=0) { return fit(dst, src, @@ -2788,23 +2630,6 @@ inline bool fit(ImageBuf &dst, const ImageBuf &src, Filter2D *filter, roi, nthreads); } -OIIO_DEPRECATED("Use isConstantColor with span color") -inline bool isConstantColor (const ImageBuf &src, span color, - ROI roi={}, int nthreads=0) { - return isConstantColor (src, 0.0f, color, roi, nthreads); -} - -OIIO_DEPRECATED("Use isConstantChannel with the threshold parameter") -inline bool isConstantChannel (const ImageBuf &src, int channel, float val, - ROI roi, int nthreads=0) { - return isConstantChannel (src, channel, val, 0.0f, roi, nthreads); -} - -OIIO_DEPRECATED("Use isMonochrome with the threshold dparameter") -inline bool isMonochrome (const ImageBuf &src, ROI roi, int nthreads=0) { - return isMonochrome (src, 0.0f, roi, nthreads); -} - #endif // DOXYGEN_SHOULD_SKIP_THIS /////////////////////////////////////////////////////////////////////// diff --git a/src/include/OpenImageIO/imagecache.h b/src/include/OpenImageIO/imagecache.h index 004e3d7c73..29db127fbb 100644 --- a/src/include/OpenImageIO/imagecache.h +++ b/src/include/OpenImageIO/imagecache.h @@ -752,14 +752,15 @@ class OIIO_API ImageCache { bool get_imagespec(ImageHandle* file, Perthread* thread_info, ImageSpec& spec, int subimage = 0); - /// DEPRECATED old API. Note that the miplevel and native parameters are ignored: - /// it will always get the native spec of miplevel 0. We recommend switching to - /// the new API. + /// DEPRECATED(3.0) old API. Note that the miplevel and native parameters + /// are ignored: it will always get the native spec of miplevel 0. We + /// recommend switching to the new API. bool get_imagespec(ustring filename, ImageSpec& spec, int subimage, int miplevel, bool native = false) { return get_imagespec(filename, spec, subimage); } + /// DEPRECATED(3.0) old API. bool get_imagespec(ImageHandle* file, Perthread* thread_info, ImageSpec& spec, int subimage, int miplevel, bool native = false) @@ -801,14 +802,15 @@ class OIIO_API ImageCache { const ImageSpec* imagespec(ImageHandle* file, Perthread* thread_info, int subimage = 0); - /// DEPRECATED old API. Note that the miplevel and native parameters are ignored: - /// it will always get the native spec of miplevel 0. We recommend switching to - /// the new API. + /// DEPRECATED(3.0) old API. Note that the miplevel and native parameters + /// are ignored: it will always get the native spec of miplevel 0. We + /// recommend switching to the new API. const ImageSpec* imagespec(ustring filename, int subimage, int miplevel, bool native = false) { return imagespec(filename, subimage); } + /// DEPRECATED(3.0) old API. const ImageSpec* imagespec(ImageHandle* file, Perthread* thread_info, int subimage, int miplevel, bool native = false) { diff --git a/src/include/OpenImageIO/platform.h b/src/include/OpenImageIO/platform.h index f5f1101786..6de87c505e 100644 --- a/src/include/OpenImageIO/platform.h +++ b/src/include/OpenImageIO/platform.h @@ -433,6 +433,14 @@ // [[deprecated(msg)]] instead. #define OIIO_DEPRECATED(msg) [[deprecated(msg)]] +// OIIO_DEPRECATED_EXTERNAL marks things deprecated for downstream apps, but +// still is allowed for internal use. Generally, this is used when we want to +// deprecate for users but can't quite extract it internally yet. +#ifndef OIIO_INTERNAL +# define OIIO_DEPRECATED_EXTERNAL(msg) [[deprecated(msg)]] +#else +# define OIIO_DEPRECATED_EXTERNAL(msg) +#endif // OIIO_FALLTHROUGH at the end of a `case` label's statements documents that // the switch statement case is intentionally falling through to the code diff --git a/src/include/OpenImageIO/ustring.h b/src/include/OpenImageIO/ustring.h index fb45c075d5..2d82d6bd10 100644 --- a/src/include/OpenImageIO/ustring.h +++ b/src/include/OpenImageIO/ustring.h @@ -669,16 +669,6 @@ class OIIO_UTIL_API ustring { return ustring(Strutil::fmt::format(fmt, args...)); } - /// NOTE: Semi-DEPRECATED! This will someday switch to behave like - /// fmt::format (or future std::format) but for now, it is back - /// compatible and equivalent to sprintf. - template - OIIO_FORMAT_DEPRECATED static ustring format(const char* fmt, - const Args&... args) - { - return ustring(Strutil::format(fmt, args...)); - } - /// Concatenate two strings, returning a ustring, implemented carefully /// to not perform any redundant copies or allocations. static ustring concat(string_view s, string_view t); diff --git a/src/libutil/strutil.cpp b/src/libutil/strutil.cpp index 54e1aece7a..e240b24ce9 100644 --- a/src/libutil/strutil.cpp +++ b/src/libutil/strutil.cpp @@ -974,17 +974,6 @@ Strutil::utf8_to_utf16wstring(string_view str) noexcept -#if OPENIMAGEIO_VERSION < 30000 -// DEPRECATED(2.5) and slated for removal in 3.0. -std::wstring -Strutil::utf8_to_utf16(string_view str) noexcept -{ - return utf8_to_utf16wstring(str); -} -#endif - - - std::string Strutil::utf16_to_utf8(const std::wstring& str) noexcept { diff --git a/testsuite/oiiotool-deep/run.py b/testsuite/oiiotool-deep/run.py index 26953d0938..6008f9bd57 100755 --- a/testsuite/oiiotool-deep/run.py +++ b/testsuite/oiiotool-deep/run.py @@ -65,7 +65,7 @@ command += oiiotool ("--fail 100 src/deep-nosamples.exr src/deep-onesample.exr --diff") command += oiiotool ("--fail 100 src/deep-onesample.exr src/deep-nosamples.exr --diff") # Recipe for creating the files: - # spec = oiio.ImageSpec (1, 1, 1, oiio.TypeDesc.TypeFloat) + # spec = oiio.ImageSpec (1, 1, 1, oiio.TypeFloat) # spec.channelnames = ("Z") # spec.deep = True # buf = oiio.ImageBuf (spec) diff --git a/testsuite/python-deep/src/test_deep.py b/testsuite/python-deep/src/test_deep.py index 7e17f86f4d..be472b4b77 100755 --- a/testsuite/python-deep/src/test_deep.py +++ b/testsuite/python-deep/src/test_deep.py @@ -10,9 +10,8 @@ test_xres = 3 test_yres = 3 test_nchannels = 6 -test_chantypes = (oiio.TypeDesc.TypeHalf, oiio.TypeDesc.TypeHalf, - oiio.TypeDesc.TypeHalf, oiio.TypeDesc.TypeHalf, - oiio.TypeDesc.TypeFloat, oiio.TypeDesc.TypeFloat) +test_chantypes = (oiio.TypeHalf, oiio.TypeHalf, oiio.TypeHalf, oiio.TypeHalf, + oiio.TypeFloat, oiio.TypeFloat) test_channames = ("R", "G", "B", "A", "Z", "Zback") print ("test_chantypes ", str(test_chantypes[0]), str(test_chantypes[1]), str(test_chantypes[2]), str(test_chantypes[3]), str(test_chantypes[4]), str(test_chantypes[5])) @@ -256,9 +255,8 @@ def test_iba_deep_holdout () : print ("\nTesting ImageBufAlgo.deep_holdout...") spec = oiio.ImageSpec (6, 1, 6, oiio.FLOAT) spec.deep = True - spec.channelformats = (oiio.TypeDesc.TypeHalf, oiio.TypeDesc.TypeHalf, - oiio.TypeDesc.TypeHalf, oiio.TypeDesc.TypeHalf, - oiio.TypeDesc.TypeFloat, oiio.TypeDesc.TypeFloat) + spec.channelformats = (oiio.TypeHalf, oiio.TypeHalf, oiio.TypeHalf, + oiio.TypeHalf, oiio.TypeFloat, oiio.TypeFloat) spec.channelnames = ("R", "G", "B", "A", "Z", "Zback") src = oiio.ImageBuf (spec) # Set up source image @@ -298,7 +296,7 @@ def test_iba_deep_holdout () : # Try to write the test image to an exr file print ("\nWriting image...") - spec = oiio.ImageSpec (test_xres, test_yres, test_nchannels, oiio.TypeDesc.TypeFloat) + spec = oiio.ImageSpec (test_xres, test_yres, test_nchannels, oiio.TypeFloat) spec.channelnames = test_channames spec.channelformats = test_chantypes spec.deep = True diff --git a/testsuite/python-imagebuf/src/test_imagebuf.py b/testsuite/python-imagebuf/src/test_imagebuf.py index dbb5eab0a3..40e4b918d6 100755 --- a/testsuite/python-imagebuf/src/test_imagebuf.py +++ b/testsuite/python-imagebuf/src/test_imagebuf.py @@ -233,7 +233,7 @@ def ftupstr(tup) : print ("Interpolating NDC 0.25,0.5 ->", ftupstr(b.interppixel_NDC(0.25,0.5))) print ("Interpolating bicubic 0.25,0.5 ->", ftupstr(b.interppixel_bicubic(1.0,0.5))) print ("Interpolating NDC bicubic 0.25,0.5 ->", ftupstr(b.interppixel_bicubic_NDC(0.25,0.5))) - print ("The whole image is: ", b.get_pixels(oiio.TypeDesc.TypeFloat)) + print ("The whole image is: ", b.get_pixels(oiio.TypeFloat)) print ("") print ("Saving file...") b.write ("out.tif") diff --git a/testsuite/python-imagebufalgo/ref/out-python2-alt.txt b/testsuite/python-imagebufalgo/ref/out-python2-alt.txt deleted file mode 100644 index 75f9959485..0000000000 --- a/testsuite/python-imagebufalgo/ref/out-python2-alt.txt +++ /dev/null @@ -1,224 +0,0 @@ - -Testing color conversions: -linear src=[0.000 0.000 0.000 1.000 ] [0.250 0.250 0.250 1.000 ] -[0.500 0.500 0.500 1.000 ] [1.000 1.000 1.000 1.000 ] -to srgb =[0.000 0.000 0.000 1.000 ] [0.537 0.537 0.537 1.000 ] -[0.735 0.735 0.735 1.000 ] [1.000 1.000 1.000 1.000 ] -back to linear =[0.000 0.000 0.000 1.000 ] [0.250 0.250 0.250 1.000 ] -[0.500 0.500 0.500 1.000 ] [1.000 1.000 1.000 1.000 ] -after *M =[0.000 0.000 0.100 1.000 ] [0.125 0.500 0.350 1.000 ] -[0.250 1.000 0.600 1.000 ] [0.500 2.000 1.100 1.000 ] -Stats for tahoe-small.tif: - min = [0.0, 0.003921568859368563, 0.007843137718737125] - max = [0.8784314393997192, 1.0, 1.0] - avg = [0.10193096846342087, 0.21669696271419525, 0.4254732131958008] - stddev = [0.13176830112934113, 0.23792722821235657, 0.3826749324798584] - nancount = [0, 0, 0] - infcount = [0, 0, 0] - finitecount = [196608, 196608, 196608] -Comparison: of flip.tif and flop.tif - mean = 0.0068759 - rms = 0.051175 - PSNR = 25.819 - max = 0.45098 - max @ (214, 88, 0, 0) - warns 2034 fails 2034 -Relative comparison: of flip.tif and flop.tif - warns 1946 fails 1896 -isConstantColor on pink image is (1 0.50196 0.50196) -isConstantColor on checker is None -Is cmul1.exr monochrome? True -Is cmul2.exr monochrome? False -color range counts = (4L, 8L, 4L) -Nonzero region is: 100 180 100 180 0 1 0 3 -SHA-1 of bsplinekernel.exr is: D5826B66A5313F9A32D42C5CF49C90EC4E7F84BF -R hist: (10000L, 0L, 0L, 0L) -G hist: (10000L, 0L, 0L, 0L) -B hist: (0L, 10000L, 0L, 0L) -Done. -Comparing "black.tif" and "ref/black.tif" -PASS -Comparing "filled.tif" and "../../../testsuite/oiiotool/ref/filled.tif" -PASS -Comparing "checker.tif" and "ref/checker.tif" -PASS -Comparing "noise-uniform3.tif" and "../../../testsuite/oiiotool-pattern/ref/noise-uniform3.tif" -PASS -Comparing "noise-gauss.tif" and "../../../testsuite/oiiotool-pattern/ref/noise-gauss.tif" -PASS -Comparing "noise-salt.tif" and "../../../testsuite/oiiotool-pattern/ref/noise-salt.tif" -PASS -Comparing "noise-blue3.tif" and "ref/noise-blue3.tif" -PASS -Comparing "bluenoise_image3.tif" and "ref/bluenoise_image3.tif" -PASS -Comparing "chanshuffle.tif" and "../../../testsuite/oiiotool-copy/ref/chanshuffle.tif" -PASS -Comparing "ch-rgba.exr" and "../../../testsuite/oiiotool-copy/ref/ch-rgba.exr" -PASS -Comparing "ch-z.exr" and "../../../testsuite/oiiotool-copy/ref/ch-z.exr" -PASS -Comparing "chappend-rgbaz.exr" and "../../../testsuite/oiiotool-copy/ref/chappend-rgbaz.exr" -PASS -Comparing "flat.exr" and "../../../testsuite/oiiotool-deep/ref/flat.exr" -PASS -Comparing "deepen.exr" and "../../../testsuite/oiiotool-deep/ref/deepen.exr" -PASS -Comparing "crop.tif" and "../../../testsuite/oiiotool-copy/ref/crop.tif" -PASS -Comparing "cut.tif" and "../../../testsuite/oiiotool-copy/ref/cut.tif" -PASS -Comparing "pasted.tif" and "../../../testsuite/oiiotool-copy/ref/pasted.tif" -PASS -Comparing "rotate90.tif" and "../../../testsuite/oiiotool-xform/ref/rotate90.tif" -PASS -Comparing "rotate180.tif" and "../../../testsuite/oiiotool/ref/rotate180.tif" -PASS -Comparing "rotate270.tif" and "../../../testsuite/oiiotool-xform/ref/rotate270.tif" -PASS -Comparing "rotated.tif" and "../../../testsuite/oiiotool-xform/ref/rotated.tif" -PASS -Comparing "rotated-offcenter.tif" and "../../../testsuite/oiiotool-xform/ref/rotated-offcenter.tif" -PASS -Comparing "warped.tif" and "../../../testsuite/oiiotool-xform/ref/warped.tif" -PASS -Comparing "flip.tif" and "../../../testsuite/oiiotool-xform/ref/flip.tif" -PASS -Comparing "flop.tif" and "../../../testsuite/oiiotool-xform/ref/flop.tif" -PASS -Comparing "reorient1.tif" and "../../../testsuite/oiiotool-xform/ref/reorient1.tif" -PASS -Comparing "transpose.tif" and "../../../testsuite/oiiotool-xform/ref/transpose.tif" -PASS -Comparing "cshift.tif" and "../../../testsuite/oiiotool-xform/ref/cshift.tif" -PASS -Comparing "cadd1.exr" and "../../../testsuite/oiiotool/ref/cadd1.exr" -PASS -Comparing "cadd2.exr" and "../../../testsuite/oiiotool/ref/cadd2.exr" -PASS -Comparing "add.exr" and "../../../testsuite/oiiotool/ref/add.exr" -PASS -Comparing "sub.exr" and "../../../testsuite/oiiotool/ref/sub.exr" -PASS -Comparing "csub2.exr" and "ref/csub2.exr" -PASS -Comparing "abs.exr" and "../../../testsuite/oiiotool/ref/abs.exr" -PASS -Comparing "absdiff.exr" and "../../../testsuite/oiiotool/ref/absdiff.exr" -PASS -Comparing "mul.exr" and "../../../testsuite/oiiotool/ref/mul.exr" -PASS -Comparing "cmul1.exr" and "../../../testsuite/oiiotool/ref/cmul1.exr" -PASS -Comparing "cmul2.exr" and "../../../testsuite/oiiotool/ref/cmul2.exr" -PASS -Comparing "mad.exr" and "../../../testsuite/oiiotool/ref/mad.exr" -PASS -Comparing "mad2.exr" and "ref/mad2.exr" -PASS -Comparing "mad3.exr" and "ref/mad3.exr" -PASS -Comparing "cpow1.exr" and "../../../testsuite/oiiotool/ref/cpow1.exr" -PASS -Comparing "cpow2.exr" and "../../../testsuite/oiiotool/ref/cpow2.exr" -PASS -Comparing "div.exr" and "../../../testsuite/oiiotool/ref/div.exr" -PASS -Comparing "divc1.exr" and "../../../testsuite/oiiotool/ref/divc1.exr" -PASS -Comparing "divc2.exr" and "../../../testsuite/oiiotool/ref/divc2.exr" -PASS -Comparing "invert.tif" and "../../../testsuite/oiiotool/ref/invert.tif" -PASS -Comparing "maximg.tif" and "ref/maximg.tif" -PASS -Comparing "maxval.tif" and "ref/maxval.tif" -PASS -Comparing "minimg.tif" and "ref/minimg.tif" -PASS -Comparing "minval.tif" and "ref/minval.tif" -PASS -Comparing "minchan.tif" and "ref/minchan.tif" -PASS -Comparing "maxchan.tif" and "ref/maxchan.tif" -PASS -Comparing "chsum.tif" and "../../../testsuite/oiiotool/ref/chsum.tif" -PASS -Comparing "colormap-inferno.tif" and "../../../testsuite/oiiotool-color/ref/colormap-inferno.tif" -PASS -Comparing "colormap-custom.tif" and "../../../testsuite/oiiotool-color/ref/colormap-custom.tif" -PASS -Comparing "grid-clamped.tif" and "../../../testsuite/oiiotool/ref/grid-clamped.tif" -PASS -Comparing "clamped-with-float.exr" and "ref/clamped-with-float.exr" -PASS -Comparing "rangecompress.tif" and "../../../testsuite/oiiotool/ref/rangecompress.tif" -PASS -Comparing "rangeexpand.tif" and "../../../testsuite/oiiotool/ref/rangeexpand.tif" -PASS -Comparing "contrast-stretch.tif" and "../../../testsuite/oiiotool-color/ref/contrast-stretch.tif" -PASS -Comparing "contrast-shrink.tif" and "../../../testsuite/oiiotool-color/ref/contrast-shrink.tif" -PASS -Comparing "contrast-sigmoid5.tif" and "../../../testsuite/oiiotool-color/ref/contrast-sigmoid5.tif" -PASS -Comparing "saturate-0.tif" and "ref/saturate-0.tif" -PASS -Comparing "saturate-2.tif" and "ref/saturate-2.tif" -PASS -Comparing "resize.tif" and "../../../testsuite/oiiotool-xform/ref/resize.tif" -PASS -Comparing "resample.tif" and "../../../testsuite/oiiotool-xform/ref/resample.tif" -PASS -Comparing "fit.tif" and "../../../testsuite/oiiotool-xform/ref/fit.tif" -PASS -Comparing "norm.exr" and "ref/norm.exr" -PASS -Comparing "normoffset.exr" and "ref/normoffset.exr" -PASS -Comparing "normalize.exr" and "ref/normalize.exr" -PASS -Comparing "normalize_scale.exr" and "ref/normalize_scale.exr" -PASS -Comparing "normalize_offsetin.exr" and "ref/normalize_offsetin.exr" -PASS -Comparing "normalize_offsetscaleout.exr" and "ref/normalize_offsetscaleout.exr" -PASS -Comparing "normalize_offsetscale.exr" and "ref/normalize_offsetscale.exr" -PASS -Comparing "bsplinekernel.exr" and "../../../testsuite/oiiotool/ref/bsplinekernel.exr" -PASS -Comparing "bspline-blur.tif" and "../../../testsuite/oiiotool/ref/bspline-blur.tif" -PASS -Comparing "tahoe-median.tif" and "../../../testsuite/oiiotool/ref/tahoe-median.tif" -PASS -Comparing "dilate.tif" and "../../../testsuite/oiiotool/ref/dilate.tif" -PASS -Comparing "erode.tif" and "../../../testsuite/oiiotool/ref/erode.tif" -PASS -Comparing "unsharp.tif" and "../../../testsuite/oiiotool/ref/unsharp.tif" -PASS -Comparing "unsharp-median.tif" and "../../../testsuite/oiiotool/ref/unsharp-median.tif" -PASS -Comparing "tahoe-laplacian.tif" and "../../../testsuite/oiiotool/ref/tahoe-laplacian.tif" -PASS -Comparing "fft.exr" and "../../../testsuite/oiiotool/ref/fft.exr" -PASS -Comparing "ifft.exr" and "../../../testsuite/oiiotool/ref/ifft.exr" -PASS -Comparing "polar.exr" and "../../../testsuite/oiiotool/ref/polar.exr" -PASS -Comparing "unpolar.exr" and "../../../testsuite/oiiotool/ref/unpolar.exr" -PASS -Comparing "tahoe-filled.tif" and "../../../testsuite/oiiotool/ref/tahoe-filled.tif" -PASS -Comparing "box3.exr" and "../../../testsuite/oiiotool-fixnan/ref/box3.exr" -PASS -Comparing "a_over_b.exr" and "../../../testsuite/oiiotool-composite/ref/a_over_b.exr" -PASS -Comparing "tahoe-small.tx" and "ref/tahoe-small.tx" -PASS -Comparing "text.tif" and "../../../testsuite/oiiotool-text/ref/text-freetype2.7.tif" -PASS -Comparing "textcentered.tif" and "ref/textcentered.tif" -PASS diff --git a/testsuite/python-imagespec/src/test_imagespec.py b/testsuite/python-imagespec/src/test_imagespec.py index f6623125e2..63714b8360 100755 --- a/testsuite/python-imagespec/src/test_imagespec.py +++ b/testsuite/python-imagespec/src/test_imagespec.py @@ -91,10 +91,10 @@ def print_imagespec (spec, msg="") : s.attribute ("foo_str", "blah") s.attribute ("foo_int", 14) s.attribute ("foo_float", 3.14) - s.attribute ("foo_vector", oiio.TypeDesc.TypeVector, (1, 0, 11)) - s.attribute ("foo_matrix", oiio.TypeDesc.TypeMatrix, + s.attribute ("foo_vector", oiio.TypeVector, (1, 0, 11)) + s.attribute ("foo_matrix", oiio.TypeMatrix, (1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 1, 2, 3, 1)) - s.attribute ("smpte:TimeCode", oiio.TypeDesc.TypeTimeCode, (18356486, 4294967295)) + s.attribute ("smpte:TimeCode", oiio.TypeTimeCode, (18356486, 4294967295)) s.attribute ("ucarr", "uint8[10]", numpy.array([49, 50, 51, 0, 0, 97, 98, 99, 1, 88], dtype='B')) s["delfoo_str"] = "egg" s["delfoo_int"] = 29 @@ -175,9 +175,9 @@ def print_imagespec (spec, msg="") : oiio.attribute ("plugin_searchpath", "perfect") print ("get_string_attribute plugin_searchpath : ", oiio.get_string_attribute ("plugin_searchpath", "bad")) print ("get_int_attribute plugin_searchpath : ", oiio.get_int_attribute ("plugin_searchpath", 0)) - print ("getattribute TypeString plugin_searchpath : ", oiio.getattribute ("plugin_searchpath", oiio.TypeDesc.TypeString)) - print ("getattribute TypeFloat plugin_searchpath : ", oiio.getattribute ("plugin_searchpath", oiio.TypeDesc.TypeFloat)) - print ("getattribute TypeString blahblah : ", oiio.getattribute ("blahblah", oiio.TypeDesc.TypeString)) + print ("getattribute TypeString plugin_searchpath : ", oiio.getattribute ("plugin_searchpath", oiio.TypeString)) + print ("getattribute TypeFloat plugin_searchpath : ", oiio.getattribute ("plugin_searchpath", oiio.TypeFloat)) + print ("getattribute TypeString blahblah : ", oiio.getattribute ("blahblah", oiio.TypeString)) print ("Done.") except Exception as detail: diff --git a/testsuite/python-typedesc/ref/out-python2.txt b/testsuite/python-typedesc/ref/out-python2.txt deleted file mode 100644 index 14a42cd961..0000000000 --- a/testsuite/python-typedesc/ref/out-python2.txt +++ /dev/null @@ -1,264 +0,0 @@ -Passed BASETYPE -Passed AGGREGATE -Passed VECSEMANTICS - -type '(default)' - c_str "unknown" - basetype BASETYPE.UNKNOWN - aggregate AGGREGATE.SCALAR - vecsemantics VECSEMANTICS.NOXFORM - arraylen 0 - str(t) = "unknown" - size = 0 - elementtype = unknown - numelements = 1 - basevalues = 1 - elementsize = 0 - basesize = 0 -type 'UINT8' - c_str "uint8" - basetype BASETYPE.UCHAR - aggregate AGGREGATE.SCALAR - vecsemantics VECSEMANTICS.NOXFORM - arraylen 0 - str(t) = "uint8" - size = 1 - elementtype = uint8 - numelements = 1 - basevalues = 1 - elementsize = 1 - basesize = 1 -type 'HALF, VEC3, COLOR' - c_str "colorh" - basetype BASETYPE.HALF - aggregate AGGREGATE.VEC3 - vecsemantics VECSEMANTICS.COLOR - arraylen 0 - str(t) = "colorh" - size = 6 - elementtype = colorh - numelements = 1 - basevalues = 3 - elementsize = 6 - basesize = 2 -type 'FLOAT, SCALAR, NOXFORM, array of 6' - c_str "float[6]" - basetype BASETYPE.FLOAT - aggregate AGGREGATE.SCALAR - vecsemantics VECSEMANTICS.NOXFORM - arraylen 6 - str(t) = "float[6]" - size = 24 - elementtype = float - numelements = 6 - basevalues = 6 - elementsize = 4 - basesize = 4 -type 'FLOAT, VEC3, POINT, array of 2' - c_str "point[2]" - basetype BASETYPE.FLOAT - aggregate AGGREGATE.VEC3 - vecsemantics VECSEMANTICS.POINT - arraylen 2 - str(t) = "point[2]" - size = 24 - elementtype = point - numelements = 2 - basevalues = 6 - elementsize = 12 - basesize = 4 -type 'INT, VEC2, BOX, array of 2' - c_str "box2i" - basetype BASETYPE.INT32 - aggregate AGGREGATE.VEC2 - vecsemantics VECSEMANTICS.BOX - arraylen 2 - str(t) = "box2i" - size = 16 - elementtype = box2i - numelements = 2 - basevalues = 4 - elementsize = 8 - basesize = 4 -type 'FLOAT, VEC3, BOX, array of 2' - c_str "box3" - basetype BASETYPE.FLOAT - aggregate AGGREGATE.VEC3 - vecsemantics VECSEMANTICS.BOX - arraylen 2 - str(t) = "box3" - size = 24 - elementtype = box3 - numelements = 2 - basevalues = 6 - elementsize = 12 - basesize = 4 - -type 'float[2]' - c_str "float[2]" - basetype BASETYPE.FLOAT - aggregate AGGREGATE.SCALAR - vecsemantics VECSEMANTICS.NOXFORM - arraylen 2 - str(t) = "float[2]" - size = 8 - elementtype = float - numelements = 2 - basevalues = 2 - elementsize = 4 - basesize = 4 -type 'normal' - c_str "normal" - basetype BASETYPE.FLOAT - aggregate AGGREGATE.VEC3 - vecsemantics VECSEMANTICS.NORMAL - arraylen 0 - str(t) = "normal" - size = 12 - elementtype = normal - numelements = 1 - basevalues = 3 - elementsize = 12 - basesize = 4 -type 'uint16' - c_str "uint16" - basetype BASETYPE.UINT16 - aggregate AGGREGATE.SCALAR - vecsemantics VECSEMANTICS.NOXFORM - arraylen 0 - str(t) = "uint16" - size = 2 - elementtype = uint16 - numelements = 1 - basevalues = 1 - elementsize = 2 - basesize = 2 -type 'box3' - c_str "box3" - basetype BASETYPE.FLOAT - aggregate AGGREGATE.VEC3 - vecsemantics VECSEMANTICS.BOX - arraylen 2 - str(t) = "box3" - size = 24 - elementtype = box3 - numelements = 2 - basevalues = 6 - elementsize = 12 - basesize = 4 - -uint8 == uint8? True -uint8 == uint8? True -uint8 == uint16 False -uint8 != uint8? False -uint8 != uint8? False -uint8 != uint16 True -vector == color False -vector.equivalent(color) True -equivalent(vector,color) True -vector.equivalent(float) False -equivalent(vector,float) False - -type 'TypeFloat' - c_str "float" -type 'TypeColor' - c_str "color" -type 'TypeString' - c_str "string" -type 'TypeInt' - c_str "int" -type 'TypePoint' - c_str "point" -type 'TypeVector' - c_str "vector" -type 'TypeNormal' - c_str "normal" -type 'TypeMatrix' - c_str "matrix" -type 'TypeMatrix33' - c_str "matrix33" -type 'TypeMatrix44' - c_str "matrix" -type 'TypeTimeCode' - c_str "timecode" -type 'TypeKeyCode' - c_str "keycode" -type 'TypeRational' - c_str "rational2i" -type 'TypeFloat2' - c_str "float2" -type 'TypeVector2' - c_str "vector2" -type 'TypeFloat4' - c_str "float4" -type 'TypeVector4' - c_str "float4" -type 'TypeVector2i' - c_str "int2" -type 'TypeVector3i' - c_str "int3" -type 'TypeHalf' - c_str "half" - -type 'TypeFloat' - c_str "float" -type 'TypeColor' - c_str "color" -type 'TypeString' - c_str "string" -type 'TypeInt' - c_str "int" -type 'TypeUInt' - c_str "uint" -type 'TypeInt64' - c_str "int64" -type 'TypeUInt64' - c_str "uint64" -type 'TypeInt32' - c_str "int" -type 'TypeUInt32' - c_str "uint" -type 'TypeInt16' - c_str "int16" -type 'TypeUInt16' - c_str "uint16" -type 'TypeInt8' - c_str "int8" -type 'TypeUInt8' - c_str "uint8" -type 'TypePoint' - c_str "point" -type 'TypeVector' - c_str "vector" -type 'TypeNormal' - c_str "normal" -type 'TypeMatrix' - c_str "matrix" -type 'TypeMatrix33' - c_str "matrix33" -type 'TypeMatrix44' - c_str "matrix" -type 'TypeTimeCode' - c_str "timecode" -type 'TypeKeyCode' - c_str "keycode" -type 'TypeFloat2' - c_str "float2" -type 'TypeVector2' - c_str "vector2" -type 'TypeFloat4' - c_str "float4" -type 'TypeVector4' - c_str "float4" -type 'TypeVector2i' - c_str "vector2i" -type 'TypeVector3i' - c_str "vector3i" -type 'TypeHalf' - c_str "half" -type 'TypeRational' - c_str "rational2i" -type 'TypeUInt' - c_str "uint" - -Done. diff --git a/testsuite/python-typedesc/ref/out.txt b/testsuite/python-typedesc/ref/out.txt index ad3e858f99..fdebc0829d 100644 --- a/testsuite/python-typedesc/ref/out.txt +++ b/testsuite/python-typedesc/ref/out.txt @@ -159,47 +159,6 @@ equivalent(vector,color) True vector.equivalent(float) False equivalent(vector,float) False -type 'TypeFloat' - c_str "float" -type 'TypeColor' - c_str "color" -type 'TypeString' - c_str "string" -type 'TypeInt' - c_str "int" -type 'TypePoint' - c_str "point" -type 'TypeVector' - c_str "vector" -type 'TypeNormal' - c_str "normal" -type 'TypeMatrix' - c_str "matrix" -type 'TypeMatrix33' - c_str "matrix33" -type 'TypeMatrix44' - c_str "matrix" -type 'TypeTimeCode' - c_str "timecode" -type 'TypeKeyCode' - c_str "keycode" -type 'TypeRational' - c_str "rational2i" -type 'TypeFloat2' - c_str "float2" -type 'TypeVector2' - c_str "vector2" -type 'TypeFloat4' - c_str "float4" -type 'TypeVector4' - c_str "float4" -type 'TypeVector2i' - c_str "vector2i" -type 'TypeVector3i' - c_str "vector3i" -type 'TypeHalf' - c_str "half" - type 'TypeFloat' c_str "float" type 'TypeColor' diff --git a/testsuite/python-typedesc/src/test_typedesc.py b/testsuite/python-typedesc/src/test_typedesc.py index 8a788efb1b..45693e6700 100755 --- a/testsuite/python-typedesc/src/test_typedesc.py +++ b/testsuite/python-typedesc/src/test_typedesc.py @@ -140,29 +140,6 @@ def breakdown_test(t, name="", verbose=True): print ("equivalent(vector,float)", oiio.TypeDesc.equivalent(oiio.TypeDesc("vector"), oiio.TypeDesc("float"))) print ("") - # DEPRECATED(1.8): Test the static data member types of pre-constructed types - breakdown_test (oiio.TypeDesc.TypeFloat, "TypeFloat", verbose=False) - breakdown_test (oiio.TypeDesc.TypeColor, "TypeColor", verbose=False) - breakdown_test (oiio.TypeDesc.TypeString, "TypeString", verbose=False) - breakdown_test (oiio.TypeDesc.TypeInt, "TypeInt", verbose=False) - breakdown_test (oiio.TypeDesc.TypePoint, "TypePoint", verbose=False) - breakdown_test (oiio.TypeDesc.TypeVector, "TypeVector", verbose=False) - breakdown_test (oiio.TypeDesc.TypeNormal, "TypeNormal", verbose=False) - breakdown_test (oiio.TypeDesc.TypeMatrix, "TypeMatrix", verbose=False) - breakdown_test (oiio.TypeDesc.TypeMatrix33, "TypeMatrix33", verbose=False) - breakdown_test (oiio.TypeDesc.TypeMatrix44, "TypeMatrix44", verbose=False) - breakdown_test (oiio.TypeDesc.TypeTimeCode, "TypeTimeCode", verbose=False) - breakdown_test (oiio.TypeDesc.TypeKeyCode, "TypeKeyCode", verbose=False) - breakdown_test (oiio.TypeDesc.TypeRational, "TypeRational", verbose=False) - breakdown_test (oiio.TypeDesc.TypeFloat2, "TypeFloat2", verbose=False) - breakdown_test (oiio.TypeDesc.TypeVector2, "TypeVector2", verbose=False) - breakdown_test (oiio.TypeDesc.TypeFloat4, "TypeFloat4", verbose=False) - breakdown_test (oiio.TypeDesc.TypeVector4, "TypeVector4", verbose=False) - breakdown_test (oiio.TypeDesc.TypeVector2i, "TypeVector2i", verbose=False) - breakdown_test (oiio.TypeDesc.TypeVector3i, "TypeVector3i", verbose=False) - breakdown_test (oiio.TypeDesc.TypeHalf, "TypeHalf", verbose=False) - print ("") - # Test the pre-constructed types breakdown_test (oiio.TypeFloat, "TypeFloat", verbose=False) breakdown_test (oiio.TypeColor, "TypeColor", verbose=False)