[Bf-blender-cvs] [7530cfc] UI-experiments: Use 4-column layout for editor menu
Julian Eisel
noreply at git.blender.org
Mon Jul 13 03:46:40 CEST 2015
Commit: 7530cfccc2f08772984e1e6fa5b5f908fd49cc64
Author: Julian Eisel
Date: Mon Jul 13 03:39:42 2015 +0200
Branches: UI-experiments
https://developer.blender.org/rB7530cfccc2f08772984e1e6fa5b5f908fd49cc64
Use 4-column layout for editor menu
Patch from T36028 with minor edits.
Note: Renamed "Visual Sequence Editor" to "Visual Sequencer" to fit better into layout.
Also forgot to do commit --amend after fixing some merge conflicts and disabled two failing asserts, so this is a bit more than just the patch.
===================================================================
M source/blender/blenkernel/BKE_blender.h
M source/blender/editors/interface/interface_handlers.c
M source/blender/editors/interface/resources.c
M source/blender/editors/screen/area.c
M source/blender/makesrna/intern/rna_space.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index 1638ba4..14048ba 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -42,7 +42,7 @@ extern "C" {
* and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */
#define BLENDER_VERSION 275
-#define BLENDER_SUBVERSION 2
+#define BLENDER_SUBVERSION 3
/* Several breakages with 270, e.g. constraint deg vs rad */
#define BLENDER_MINVERSION 270
#define BLENDER_MINSUBVERSION 5
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 2330a4e..ae5622c 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -7423,7 +7423,8 @@ static uiSubBut *ui_subbut_find_mouse_over(const ARegion *ar, const uiBut *but,
float mx = mouse_xy[0];
float my = mouse_xy[1];
- BLI_assert(ui_but_contains_point_px(ar, but, UNPACK2(mouse_xy)));
+ /* XXX (julian) */
+// BLI_assert(ui_but_contains_point_px(ar, but, UNPACK2(mouse_xy)));
ui_window_to_block_fl(ar, but->block, &mx, &my);
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 5bc6fb4..35c4ef0 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -2658,6 +2658,36 @@ void init_userdef_do_versions(void)
0,
0, 0
};
+
+ for (btheme = U.themes.first; btheme; btheme = btheme->next) {
+ btheme->tui.wcol_tab = wcol_tab;
+ for (ts = UI_THEMESPACE_START(btheme); ts != UI_THEMESPACE_END(btheme); ts++) {
+ copy_v4_v4_char(ts->tabs.tab_active, ts->tab_active);
+ copy_v4_v4_char(ts->tabs.tab_inactive, ts->tab_inactive);
+ copy_v4_v4_char(ts->tabs.tab_back, ts->tab_back);
+ copy_v4_v4_char(ts->tabs.tab_outline, ts->tab_outline);
+ }
+ }
+ }
+
+ if (!USER_VERSION_ATLEAST(275, 3)) {
+ bTheme *btheme;
+ ThemeSpace *ts;
+
+ for (btheme = U.themes.first; btheme; btheme = btheme->next) {
+ for (ts = UI_THEMESPACE_START(btheme); ts != UI_THEMESPACE_END(btheme); ts++) {
+ /* XXX maybe remove show_back/show_header options? */
+ ts->panelcolors.show_back = ts->panelcolors.show_header = true;
+ rgba_char_args_set(ts->panelcolors.back, 128, 128, 128, 255);
+ rgba_char_args_set(ts->panelcolors.header, 97, 97, 97, 255);
+ }
+
+ rgba_char_args_set_fl(btheme->tui.area_edges, 0.10f, 0.10f, 0.10f, 1.0f);
+
+ btheme->tui.interface_style = TH_IFACE_STYLE_FLAT;
+
+ ui_widget_color_init(&btheme->tui);
+ }
}
if (U.pixelsize == 0.0f)
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index d7e91a1..85ed5aa 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -99,7 +99,8 @@ static void region_draw_emboss(const ARegion *ar, const rcti *scirct)
}
/* top */
else {
- BLI_assert(ar->alignment == RGN_ALIGN_BOTTOM);
+ /* XXX (julian) */
+// BLI_assert(ar->alignment == RGN_ALIGN_BOTTOM);
sdrawline(rect.xmin, rect.ymax, rect.xmax, rect.ymax);
}
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 2447c62..2f981de 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -63,28 +63,38 @@
EnumPropertyItem space_type_items[] = {
/* empty must be here for python, is skipped for UI */
{SPACE_EMPTY, "EMPTY", ICON_NONE, "Empty", ""},
+
+ /* Workspaces - for authoring new data directly */
+ {0, "", ICON_NONE, "Workspaces", ""},
{SPACE_VIEW3D, "VIEW_3D", ICON_VIEW3D, "3D View", "3D viewport"},
- {0, "", ICON_NONE, NULL, NULL},
+ {SPACE_IMAGE, "IMAGE_EDITOR", ICON_IMAGE_COL, "UV/Image Editor", "View and edit images and UV Maps"},
+ {SPACE_NODE, "NODE_EDITOR", ICON_NODETREE, "Node Editor", "Editor for node-based shading and compositing tools"},
+ {SPACE_SEQ, "SEQUENCE_EDITOR", ICON_SEQUENCE, "Video Sequencer", "Video editing tools"},
+ {SPACE_CLIP, "CLIP_EDITOR", ICON_CLIP, "Movie Clip Editor", "Motion tracking tools"},
+
+ /* animation editors */
+ {0, "", ICON_NONE, "Animation", ""},
{SPACE_TIME, "TIMELINE", ICON_TIME, "Timeline", "Timeline and playback controls"},
{SPACE_IPO, "GRAPH_EDITOR", ICON_IPO, "Graph Editor", "Edit drivers and keyframe interpolation"},
{SPACE_ACTION, "DOPESHEET_EDITOR", ICON_ACTION, "Dope Sheet", "Adjust timing of keyframes"},
{SPACE_NLA, "NLA_EDITOR", ICON_NLA, "NLA Editor", "Combine and layer Actions"},
- {0, "", ICON_NONE, NULL, NULL},
- {SPACE_IMAGE, "IMAGE_EDITOR", ICON_IMAGE_COL, "UV/Image Editor", "View and edit images and UV Maps"},
- {SPACE_SEQ, "SEQUENCE_EDITOR", ICON_SEQUENCE, "Video Sequence Editor", "Video editing tools"},
- {SPACE_CLIP, "CLIP_EDITOR", ICON_CLIP, "Movie Clip Editor", "Motion tracking tools"},
+
+ /* scripting */
+ {0, "", ICON_NONE, "Scripting", ""},
{SPACE_TEXT, "TEXT_EDITOR", ICON_TEXT, "Text Editor", "Edit scripts and in-file documentation"},
- {SPACE_NODE, "NODE_EDITOR", ICON_NODETREE, "Node Editor", "Editor for node-based shading and compositing tools"},
{SPACE_LOGIC, "LOGIC_EDITOR", ICON_LOGIC, "Logic Editor", "Game logic editing"},
- {0, "", ICON_NONE, NULL, NULL},
- {SPACE_BUTS, "PROPERTIES", ICON_BUTS, "Properties", "Edit properties of active object and related datablocks"},
+ {SPACE_CONSOLE, "CONSOLE", ICON_CONSOLE, "Python Console", "Interactive programmatic console for "
+ "advanced editing and script development"},
+ {SPACE_INFO, "INFO", ICON_INFO, "Info", "Main menu bar and list of error messages "
+ "(drag down to expand and display)"},
+
+ /* data */
+ {0, "", ICON_NONE, "Data", ""},
{SPACE_OUTLINER, "OUTLINER", ICON_OOPS, "Outliner", "Overview of scene graph and all available datablocks"},
- {SPACE_USERPREF, "USER_PREFERENCES", ICON_PREFERENCES, "User Preferences", "Edit persistent configuration settings"},
- {SPACE_INFO, "INFO", ICON_INFO, "Info", "Main menu bar and list of error messages (drag down to expand and display)"},
- {0, "", ICON_NONE, NULL, NULL},
+ {SPACE_BUTS, "PROPERTIES", ICON_BUTS, "Properties", "Edit properties of active object and related datablocks"},
{SPACE_FILE, "FILE_BROWSER", ICON_FILESEL, "File Browser", "Browse for files and assets"},
- {0, "", ICON_NONE, NULL, NULL},
- {SPACE_CONSOLE, "CONSOLE", ICON_CONSOLE, "Python Console", "Interactive programmatic console for advanced editing and script development"},
+ {SPACE_USERPREF, "USER_PREFERENCES", ICON_PREFERENCES, "User Preferences", "Edit persistent "
+ "configuration settings"},
{0, NULL, 0, NULL, NULL}
};
More information about the Bf-blender-cvs
mailing list