From b2f8f5a491f639e6207a8106da50b43d35f1f006 Mon Sep 17 00:00:00 2001 From: Michael Kowalski Date: Thu, 27 Jun 2024 19:06:49 +0200 Subject: [PATCH 1/5] Fix: USD import: domelight Y-up orientation Added necessary rotation to convert from Y-up to Z-up when importing USD dome lights as world materials. Pull Request: https://projects.blender.org/blender/blender/pulls/123797 --- source/blender/io/usd/intern/usd_light_convert.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source/blender/io/usd/intern/usd_light_convert.cc b/source/blender/io/usd/intern/usd_light_convert.cc index c78822b0584..3fd3cef91f3 100644 --- a/source/blender/io/usd/intern/usd_light_convert.cc +++ b/source/blender/io/usd/intern/usd_light_convert.cc @@ -12,6 +12,8 @@ #include #include #include +#include +#include #include #include #include @@ -533,6 +535,19 @@ void dome_light_to_world_material(const USDImportParams ¶ms, pxr::UsdGeomXformCache xf_cache(motionSampleTime); pxr::GfMatrix4d xf = xf_cache.GetLocalToWorldTransform(dome_light.GetPrim()); + pxr::UsdStageRefPtr stage = dome_light.GetPrim().GetStage(); + + if (!stage) { + CLOG_WARN( + &LOG, "Couldn't get stage for dome light %s", dome_light.GetPrim().GetPath().GetText()); + return; + } + + if (pxr::UsdGeomGetStageUpAxis(stage) == pxr::UsdGeomTokens->y) { + /* Convert from Y-up to Z-up with a 90 degree rotation about the X-axis. */ + xf *= pxr::GfMatrix4d().SetRotate(pxr::GfRotation(pxr::GfVec3d(1.0, 0.0, 0.0), 90.0)); + } + xf = pxr::GfMatrix4d().SetRotate(pxr::GfRotation(pxr::GfVec3d(0.0, 0.0, 1.0), -90.0)) * pxr::GfMatrix4d().SetRotate(pxr::GfRotation(pxr::GfVec3d(1.0, 0.0, 0.0), -90.0)) * xf; From 095e78bd28bbbab98bc66a8d8947ab1bfae969ac Mon Sep 17 00:00:00 2001 From: Miguel Pozo Date: Thu, 27 Jun 2024 19:14:48 +0200 Subject: [PATCH 2/5] Fix #123794: Crash when UDIMs have gray and color tiles --- source/blender/blenkernel/intern/image_gpu.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/image_gpu.cc b/source/blender/blenkernel/intern/image_gpu.cc index ff63ed32701..ec9ad497e7a 100644 --- a/source/blender/blenkernel/intern/image_gpu.cc +++ b/source/blender/blenkernel/intern/image_gpu.cc @@ -225,6 +225,7 @@ static GPUTexture *gpu_texture_create_tile_array(Image *ima, ImBuf *main_ibuf) ImBuf *ibuf = BKE_image_acquire_ibuf(ima, &iuser, nullptr); if (ibuf) { + const bool tile_use_grayscale = ibuf->planes <= 8; const bool store_premultiplied = BKE_image_has_gpu_texture_premultiplied_alpha(ima, ibuf); IMB_update_gpu_texture_sub(tex, ibuf, @@ -232,7 +233,7 @@ static GPUTexture *gpu_texture_create_tile_array(Image *ima, ImBuf *main_ibuf) tilelayer, UNPACK2(tilesize), use_high_bitdepth, - use_grayscale, + tile_use_grayscale, store_premultiplied); } From baf07c22bdbb33f0ecf13aa483f5fb3fa8a486e4 Mon Sep 17 00:00:00 2001 From: Miguel Pozo Date: Thu, 27 Jun 2024 19:15:55 +0200 Subject: [PATCH 3/5] Revert "Fix #123794: Crash when UDIMs have gray and color tiles" This reverts commit 095e78bd28bbbab98bc66a8d8947ab1bfae969ac. --- source/blender/blenkernel/intern/image_gpu.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/image_gpu.cc b/source/blender/blenkernel/intern/image_gpu.cc index ec9ad497e7a..ff63ed32701 100644 --- a/source/blender/blenkernel/intern/image_gpu.cc +++ b/source/blender/blenkernel/intern/image_gpu.cc @@ -225,7 +225,6 @@ static GPUTexture *gpu_texture_create_tile_array(Image *ima, ImBuf *main_ibuf) ImBuf *ibuf = BKE_image_acquire_ibuf(ima, &iuser, nullptr); if (ibuf) { - const bool tile_use_grayscale = ibuf->planes <= 8; const bool store_premultiplied = BKE_image_has_gpu_texture_premultiplied_alpha(ima, ibuf); IMB_update_gpu_texture_sub(tex, ibuf, @@ -233,7 +232,7 @@ static GPUTexture *gpu_texture_create_tile_array(Image *ima, ImBuf *main_ibuf) tilelayer, UNPACK2(tilesize), use_high_bitdepth, - tile_use_grayscale, + use_grayscale, store_premultiplied); } From 39fe42fcac718cb99e75aff920f5e7c00f7b068d Mon Sep 17 00:00:00 2001 From: Anthony Roberts Date: Thu, 27 Jun 2024 19:22:51 +0200 Subject: [PATCH 4/5] Windows: 4.2 Library incremental (OIIO+OIDN) Updating as per #118455, new versions of OIIO and OIDN Pull Request: https://projects.blender.org/blender/blender/pulls/123851 --- lib/windows_arm64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/windows_arm64 b/lib/windows_arm64 index 06a9cd56a27..181d15c1c64 160000 --- a/lib/windows_arm64 +++ b/lib/windows_arm64 @@ -1 +1 @@ -Subproject commit 06a9cd56a271b0d44a600858aedc8e32d18229a9 +Subproject commit 181d15c1c640d826c593b54ce097894a1710977e From 9e4d9295f0fb299773324be6125c1d3b783ebef4 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 27 Jun 2024 19:56:46 +0200 Subject: [PATCH 5/5] Fix: Compilation error of fribidi on macOS Fribidi uses Meson, which auto-detects presence of ccache and uses it when found. This could cause incorrect compilation results when doing a cross-compilation to different platforms on the same machine. Pass the typical configuration environment to the Meson setup, which takes care of specifying deployment targets and architecture as the compiler flags, preventing ccache from using result from a different architecture. This is similar to the Meson setup used for Harfbuzz and Epoxy. Pull Request: https://projects.blender.org/blender/blender/pulls/123828 --- build_files/build_environment/cmake/fribidi.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_files/build_environment/cmake/fribidi.cmake b/build_files/build_environment/cmake/fribidi.cmake index e2adb7bae0d..9f1790c6d39 100644 --- a/build_files/build_environment/cmake/fribidi.cmake +++ b/build_files/build_environment/cmake/fribidi.cmake @@ -12,7 +12,7 @@ ExternalProject_Add(external_fribidi DOWNLOAD_DIR ${DOWNLOAD_DIR} PREFIX ${BUILD_DIR}/fribidi - CONFIGURE_COMMAND + CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${MESON} setup --prefix ${LIBDIR}/fribidi ${MESON_BUILD_TYPE}