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:
authorBastien Montagne <bastien@blender.org>2022-09-06 19:21:16 +0300
committerBastien Montagne <bastien@blender.org>2022-09-06 19:21:16 +0300
commit0c242ff72b15fd21d4d2d9af0e3382c9197d4ab5 (patch)
tree17f0af0a941be6ff1c3f31b1f329fdcdb02673d1 /source/blender/blenkernel/intern/lib_override.cc
parente46687c3aacfd69bde83187233e73a8cc6fa5d8d (diff)
Cleanup: IDManagement: Simplify `owner_get` calllback of IDTypeInfo.
Now that all embedded IDs have a loopback pointer to their owner, we do need anymore extra parameters for this accessor.
Diffstat (limited to 'source/blender/blenkernel/intern/lib_override.cc')
-rw-r--r--source/blender/blenkernel/intern/lib_override.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/lib_override.cc b/source/blender/blenkernel/intern/lib_override.cc
index 3c77573dc41..a6f41868453 100644
--- a/source/blender/blenkernel/intern/lib_override.cc
+++ b/source/blender/blenkernel/intern/lib_override.cc
@@ -105,8 +105,7 @@ BLI_INLINE const IDOverrideLibrary *BKE_lib_override_library_get(const Main *bma
if (id_type->owner_get != nullptr) {
/* The #IDTypeInfo::owner_get callback should not modify the arguments, so casting away const
* is okay. */
- const ID *owner_id = id_type->owner_get(
- const_cast<Main *>(bmain), const_cast<ID *>(id), const_cast<ID *>(owner_id_hint));
+ const ID *owner_id = id_type->owner_get(const_cast<ID *>(id));
if (r_owner_id != nullptr) {
*r_owner_id = owner_id;
}
@@ -2214,7 +2213,7 @@ static ID *lib_override_library_main_resync_root_get(Main *bmain, ID *id)
if (!ID_IS_OVERRIDE_LIBRARY_REAL(id)) {
const IDTypeInfo *id_type = BKE_idtype_get_info_from_id(id);
if (id_type->owner_get != nullptr) {
- id = id_type->owner_get(bmain, id, nullptr);
+ id = id_type->owner_get(id);
}
BLI_assert(ID_IS_OVERRIDE_LIBRARY_REAL(id));
}