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>2021-08-06 16:18:18 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-08-06 16:20:39 +0300
commit9cff9f9f5df034ca27848875c25471dd952c34c4 (patch)
treedbee329e85d8dd332a11bf905c43c2970c576a0c /source/blender/editors/asset
parent2796ee7da049bbea3d83efdd42c3eaf1af1ebb2c (diff)
Cleanup: rename `FileList::asset_library` → `asset_library_ref`
In the `FileList` struct, rename the `AssetLibraryReference *asset_library` field to `asset_library_ref` -- it's a description of which asset library is used, and not the asset library itself. This is to make space for a future `AssetLibrary *asset_library` field, which will point to an actual asset library struct/class. No functional changes. Reviewed by: Severin Differential Revision: https://developer.blender.org/D12151
Diffstat (limited to 'source/blender/editors/asset')
-rw-r--r--source/blender/editors/asset/ED_asset_handle.h2
-rw-r--r--source/blender/editors/asset/ED_asset_temp_id_consumer.h2
-rw-r--r--source/blender/editors/asset/intern/asset_handle.cc4
-rw-r--r--source/blender/editors/asset/intern/asset_ops.cc4
-rw-r--r--source/blender/editors/asset/intern/asset_temp_id_consumer.cc10
5 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/asset/ED_asset_handle.h b/source/blender/editors/asset/ED_asset_handle.h
index c51ce422c25..efb99410d3d 100644
--- a/source/blender/editors/asset/ED_asset_handle.h
+++ b/source/blender/editors/asset/ED_asset_handle.h
@@ -36,7 +36,7 @@ struct ID *ED_asset_handle_get_local_id(const struct AssetHandle *asset);
ID_Type ED_asset_handle_get_id_type(const struct AssetHandle *asset);
int ED_asset_handle_get_preview_icon_id(const struct AssetHandle *asset);
void ED_asset_handle_get_full_library_path(const struct bContext *C,
- const struct AssetLibraryReference *asset_library,
+ const struct AssetLibraryReference *asset_library_ref,
const struct AssetHandle *asset,
char r_full_lib_path[]);
diff --git a/source/blender/editors/asset/ED_asset_temp_id_consumer.h b/source/blender/editors/asset/ED_asset_temp_id_consumer.h
index 9af08c5c52b..7c10d88262e 100644
--- a/source/blender/editors/asset/ED_asset_temp_id_consumer.h
+++ b/source/blender/editors/asset/ED_asset_temp_id_consumer.h
@@ -39,7 +39,7 @@ void ED_asset_temp_id_consumer_free(AssetTempIDConsumer **consumer);
struct ID *ED_asset_temp_id_consumer_ensure_local_id(
AssetTempIDConsumer *consumer,
const struct bContext *C,
- const struct AssetLibraryReference *asset_library,
+ const struct AssetLibraryReference *asset_library_ref,
ID_Type id_type,
struct Main *bmain,
struct ReportList *reports);
diff --git a/source/blender/editors/asset/intern/asset_handle.cc b/source/blender/editors/asset/intern/asset_handle.cc
index aae85e61372..5c8d0b1349c 100644
--- a/source/blender/editors/asset/intern/asset_handle.cc
+++ b/source/blender/editors/asset/intern/asset_handle.cc
@@ -60,13 +60,13 @@ int ED_asset_handle_get_preview_icon_id(const AssetHandle *asset)
}
void ED_asset_handle_get_full_library_path(const bContext *C,
- const AssetLibraryReference *asset_library,
+ const AssetLibraryReference *asset_library_ref,
const AssetHandle *asset,
char r_full_lib_path[FILE_MAX_LIBEXTRA])
{
*r_full_lib_path = '\0';
- std::string asset_path = ED_assetlist_asset_filepath_get(C, *asset_library, *asset);
+ std::string asset_path = ED_assetlist_asset_filepath_get(C, *asset_library_ref, *asset);
if (asset_path.empty()) {
return;
}
diff --git a/source/blender/editors/asset/intern/asset_ops.cc b/source/blender/editors/asset/intern/asset_ops.cc
index 579803f7ff7..dc418a1b3d5 100644
--- a/source/blender/editors/asset/intern/asset_ops.cc
+++ b/source/blender/editors/asset/intern/asset_ops.cc
@@ -266,7 +266,7 @@ static void ASSET_OT_clear(wmOperatorType *ot)
static bool asset_list_refresh_poll(bContext *C)
{
- const AssetLibraryReference *library = CTX_wm_asset_library(C);
+ const AssetLibraryReference *library = CTX_wm_asset_library_ref(C);
if (!library) {
return false;
}
@@ -276,7 +276,7 @@ static bool asset_list_refresh_poll(bContext *C)
static int asset_list_refresh_exec(bContext *C, wmOperator *UNUSED(unused))
{
- const AssetLibraryReference *library = CTX_wm_asset_library(C);
+ const AssetLibraryReference *library = CTX_wm_asset_library_ref(C);
ED_assetlist_clear(library, C);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/asset/intern/asset_temp_id_consumer.cc b/source/blender/editors/asset/intern/asset_temp_id_consumer.cc
index bed35fdeeb5..f664eab5cbb 100644
--- a/source/blender/editors/asset/intern/asset_temp_id_consumer.cc
+++ b/source/blender/editors/asset/intern/asset_temp_id_consumer.cc
@@ -60,14 +60,14 @@ class AssetTemporaryIDConsumer : NonCopyable, NonMovable {
}
ID *import_id(const bContext *C,
- const AssetLibraryReference &asset_library,
+ const AssetLibraryReference &asset_library_ref,
ID_Type id_type,
Main &bmain,
ReportList &reports)
{
const char *asset_name = ED_asset_handle_get_name(&handle_);
char blend_file_path[FILE_MAX_LIBEXTRA];
- ED_asset_handle_get_full_library_path(C, &asset_library, &handle_, blend_file_path);
+ ED_asset_handle_get_full_library_path(C, &asset_library_ref, &handle_, blend_file_path);
temp_lib_context_ = BLO_library_temp_load_id(
&bmain, blend_file_path, id_type, asset_name, &reports);
@@ -99,12 +99,12 @@ void ED_asset_temp_id_consumer_free(AssetTempIDConsumer **consumer)
ID *ED_asset_temp_id_consumer_ensure_local_id(AssetTempIDConsumer *consumer_,
const bContext *C,
- const AssetLibraryReference *asset_library,
+ const AssetLibraryReference *asset_library_ref,
ID_Type id_type,
Main *bmain,
ReportList *reports)
{
- if (!(consumer_ && asset_library && bmain && reports)) {
+ if (!(consumer_ && asset_library_ref && bmain && reports)) {
return nullptr;
}
AssetTemporaryIDConsumer *consumer = reinterpret_cast<AssetTemporaryIDConsumer *>(consumer_);
@@ -112,5 +112,5 @@ ID *ED_asset_temp_id_consumer_ensure_local_id(AssetTempIDConsumer *consumer_,
if (ID *local_id = consumer->get_local_id()) {
return local_id;
}
- return consumer->import_id(C, *asset_library, id_type, *bmain, *reports);
+ return consumer->import_id(C, *asset_library_ref, id_type, *bmain, *reports);
}