Page MenuHome

loopcut_theme.patch

Authored By
Sergej Reich (sergof)
Nov 13 2013, 3:19 PM
Size
4 KB
Subscribers
None

loopcut_theme.patch

Index: source/blender/editors/include/UI_resources.h
===================================================================
--- source/blender/editors/include/UI_resources.h (revision 35940)
+++ source/blender/editors/include/UI_resources.h (working copy)
@@ -242,7 +242,9 @@ enum {
TH_DRAWEXTRA_EDGELEN,
TH_DRAWEXTRA_FACEAREA,
- TH_DRAWEXTRA_FACEANG
+ TH_DRAWEXTRA_FACEANG,
+
+ TH_LOOPCUT
};
/* XXX WARNING: previous is saved in file, so do not change order! */
Index: source/blender/editors/interface/resources.c
===================================================================
--- source/blender/editors/interface/resources.c (revision 35940)
+++ source/blender/editors/interface/resources.c (working copy)
@@ -289,6 +289,8 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
cp= ts->face_dot; break;
case TH_FACEDOT_SIZE:
cp= &ts->facedot_size; break;
+ case TH_LOOPCUT:
+ cp= &ts->loopcut; break;
case TH_DRAWEXTRA_EDGELEN:
cp= ts->extra_edge_len; break;
case TH_DRAWEXTRA_FACEAREA:
@@ -598,6 +600,7 @@ void ui_theme_init_default(void)
SETCOL(btheme->tv3d.edge_facesel, 75, 75, 75, 255);
SETCOL(btheme->tv3d.face, 0, 0, 0, 18);
SETCOL(btheme->tv3d.face_select, 255, 133, 0, 60);
+ SETCOL(btheme->tv3d.loopcut, 255, 0, 255, 255);
SETCOL(btheme->tv3d.normal, 0x22, 0xDD, 0xDD, 255);
SETCOL(btheme->tv3d.vertex_normal, 0x23, 0x61, 0xDD, 255);
SETCOL(btheme->tv3d.face_dot, 255, 133, 0, 255);
@@ -1541,6 +1544,13 @@ void init_userdef_do_versions(void)
U.autokey_flag &= ~AUTOKEY_FLAG_ONLYKEYINGSET;
}
+ if (bmain->versionfile < 257) { // TODO should bump subversion
+ bTheme *btheme;
+ for(btheme= U.themes.first; btheme; btheme= btheme->next) {
+ SETCOL(btheme->tv3d.loopcut, 255, 0, 255, 255);
+ }
+ }
+
/* GL Texture Garbage Collection (variable abused above!) */
if (U.textimeout == 0) {
U.texcollectrate = 60;
Index: source/blender/editors/mesh/loopcut.c
===================================================================
--- source/blender/editors/mesh/loopcut.c (revision 35940)
+++ source/blender/editors/mesh/loopcut.c (working copy)
@@ -76,6 +76,7 @@
#include "RNA_define.h"
#include "UI_interface.h"
+#include "UI_resources.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -116,7 +117,7 @@ static void ringsel_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
glPushMatrix();
glMultMatrixf(lcd->ob->obmat);
- glColor3ub(255, 0, 255);
+ UI_ThemeColor(TH_LOOPCUT);
glBegin(GL_LINES);
for (i=0; i<lcd->totedge; i++) {
glVertex3fv(lcd->edges[i][0]);
Index: source/blender/makesdna/DNA_userdef_types.h
===================================================================
--- source/blender/makesdna/DNA_userdef_types.h (revision 35940)
+++ source/blender/makesdna/DNA_userdef_types.h (working copy)
@@ -204,6 +204,7 @@ typedef struct ThemeSpace {
char edge_seam[4], edge_sharp[4], edge_facesel[4], edge_crease[4];
char face[4], face_select[4]; // solid faces
char face_dot[4]; // selected color
+ char loopcut[4];
char extra_edge_len[4], extra_face_angle[4], extra_face_area[4], pad3[4];
char normal[4];
char vertex_normal[4];
@@ -233,7 +234,7 @@ typedef struct ThemeSpace {
char handle_vertex_select[4];
char handle_vertex_size;
- char hpad[7];
+ char hpad[3];
char preview_back[4];
Index: source/blender/makesrna/intern/rna_userdef.c
===================================================================
--- source/blender/makesrna/intern/rna_userdef.c (revision 35940)
+++ source/blender/makesrna/intern/rna_userdef.c (working copy)
@@ -976,6 +976,11 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
RNA_def_property_range(prop, 1, 5);
RNA_def_property_ui_text(prop, "Outline Width", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop= RNA_def_property(srna, "loopcut", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Loopcut selection", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
28/f8/aef021290836b17d28990cbc21a0

Event Timeline