[Bf-blender-cvs] [8aa094263b9] blender-v3.3-release: Fix T100412: LibOverride: shift click on the modifier link button do not create override

Bastien Montagne noreply at git.blender.org
Tue Aug 16 14:39:21 CEST 2022


Commit: 8aa094263b91d47c2bf5f4a944be722d8d0d46aa
Author: Bastien Montagne
Date:   Tue Aug 16 14:36:58 2022 +0200
Branches: blender-v3.3-release
https://developer.blender.org/rB8aa094263b91d47c2bf5f4a944be722d8d0d46aa

Fix T100412: LibOverride: shift click on the modifier link button do not create override

Add support for the (geometry)node tree case.

Also add warning about not being implemented for other types.

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

M	source/blender/editors/interface/interface_templates.c

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

diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index b131bf0adfe..dcde840ad1b 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -684,6 +684,7 @@ static void template_id_liboverride_hierarchy_create(bContext *C,
    * NOTE: do not attempt to perform such hierarchy override at all cost, if there is not enough
    * context, better to abort than create random overrides all over the place. */
   if (!ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY(id)) {
+    RNA_warning("The data-block %s is not direclty overridable", id->name);
     return;
   }
 
@@ -816,7 +817,8 @@ static void template_id_liboverride_hierarchy_create(bContext *C,
     case ID_CV:
     case ID_PT:
     case ID_VO:
-      if (object_active != NULL && object_active->data == id) {
+    case ID_NT: /* Essentially geometry nodes from modifier currently. */
+      if (object_active != NULL) {
         if (collection_active != NULL &&
             BKE_collection_has_object_recursive(collection_active, object_active)) {
           template_id_liboverride_hierarchy_collections_tag_recursive(collection_active, id, true);
@@ -850,12 +852,16 @@ static void template_id_liboverride_hierarchy_create(bContext *C,
     case ID_MA:
     case ID_TE:
     case ID_IM:
+      RNA_warning("The type of data-block %s could not yet implemented", id->name);
       break;
     case ID_WO:
+      RNA_warning("The type of data-block %s could not yet implemented", id->name);
       break;
     case ID_PA:
+      RNA_warning("The type of data-block %s could not yet implemented", id->name);
       break;
     default:
+      RNA_warning("The type of data-block %s could not yet implemented", id->name);
       break;
   }
   if (id_override != NULL) {
@@ -868,6 +874,9 @@ static void template_id_liboverride_hierarchy_create(bContext *C,
      * above). */
     RNA_id_pointer_create(id_override, idptr);
   }
+  else {
+    RNA_warning("The data-block %s could not be overridden", id->name);
+  }
 }
 
 static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)



More information about the Bf-blender-cvs mailing list