diff options
author | Bastien Montagne <bastien@blender.org> | 2022-08-16 15:36:58 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-08-16 15:36:58 +0300 |
commit | 8aa094263b91d47c2bf5f4a944be722d8d0d46aa (patch) | |
tree | 868034134ffa91f00083b9a29c921d5cd7246dc2 /source | |
parent | a93f6a5429d6c6ff1765d06a3a8fd4817bd95e67 (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 11 |
1 files changed, 10 insertions, 1 deletions
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) |