diff options
Diffstat (limited to 'source/blender/blenkernel/BKE_lib_override.h')
-rw-r--r-- | source/blender/blenkernel/BKE_lib_override.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_lib_override.h b/source/blender/blenkernel/BKE_lib_override.h index b2162e651fd..8542c02fab5 100644 --- a/source/blender/blenkernel/BKE_lib_override.h +++ b/source/blender/blenkernel/BKE_lib_override.h @@ -60,6 +60,21 @@ void BKE_lib_override_library_clear(struct IDOverrideLibrary *override, bool do_ void BKE_lib_override_library_free(struct IDOverrideLibrary **override, bool do_id_user); /** + * Return the actual #IDOverrideLibrary data 'controlling' the given `id`, and the actual ID owning + * it. + * + * \note This is especially useful when `id` is a non-real override (e.g. embedded ID like a master + * collection or root node tree, or a shape key). + * + * \param owner_id_hint: If not NULL, a potential owner for the given override-embedded `id`. + * \param r_owner_id: If given, will be set with the actual ID owning the return liboverride data. + */ +IDOverrideLibrary *BKE_lib_override_library_get(struct Main *bmain, + struct ID *id, + struct ID *owner_id_hint, + struct ID **r_owner_id); + +/** * Check if given ID has some override rules that actually indicate the user edited it. */ bool BKE_lib_override_library_is_user_edited(const struct ID *id); |