Commit: ce0a87a2089c32db867930418f60ebaa7acc1604
Author: Jeroen Bakker
Date:   Tue Jun 19 14:32:09 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBce0a87a2089c32db867930418f60ebaa7acc1604

Revert: EditMode Inactive edge drawing

Did it manually as there was some refactoring done that has value

===================================================================

M       source/blender/draw/intern/draw_common.c
M       source/blender/draw/intern/draw_common.h
M       source/blender/draw/modes/shaders/common_globals_lib.glsl
M       source/blender/draw/modes/shaders/edit_mesh_overlay_common_lib.glsl
M       source/blender/editors/include/UI_resources.h
M       source/blender/editors/interface/resources.c
M       source/blender/makesdna/DNA_userdef_types.h
M       source/blender/makesrna/intern/rna_userdef.c

===================================================================

diff --git a/source/blender/draw/intern/draw_common.c 
b/source/blender/draw/intern/draw_common.c
index 4bcbb2110e7..d40378dec2d 100644
--- a/source/blender/draw/intern/draw_common.c
+++ b/source/blender/draw/intern/draw_common.c
@@ -50,7 +50,6 @@ struct GPUTexture *globals_ramp = NULL;
 void DRW_globals_update(void)
 {
        UI_GetThemeColor4fv(TH_WIRE, ts.colorWire);
-       UI_GetThemeColor4fv(TH_WIRE_INACTIVE, ts.colorWireInactive);
        UI_GetThemeColor4fv(TH_WIRE_EDIT, ts.colorWireEdit);
        UI_GetThemeColor4fv(TH_ACTIVE, ts.colorActive);
        UI_GetThemeColor4fv(TH_SELECT, ts.colorSelect);
diff --git a/source/blender/draw/intern/draw_common.h 
b/source/blender/draw/intern/draw_common.h
index 5e29831624b..6227130fb05 100644
--- a/source/blender/draw/intern/draw_common.h
+++ b/source/blender/draw/intern/draw_common.h
@@ -41,7 +41,6 @@ struct PTCacheEdit;
 typedef struct GlobalsUboStorage {
        /* UBOs data needs to be 16 byte aligned (size of vec4) */
        float colorWire[4];
-       float colorWireInactive[4];
        float colorWireEdit[4];
        float colorActive[4];
        float colorSelect[4];
diff --git a/source/blender/draw/modes/shaders/common_globals_lib.glsl 
b/source/blender/draw/modes/shaders/common_globals_lib.glsl
index f8a8f3b9203..c55457bb6d2 100644
--- a/source/blender/draw/modes/shaders/common_globals_lib.glsl
+++ b/source/blender/draw/modes/shaders/common_globals_lib.glsl
@@ -2,7 +2,6 @@
 /* keep in sync with GlobalsUboStorage */
 layout(std140) uniform globalsBlock {
        vec4 colorWire;
-       vec4 colorWireInactive;
        vec4 colorWireEdit;
        vec4 colorActive;
        vec4 colorSelect;
diff --git 
a/source/blender/draw/modes/shaders/edit_mesh_overlay_common_lib.glsl 
b/source/blender/draw/modes/shaders/edit_mesh_overlay_common_lib.glsl
index b3eb55baa3a..dabbb4a321a 100644
--- a/source/blender/draw/modes/shaders/edit_mesh_overlay_common_lib.glsl
+++ b/source/blender/draw/modes/shaders/edit_mesh_overlay_common_lib.glsl
@@ -33,7 +33,7 @@ vec4 EDIT_MESH_edge_color_inner(int edge_flag, bool 
face_active)
        color = ((edge_flag & EDGE_ACTIVE) != 0) ? colorEditMeshActive : color;
 
 #else
-       vec4 color = colorWireInactive;
+       vec4 color = colorWireEdit;
        color = ((edge_flag & EDGE_SELECTED) != 0) ? colorEdgeSelect : color;
 #endif
        return color;
@@ -46,10 +46,6 @@ vec4 EDIT_MESH_vertex_color(int vertex_flag)
                return colorEdgeSelect;
        }
        else {
-#ifdef EDGE_SELECTION
                return colorWireEdit;
-#else
-               return colorWireInactive;
-#endif
        }
 }
diff --git a/source/blender/editors/include/UI_resources.h 
b/source/blender/editors/include/UI_resources.h
index 48afea6bbf0..cab0fa8645d 100644
--- a/source/blender/editors/include/UI_resources.h
+++ b/source/blender/editors/include/UI_resources.h
@@ -90,7 +90,6 @@ typedef enum ThemeColorID {
        TH_WIRE,
        TH_WIRE_INNER,
        TH_WIRE_EDIT,
-       TH_WIRE_INACTIVE,
        TH_SELECT,
        TH_ACTIVE,
        TH_GROUP,
diff --git a/source/blender/editors/interface/resources.c 
b/source/blender/editors/interface/resources.c
index 79054190686..8bd41b874f5 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -298,8 +298,6 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, 
int spacetype, int colo
                                        cp = ts->syntaxr; break;
                                case TH_WIRE_EDIT:
                                        cp = ts->wire_edit; break;
-                               case TH_WIRE_INACTIVE:
-                                       cp = ts->wire_inactive; break;
                                case TH_LAMP:
                                        cp = ts->lamp; break;
                                case TH_SPEAKER:
@@ -936,7 +934,6 @@ void ui_theme_init_default(void)
        rgba_char_args_set(btheme->tv3d.view_overlay, 0, 0, 0, 255);
        rgba_char_args_set(btheme->tv3d.wire,       0x0, 0x0, 0x0, 255);
        rgba_char_args_set(btheme->tv3d.wire_edit,  0x0, 0x0, 0x0, 255);
-       rgba_char_args_set(btheme->tv3d.wire_inactive, 32, 32, 32, 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);
@@ -3050,17 +3047,6 @@ void init_userdef_do_versions(Main *bmain)
                }
        }
 
