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:
authorCampbell Barton <ideasman42@gmail.com>2007-01-03 08:50:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-01-03 08:50:17 +0300
commit59e44e4afa3adf2946d247d8950383155c476fd2 (patch)
tree432eec5f58896fe8332ba8bcad3845df3eacf441
parent67426593127383a8c07ec84e5966a5344874ba13 (diff)
added sharp edge theme color
-rw-r--r--source/blender/include/BIF_resources.h1
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h5
-rw-r--r--source/blender/python/api2_2x/windowTheme.c6
-rw-r--r--source/blender/src/drawobject.c2
-rw-r--r--source/blender/src/resources.c3
-rw-r--r--source/blender/src/usiblender.c1
6 files changed, 13 insertions, 5 deletions
diff --git a/source/blender/include/BIF_resources.h b/source/blender/include/BIF_resources.h
index 7a8dc73632a..bc34490f6ef 100644
--- a/source/blender/include/BIF_resources.h
+++ b/source/blender/include/BIF_resources.h
@@ -524,6 +524,7 @@ enum {
TH_SEQ_TRANSITION,
TH_SEQ_META,
+ TH_EDGE_SHARP,
};
/* XXX WARNING: previous is saved in file, so do not change order! */
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 53570a80220..b83568def5d 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -86,7 +86,7 @@ typedef struct ThemeSpace {
char active[4], group[4], group_active[4], transform[4];
char vertex[4], vertex_select[4];
char edge[4], edge_select[4];
- char edge_seam[4], edge_facesel[4];
+ char edge_seam[4], edge_sharp[4], edge_facesel[4];
char face[4], face_select[4]; // solid faces
char face_dot[4]; // selected color
char normal[4];
@@ -94,13 +94,14 @@ typedef struct ThemeSpace {
char strip[4], strip_select[4];
char vertex_size, facedot_size;
- char bpad[2];
+ char bpad[2];
char syntaxl[4], syntaxn[4], syntaxb[4]; // syntax for textwindow and nodes
char syntaxv[4], syntaxc[4];
char movie[4], image[4], scene[4], audio[4]; // for sequence editor
char effect[4], plugin[4], transition[4], meta[4];
+ char bpad1[4];
} ThemeSpace;
diff --git a/source/blender/python/api2_2x/windowTheme.c b/source/blender/python/api2_2x/windowTheme.c
index dfcf26ed5cb..237cf1d0dae 100644
--- a/source/blender/python/api2_2x/windowTheme.c
+++ b/source/blender/python/api2_2x/windowTheme.c
@@ -171,6 +171,7 @@ static PyObject *ThemeSpace_getAttr( BPy_ThemeSpace * self, char *name )
ELSEIF_TSP_RGBA( edge )
ELSEIF_TSP_RGBA( edge_select )
ELSEIF_TSP_RGBA( edge_seam )
+ ELSEIF_TSP_RGBA( edge_sharp )
ELSEIF_TSP_RGBA( edge_facesel )
ELSEIF_TSP_RGBA( face )
ELSEIF_TSP_RGBA( face_select )
@@ -198,13 +199,13 @@ static PyObject *ThemeSpace_getAttr( BPy_ThemeSpace * self, char *name )
else if( !strcmp( name, "facedot_size" ) )
attrib = Py_BuildValue( "i", tsp->facedot_size );
else if( !strcmp( name, "__members__" ) )
- attrib = Py_BuildValue("[ssssssssssssssssssssssssssssssssssssssssssssss]", "theme",
+ attrib = Py_BuildValue("[sssssssssssssssssssssssssssssssssssssssssssssss]", "theme",
"back", "text", "text_hi", "header",
"panel", "shade1", "shade2", "hilite",
"grid", "wire", "select", "lamp", "active",
"group", "group_active",
"transform", "vertex", "vertex_select",
- "edge", "edge_select", "edge_seam",
+ "edge", "edge_select", "edge_seam", "edge_sharp",
"edge_facesel", "face", "face_select",
"face_dot", "normal", "bone_solid", "bone_pose",
"strip", "strip_select",
@@ -249,6 +250,7 @@ static int ThemeSpace_setAttr( BPy_ThemeSpace * self, char *name,
ELSEIF_TSP_RGBA( edge )
ELSEIF_TSP_RGBA( edge_select )
ELSEIF_TSP_RGBA( edge_seam )
+ ELSEIF_TSP_RGBA( edge_sharp )
ELSEIF_TSP_RGBA( edge_facesel )
ELSEIF_TSP_RGBA( face )
ELSEIF_TSP_RGBA( face_select )
diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c
index e56f4a7224e..0266e5fb002 100644
--- a/source/blender/src/drawobject.c
+++ b/source/blender/src/drawobject.c
@@ -1879,7 +1879,7 @@ static void draw_em_fancy(Object *ob, EditMesh *em, DerivedMesh *cageDM, Derived
}
if(G.f & G_DRAWSHARP) {
- glColor3ub(255, 32, 32); /* todo, make theme-able */
+ BIF_ThemeColor(TH_EDGE_SHARP);
glLineWidth(2);
draw_dm_edges_sharp(cageDM);
diff --git a/source/blender/src/resources.c b/source/blender/src/resources.c
index 5bfb7d5d4e3..c1c62bdd738 100644
--- a/source/blender/src/resources.c
+++ b/source/blender/src/resources.c
@@ -250,6 +250,8 @@ char *BIF_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
cp= ts->edge_select; break;
case TH_EDGE_SEAM:
cp= ts->edge_seam; break;
+ case TH_EDGE_SHARP:
+ cp= ts->edge_sharp; break;
case TH_EDGE_FACESEL:
cp= ts->edge_facesel; break;
case TH_FACE:
@@ -581,6 +583,7 @@ char *BIF_ThemeColorsPup(int spacetype)
str += sprintf(str, "Vertex Size %%x%d|", TH_VERTEX_SIZE);
str += sprintf(str, "Edge Selected %%x%d|", TH_EDGE_SELECT);
str += sprintf(str, "Edge Seam %%x%d|", TH_EDGE_SEAM);
+ str += sprintf(str, "Edge Sharp %%x%d|", TH_EDGE_SHARP);
str += sprintf(str, "Edge UV Face Select %%x%d|", TH_EDGE_FACESEL);
str += sprintf(str, "Face (transp) %%x%d|", TH_FACE);
str += sprintf(str, "Face Selected (transp) %%x%d|", TH_FACE_SELECT);
diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c
index 8cf22b889f0..fe801d0f908 100644
--- a/source/blender/src/usiblender.c
+++ b/source/blender/src/usiblender.c
@@ -340,6 +340,7 @@ static void init_userdef_file(void)
for(btheme= U.themes.first; btheme; btheme= btheme->next) {
/* check for alpha==0 is safe, then color was never set */
if(btheme->tact.strip[3]==0) {
+ SETCOL(btheme->tv3d.edge_sharp, 255, 32, 32, 255);
SETCOL(btheme->tact.strip_select, 0xff, 0xff, 0xaa, 204);
SETCOL(btheme->tact.strip, 0xe4, 0x9c, 0xc6, 204);
}