[Bf-blender-cvs] [ca935ab] master: Graph Editor UI: Experimental Tweak - Use tabs for properties region, to make it easier to navigate

Joshua Leung noreply at git.blender.org
Mon Mar 28 03:47:40 CEST 2016


Commit: ca935abc1844e1f9b89d565fc43f26258c12ee14
Author: Joshua Leung
Date:   Mon Mar 28 14:45:54 2016 +1300
Branches: master
https://developer.blender.org/rBca935abc1844e1f9b89d565fc43f26258c12ee14

Graph Editor UI: Experimental Tweak - Use tabs for properties region, to make it easier to navigate

===================================================================

M	source/blender/editors/screen/area.c
M	source/blender/editors/space_graph/graph_buttons.c

===================================================================

diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 37847b0..4ede89e 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1753,7 +1753,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, const char *context, int c
 	int redo;
 	int scroll;
 
-	bool use_category_tabs = (ar->regiontype == RGN_TYPE_TOOLS);  /* XXX, should use some better check? */
+	bool use_category_tabs = (ELEM(ar->regiontype, RGN_TYPE_TOOLS, RGN_TYPE_UI));  /* XXX, should use some better check? */
 	/* offset panels for small vertical tab area */
 	const char *category = NULL;
 	const int category_tabs_width = UI_PANEL_CATEGORY_MARGIN_WIDTH;
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index f5057fd..6efb0b1 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -983,14 +983,15 @@ void graph_buttons_register(ARegionType *art)
 	pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel view");
 	strcpy(pt->idname, "GRAPH_PT_view");
 	strcpy(pt->label, N_("View Properties"));
+	strcpy(pt->category, "View");
 	strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA);
 	pt->draw = graph_panel_view;
-	pt->flag |= PNL_DEFAULT_CLOSED;
 	BLI_addtail(&art->paneltypes, pt);
 	
 	pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel properties");
 	strcpy(pt->idname, "GRAPH_PT_properties");
 	strcpy(pt->label, N_("Active F-Curve"));
+	strcpy(pt->category, "F-Curve");
 	strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA);
 	pt->draw = graph_panel_properties;
 	pt->poll = graph_panel_poll;
@@ -999,6 +1000,7 @@ void graph_buttons_register(ARegionType *art)
 	pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel properties");
 	strcpy(pt->idname, "GRAPH_PT_key_properties");
 	strcpy(pt->label, N_("Active Keyframe"));
+	strcpy(pt->category, "F-Curve");
 	strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA);
 	pt->draw = graph_panel_key_properties;
 	pt->poll = graph_panel_poll;
@@ -1008,6 +1010,7 @@ void graph_buttons_register(ARegionType *art)
 	pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel drivers");
 	strcpy(pt->idname, "GRAPH_PT_drivers");
 	strcpy(pt->label, N_("Drivers"));
+	strcpy(pt->category, "Drivers");
 	strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA);
 	pt->draw = graph_panel_drivers;
 	pt->poll = graph_panel_drivers_poll;
@@ -1016,6 +1019,7 @@ void graph_buttons_register(ARegionType *art)
 	pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel modifiers");
 	strcpy(pt->idname, "GRAPH_PT_modifiers");
 	strcpy(pt->label, N_("Modifiers"));
+	strcpy(pt->category, "Modifiers");
 	strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA);
 	pt->draw = graph_panel_modifiers;
 	pt->poll = graph_panel_poll;




More information about the Bf-blender-cvs mailing list