[46fc8821601] temp-usd-library-update-20.05: USD: Upgrade library 20.02 → 20.05

Sybren A. Stüvel noreply at git.blender.org
Fri Jun 12 18:12:19 CEST 2020


Commit: 46fc8821601841c4a3fad725ad2ee7a3d855647e
Author: Sybren A. Stüvel
Date:   Fri Jun 12 17:38:30 2020 +0200
Branches: temp-usd-library-update-20.05
https://developer.blender.org/rB46fc8821601841c4a3fad725ad2ee7a3d855647e

USD: Upgrade library 20.02 → 20.05

USD version 20.05 requires C++14, so we should only upgrade after T76783.

===================================================================

M	build_files/build_environment/cmake/versions.cmake
M	build_files/build_environment/install_deps.sh
M	build_files/build_environment/patches/usd.diff

===================================================================

diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake
index a140a26b023..1aadc7e1709 100644
--- a/build_files/build_environment/cmake/versions.cmake
+++ b/build_files/build_environment/cmake/versions.cmake
@@ -297,9 +297,9 @@ set(EMBREE_VERSION 3.10.0)
 set(EMBREE_URI https://github.com/embree/embree/archive/v${EMBREE_VERSION}.zip)
 set(EMBREE_HASH 4bbe29e7eaa46417efc75fc5f1e8eb87)
 
-set(USD_VERSION 20.02)
+set(USD_VERSION 20.05)
 set(USD_URI https://github.com/PixarAnimationStudios/USD/archive/v${USD_VERSION}.tar.gz)
-set(USD_HASH 8901815f01469a7f4496bd60315a9d10)
+set(USD_HASH 6d679e739e7f65725d9c029e37dda9fc)
 
 set(OIDN_VERSION 1.0.0)
 set(OIDN_URI https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.zip)
diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh
index 06d9cc4aa06..570d75399ea 100755
--- a/build_files/build_environment/install_deps.sh
+++ b/build_files/build_environment/install_deps.sh
@@ -459,7 +459,7 @@ ALEMBIC_FORCE_BUILD=false
 ALEMBIC_FORCE_REBUILD=false
 ALEMBIC_SKIP=false
 
-USD_VERSION="20.02"
+USD_VERSION="20.05"
 USD_FORCE_BUILD=false
 USD_FORCE_REBUILD=false
 USD_SKIP=false
diff --git a/build_files/build_environment/patches/usd.diff b/build_files/build_environment/patches/usd.diff
index adee3d2e458..8f457271a5c 100644
--- a/build_files/build_environment/patches/usd.diff
+++ b/build_files/build_environment/patches/usd.diff
@@ -11,10 +11,10 @@ diff -x .git -ur usd.orig/cmake/defaults/Packages.cmake external_usd/cmake/defau
  
  # --math
 diff -x .git -ur usd.orig/pxr/base/plug/initConfig.cpp external_usd/pxr/base/plug/initConfig.cpp
---- usd.orig/pxr/base/plug/initConfig.cpp	2019-10-24 22:39:53.000000000 +0200
-+++ external_usd/pxr/base/plug/initConfig.cpp	2019-12-11 11:00:37.643323127 +0100
-@@ -69,8 +69,38 @@
- 
+--- usd.orig/pxr/base/plug/initConfig.cpp.orig	2020-06-12 17:20:07.478199779 +0200
++++ external_usd/pxr/base/plug/initConfig.cpp	2020-06-12 17:25:28.648588552 +0200
+@@ -69,10 +69,40 @@
+
  ARCH_CONSTRUCTOR(Plug_InitConfig, 2, void)
  {
 +    /* The contents of this constructor have been moved to usd_initialise_plugin_path(...) */
@@ -39,7 +39,9 @@ diff -x .git -ur usd.orig/pxr/base/plug/initConfig.cpp external_usd/pxr/base/plu
 +usd_initialise_plugin_path(const char *datafiles_usd_path)
 +{
      std::vector<std::string> result;
- 
+
+     std::vector<std::string> debugMessages;
+
 +    // Add Blender-specific paths. They MUST end in a slash, or symlinks will not be treated as directory.
 +    if (datafiles_usd_path != NULL && datafiles_usd_path[0] != '\0') {
 +        std::string datafiles_usd_path_str(datafiles_usd_path);
@@ -49,14 +51,14 @@ diff -x .git -ur usd.orig/pxr/base/plug/initConfig.cpp external_usd/pxr/base/plu
 +        result.push_back(datafiles_usd_path_str);
 +    }
 +
-     // Determine the absolute path to the Plug shared library.
-     // Any relative paths specified in the plugin search path will be
-     // anchored to this directory, to allow for relocatability.
-@@ -94,9 +124,24 @@
-     _AppendPathList(&result, installLocation, sharedLibPath);
+     // Determine the absolute path to the Plug shared library.  Any relative
+     // paths specified in the plugin search path will be anchored to this
+     // directory, to allow for relocatability.  Note that this can fail when pxr
+@@ -114,9 +144,24 @@
+     _AppendPathList(&result, installLocation, binaryPath);
  #endif // PXR_INSTALL_LOCATION
- 
--    Plug_SetPaths(result);
+
+-    Plug_SetPaths(result, debugMessages);
 -}
 +    if (!TfGetenv("PXR_PATH_DEBUG").empty()) {
 +        printf("USD Plugin paths: (%zu in total):\n", result.size());
@@ -64,10 +66,10 @@ diff -x .git -ur usd.orig/pxr/base/plug/initConfig.cpp external_usd/pxr/base/plu
 +            printf("    %s\n", path.c_str());
 +        }
 +    }
- 
-+    Plug_SetPaths(result);
+
++    Plug_SetPaths(result, debugMessages);
  }
- 
+
  PXR_NAMESPACE_CLOSE_SCOPE
 +
 +/* Workaround to make it possible to pass a path at runtime to USD. */
@@ -79,18 +81,6 @@ diff -x .git -ur usd.orig/pxr/base/plug/initConfig.cpp external_usd/pxr/base/plu
 +    PXR_NS::usd_initialise_plugin_path(datafiles_usd_path);
 +}
 +}
-diff -Naur external_usd_orig/pxr/base/tf/preprocessorUtils.h external_usd/pxr/base/tf/preprocessorUtils.h
---- external_usd_orig/pxr/base/tf/preprocessorUtils.h	2019-10-24 14:39:53 -0600
-+++ external_usd/pxr/base/tf/preprocessorUtils.h	2020-01-14 09:30:18 -0700
-@@ -189,7 +189,7 @@
- /// Exapnds to 1 if the argument is a tuple, and 0 otherwise.
- /// \ingroup group_tf_Preprocessor
- /// \hideinitializer
--#if defined(ARCH_OS_WINDOWS)
-+#if defined(ARCH_COMPILER_MSVC)
-     #define TF_PP_IS_TUPLE(sequence) \
-         BOOST_VMD_IS_TUPLE(sequence)
- #else
 diff -Naur external_usd_base/cmake/macros/Public.cmake external_usd/cmake/macros/Public.cmake
 --- external_usd_base/cmake/macros/Public.cmake	2019-10-24 14:39:53 -0600
 +++ external_usd/cmake/macros/Public.cmake	2020-01-11 13:33:29 -0700



More information about the Bf-blender-cvs mailing list