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
path: root/source
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2012-03-23 20:14:25 +0400
committerThomas Dinges <blender@dingto.org>2012-03-23 20:14:25 +0400
commitb331c867e1783cc1b3fa8c7ed88b022ddfda8436 (patch)
treeb960cf0e3ff0967c21128a31ccf8dd435a4430c6 /source
parent310353171600278bbffdbf060d68ac502e3b0d33 (diff)
3D View Themes:
* Camera and Empty colour is now themeable. Patch by Pablo Vazquez (venomgfx) with some minor edits.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/include/UI_resources.h3
-rw-r--r--source/blender/editors/interface/resources.c6
-rw-r--r--source/blender/editors/space_view3d/drawobject.c4
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c10
5 files changed, 22 insertions, 3 deletions
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h
index c329a784d18..c470b13aa69 100644
--- a/source/blender/editors/include/UI_resources.h
+++ b/source/blender/editors/include/UI_resources.h
@@ -133,8 +133,9 @@ enum {
TH_STRIP_SELECT,
TH_LAMP,
-
TH_SPEAKER,
+ TH_CAMERA,
+ TH_EMPTY,
TH_NODE,
TH_NODE_IN_OUT,
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 448c076a6a1..124ce77325b 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -245,6 +245,10 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
cp= ts->lamp; break;
case TH_SPEAKER:
cp= ts->speaker; break;
+ case TH_CAMERA:
+ cp= ts->camera; break;
+ case TH_EMPTY:
+ cp= ts->empty; break;
case TH_SELECT:
cp= ts->select; break;
case TH_ACTIVE:
@@ -636,6 +640,8 @@ void ui_theme_init_default(void)
rgba_char_args_set(btheme->tv3d.wire, 0x0, 0x0, 0x0, 255);
rgba_char_args_set(btheme->tv3d.lamp, 0, 0, 0, 40);
rgba_char_args_set(btheme->tv3d.speaker, 0, 0, 0, 255);
+ rgba_char_args_set(btheme->tv3d.camera, 0, 0, 0, 255);
+ rgba_char_args_set(btheme->tv3d.empty, 0, 0, 0, 255);
rgba_char_args_set(btheme->tv3d.select, 241, 88, 0, 255);
rgba_char_args_set(btheme->tv3d.active, 255, 170, 64, 255);
rgba_char_args_set(btheme->tv3d.group, 8, 48, 8, 255);
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index f18ee9220a9..c0c117242d7 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -5877,7 +5877,7 @@ static void draw_forcefield(Scene *scene, Object *ob, RegionView3D *rv3d)
if (ob==OBACT) curcol= TH_ACTIVE;
else curcol= TH_SELECT;
}
- else curcol= TH_WIRE;
+ else curcol= TH_EMPTY;
/* scale size of circle etc with the empty drawsize */
if (ob->type == OB_EMPTY) size = ob->empty_drawsize;
@@ -6475,6 +6475,8 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
else {
if (ob->type==OB_LAMP) theme_id= TH_LAMP;
else if (ob->type==OB_SPEAKER) theme_id= TH_SPEAKER;
+ else if (ob->type==OB_CAMERA) theme_id= TH_CAMERA;
+ else if (ob->type==OB_EMPTY) theme_id= TH_EMPTY;
/* fallback to TH_WIRE */
}
}
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 9c8c3a7731c..40c4a7fab9d 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -205,7 +205,7 @@ typedef struct ThemeSpace {
char grid[4];
char wire[4], select[4];
- char lamp[4], speaker[4];
+ char lamp[4], speaker[4], empty[4],camera[4], pad[8];
char active[4], group[4], group_active[4], transform[4];
char vertex[4], vertex_select[4];
char edge[4], edge_select[4];
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index dd26df0a10f..8e4ebe0b22e 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -1085,6 +1085,16 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Speaker", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop = RNA_def_property(srna, "camera", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Camera", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop = RNA_def_property(srna, "empty", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Empty", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop = RNA_def_property(srna, "object_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "select");