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:
-rw-r--r--source/blender/blenkernel/BKE_asset_catalog.hh1
-rw-r--r--source/blender/blenkernel/intern/asset_catalog.cc15
2 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/blenkernel/BKE_asset_catalog.hh b/source/blender/blenkernel/BKE_asset_catalog.hh
index cae476708cd..8e6aeec5204 100644
--- a/source/blender/blenkernel/BKE_asset_catalog.hh
+++ b/source/blender/blenkernel/BKE_asset_catalog.hh
@@ -231,6 +231,7 @@ class AssetCatalogDefinitionFile {
* Later versioning code may be added to handle older files. */
const static int SUPPORTED_VERSION;
const static std::string VERSION_MARKER;
+ const static std::string HEADER;
CatalogFilePath file_path;
diff --git a/source/blender/blenkernel/intern/asset_catalog.cc b/source/blender/blenkernel/intern/asset_catalog.cc
index d98d83c477f..e16537fcb7f 100644
--- a/source/blender/blenkernel/intern/asset_catalog.cc
+++ b/source/blender/blenkernel/intern/asset_catalog.cc
@@ -48,6 +48,13 @@ const int AssetCatalogDefinitionFile::SUPPORTED_VERSION = 1;
* that starts with "VERSION". */
const std::string AssetCatalogDefinitionFile::VERSION_MARKER = "VERSION ";
+const std::string AssetCatalogDefinitionFile::HEADER =
+ "# This is an Asset Catalog Definition file for Blender.\n"
+ "#\n"
+ "# Empty lines and lines starting with `#` will be ignored.\n"
+ "# The first non-ignored line should be the version indicator.\n"
+ "# Other lines are of the format \"UUID:catalog/path/for/assets:simple catalog name\"\n";
+
AssetCatalogService::AssetCatalogService(const CatalogFilePath &asset_library_root)
: asset_library_root_(asset_library_root)
{
@@ -652,13 +659,7 @@ bool AssetCatalogDefinitionFile::write_to_disk_unsafe(const CatalogFilePath &des
// the file again.
// Write the header.
- // TODO(@sybren): move the header definition to some other place.
- output << "# This is an Asset Catalog Definition file for Blender." << std::endl;
- output << "#" << std::endl;
- output << "# Empty lines and lines starting with `#` will be ignored." << std::endl;
- output << "# The first non-ignored line should be the version indicator." << std::endl;
- output << "# Other lines are of the format \"UUID:catalog/path/for/assets:simple catalog name\""
- << std::endl;
+ output << HEADER;
output << "" << std::endl;
output << VERSION_MARKER << SUPPORTED_VERSION << std::endl;
output << "" << std::endl;