Fixed a drawing error in radial control and a warning in sculpt.c.
authorNicholas Bishop <nicholasbishop@gmail.com>
Sat, 24 Jan 2009 23:20:25 +0000 (23:20 +0000)
committerNicholas Bishop <nicholasbishop@gmail.com>
Sat, 24 Jan 2009 23:20:25 +0000 (23:20 +0000)
source/blender/editors/sculpt/sculpt.c
source/blender/editors/sculpt/sculpt_intern.h
source/blender/windowmanager/intern/wm_operators.c

index ec19ec08ac36cde6ccadb0196417b2e917a12d15..a3cbc9549171a0599c966dd276823413261c68a1 100644 (file)
@@ -271,7 +271,7 @@ static float brush_strength(Sculpt *sd, StrokeCache *cache)
 /* For clipping against a mirror modifier */
 static void sculpt_clip(StrokeCache *cache, float *co, const float val[3])
 {
-       char i;
+       int i;
        for(i=0; i<3; ++i) {
                if((cache->flag & (CLIP_X << i)) && (fabs(co[i]) <= cache->clip_tolerance[i]))
                        co[i]= 0.0f;
index dd668125aff25d09ba5600793dc23d3682528598..112da5b4f0f50b7c960ffb55e0935f02cea88226 100644 (file)
 #include "DNA_vec_types.h"
 #include "BKE_sculpt.h"
 
-struct BrushAction;
 struct Brush;
-struct IndexNode;
-struct KeyBlock;
 struct Mesh;
 struct Object;
-struct PartialVisibility;
 struct Scene;
-struct ScrArea;
 struct Sculpt;
 struct SculptStroke;
 
index dbaa50be92a5d5cff98c923cde8baec91edd03f9..1f1132eb616baba8d6aa0f7d1705499e9df62b6c 100644 (file)
@@ -924,7 +924,10 @@ static void wm_radial_control_paint(bContext *C, int x, int y, void *customdata)
        if(rc->tex) {
                const float str = rc->mode == WM_RADIALCONTROL_STRENGTH ? (rc->value + 0.5) : 1;
 
-               glRotatef(angle, 0, 0, 1);
+               if(rc->mode == WM_RADIALCONTROL_ANGLE) {
+                       glRotatef(angle, 0, 0, 1);
+                       fdrawline(0, 0, WM_RADIAL_CONTROL_DISPLAY_SIZE, 0);
+               }
 
                glBindTexture(GL_TEXTURE_2D, rc->tex);
 
@@ -947,8 +950,6 @@ static void wm_radial_control_paint(bContext *C, int x, int y, void *customdata)
        }
 
        glColor4ub(255, 255, 255, 128); 
-       if(rc->mode == WM_RADIALCONTROL_ANGLE)
-               fdrawline(0, 0, WM_RADIAL_CONTROL_DISPLAY_SIZE, 0);
        glutil_draw_lined_arc(0.0, M_PI*2.0, r1, 40);
        glutil_draw_lined_arc(0.0, M_PI*2.0, r2, 40);
        glDisable(GL_BLEND);