From 07f7483296983efc55bfc61c69e4872000d437f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastia=CC=81n=20Barschkis?= Date: Thu, 4 Feb 2021 12:19:18 +0100 Subject: LibOverride: Added log statements in liboverride operator functions As discussed in D10301. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D10303 --- source/blender/editors/space_outliner/CMakeLists.txt | 1 + source/blender/editors/space_outliner/outliner_tools.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) (limited to 'source') diff --git a/source/blender/editors/space_outliner/CMakeLists.txt b/source/blender/editors/space_outliner/CMakeLists.txt index e0262371559..d54265aa292 100644 --- a/source/blender/editors/space_outliner/CMakeLists.txt +++ b/source/blender/editors/space_outliner/CMakeLists.txt @@ -27,6 +27,7 @@ set(INC ../../makesrna ../../sequencer ../../windowmanager + ../../../../intern/clog ../../../../intern/glew-mx ../../../../intern/guardedalloc ) diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index f1ac226d7be..fa485dc6b4b 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -23,6 +23,8 @@ #include "MEM_guardedalloc.h" +#include "CLG_log.h" + #include "DNA_anim_types.h" #include "DNA_armature_types.h" #include "DNA_collection_types.h" @@ -92,6 +94,8 @@ #include "outliner_intern.h" +static CLG_LogRef LOG = {"ed.outliner.tools"}; + /* -------------------------------------------------------------------- */ /** \name ID/Library/Data Set/Un-link Utilities * \{ */ @@ -824,6 +828,9 @@ static void id_override_library_create_fn(bContext *C, BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false); } } + else { + CLOG_WARN(&LOG, "Could not create library override for data block '%s'", id_root->name); + } } static void id_override_library_reset_fn(bContext *C, @@ -852,6 +859,9 @@ static void id_override_library_reset_fn(bContext *C, WM_event_add_notifier(C, NC_WM | ND_DATACHANGED, NULL); WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, NULL); } + else { + CLOG_WARN(&LOG, "Could not reset library override of data block '%s'", id_root->name); + } } static void id_override_library_resync_fn(bContext *C, @@ -883,6 +893,9 @@ static void id_override_library_resync_fn(bContext *C, BKE_lib_override_library_resync(bmain, scene, CTX_data_view_layer(C), id_root); } + else { + CLOG_WARN(&LOG, "Could not resync library override of data block '%s'", id_root->name); + } } static void id_override_library_delete_fn(bContext *C, @@ -914,6 +927,9 @@ static void id_override_library_delete_fn(bContext *C, BKE_lib_override_library_delete(bmain, id_root); } + else { + CLOG_WARN(&LOG, "Could not delete library override of data block '%s'", id_root->name); + } } static void id_fake_user_set_fn(bContext *UNUSED(C), -- cgit v1.2.3