[Bf-blender-cvs] [fa21ba01798] blender-v2.90-release: LibOverride: Outliner override creation: Better checks.

Bastien Montagne noreply at git.blender.org
Thu Jul 23 11:45:22 CEST 2020


Commit: fa21ba017989731c97f77b50c2a5ea2ba4b87ad8
Author: Bastien Montagne
Date:   Thu Jul 23 11:25:28 2020 +0200
Branches: blender-v2.90-release
https://developer.blender.org/rBfa21ba017989731c97f77b50c2a5ea2ba4b87ad8

LibOverride: Outliner override creation: Better checks.

Enhance checks for which ID is valid for the override creation
operation.

===================================================================

M	source/blender/editors/space_outliner/outliner_tools.c

===================================================================

diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index d38d63a40c0..9e7bf1e268c 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -754,12 +754,11 @@ static void id_override_library_create_cb(bContext *C,
 {
   BLI_assert(TSE_IS_REAL_ID(tselem));
   ID *id_root = tselem->id;
+  OutlinerLibOverrideData *data = user_data;
+  const bool do_hierarchy = data->do_hierarchy;
 
-  if (ID_IS_LINKED(id_root) &&
-      (BKE_idtype_get_info_from_id(id_root)->flags & IDTYPE_FLAGS_NO_LIBLINKING) == 0) {
+  if (ID_IS_OVERRIDABLE_LIBRARY(id_root) || (ID_IS_LINKED(id_root) && do_hierarchy)) {
     Main *bmain = CTX_data_main(C);
-    OutlinerLibOverrideData *data = user_data;
-    const bool do_hierarchy = data->do_hierarchy;
 
     id_root->tag |= LIB_TAG_DOIT;



More information about the Bf-blender-cvs mailing list