diff options
author | Julian Eisel <julian@blender.org> | 2020-12-28 00:15:20 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-12-28 00:45:41 +0300 |
commit | aa64fd69e733e49317101ea60299f2179830ae95 (patch) | |
tree | 5546b93625c908945a6123e27110f55c793e8bc8 /source/blender/editors/undo | |
parent | 960a0b892c096965696bbd93d0782001d53c869e (diff) |
UI: List library overrides in the Outliner
Having a centeral place to find a list of all library overrides should be
useful for managing production scenes where library overrides are used a lot.
This change adds the individually overridden properties of a data-block under
the data-block itself. Just how we show modifiers, constraints or pose channels
there. This way we can also expose library override operations/options better
in future.
There's also a filter option for the library overrides now, so they can be
hidden. It is only available in the View Layer display mode though, like the
other filter options.
One internal change this has to do is adding more informative return values to
undo pushes and the library override functions called by it. That way we can
send a notifier when library overrides change for the Outliner to know when to
rebuild the tree.
Differential Revision: https://developer.blender.org/D7631
Reviewed by: Andy Goralczyk, Bastien Montagne, William Reynish
Diffstat (limited to 'source/blender/editors/undo')
-rw-r--r-- | source/blender/editors/undo/ed_undo.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/undo/ed_undo.c b/source/blender/editors/undo/ed_undo.c index 2328f7d5256..533416bf85e 100644 --- a/source/blender/editors/undo/ed_undo.c +++ b/source/blender/editors/undo/ed_undo.c @@ -145,12 +145,14 @@ void ED_undo_push(bContext *C, const char *str) } } + UndoPushReturn push_retval; + /* Only apply limit if this is the last undo step. */ if (wm->undo_stack->step_active && (wm->undo_stack->step_active->next == NULL)) { BKE_undosys_stack_limit_steps_and_memory(wm->undo_stack, steps - 1, 0); } - BKE_undosys_step_push(wm->undo_stack, C, str); + push_retval = BKE_undosys_step_push(wm->undo_stack, C, str); if (U.undomemory != 0) { const size_t memory_limit = (size_t)U.undomemory * 1024 * 1024; @@ -160,6 +162,10 @@ void ED_undo_push(bContext *C, const char *str) if (CLOG_CHECK(&LOG, 1)) { BKE_undosys_print(wm->undo_stack); } + + if (push_retval & UNDO_PUSH_RET_OVERRIDE_CHANGED) { + WM_main_add_notifier(NC_WM | ND_LIB_OVERRIDE_CHANGED, NULL); + } } /** |