[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11037] trunk/blender/source/blender: == Sculpt Mode ==
Nicholas Bishop
nicholasbishop at gmail.com
Mon Jun 25 01:03:04 CEST 2007
Revision: 11037
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11037
Author: nicholasbishop
Date: 2007-06-25 01:02:58 +0200 (Mon, 25 Jun 2007)
Log Message:
-----------
== Sculpt Mode ==
Removed the draw_flag field from SculptData, moved the two draw flags over to SculptData.flags
Modified Paths:
--------------
trunk/blender/source/blender/makesdna/DNA_scene_types.h
trunk/blender/source/blender/src/drawobject.c
trunk/blender/source/blender/src/drawview.c
trunk/blender/source/blender/src/header_view3d.c
trunk/blender/source/blender/src/sculptmode.c
Modified: trunk/blender/source/blender/makesdna/DNA_scene_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_scene_types.h 2007-06-24 22:28:28 UTC (rev 11036)
+++ trunk/blender/source/blender/makesdna/DNA_scene_types.h 2007-06-24 23:02:58 UTC (rev 11037)
@@ -390,16 +390,12 @@
char averaging;
char flags;
- char draw_flag;
-
/* Control tablet input */
char tablet_size, tablet_strength;
/* Symmetry is separate from the other BrushData because the same
settings are always used for all brush types */
char symm;
-
- char pad[7];
} SculptData;
typedef struct Scene {
@@ -608,21 +604,20 @@
/* SculptData.flags */
#define SCULPT_INPUT_SMOOTH 1
+#define SCULPT_DRAW_FAST 2
+#define SCULPT_DRAW_BRUSH 4
/* SculptData.brushtype */
-#define DRAW_BRUSH 1
-#define SMOOTH_BRUSH 2
-#define PINCH_BRUSH 3
+#define DRAW_BRUSH 1
+#define SMOOTH_BRUSH 2
+#define PINCH_BRUSH 3
#define INFLATE_BRUSH 4
-#define GRAB_BRUSH 5
-#define LAYER_BRUSH 6
+#define GRAB_BRUSH 5
+#define LAYER_BRUSH 6
#define FLATTEN_BRUSH 7
/* SculptData.texrept */
#define SCULPTREPT_DRAG 1
#define SCULPTREPT_TILE 2
#define SCULPTREPT_3D 3
-/* SculptData.draw_flag */
-#define SCULPTDRAW_FAST 1
-#define SCULPTDRAW_BRUSH 2
#define SYMM_X 1
#define SYMM_Y 2
Modified: trunk/blender/source/blender/src/drawobject.c
===================================================================
--- trunk/blender/source/blender/src/drawobject.c 2007-06-24 22:28:28 UTC (rev 11036)
+++ trunk/blender/source/blender/src/drawobject.c 2007-06-24 23:02:58 UTC (rev 11037)
@@ -2184,7 +2184,7 @@
cageDM->release(cageDM);
finalDM->release(finalDM);
}
- else if(!G.obedit && (G.f & G_SCULPTMODE) &&(G.scene->sculptdata.draw_flag & SCULPTDRAW_FAST) &&
+ else if(!G.obedit && (G.f & G_SCULPTMODE) &&(G.scene->sculptdata.flags & SCULPT_DRAW_FAST) &&
OBACT==ob && !sculpt_modifiers_active(ob)) {
sculptmode_draw_mesh(0);
}
Modified: trunk/blender/source/blender/src/drawview.c
===================================================================
--- trunk/blender/source/blender/src/drawview.c 2007-06-24 22:28:28 UTC (rev 11036)
+++ trunk/blender/source/blender/src/drawview.c 2007-06-24 23:02:58 UTC (rev 11037)
@@ -2980,7 +2980,7 @@
sdrawXORline(pd->origloc[0], pd->origloc[1], mouse[0], mouse[1]);
}
}
- else if(sculpt_data()->draw_flag & SCULPTDRAW_BRUSH) {
+ else if(sculpt_data()->flags & SCULPT_DRAW_BRUSH) {
short csc[2], car[2];
getmouseco_sc(csc);
getmouseco_areawin(car);
Modified: trunk/blender/source/blender/src/header_view3d.c
===================================================================
--- trunk/blender/source/blender/src/header_view3d.c 2007-06-24 22:28:28 UTC (rev 11036)
+++ trunk/blender/source/blender/src/header_view3d.c 2007-06-24 23:02:58 UTC (rev 11037)
@@ -4231,10 +4231,10 @@
G.vd->pivot_last= !G.vd->pivot_last;
break;
case 12:
- sd->draw_flag ^= SCULPTDRAW_FAST;
+ sd->flags ^= SCULPT_DRAW_FAST;
break;
case 13:
- sd->draw_flag ^= SCULPTDRAW_BRUSH;
+ sd->flags ^= SCULPT_DRAW_BRUSH;
break;
case 14:
add_blockhandler(curarea, VIEW3D_HANDLER_OBJECT, UI_PNL_UNSTOW);
@@ -4288,8 +4288,8 @@
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
uiDefIconTextBlockBut(block, view3d_sculpt_inputmenu, NULL, ICON_RIGHTARROW_THIN, "Input Settings", 0, yco-=20, 120, 19, "");
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
- uiDefIconTextBut(block, BUTM, 1, ((sd->draw_flag & SCULPTDRAW_BRUSH) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT), "Display Brush", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 13, "");
- uiDefIconTextBut(block, BUTM, 1, ((sd->draw_flag & SCULPTDRAW_FAST) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT), "Partial Redraw", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, "");
+ uiDefIconTextBut(block, BUTM, 1, ((sd->flags & SCULPT_DRAW_BRUSH) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT), "Display Brush", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 13, "");
+ uiDefIconTextBut(block, BUTM, 1, ((sd->flags & SCULPT_DRAW_FAST) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT), "Partial Redraw", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, "");
if(G.vd)
uiDefIconTextBut(block, BUTM, 1, (G.vd->pivot_last ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT), "Pivot Last", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 11, "");
Modified: trunk/blender/source/blender/src/sculptmode.c
===================================================================
--- trunk/blender/source/blender/src/sculptmode.c 2007-06-24 22:28:28 UTC (rev 11036)
+++ trunk/blender/source/blender/src/sculptmode.c 2007-06-24 23:02:58 UTC (rev 11037)
@@ -222,7 +222,7 @@
sd->averaging= 1;
sd->texsep= 0;
sd->texrept= SCULPTREPT_DRAG;
- sd->draw_flag= SCULPTDRAW_BRUSH;
+ sd->flags= SCULPT_DRAW_BRUSH;
sd->tablet_size=3;
sd->tablet_strength=10;
}
@@ -1395,7 +1395,7 @@
void sculpt_paint_brush(char clear)
{
- if(sculpt_data()->draw_flag & SCULPTDRAW_BRUSH) {
+ if(sculpt_data()->flags & SCULPT_DRAW_BRUSH) {
static short mvalo[2];
short mval[2];
const short rad= sculptmode_brush()->size;
@@ -1711,7 +1711,7 @@
e.scale[2]= 1.0f / ob->size[2];
/* Capture original copy */
- if(sd->draw_flag & SCULPTDRAW_FAST)
+ if(sd->flags & SCULPT_DRAW_FAST)
glAccum(GL_LOAD, 1);
while (get_mbut() & mousebut) {
@@ -1745,7 +1745,7 @@
if(modifier_calculations || ob_get_keyblock(ob))
DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
- if(modifier_calculations || sd->brush_type == GRAB_BRUSH || !(sd->draw_flag & SCULPTDRAW_FAST)) {
+ if(modifier_calculations || sd->brush_type == GRAB_BRUSH || !(sd->flags & SCULPT_DRAW_FAST)) {
calc_damaged_verts(&ss->damaged_verts,e.grabdata);
scrarea_do_windraw(curarea);
screen_swapbuffers();
@@ -1788,7 +1788,7 @@
glEnable(GL_SCISSOR_TEST);
/* Draw cursor */
- if(sculpt_data()->draw_flag & SCULPTDRAW_BRUSH) {
+ if(sculpt_data()->flags & SCULPT_DRAW_BRUSH) {
persp(PERSP_WIN);
glDisable(GL_DEPTH_TEST);
fdrawXORcirc((float)mouse[0],(float)mouse[1],sculptmode_brush()->size);
More information about the Bf-blender-cvs
mailing list