remove hardcoded path

This commit is contained in:
Jacques Lucke 2023-01-18 16:22:07 +01:00
parent cd9ab37373
commit fe6ae405c5
1 changed files with 7 additions and 1 deletions

View File

@ -4,13 +4,19 @@
* \ingroup asset_system
*/
#include "BKE_appdir.h"
#include "AS_asset_bundled.hh"
namespace blender::asset_system {
StringRefNull bundled_assets_directory_path()
{
return "/home/jacques/blender/build_release/bin/3.5/datafiles/assets/base_meshes";
static std::string path = []() {
const char *datafiles_path = BKE_appdir_folder_id(BLENDER_DATAFILES, "assets");
return datafiles_path;
}();
return path;
}
} // namespace blender::asset_system