diff options
Diffstat (limited to 'source/blender/editors/space_outliner/tree/tree_element_overrides.cc')
-rw-r--r-- | source/blender/editors/space_outliner/tree/tree_element_overrides.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/tree/tree_element_overrides.cc b/source/blender/editors/space_outliner/tree/tree_element_overrides.cc index 3a039da86c2..53e7b88c923 100644 --- a/source/blender/editors/space_outliner/tree/tree_element_overrides.cc +++ b/source/blender/editors/space_outliner/tree/tree_element_overrides.cc @@ -38,6 +38,19 @@ TreeElementOverridesBase::TreeElementOverridesBase(TreeElement &legacy_te, ID &i } } +StringRefNull TreeElementOverridesBase::getWarning() const +{ + if (id.flag & LIB_LIB_OVERRIDE_RESYNC_LEFTOVER) { + return TIP_("This override data-block is not needed anymore, but was detected as user-edited"); + } + + if (ID_IS_OVERRIDE_LIBRARY_REAL(&id) && ID_REAL_USERS(&id) == 0) { + return TIP_("This override data-block is unused"); + } + + return {}; +} + void TreeElementOverridesBase::expand(SpaceOutliner &space_outliner) const { BLI_assert(id.override_library != nullptr); @@ -93,4 +106,15 @@ TreeElementOverridesProperty::TreeElementOverridesProperty(TreeElement &legacy_t legacy_te.name = override_data.override_property.rna_path; } +StringRefNull TreeElementOverridesProperty::getWarning() const +{ + if (!is_rna_path_valid) { + return TIP_( + "This override property does not exist in current data, it will be removed on " + "next .blend file save"); + } + + return {}; +} + } // namespace blender::ed::outliner |