[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26021] trunk/blender: Console:
Thomas Dinges
dingto at gmx.de
Fri Jan 15 18:00:37 CET 2010
Revision: 26021
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26021
Author: dingto
Date: 2010-01-15 18:00:37 +0100 (Fri, 15 Jan 2010)
Log Message:
-----------
Console:
* Added Theme support for the console.
You can change:
-Header Color
-Text Color of Output, Input, Info and Error Messages. (Inside the User Preferences -> Themes)
Modified Paths:
--------------
trunk/blender/release/scripts/ui/space_userpref.py
trunk/blender/source/blender/editors/include/UI_resources.h
trunk/blender/source/blender/editors/interface/resources.c
trunk/blender/source/blender/editors/space_console/console_draw.c
trunk/blender/source/blender/makesdna/DNA_userdef_types.h
trunk/blender/source/blender/makesrna/RNA_access.h
trunk/blender/source/blender/makesrna/intern/rna_userdef.c
Modified: trunk/blender/release/scripts/ui/space_userpref.py
===================================================================
--- trunk/blender/release/scripts/ui/space_userpref.py 2010-01-15 12:21:33 UTC (rev 26020)
+++ trunk/blender/release/scripts/ui/space_userpref.py 2010-01-15 17:00:37 UTC (rev 26021)
@@ -920,6 +920,19 @@
col = split.column()
col.prop(prefs, "header_text")
+
+ elif theme.theme_area == 'CONSOLE':
+ prefs = theme.console
+
+ col = split.column()
+ col.prop(prefs, "header")
+
+ col = split.column()
+ col.prop(prefs, "line_output")
+ col.prop(prefs, "line_input")
+ col.prop(prefs, "line_info")
+ col.prop(prefs, "line_error")
+
class USERPREF_PT_file(bpy.types.Panel):
Modified: trunk/blender/source/blender/editors/include/UI_resources.h
===================================================================
--- trunk/blender/source/blender/editors/include/UI_resources.h 2010-01-15 12:21:33 UTC (rev 26020)
+++ trunk/blender/source/blender/editors/include/UI_resources.h 2010-01-15 17:00:37 UTC (rev 26021)
@@ -184,6 +184,11 @@
TH_NODE_CONVERTOR,
TH_NODE_GROUP,
+ TH_CONSOLE_OUTPUT,
+ TH_CONSOLE_INPUT,
+ TH_CONSOLE_INFO,
+ TH_CONSOLE_ERROR,
+
TH_SEQ_MOVIE,
TH_SEQ_IMAGE,
TH_SEQ_SCENE,
Modified: trunk/blender/source/blender/editors/interface/resources.c
===================================================================
--- trunk/blender/source/blender/editors/interface/resources.c 2010-01-15 12:21:33 UTC (rev 26020)
+++ trunk/blender/source/blender/editors/interface/resources.c 2010-01-15 17:00:37 UTC (rev 26021)
@@ -154,6 +154,9 @@
case SPACE_USERPREF:
ts= &btheme->tuserpref;
break;
+ case SPACE_CONSOLE:
+ ts= &btheme->tconsole;
+ break;
case SPACE_TIME:
ts= &btheme->ttime;
break;
@@ -340,6 +343,15 @@
case TH_SEQ_META:
cp= ts->meta; break;
+ case TH_CONSOLE_OUTPUT:
+ cp= ts->console_output; break;
+ case TH_CONSOLE_INPUT:
+ cp= ts-> console_input; break;
+ case TH_CONSOLE_INFO:
+ cp= ts->console_info; break;
+ case TH_CONSOLE_ERROR:
+ cp= ts->console_error; break;
+
case TH_HANDLE_VERTEX:
cp= ts->handle_vertex;
break;
@@ -407,6 +419,7 @@
ui_theme_init_new_do(&btheme->tnode);
ui_theme_init_new_do(&btheme->tlogic);
ui_theme_init_new_do(&btheme->tuserpref);
+ ui_theme_init_new_do(&btheme->tconsole);
}
@@ -594,6 +607,14 @@
/* space user preferences */
btheme->tuserpref= btheme->tv3d;
SETCOLF(btheme->tuserpref.back, 0.45, 0.45, 0.45, 1.0);
+
+ /* space console */
+ btheme->tconsole= btheme->tv3d;
+ SETCOL(btheme->tconsole.console_output, 96, 128, 255, 255);
+ SETCOL(btheme->tconsole.console_input, 255, 255, 255, 255);
+ SETCOL(btheme->tconsole.console_info, 0, 170, 0, 255);
+ SETCOL(btheme->tconsole.console_error, 220, 96, 96, 255);
+
/* space sound */
btheme->tsnd= btheme->tv3d;
Modified: trunk/blender/source/blender/editors/space_console/console_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_console/console_draw.c 2010-01-15 12:21:33 UTC (rev 26020)
+++ trunk/blender/source/blender/editors/space_console/console_draw.c 2010-01-15 17:00:37 UTC (rev 26021)
@@ -78,16 +78,20 @@
{
switch(type) {
case CONSOLE_LINE_OUTPUT:
- fg[0]=96; fg[1]=128; fg[2]=255;
+ UI_GetThemeColor3ubv(TH_CONSOLE_OUTPUT, fg);
+ fg[0], fg[1], fg[2];
break;
case CONSOLE_LINE_INPUT:
- fg[0]=255; fg[1]=255; fg[2]=255;
+ UI_GetThemeColor3ubv(TH_CONSOLE_INPUT, fg);
+ fg[0], fg[1], fg[2];
break;
case CONSOLE_LINE_INFO:
- fg[0]=0; fg[1]=170; fg[2]=0;
+ UI_GetThemeColor3ubv(TH_CONSOLE_INFO, fg);
+ fg[0], fg[1], fg[2];
break;
case CONSOLE_LINE_ERROR:
- fg[0]=220; fg[1]=96; fg[2]=96;
+ UI_GetThemeColor3ubv(TH_CONSOLE_ERROR, fg);
+ fg[0], fg[1], fg[2];
break;
}
}
Modified: trunk/blender/source/blender/makesdna/DNA_userdef_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_userdef_types.h 2010-01-15 12:21:33 UTC (rev 26020)
+++ trunk/blender/source/blender/makesdna/DNA_userdef_types.h 2010-01-15 17:00:37 UTC (rev 26021)
@@ -201,6 +201,8 @@
char cframe[4];
char ds_channel[4], ds_subchannel[4]; // dopesheet
+ char console_output[4], console_input[4], console_info[4], console_error[4]; // Console
+
char vertex_size, facedot_size;
char bpad[2];
@@ -261,6 +263,7 @@
ThemeSpace tnode;
ThemeSpace tlogic;
ThemeSpace tuserpref;
+ ThemeSpace tconsole;
/* 20 sets of bone colors for this theme */
ThemeWireColor tarm[20];
Modified: trunk/blender/source/blender/makesrna/RNA_access.h
===================================================================
--- trunk/blender/source/blender/makesrna/RNA_access.h 2010-01-15 12:21:33 UTC (rev 26020)
+++ trunk/blender/source/blender/makesrna/RNA_access.h 2010-01-15 17:00:37 UTC (rev 26021)
@@ -492,6 +492,7 @@
extern StructRNA RNA_Theme;
extern StructRNA RNA_ThemeAudioWindow;
extern StructRNA RNA_ThemeBoneColorSet;
+extern StructRNA RNA_ThemeConsole;
extern StructRNA RNA_ThemeDopeSheet;
extern StructRNA RNA_ThemeFileBrowser;
extern StructRNA RNA_ThemeFontStyle;
Modified: trunk/blender/source/blender/makesrna/intern/rna_userdef.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2010-01-15 12:21:33 UTC (rev 26020)
+++ trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2010-01-15 17:00:37 UTC (rev 26021)
@@ -906,6 +906,44 @@
rna_def_userdef_theme_spaces_main(srna, SPACE_USERPREF);
}
+static void rna_def_userdef_theme_space_console(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ /* space_console */
+
+ srna= RNA_def_struct(brna, "ThemeConsole", NULL);
+ RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_ui_text(srna, "Theme Console", "Theme settings for the Console.");
+
+ rna_def_userdef_theme_spaces_main(srna, SPACE_CONSOLE);
+
+ prop= RNA_def_property(srna, "line_output", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "console_output");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Line Output", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop= RNA_def_property(srna, "line_input", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "console_input");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Line Input", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop= RNA_def_property(srna, "line_info", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "console_info");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Line Info", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop= RNA_def_property(srna, "line_error", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "console_error");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Line Error", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+}
+
static void rna_def_userdef_theme_space_info(BlenderRNA *brna)
{
StructRNA *srna;
@@ -1562,6 +1600,12 @@
RNA_def_property_pointer_sdna(prop, NULL, "tuserpref");
RNA_def_property_struct_type(prop, "ThemeUserPreferences");
RNA_def_property_ui_text(prop, "User Preferences", "");
+
+ prop= RNA_def_property(srna, "console", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
+ RNA_def_property_pointer_sdna(prop, NULL, "tconsole");
+ RNA_def_property_struct_type(prop, "ThemeConsole");
+ RNA_def_property_ui_text(prop, "Console", "");
prop= RNA_def_property(srna, "bone_color_sets", PROP_COLLECTION, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
@@ -1590,6 +1634,7 @@
rna_def_userdef_theme_space_outliner(brna);
rna_def_userdef_theme_space_info(brna);
rna_def_userdef_theme_space_userpref(brna);
+ rna_def_userdef_theme_space_console(brna);
rna_def_userdef_theme_space_sound(brna);
rna_def_userdef_theme_space_logic(brna);
rna_def_userdef_theme_colorset(brna);
More information about the Bf-blender-cvs
mailing list