[Bf-blender-cvs] [0a6a74bac41] master: Fix T94396: USD errors opening saved scenes.

Michael Kowalski noreply at git.blender.org
Fri Feb 25 15:28:01 CET 2022


Commit: 0a6a74bac41558af0ee6d3031d923470d32e767e
Author: Michael Kowalski
Date:   Fri Feb 25 09:27:10 2022 -0500
Branches: master
https://developer.blender.org/rB0a6a74bac41558af0ee6d3031d923470d32e767e

Fix T94396: USD errors opening saved scenes.

Added call to ensure that the USD plugins are registered
when opening a USD cache archive. This is to avoid USD
load errors due to missing USD file format plugins when
opening blender files that contain USD transform cache
constraints and mesh sequence cache modifilers.

Fixes T94396

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

M	source/blender/io/usd/intern/usd_capi_import.cc

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

diff --git a/source/blender/io/usd/intern/usd_capi_import.cc b/source/blender/io/usd/intern/usd_capi_import.cc
index 1f384bdf127..6186e2bb61f 100644
--- a/source/blender/io/usd/intern/usd_capi_import.cc
+++ b/source/blender/io/usd/intern/usd_capi_import.cc
@@ -502,6 +502,9 @@ CacheArchiveHandle *USD_create_handle(struct Main * /*bmain*/,
                                       const char *filename,
                                       ListBase *object_paths)
 {
+  /* Must call this so that USD file format plugins are loaded. */
+  ensure_usd_plugin_path_registered();
+
   pxr::UsdStageRefPtr stage = pxr::UsdStage::Open(filename);
 
   if (!stage) {



More information about the Bf-blender-cvs mailing list