Fix [#21678] Crease color cannot be adjusted
authorMatt Ebb <matt@mke3.net>
Tue, 6 Apr 2010 02:36:37 +0000 (02:36 +0000)
committerMatt Ebb <matt@mke3.net>
Tue, 6 Apr 2010 02:36:37 +0000 (02:36 +0000)
Gave edge crease a unique theme colour.

release/scripts/ui/space_userpref.py
source/blender/editors/include/UI_resources.h
source/blender/editors/interface/resources.c
source/blender/editors/space_view3d/drawobject.c
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesrna/intern/rna_userdef.c

index 83693ed2dffdc1a23b4c18ce9104e85e15f17222..00bde5eb47d80aac8eedde107449cc0a8a80af22 100644 (file)
@@ -687,6 +687,8 @@ class USERPREF_PT_theme(bpy.types.Panel):
             col.prop(v3d, "bone_solid")
             col.prop(v3d, "bone_pose")
             col.prop(v3d, "edge_seam")
+            col.prop(v3d, "edge_sharp")
+            col.prop(v3d, "edge_crease")
             #col.prop(v3d, "edge") Doesn't seem to work
 
         elif theme.theme_area == 'GRAPH_EDITOR':
index 273071f94bfff68dec685881fd9381c7b363d4e8..13f5eb86de2a5f2d3aab086465f4a3cb16f6ba5a 100644 (file)
@@ -227,6 +227,8 @@ enum {
        TH_DOPESHEET_CHANNELSUBOB,
        
        TH_PREVIEW_BACK,
+       
+       TH_EDGE_CREASE,
 };
 /* XXX WARNING: previous is saved in file, so do not change order! */
 
index dcfbc94798b07731b6defd514bdf84e58060554c..b22ef5bbe52663868a8f9328045f72faed34e12d 100644 (file)
@@ -275,6 +275,8 @@ char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
                                cp= ts->edge_seam; break;
                        case TH_EDGE_SHARP:
                                cp= ts->edge_sharp; break;
+                       case TH_EDGE_CREASE:
+                               cp= ts->edge_crease; break;
                        case TH_EDITMESH_ACTIVE:
                                cp= ts->editmesh_active; break;
                        case TH_EDGE_FACESEL:
@@ -1440,6 +1442,9 @@ void init_userdef_do_versions(void)
                        SETCOL(btheme->tipo.handle_sel_auto, 0xf0, 0xff, 0x40, 255);
                        SETCOL(btheme->tipo.handle_sel_vect, 0x40, 0xc0, 0x30, 255);
                        SETCOL(btheme->tipo.handle_sel_align, 0xf0, 0x90, 0xa0, 255);
+                       
+                       /* edge crease */
+                       SETCOLF(btheme->tv3d.edge_crease, 0.8, 0, 0.6, 1.0);
                }
        }
 
index c5cbb080b4ca1b11c242b82ab02a0700b5348b82..93f2f571d77f848e4fea61fd15031b066a24afe5 100644 (file)
@@ -1885,7 +1885,7 @@ static int draw_dm_creases__setDrawOptions(void *userData, int index)
        EditEdge *eed = EM_get_edge_for_index(index);
 
        if (eed->h==0 && eed->crease!=0.0) {
-               UI_ThemeColorBlend(TH_WIRE, TH_EDGE_SELECT, eed->crease);
+               UI_ThemeColorBlend(TH_WIRE, TH_EDGE_CREASE, eed->crease);
                return 1;
        } else {
                return 0;
index d5a2b504962cbf129044c59128b174a4f109040a..0b898e1a52524540101197e5b26970f17eb431a5 100644 (file)
@@ -192,7 +192,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_sharp[4], edge_facesel[4];
+       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 normal[4];
@@ -210,7 +210,7 @@ typedef struct ThemeSpace {
        char console_cursor[4];
        
        char vertex_size, facedot_size;
-       char bpad[6];
+       char bpad[2];
 
        char syntaxl[4], syntaxn[4], syntaxb[4]; // syntax for textwindow and nodes
        char syntaxv[4], syntaxc[4];
index 6b78ddaeae1db0524333af9906e6acad2ca712fc..3dd90bf6f89322eac913df0aea3c6b3b67e93663 100644 (file)
@@ -671,6 +671,11 @@ static void rna_def_userdef_theme_spaces_edge(StructRNA *srna)
        RNA_def_property_array(prop, 3);
        RNA_def_property_ui_text(prop, "Edge Sharp", "");
        RNA_def_property_update(prop, 0, "rna_userdef_update");
+       
+       prop= RNA_def_property(srna, "edge_crease", PROP_FLOAT, PROP_COLOR);
+       RNA_def_property_array(prop, 3);
+       RNA_def_property_ui_text(prop, "Edge Crease", "");
+       RNA_def_property_update(prop, 0, "rna_userdef_update");
 
        prop= RNA_def_property(srna, "edge_facesel", PROP_FLOAT, PROP_COLOR);
        RNA_def_property_array(prop, 3);