USD: fix startup issue on linux
On linux a man page is generated before the scripts are installed, this lead to USD getting a null pointer for it's pluging path and crashing the process.
This commit is contained in:
parent
ce961c4c2e
commit
ce4c16b7e2
|
@ -23,9 +23,12 @@ void ensure_usd_plugin_path_registered()
|
|||
|
||||
/* 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. */
|
||||
const std::string blender_usd_datafiles = BKE_appdir_folder_id(BLENDER_DATAFILES, "usd");
|
||||
/* The trailing slash indicates to the USD library that the path is a directory. */
|
||||
pxr::PlugRegistry::GetInstance().RegisterPlugins(blender_usd_datafiles + "/");
|
||||
const char *blender_usd_datafiles = BKE_appdir_folder_id(BLENDER_DATAFILES, "usd");
|
||||
if (blender_usd_datafiles) {
|
||||
const std::string blender_usd_data_folder = blender_usd_datafiles;
|
||||
/* The trailing slash indicates to the USD library that the path is a directory. */
|
||||
pxr::PlugRegistry::GetInstance().RegisterPlugins(blender_usd_data_folder + "/");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue