Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2022-04-26 23:30:33 +0300
committerJulian Eisel <julian@blender.org>2022-04-26 23:30:33 +0300
commit994da7077d4a683a122f40ad0c3b0585d4968fcc (patch)
tree26e667a2547268a822b0de5422773a5766fc545c /source/blender/editors/space_outliner/outliner_utils.cc
parent83c8f996f1618a51496100dc680a877a89be7a4e (diff)
Outliner: Add icon column to toggle if library overrides are editable
Adds a column to the right in the Library Overrides Hierarchies view mode to toggle editability of library overrides. Note that making a library override non-editable currently involves clearing all overridden properties. This is an arguable design choice, we should probably at least warn the user before doing this. Part of T95802. Reviewed by: Bastien Montagne Differential Revision: https://developer.blender.org/D14653
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_utils.cc')
-rw-r--r--source/blender/editors/space_outliner/outliner_utils.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/outliner_utils.cc b/source/blender/editors/space_outliner/outliner_utils.cc
index 7526cc7ef5c..4b947154864 100644
--- a/source/blender/editors/space_outliner/outliner_utils.cc
+++ b/source/blender/editors/space_outliner/outliner_utils.cc
@@ -324,10 +324,14 @@ float outliner_right_columns_width(const SpaceOutliner *space_outliner)
case SO_LIBRARIES:
return 0.0f;
case SO_OVERRIDES_LIBRARY:
- if (space_outliner->lib_override_view_mode != SO_LIB_OVERRIDE_VIEW_PROPERTIES) {
- return 0.0f;
+ switch ((eSpaceOutliner_LibOverrideViewMode)space_outliner->lib_override_view_mode) {
+ case SO_LIB_OVERRIDE_VIEW_PROPERTIES:
+ num_columns = OL_RNA_COL_SIZEX / UI_UNIT_X;
+ break;
+ case SO_LIB_OVERRIDE_VIEW_HIERARCHIES:
+ num_columns = 1;
+ break;
}
- num_columns = OL_RNA_COL_SIZEX / UI_UNIT_X;
break;
case SO_ID_ORPHANS:
num_columns = 3;