Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-08-31 19:13:49 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-09-01 18:28:05 +0300
commitfef1a6c54e74372b863561ad40c1bd5bffef8c38 (patch)
tree4e5f41667e54aeef16a11809eb5ee3a42219135e /source/creator
parentf1b10477c28c91f8b29a0ab4a25a149e7f0147db (diff)
USD: move library initialisation from `main()` to USD module
Initialize the USD library when used (instead of at startup), so that this can happen inside the IO/USD module. This makes calls to the USD library local to Blender's USD code. Note that failure to find the USD JSON files will now only be reported when the USD exporter is used, and not on every startup of Blender. This is the first step in cleaning up the way Blender patches and initialises the USD library. Manifest Task: https://developer.blender.org/T80320
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 3d76d832d9f..37fbf0cf76a 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -442,23 +442,6 @@ int main(int argc,
BKE_materials_init();
-#ifdef WITH_USD
- /* Workaround to make it possible to pass a path at runtime to USD.
- *
- * USD requires some JSON files, and it uses a static constructor to determine the possible
- * file-system paths to find those files. This made it impossible for Blender to pass a path to
- * the USD library at runtime, as the constructor would run before Blender's main() function.
- * We have patched USD (see usd.diff) to avoid that particular static constructor, and have an
- * initialization function instead.
- *
- * This function is implemented in the USD source code, `pxr/base/lib/plug/initConfig.cpp`. */
- extern void usd_initialise_plugin_path(const char *datafiles_usd_path);
-
- /* Tell USD which directory to search for its JSON files. If 'datafiles/usd'
- * does not exist, the USD library will not be able to read or write any files. */
- usd_initialise_plugin_path(BKE_appdir_folder_id(BLENDER_DATAFILES, "usd"));
-#endif /* WITH_USD */
-
if (G.background == 0) {
#ifndef WITH_PYTHON_MODULE
BLI_argsParse(ba, 2, NULL, NULL);