Revision: 49208
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49208
Author:   campbellbarton
Date:     2012-07-25 13:55:16 +0000 (Wed, 25 Jul 2012)
Log Message:
-----------
edit fix for [#32177] - drawing text isnt really needed for selections.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_view3d/drawobject.c

Modified: trunk/blender/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawobject.c      
2012-07-25 13:44:59 UTC (rev 49207)
+++ trunk/blender/source/blender/editors/space_view3d/drawobject.c      
2012-07-25 13:55:16 UTC (rev 49208)
@@ -6447,20 +6447,7 @@
        const char *axis_str[3] = {"px", "py", "pz"};
        int axis;
        float mat[4][4];
-       unsigned char _col[4], *col;
 
-       /* color */
-       if (dflag & DRAW_CONSTCOLOR) {
-               /* so we can draw pivot point in current const color */
-               float tcol[4];
-               col = _col;
-               glGetFloatv(GL_CURRENT_COLOR, tcol);
-               rgb_float_to_uchar(col, tcol);
-       }
-       else {
-               col = ob_wire_col;
-       }
-
        eul_to_mat4(mat, &data->axX);
        glLineWidth(4.0f);
        setlinestyle(2);
@@ -6470,7 +6457,7 @@
 
                copy_v3_v3(v, &data->pivX);
 
-               dir[axis] = 1.f;
+               dir[axis] = 1.0f;
                glBegin(GL_LINES);
                mul_m4_v3(mat, dir);
                add_v3_v3(v, dir);
@@ -6478,7 +6465,11 @@
                glVertex3fv(v);
                glEnd();
 
-               view3d_cached_text_draw_add(v, axis_str[axis], 0, 
V3D_CACHE_TEXT_ASCII, col);
+               /* when const color is set wirecolor is NULL - we could get the 
current color but
+                * with selection and group instancing its not needed to draw 
the text */
+               if ((dflag & DRAW_CONSTCOLOR) == 0) {
+                       view3d_cached_text_draw_add(v, axis_str[axis], 0, 
V3D_CACHE_TEXT_ASCII, ob_wire_col);
+               }
        }
        glLineWidth(1.0f);
        setlinestyle(0);

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

Reply via email to