|
Blender V5.3
|
#include <AS_asset_catalog.hh>
Inherited by blender::asset_system::tests::TestableAssetCatalogService.
Classes | |
| struct | read_only_tag |
Static Public Attributes | |
| static const CatalogFilePath | DEFAULT_CATALOG_FILENAME = "blender_assets.cats.txt" |
Static Protected Member Functions | |
| static CatalogFilePath | find_suitable_cdf_path_for_writing (const CatalogFilePath &blend_file_path) |
Friends | |
| class | AssetLibraryService |
| class | AssetLibrary |
Definition at line 41 of file AS_asset_catalog.hh.
|
explicit |
Definition at line 39 of file asset_system/intern/asset_catalog.cc.
References blender::false, and blender::true.
Referenced by add_from_existing(), AssetCatalogService(), blender::asset_system::tests::TestableAssetCatalogService::TestableAssetCatalogService(), and ~AssetCatalogService().
|
explicit |
Definition at line 47 of file asset_system/intern/asset_catalog.cc.
References AssetCatalogService().
|
default |
References add_from_existing(), AssetCatalogService(), catalog_tree(), construct_cdf_in_memory(), create_catalog(), create_catalog_filter(), create_missing_catalogs(), delete_catalog_by_id_hard(), delete_catalog_by_id_soft(), find_catalog(), find_catalog_by_path(), find_suitable_cdf_path_for_writing(), get_catalog_definition_file(), get_catalogs(), get_deleted_catalogs(), has_unsaved_changes(), invalidate_catalog_tree(), is_catalog_known(), is_catalog_known_with_unsaved_changes(), is_empty(), is_read_only(), is_redo_possbile(), is_undo_possbile(), load_directory_recursive(), load_from_disk(), load_single_file(), parse_catalog_file(), prepare_to_merge_on_write(), prune_catalogs_by_id(), prune_catalogs_by_path(), purge_catalogs_not_listed(), read_into_tree(), redo(), reload_catalogs(), tag_all_catalogs_as_unsaved_changes(), tag_has_unsaved_changes(), undo(), undo_push(), untag_has_unsaved_changes(), update_catalog_path(), write_to_disk(), and write_to_disk_ex().
| void blender::asset_system::AssetCatalogService::add_from_existing | ( | const AssetCatalogService & | other_service, |
| FunctionRef< void(const AssetCatalog &existing, const AssetCatalog &to_be_ignored)> | on_duplicate_items ) |
Duplicate the catalogs from other_service into this one. Does not rebuild the tree, this needs to be done by the caller (call #rebuild_tree()!).
Definition at line 339 of file asset_system/intern/asset_catalog.cc.
References AssetCatalogService().
Referenced by ~AssetCatalogService().
| std::shared_ptr< const AssetCatalogTree > blender::asset_system::AssetCatalogService::catalog_tree | ( | ) |
May be called from multiple threads.
Definition at line 607 of file asset_system/intern/asset_catalog.cc.
References create_missing_catalogs(), lock, and read_into_tree().
Referenced by blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), and ~AssetCatalogService().
|
protected |
Construct an in-memory catalog definition file (CDF) from the currently known catalogs. This object can then be processed further before saving to disk.
Definition at line 577 of file asset_system/intern/asset_catalog.cc.
Referenced by blender::asset_system::AssetLibraryService::move_runtime_current_file_into_on_disk_library(), write_to_disk_ex(), and ~AssetCatalogService().
| AssetCatalog * blender::asset_system::AssetCatalogService::create_catalog | ( | const AssetCatalogPath & | catalog_path | ) |
Create a catalog with some sensible auto-generated catalog ID. The catalog will be saved to the default catalog file.
NOTE: this does NOT mark the catalog service itself as 'has changes'. The caller is responsible for that.
Definition at line 272 of file asset_system/intern/asset_catalog.cc.
References BLI_assert_msg, blender::asset_system::AssetCatalog::from_path(), blender::asset_system::AssetLibraryService::get(), invalidate_catalog_tree(), and blender::asset_system::AssetLibraryService::tag_all_library_catalogs_dirty().
Referenced by blender::ed::asset::catalog_add(), create_missing_catalogs(), blender::ed::asset::library_ensure_catalog(), blender::asset_system::tests::AssetCatalogTest::save_from_memory_into_existing_asset_lib(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), and ~AssetCatalogService().
| AssetCatalogFilter blender::asset_system::AssetCatalogService::create_catalog_filter | ( | CatalogID | active_catalog_id | ) | const |
Create a filter object that can be used to determine whether an asset belongs to the given catalog, or any of the catalogs in the sub-tree rooted at the given catalog.
Definition at line 162 of file asset_system/intern/asset_catalog.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::asset_system::AssetCatalogFilter::AssetCatalogFilter(), find_catalog(), blender::asset_system::AssetCatalogPath::is_contained_in(), and blender::asset_system::AssetCatalog::path.
Referenced by blender::ed::asset_browser::file_ensure_updated_catalog_filter_data(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), and ~AssetCatalogService().
|
protected |
For every catalog, ensure that its parent path also has a known catalog.
Definition at line 620 of file asset_system/intern/asset_catalog.cc.
References blender::asset_system::AssetCatalogPath::AssetCatalogPath(), create_catalog(), blender::asset_system::AssetCatalog::flags, blender::asset_system::AssetCatalog::Flags::has_unsaved_changes, and blender::asset_system::AssetCatalogPath::parent().
Referenced by catalog_tree(), blender::asset_system::tests::TestableAssetCatalogService::create_missing_catalogs(), load_from_disk(), redo(), reload_catalogs(), undo(), update_catalog_path(), and ~AssetCatalogService().
|
protected |
Hard delete a catalog. This simply removes the catalog from existence. The deletion will not be remembered, and reloading the CDF will bring it back.
Definition at line 207 of file asset_system/intern/asset_catalog.cc.
Referenced by purge_catalogs_not_listed(), and ~AssetCatalogService().
|
protected |
Delete a catalog, without deleting any of its children and without rebuilding the catalog tree. The deletion in "Soft", in the sense that the catalog pointer is moved from catalogs_ to deleted_catalogs_; the AssetCatalog instance itself is kept in memory. As a result, it will be removed from a CDF when saved to disk.
This is a lower-level function than prune_catalogs_by_path.
NOTE: this does NOT mark the catalog service itself as 'has changes'. The caller is responsible for that.
Definition at line 186 of file asset_system/intern/asset_catalog.cc.
References blender::asset_system::AssetCatalog::flags, and blender::asset_system::AssetCatalog::Flags::is_deleted.
Referenced by blender::asset_system::tests::TestableAssetCatalogService::delete_catalog_by_id_soft(), prune_catalogs_by_path(), and ~AssetCatalogService().
| AssetCatalog * blender::asset_system::AssetCatalogService::find_catalog | ( | CatalogID | catalog_id | ) | const |
Return catalog with the given ID. Return nullptr if not found.
Definition at line 125 of file asset_system/intern/asset_catalog.cc.
Referenced by blender::ed::asset::catalog_move(), blender::ed::asset::catalog_rename(), blender::compare_asset_catalog(), create_catalog_filter(), blender::ed::asset_browser::AssetCatalogDropTarget::get_drag_catalog(), prune_catalogs_by_id(), blender::asset_system::AssetLibrary::refresh_catalog_simplename(), blender::ed::geometry::register_node_group_operators(), blender::asset_system::tests::AssetCatalogTest::save_from_memory_into_existing_asset_lib(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), update_catalog_path(), and ~AssetCatalogService().
| AssetCatalog * blender::asset_system::AssetCatalogService::find_catalog_by_path | ( | const AssetCatalogPath & | path | ) | const |
Return first catalog with the given path. Return nullptr if not found. This is not an efficient call as it's just a linear search over the catalogs.
If there are multiple catalogs with the same path, return the first-loaded one. If there is none marked as "first loaded", return the one with the lowest UUID.
Definition at line 135 of file asset_system/intern/asset_catalog.cc.
Referenced by blender::ed::asset::catalog_name_ensure_unique(), blender::ed::asset::library_ensure_catalog(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), and ~AssetCatalogService().
|
staticprotected |
Find a suitable path to write a CDF to.
This depends on the location of the blend file, and on whether a CDF already exists next to it or whether the blend file is saved inside an asset library.
Definition at line 550 of file asset_system/intern/asset_catalog.cc.
References blender::AS_asset_library_find_suitable_root_path_from_path(), blender::asset_system::asset_definition_default_file_path_from_dir(), BLI_assert_msg, BLI_path_join, blender::BLI_path_split_dir_part(), DEFAULT_CATALOG_FILENAME, and PATH_MAX.
Referenced by write_to_disk_ex(), and ~AssetCatalogService().
|
protected |
|
protected |
Definition at line 111 of file asset_system/intern/asset_catalog.cc.
Referenced by blender::asset_system::tests::TestableAssetCatalogService::count_catalogs_with_path(), and ~AssetCatalogService().
|
protected |
Definition at line 115 of file asset_system/intern/asset_catalog.cc.
Referenced by blender::asset_system::tests::TestableAssetCatalogService::get_deleted_catalogs(), and ~AssetCatalogService().
| bool blender::asset_system::AssetCatalogService::has_unsaved_changes | ( | ) | const |
Definition at line 86 of file asset_system/intern/asset_catalog.cc.
References blender::BLI_assert().
Referenced by is_catalog_known_with_unsaved_changes(), blender::asset_system::tests::TEST_F(), write_to_disk_ex(), and ~AssetCatalogService().
|
protected |
Ensure a catalog_tree() will update the tree. Must be called whenever the contained user visible catalogs change. May be called from multiple threads.
Definition at line 601 of file asset_system/intern/asset_catalog.cc.
References lock.
Referenced by create_catalog(), load_from_disk(), prune_catalogs_by_path(), redo(), reload_catalogs(), undo(), update_catalog_path(), write_to_disk(), and ~AssetCatalogService().
| bool blender::asset_system::AssetCatalogService::is_catalog_known | ( | CatalogID | catalog_id | ) | const |
Return true only if this catalog is known. This treats deleted catalogs as "unknown".
Definition at line 156 of file asset_system/intern/asset_catalog.cc.
References blender::BLI_assert().
Referenced by ~AssetCatalogService().
|
protected |
Definition at line 465 of file asset_system/intern/asset_catalog.cc.
References has_unsaved_changes().
Referenced by purge_catalogs_not_listed(), reload_catalogs(), and ~AssetCatalogService().
| bool blender::asset_system::AssetCatalogService::is_empty | ( | ) | const |
Return true only if there are no catalogs known.
Definition at line 105 of file asset_system/intern/asset_catalog.cc.
References blender::BLI_assert().
Referenced by blender::asset_system::tests::TEST_F(), and ~AssetCatalogService().
| bool blender::asset_system::AssetCatalogService::is_read_only | ( | ) | const |
Check if this is a read-only service meaning the user shouldn't be able to do edits. This is not enforced by internal catalog code, the catalog service user is responsible for it. For example the UI should disallow edits.
Definition at line 92 of file asset_system/intern/asset_catalog.cc.
Referenced by blender::ed::asset::catalog_add(), blender::ed::asset::catalog_move(), blender::ed::asset::catalog_remove(), blender::ed::asset::catalog_rename(), blender::ed::asset::catalogs_read_only(), blender::ed::asset::catalogs_save_from_asset_reference(), blender::ed::asset::catalogs_save_from_main_path(), and ~AssetCatalogService().
| bool blender::asset_system::AssetCatalogService::is_redo_possbile | ( | ) | const |
Definition at line 665 of file asset_system/intern/asset_catalog.cc.
Referenced by blender::ed::asset::asset_catalog_redo_poll(), redo(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), and ~AssetCatalogService().
| bool blender::asset_system::AssetCatalogService::is_undo_possbile | ( | ) | const |
Definition at line 660 of file asset_system/intern/asset_catalog.cc.
Referenced by blender::ed::asset::asset_catalog_undo_poll(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), undo(), and ~AssetCatalogService().
|
protected |
Definition at line 347 of file asset_system/intern/asset_catalog.cc.
References blender::asset_system::asset_definition_default_file_path_from_dir(), blender::BLI_exists(), CLOG_DEBUG, load_single_file(), and blender::LOG.
Referenced by load_from_disk(), and ~AssetCatalogService().
| void blender::asset_system::AssetCatalogService::load_from_disk | ( | ) |
Load asset catalog definitions from the files found in the asset library.
Definition at line 309 of file asset_system/intern/asset_catalog.cc.
References load_from_disk().
Referenced by load_from_disk(), blender::asset_system::AssetLibrary::load_or_reload_catalogs(), blender::asset_system::tests::AssetCatalogTest::save_from_memory_into_existing_asset_lib(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), and ~AssetCatalogService().
| void blender::asset_system::AssetCatalogService::load_from_disk | ( | const CatalogFilePath & | file_or_directory_path | ) |
Load asset catalog definitions from the given file or directory.
Definition at line 314 of file asset_system/intern/asset_catalog.cc.
References blender::BLI_stat(), CLOG_DEBUG, create_missing_catalogs(), invalidate_catalog_tree(), load_directory_recursive(), load_single_file(), blender::LOG, S_ISDIR, and S_ISREG.
|
protected |
Definition at line 362 of file asset_system/intern/asset_catalog.cc.
References BLI_assert_msg, and parse_catalog_file().
Referenced by load_directory_recursive(), load_from_disk(), and ~AssetCatalogService().
|
protected |
Definition at line 374 of file asset_system/intern/asset_catalog.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), and blender::asset_system::skip_experimental_asset_catalog().
Referenced by load_single_file(), and ~AssetCatalogService().
| void blender::asset_system::AssetCatalogService::prepare_to_merge_on_write | ( | ) |
Ensure that the next call to #on_blend_save_post() will choose a new location for the CDF suitable for the location of the blend file (regardless of where the current catalogs come from), and that catalogs will be merged with already-existing ones in that location.
Use this for a "Save as..." that has to write the catalogs to the new blend file location, instead of updating the previously read CDF.
Definition at line 532 of file asset_system/intern/asset_catalog.cc.
References tag_all_catalogs_as_unsaved_changes().
Referenced by blender::ed::asset::asset_bundle_install_exec(), and ~AssetCatalogService().
| void blender::asset_system::AssetCatalogService::prune_catalogs_by_id | ( | CatalogID | catalog_id | ) |
Delete all catalogs with the same path as the identified catalog, and their children. This call is the same as calling prune_catalogs_by_path(find_catalog(catalog_id)->path).
Definition at line 236 of file asset_system/intern/asset_catalog.cc.
References BLI_assert_msg, find_catalog(), blender::asset_system::AssetCatalog::path, and prune_catalogs_by_path().
Referenced by blender::ed::asset::catalog_remove(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), and ~AssetCatalogService().
| void blender::asset_system::AssetCatalogService::prune_catalogs_by_path | ( | const AssetCatalogPath & | path | ) |
Delete all catalogs with the given path, and their children.
Definition at line 216 of file asset_system/intern/asset_catalog.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::asset_system::AssetCatalog::catalog_id, delete_catalog_by_id_soft(), blender::asset_system::AssetLibraryService::get(), invalidate_catalog_tree(), blender::asset_system::AssetCatalogPath::is_contained_in(), blender::asset_system::AssetCatalog::path, and blender::asset_system::AssetLibraryService::tag_all_library_catalogs_dirty().
Referenced by prune_catalogs_by_id(), blender::asset_system::tests::TEST_F(), and ~AssetCatalogService().
|
protected |
Delete catalogs, only keeping them when they are either listed in catalogs_to_keep or have unsaved changes.
Definition at line 446 of file asset_system/intern/asset_catalog.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), delete_catalog_by_id_hard(), and is_catalog_known_with_unsaved_changes().
Referenced by reload_catalogs(), and ~AssetCatalogService().
|
protected |
Definition at line 589 of file asset_system/intern/asset_catalog.cc.
Referenced by catalog_tree(), and ~AssetCatalogService().
| void blender::asset_system::AssetCatalogService::redo | ( | ) |
Restore the last-saved redo snapshot, pushing the current state onto the undo stack. The caller is responsible for first checking that undoing is possible.
Definition at line 681 of file asset_system/intern/asset_catalog.cc.
References blender::BLI_assert(), BLI_assert_msg, create_missing_catalogs(), blender::asset_system::AssetLibraryService::get(), invalidate_catalog_tree(), is_redo_possbile(), and blender::asset_system::AssetLibraryService::tag_all_library_catalogs_dirty().
Referenced by blender::ed::asset::asset_catalog_redo_exec(), blender::asset_system::tests::TEST_F(), and ~AssetCatalogService().
| void blender::asset_system::AssetCatalogService::reload_catalogs | ( | ) |
Merge on-disk changes into the in-memory asset catalogs. This should be called before writing the asset catalogs to disk.
Definition at line 408 of file asset_system/intern/asset_catalog.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::BLI_is_file(), create_missing_catalogs(), blender::asset_system::AssetCatalogDefinitionFile::file_path, invalidate_catalog_tree(), is_catalog_known_with_unsaved_changes(), blender::asset_system::AssetCatalogDefinitionFile::parse_catalog_file(), purge_catalogs_not_listed(), and blender::asset_system::skip_experimental_asset_catalog().
Referenced by blender::asset_system::AllAssetLibrary::rebuild_catalogs_from_nested(), blender::asset_system::OnDiskAssetLibrary::refresh_catalogs(), blender::asset_system::RemoteAssetLibrary::refresh_catalogs(), blender::asset_system::tests::TEST_F(), write_to_disk_ex(), and ~AssetCatalogService().
|
protected |
For every catalog, mark it as "dirty".
Definition at line 97 of file asset_system/intern/asset_catalog.cc.
Referenced by prepare_to_merge_on_write(), and ~AssetCatalogService().
| void blender::asset_system::AssetCatalogService::tag_has_unsaved_changes | ( | AssetCatalog * | edited_catalog = nullptr | ) |
Set tag indicating that some catalog modifications are unsaved, which could get lost on exit. This tag is not set by internal catalog code, the catalog service user is responsible for it. It is cleared by write_to_disk().
This "dirty" state is tracked per catalog, so that it's possible to gracefully load changes from disk. Any catalog with unsaved changes will not be overwritten by on-disk changes.
Definition at line 54 of file asset_system/intern/asset_catalog.cc.
References blender::BLI_assert(), blender::asset_system::AssetCatalog::flags, and blender::asset_system::AssetCatalog::Flags::has_unsaved_changes.
Referenced by blender::ed::asset::catalog_add(), blender::ed::asset::catalog_move(), blender::ed::asset::catalog_remove(), blender::ed::asset::catalog_rename(), blender::ed::asset::library_ensure_catalog(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), update_catalog_path(), and ~AssetCatalogService().
| void blender::asset_system::AssetCatalogService::undo | ( | ) |
Restore the last-saved undo snapshot, pushing the current state onto the redo stack. The caller is responsible for first checking that undoing is possible.
Definition at line 670 of file asset_system/intern/asset_catalog.cc.
References BLI_assert_msg, create_missing_catalogs(), blender::asset_system::AssetLibraryService::get(), invalidate_catalog_tree(), is_undo_possbile(), and blender::asset_system::AssetLibraryService::tag_all_library_catalogs_dirty().
Referenced by blender::ed::asset::asset_bundle_install_exec(), blender::ed::asset::asset_catalog_undo_exec(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), and ~AssetCatalogService().
| void blender::asset_system::AssetCatalogService::undo_push | ( | ) |
Store the current catalogs in the undo stack. This snapshots everything in the AssetCatalogCollection.
Definition at line 693 of file asset_system/intern/asset_catalog.cc.
References blender::BLI_assert().
Referenced by blender::ed::asset::asset_bundle_install_exec(), blender::ed::asset::asset_catalog_undo_push_exec(), blender::ed::asset::catalog_add(), blender::ed::asset::catalog_move(), blender::ed::asset::catalog_remove(), blender::ed::asset::catalog_rename(), blender::ed::asset::catalogs_save_from_asset_reference(), blender::ed::asset::catalogs_save_from_main_path(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), and ~AssetCatalogService().
|
protected |
Definition at line 65 of file asset_system/intern/asset_catalog.cc.
References blender::BLI_assert().
Referenced by write_to_disk(), and ~AssetCatalogService().
| void blender::asset_system::AssetCatalogService::update_catalog_path | ( | CatalogID | catalog_id, |
| const AssetCatalogPath & | new_catalog_path ) |
Update the catalog path, also updating the catalog path of all sub-catalogs.
Definition at line 246 of file asset_system/intern/asset_catalog.cc.
References create_missing_catalogs(), find_catalog(), blender::asset_system::AssetLibraryService::get(), invalidate_catalog_tree(), blender::asset_system::AssetCatalog::path, blender::asset_system::AssetCatalogPath::rebase(), blender::asset_system::AssetCatalog::simple_name_refresh(), blender::asset_system::AssetLibraryService::tag_all_library_catalogs_dirty(), and tag_has_unsaved_changes().
Referenced by blender::ed::asset::catalog_move(), blender::ed::asset::catalog_rename(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), and ~AssetCatalogService().
| bool blender::asset_system::AssetCatalogService::write_to_disk | ( | const CatalogFilePath & | blend_file_path | ) |
Write the catalog definitions to disk.
The location where the catalogs are saved is variable, and depends on the location of the blend file. The first matching rule wins:
Return true on success, which either means there were no in-memory categories to save, or the save was successful.
Definition at line 483 of file asset_system/intern/asset_catalog.cc.
References blender::BLI_assert(), invalidate_catalog_tree(), untag_has_unsaved_changes(), and write_to_disk_ex().
Referenced by blender::ed::asset::catalogs_save_from_asset_reference(), blender::ed::asset::catalogs_save_from_main_path(), blender::asset_system::AssetLibrary::on_blend_save_post(), blender::asset_system::tests::AssetCatalogTest::save_from_memory_into_existing_asset_lib(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), and ~AssetCatalogService().
|
protected |
Implementation of write_to_disk() that doesn't clear the "has unsaved changes" tag.
Definition at line 501 of file asset_system/intern/asset_catalog.cc.
References construct_cdf_in_memory(), find_suitable_cdf_path_for_writing(), has_unsaved_changes(), and reload_catalogs().
Referenced by write_to_disk(), and ~AssetCatalogService().
|
friend |
Definition at line 57 of file AS_asset_catalog.hh.
References AssetLibrary.
Referenced by AssetLibrary.
|
friend |
Definition at line 56 of file AS_asset_catalog.hh.
References AssetLibraryService.
Referenced by AssetLibraryService.
|
static |
Definition at line 60 of file AS_asset_catalog.hh.
Referenced by blender::asset_system::asset_definition_default_file_path_from_dir(), find_suitable_cdf_path_for_writing(), blender::asset_system::AssetLibraryService::move_runtime_current_file_into_on_disk_library(), blender::asset_system::tests::AssetCatalogTest::save_from_memory_into_existing_asset_lib(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), and blender::asset_system::tests::TEST_F().