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-08 14:06:40 +0300
committerBastien Montagne <bastien@blender.org>2022-09-08 17:34:31 +0300
commit462014b59b4f5ad110ebfcbc17dfa1f896582110 (patch)
treeb3b809c4f718a441650b03dd8a5c1adffa20f9cd /source/blender/editors/space_outliner
parent4ac69c26db4c246dfb597411884af2a7ecc7ee66 (diff)
IDManagement: Add new `BKE_id_owner_get` accessor.
Essentially calls `IDTypeInfo->owner_get` for now, will make more sense once the callback is changed to return the address of the pointer instead.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/outliner_collections.cc11
1 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/editors/space_outliner/outliner_collections.cc b/source/blender/editors/space_outliner/outliner_collections.cc
index 0ded4654c80..6b1ca5a53f8 100644
--- a/source/blender/editors/space_outliner/outliner_collections.cc
+++ b/source/blender/editors/space_outliner/outliner_collections.cc
@@ -377,10 +377,8 @@ void outliner_collection_delete(
if (parent->flag & COLLECTION_IS_MASTER) {
BLI_assert(parent->id.flag & LIB_EMBEDDED_DATA);
- const IDTypeInfo *id_type = BKE_idtype_get_info_from_id(&parent->id);
- BLI_assert(id_type->owner_get != nullptr);
-
- ID *scene_owner = id_type->owner_get(&parent->id);
+ ID *scene_owner = BKE_id_owner_get(&parent->id);
+ BLI_assert(scene_owner != nullptr);
BLI_assert(GS(scene_owner->name) == ID_SCE);
if (ID_IS_LINKED(scene_owner) || ID_IS_OVERRIDE_LIBRARY(scene_owner)) {
skip = true;
@@ -610,10 +608,7 @@ static int collection_duplicate_exec(bContext *C, wmOperator *op)
else if (parent != nullptr && (parent->flag & COLLECTION_IS_MASTER) != 0) {
BLI_assert(parent->id.flag & LIB_EMBEDDED_DATA);
- const IDTypeInfo *id_type = BKE_idtype_get_info_from_id(&parent->id);
- BLI_assert(id_type->owner_get != nullptr);
-
- Scene *scene_owner = (Scene *)id_type->owner_get(&parent->id);
+ Scene *scene_owner = reinterpret_cast<Scene *>(BKE_id_owner_get(&parent->id));
BLI_assert(scene_owner != nullptr);
BLI_assert(GS(scene_owner->id.name) == ID_SCE);