[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25904] trunk/blender: - draw mesh wire faded into the 3D view background color when in particle mode , the mesh and particle selection colors conflict too much making it hard to see particles .

Campbell Barton ideasman42 at gmail.com
Mon Jan 11 19:10:15 CET 2010


Revision: 25904
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25904
Author:   campbellbarton
Date:     2010-01-11 19:10:13 +0100 (Mon, 11 Jan 2010)

Log Message:
-----------
- draw mesh wire faded into the 3D view background color when in particle mode, the mesh and particle selection colors conflict too much making it hard to see particles.
- show proportional editmode button in particle editmode.

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/space_view3d.py
    trunk/blender/source/blender/editors/space_view3d/drawobject.c
    trunk/blender/source/blender/makesrna/intern/rna_sculpt_paint.c

Modified: trunk/blender/release/scripts/ui/space_view3d.py
===================================================================
--- trunk/blender/release/scripts/ui/space_view3d.py	2010-01-11 17:46:19 UTC (rev 25903)
+++ trunk/blender/release/scripts/ui/space_view3d.py	2010-01-11 18:10:13 UTC (rev 25904)
@@ -65,7 +65,7 @@
             row.prop(view, "occlude_geometry", text="")
 
         # Proportional editing
-        if obj and obj.mode in ('OBJECT', 'EDIT'):
+        if obj and obj.mode in ('OBJECT', 'EDIT', 'PARTICLE_EDIT'):
             row = layout.row(align=True)
             row.prop(toolsettings, "proportional_editing", text="", icon_only=True)
             if toolsettings.proportional_editing != 'DISABLED':

Modified: trunk/blender/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawobject.c	2010-01-11 17:46:19 UTC (rev 25903)
+++ trunk/blender/source/blender/editors/space_view3d/drawobject.c	2010-01-11 18:10:13 UTC (rev 25904)
@@ -2489,15 +2489,28 @@
 		}
 	}
 	if (draw_wire) {
-			/* If drawing wire and drawtype is not OB_WIRE then we are
-				* overlaying the wires.
-				*
-				* UPDATE bug #10290 - With this wire-only objects can draw
-				* behind other objects depending on their order in the scene. 2x if 0's below. undo'ing zr's commit: r4059
-				* 
-				* if draw wire is 1 then just drawing wire, no need for depth buffer stuff,
-				* otherwise this wire is to overlay solid mode faces so do some depth buffer tricks.
-				*/
+
+		/* When using wireframe object traw in particle edit mode
+		 * the mesh gets in the way of seeing the particles, fade the wire color
+		 * with the background. */
+		if(ob==OBACT && (ob->mode & OB_MODE_PARTICLE_EDIT)) {
+			float col_wire[4], col_bg[4], col[3];
+
+			UI_GetThemeColor3fv(TH_BACK, col_bg);
+			glGetFloatv(GL_CURRENT_COLOR, col_wire);
+			interp_v3_v3v3(col, col_bg, col_wire, 0.15);
+			glColor3fv(col);
+		}
+
+		/* If drawing wire and drawtype is not OB_WIRE then we are
+		 * overlaying the wires.
+		 *
+		 * UPDATE bug #10290 - With this wire-only objects can draw
+		 * behind other objects depending on their order in the scene. 2x if 0's below. undo'ing zr's commit: r4059
+		 *
+		 * if draw wire is 1 then just drawing wire, no need for depth buffer stuff,
+		 * otherwise this wire is to overlay solid mode faces so do some depth buffer tricks.
+		 */
 		if (dt!=OB_WIRE && draw_wire==2) {
 			bglPolygonOffset(rv3d->dist, 1.0);
 			glDepthMask(0);	// disable write in zbuffer, selected edge wires show better

Modified: trunk/blender/source/blender/makesrna/intern/rna_sculpt_paint.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_sculpt_paint.c	2010-01-11 17:46:19 UTC (rev 25903)
+++ trunk/blender/source/blender/makesrna/intern/rna_sculpt_paint.c	2010-01-11 18:10:13 UTC (rev 25904)
@@ -36,7 +36,7 @@
 
 #include "WM_types.h"
 
-EnumPropertyItem particle_edit_hair_brush_items[] = {
+static EnumPropertyItem particle_edit_hair_brush_items[] = {
 	{PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush."},
 	{PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb hairs."},
 	{PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth hairs."},





More information about the Bf-blender-cvs mailing list