[Bf-blender-cvs] [5b9926521a5] tmp_libupdate_34: cleanup: remove superfluous plugin setup calls

Ray Molenkamp noreply at git.blender.org
Thu Aug 18 01:55:37 CEST 2022


Commit: 5b9926521a5ca370c09524f1020f10e7b7931532
Author: Ray Molenkamp
Date:   Wed Aug 17 17:54:59 2022 -0600
Branches: tmp_libupdate_34
https://developer.blender.org/rB5b9926521a5ca370c09524f1020f10e7b7931532

cleanup: remove superfluous plugin setup calls

ensure_usd_plugin_path_registered is called at
blender startup now, the test code does it's
own thing, so the individual functions no longer
have to worry about this.

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

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

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

diff --git a/source/blender/io/usd/intern/usd_capi_export.cc b/source/blender/io/usd/intern/usd_capi_export.cc
index 1033f85181c..0fbfa4c6d5d 100644
--- a/source/blender/io/usd/intern/usd_capi_export.cc
+++ b/source/blender/io/usd/intern/usd_capi_export.cc
@@ -175,8 +175,6 @@ bool USD_export(bContext *C,
   ViewLayer *view_layer = CTX_data_view_layer(C);
   Scene *scene = CTX_data_scene(C);
 
-  blender::io::usd::ensure_usd_plugin_path_registered();
-
   blender::io::usd::ExportJobData *job = static_cast<blender::io::usd::ExportJobData *>(
       MEM_mallocN(sizeof(blender::io::usd::ExportJobData), "ExportJobData"));
 
diff --git a/source/blender/io/usd/intern/usd_capi_import.cc b/source/blender/io/usd/intern/usd_capi_import.cc
index 6e7b32611e0..c80faa5960e 100644
--- a/source/blender/io/usd/intern/usd_capi_import.cc
+++ b/source/blender/io/usd/intern/usd_capi_import.cc
@@ -393,8 +393,6 @@ bool USD_import(struct bContext *C,
                 const USDImportParams *params,
                 bool as_background_job)
 {
-  blender::io::usd::ensure_usd_plugin_path_registered();
-
   /* Using new here since `MEM_*` functions do not call constructor to properly initialize data. */
   ImportJobData *job = new ImportJobData();
   job->bmain = CTX_data_main(C);
@@ -548,9 +546,6 @@ CacheArchiveHandle *USD_create_handle(struct Main * /*bmain*/,
                                       const char *filepath,
                                       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(filepath);
 
   if (!stage) {



More information about the Bf-blender-cvs mailing list