-       for (bTheme *btheme = U.themes.first; btheme; btheme = btheme->next) {
-               ThemeSpace *ts;
-
-               for (ts = UI_THEMESPACE_START(btheme); ts != 
UI_THEMESPACE_END(btheme); ts++) {
-                       if (btheme->tv3d.wire_inactive[3] == 0) {
-                               rgba_char_args_set(btheme->tv3d.wire_inactive,  
32, 32, 32, 255);
-                       }
-               }
-       }
-
-
        if (U.pixelsize == 0.0f)
                U.pixelsize = 1.0f;
 
diff --git a/source/blender/makesdna/DNA_userdef_types.h 
b/source/blender/makesdna/DNA_userdef_types.h
index 187c9f57e64..f4e8d5e0000 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -253,7 +253,7 @@ typedef struct ThemeSpace {
 
        char view_overlay[4];
 
-       char wire[4], wire_edit[4], wire_inactive[4], select[4];
+       char wire[4], wire_edit[4], select[4];
        char lamp[4], speaker[4], empty[4], camera[4];
        char active[4], group[4], group_active[4], transform[4];
        char vertex[4], vertex_select[4], vertex_bevel[4], 
vertex_unreferenced[4];
@@ -361,7 +361,6 @@ typedef struct ThemeSpace {
 
        char metadatabg[4];
        char metadatatext[4];
-       int pad;
 } ThemeSpace;
 
 
diff --git a/source/blender/makesrna/intern/rna_userdef.c 
b/source/blender/makesrna/intern/rna_userdef.c
index 9986701d9c3..215db672e02 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -1709,11 +1709,6 @@ static void 
rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Wire", "");
        RNA_def_property_update(prop, 0, "rna_userdef_update");
 
-       prop = RNA_def_property(srna, "wire_inactive", PROP_FLOAT, 
PROP_COLOR_GAMMA);
-       RNA_def_property_array(prop, 3);
-       RNA_def_property_ui_text(prop, "Wire Inactive", "Color for wireframe 
when in edit mode, but edge selection is not active");
-       RNA_def_property_update(prop, 0, "rna_userdef_update");
-
        prop = RNA_def_property(srna, "wire_edit", PROP_FLOAT, 
PROP_COLOR_GAMMA);
        RNA_def_property_array(prop, 3);
        RNA_def_property_ui_text(prop, "Wire Edit", "Color for wireframe when 
in edit mode, but edge selection is active");

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to