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:
authorDalai Felinto <dfelinto@gmail.com>2018-01-19 20:44:26 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-01-19 21:06:14 +0300
commitefe1af3d11a930b539718cc566049f07316427ff (patch)
tree106ebb3f0edda4263f1f9d88f114fd83a9da012d /source/blender
parentd9858d5897efbf0e41ebe61c2aaabf451c33d6ad (diff)
Outliner: Remove User Preferences
This was introduced to the outliner when we had no User Preference window back in 2.5x. Right now it makes no sense to keep this around. But how about addon user preferences: * They belong in the user preference window under the addon. How about the user preferences themselves: * You find them in the user preference window. And templates? * Why are they here in the first place? After talking to Pablo Vazquez (who in turn poked Sergey Sharybin) we found it reasonable to get rid of this. If it turns out that we were wrong we revert this. As for leaving this exposed as a debug option (as suggested on IRC) I would say no, please. This end up polluting the code and never cleaned up in the end. (this was specific talking about templates). Technical note: I left the functions in outliner still hanging around. While I used UNUSED_FUNCTION for one of them, for the other one I had to use: `#if 0` because the function was calling itself, which would fail to build if I used UNUSED_FUNCTION.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenloader/intern/versioning_260.c3
-rw-r--r--source/blender/blenloader/intern/versioning_280.c1
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c17
-rw-r--r--source/blender/editors/space_outliner/outliner_select.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c12
-rw-r--r--source/blender/makesdna/DNA_space_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_space.c1
7 files changed, 10 insertions, 28 deletions
diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c
index d26c30e6d31..3ac934f7de7 100644
--- a/source/blender/blenloader/intern/versioning_260.c
+++ b/source/blender/blenloader/intern/versioning_260.c
@@ -2458,8 +2458,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *main)
SO_GROUPS,
SO_LIBRARIES,
SO_SEQUENCE,
- SO_DATABLOCKS,
- SO_USERDEF))
+ SO_DATABLOCKS))
{
so->outlinevis = SO_SCENES;
}
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 1f92852e54f..b5530d90330 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -903,7 +903,6 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main)
SO_LIBRARIES,
SO_SEQUENCE,
SO_DATABLOCKS,
- SO_USERDEF,
SO_ID_ORPHANS,
SO_VIEW_LAYER,
SO_COLLECTIONS))
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index c903a5026cf..807a6555a01 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -671,7 +671,7 @@ static void outliner_draw_userbuts(uiBlock *block, ARegion *ar, SpaceOops *soops
}
}
-static void outliner_draw_rnacols(ARegion *ar, int sizex)
+static void UNUSED_FUNCTION(outliner_draw_rnacols)(ARegion *ar, int sizex)
{
View2D *v2d = &ar->v2d;
@@ -697,6 +697,7 @@ static void outliner_draw_rnacols(ARegion *ar, int sizex)
immUnbindProgram();
}
+#if 0
static void outliner_draw_rnabuts(uiBlock *block, ARegion *ar, SpaceOops *soops, int sizex, ListBase *lb)
{
TreeElement *te;
@@ -741,6 +742,7 @@ static void outliner_draw_rnabuts(uiBlock *block, ARegion *ar, SpaceOops *soops,
UI_block_emboss_set(block, UI_EMBOSS);
}
+#endif
static void outliner_buttons(const bContext *C, uiBlock *block, ARegion *ar, TreeElement *te)
{
@@ -1788,7 +1790,7 @@ static void outliner_draw_tree(
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // only once
- if (ELEM(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF)) {
+ if (soops->outlinevis == SO_DATABLOCKS) {
/* struct marks */
starty = (int)ar->v2d.tot.ymax - UI_UNIT_Y - OL_Y_OFFSET;
outliner_draw_struct_marks(ar, soops, &soops->tree, &starty);
@@ -1911,7 +1913,7 @@ void draw_outliner(const bContext *C)
/* get extents of data */
outliner_height(soops, &soops->tree, &sizey);
- if (ELEM(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF)) {
+ if (soops->outlinevis == SO_DATABLOCKS) {
/* RNA has two columns:
* - column 1 is (max_width + OL_RNA_COL_SPACEX) or
* (OL_RNA_COL_X), whichever is wider...
@@ -1958,13 +1960,8 @@ void draw_outliner(const bContext *C)
outliner_back(ar);
block = UI_block_begin(C, ar, __func__, UI_EMBOSS);
outliner_draw_tree((bContext *)C, block, scene, view_layer, ar, soops, has_restrict_icons, &te_edit);
-
- if (ELEM(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF)) {
- /* draw rna buttons */
- outliner_draw_rnacols(ar, sizex_rna);
- outliner_draw_rnabuts(block, ar, soops, sizex_rna, &soops->tree);
- }
- else if ((soops->outlinevis == SO_ID_ORPHANS) && has_restrict_icons) {
+
+ if ((soops->outlinevis == SO_ID_ORPHANS) && has_restrict_icons) {
/* draw user toggle columns */
outliner_draw_restrictcols(ar);
outliner_draw_userbuts(block, ar, soops, &soops->tree);
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index e13177a862a..b9222e62bb0 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -1005,7 +1005,7 @@ static bool outliner_item_is_co_within_close_toggle(TreeElement *te, float view_
static bool outliner_is_co_within_restrict_columns(const SpaceOops *soops, const ARegion *ar, float view_co_x)
{
- return (!ELEM(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF) &&
+ return ((soops->outlinevis != SO_DATABLOCKS) &&
!(soops->flag & SO_HIDE_RESTRICTCOLS) &&
(view_co_x > ar->v2d.cur.xmax - OL_TOG_RESTRICT_VIEWX));
}
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index 78956db6de2..be60312b110 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -2292,18 +2292,6 @@ void outliner_build_tree(Main *mainvar, Scene *scene, ViewLayer *view_layer, Spa
tselem->flag &= ~TSE_CLOSED;
}
}
- else if (soops->outlinevis == SO_USERDEF) {
- PointerRNA userdefptr;
-
- RNA_pointer_create(NULL, &RNA_UserPreferences, &U, &userdefptr);
-
- ten = outliner_add_element(soops, &soops->tree, (void *)&userdefptr, NULL, TSE_RNA_STRUCT, -1);
-
- if (show_opened) {
- tselem = TREESTORE(ten);
- tselem->flag &= ~TSE_CLOSED;
- }
- }
else if (soops->outlinevis == SO_ID_ORPHANS) {
outliner_add_orphaned_datablocks(mainvar, soops);
}
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 16ddce72dae..077ac4f7aa3 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -342,7 +342,7 @@ typedef enum eSpaceOutliner_Mode {
/* SO_VERSE_MS = 9, */ /* deprecated! */
SO_SEQUENCE = 10,
SO_DATABLOCKS = 11,
- SO_USERDEF = 12,
+ /* SO_USERDEF = 12, */ /* deprecated! */
/* SO_KEYMAP = 13, */ /* deprecated! */
SO_ID_ORPHANS = 14,
SO_VIEW_LAYER = 15,
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index b2892f7e9a9..4ff8444cd71 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2109,7 +2109,6 @@ static void rna_def_space_outliner(BlenderRNA *brna)
{SO_SEQUENCE, "SEQUENCE", 0, "Sequence", "Display sequence data-blocks"},
{SO_LIBRARIES, "LIBRARIES", 0, "Blender File", "Display data of current file and linked libraries"},
{SO_DATABLOCKS, "DATABLOCKS", 0, "Data-Blocks", "Display all raw data-blocks"},
- {SO_USERDEF, "USER_PREFERENCES", 0, "User Preferences", "Display user preference data"},
{SO_ID_ORPHANS, "ORPHAN_DATA", 0, "Orphan Data",
"Display data-blocks which are unused and/or will be lost when the file is reloaded"},
{0, NULL, 0, NULL, NULL}