diff options
author | Aaron Carlisle <carlisle.b3d@gmail.com> | 2022-05-23 04:58:45 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2022-05-23 04:58:45 +0300 |
commit | 04ed96136bb2feae2418fb8c9db87bd22074a022 (patch) | |
tree | a28e0a4cf3454c50f70f78e6d10ab145b644f5ad /source/blender/io/usd | |
parent | d095fcd6b417e7b2d70d9c6ffd9fcf900935c0ec (diff) | |
parent | 568b692bcf8619ae057a0e604bf6e9e2ad89a15c (diff) |
Merge branch 'blender-v3.2-release'
Diffstat (limited to 'source/blender/io/usd')
-rw-r--r-- | source/blender/io/usd/CMakeLists.txt | 2 | ||||
-rw-r--r-- | source/blender/io/usd/intern/usd_writer_material.cc | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/io/usd/CMakeLists.txt b/source/blender/io/usd/CMakeLists.txt index 7a7c95b29f9..1205ae74e6f 100644 --- a/source/blender/io/usd/CMakeLists.txt +++ b/source/blender/io/usd/CMakeLists.txt @@ -43,6 +43,7 @@ set(INC ../../bmesh ../../depsgraph ../../editors/include + ../../imbuf ../../makesdna ../../makesrna ../../windowmanager @@ -114,6 +115,7 @@ set(SRC set(LIB bf_blenkernel bf_blenlib + bf_imbuf bf_io_common ) diff --git a/source/blender/io/usd/intern/usd_writer_material.cc b/source/blender/io/usd/intern/usd_writer_material.cc index a24877a20bd..857896b9330 100644 --- a/source/blender/io/usd/intern/usd_writer_material.cc +++ b/source/blender/io/usd/intern/usd_writer_material.cc @@ -10,6 +10,8 @@ #include "BKE_main.h" #include "BKE_node.h" +#include "IMB_colormanagement.h" + #include "BLI_fileops.h" #include "BLI_linklist.h" #include "BLI_listbase.h" @@ -414,13 +416,10 @@ static pxr::TfToken get_node_tex_image_color_space(bNode *node) Image *ima = reinterpret_cast<Image *>(node->id); - if (strcmp(ima->colorspace_settings.name, "Raw") == 0) { - return usdtokens::raw; - } - if (strcmp(ima->colorspace_settings.name, "Non-Color") == 0) { + if (IMB_colormanagement_space_name_is_data(ima->colorspace_settings.name)) { return usdtokens::raw; } - if (strcmp(ima->colorspace_settings.name, "sRGB") == 0) { + if (IMB_colormanagement_space_name_is_srgb(ima->colorspace_settings.name)) { return usdtokens::sRGB; } |