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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-05-17 13:20:40 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-05-17 15:27:58 +0300
commit6d706dc8c75828622c027c6bc158329b33347b8f (patch)
treec3b1176c1e384399bbd77375a419a5ce3694fb10 /source/blender/editors/space_outliner
parent1f3143fcc7b6e939732662268aa969e4a4a52e5e (diff)
Outliner: in Blender File, use upper case names and icons.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c10
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c10
2 files changed, 16 insertions, 4 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index a01a4bf187d..d3e70da80c8 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -1223,6 +1223,11 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto
}
break;
}
+ case ID_BR:
+ tselem_draw_icon_uibut(&arg, ICON_BRUSH_DATA); break;
+ case ID_SCR:
+ case ID_WS:
+ tselem_draw_icon_uibut(&arg, ICON_SPLITSCREEN); break;
default:
break;
}
@@ -1294,10 +1299,11 @@ static void outliner_draw_iconrow(
}
/* this tree element always has same amount of branches, so don't draw */
- if (tselem->type != TSE_R_LAYER)
+ if (tselem->type != TSE_R_LAYER) {
outliner_draw_iconrow(
C, block, scene, view_layer, obedit, soops,
&te->subtree, level + 1, xmax, offsx, ys, alpha_fac);
+ }
}
}
@@ -1435,7 +1441,7 @@ static void outliner_draw_tree_element(
/* datatype icon */
- if (!(ELEM(tselem->type, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM))) {
+ if (!(ELEM(tselem->type, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM, TSE_ID_BASE))) {
tselem_draw_icon(block, xmax, (float)startx + offsx, (float)*starty, tselem, te, alpha_fac);
offsx += UI_UNIT_X + 2 * ufac;
}
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index d9e985bf73e..f985734795c 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -1256,6 +1256,12 @@ static void outliner_add_seq_dup(SpaceOops *soops, Sequence *seq, TreeElement *t
/* ----------------------------------------------- */
+static const char *outliner_idcode_to_plural(short idcode)
+{
+ const char *propname = BKE_idcode_to_name_plural(idcode);
+ PropertyRNA *prop = RNA_struct_type_find_property(&RNA_BlendData, propname);
+ return RNA_property_ui_name(prop);
+}
static void outliner_add_library_contents(Main *mainvar, SpaceOops *soops, TreeElement *te, Library *lib)
{
@@ -1277,7 +1283,7 @@ static void outliner_add_library_contents(Main *mainvar, SpaceOops *soops, TreeE
ten = outliner_add_element(soops, &te->subtree, lbarray[a], NULL, TSE_ID_BASE, 0);
ten->directdata = lbarray[a];
- ten->name = BKE_idcode_to_name_plural(GS(id->name));
+ ten->name = outliner_idcode_to_plural(GS(id->name));
if (ten->name == NULL)
ten->name = "UNKNOWN";
@@ -1317,7 +1323,7 @@ static void outliner_add_orphaned_datablocks(Main *mainvar, SpaceOops *soops)
ten = outliner_add_element(soops, &soops->tree, lbarray[a], NULL, TSE_ID_BASE, 0);
ten->directdata = lbarray[a];
- ten->name = BKE_idcode_to_name_plural(GS(id->name));
+ ten->name = outliner_idcode_to_plural(GS(id->name));
if (ten->name == NULL)
ten->name = "UNKNOWN";