Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2005-07-14 19:48:01 +0400
committerDaniel Dunbar <daniel@zuster.org>2005-07-14 19:48:01 +0400
commitbefc2bbc41ee7c8396f9acb781977b1af4915626 (patch)
tree79b88a72113f8f75988896782b0d25502c88a369 /source/blender/src
parent1261dc7e4ede3169d2a959a10ee428e492eddfeb (diff)
- split makeDispList into makeDispList{Mesh,MBall,CurveTypes}, there is
still a makeDispList that dispatches to the appropriate one. makeDispList is on the way out and this makes it easier to track down exactly which places use makedispList and for what types of objects. - switch calls to makeDispList to appropriate more specific function (if the object type is known by caller). - added mesh_changed function that invalidates cached mesh data (but does not rebuild, mesh data gets rebuilt on access). Most old calls to makeDispListMesh use this instead now.
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/editface.c8
-rw-r--r--source/blender/src/editobject.c8
-rw-r--r--source/blender/src/editsima.c2
-rw-r--r--source/blender/src/toolbox.c4
-rw-r--r--source/blender/src/vpaint.c13
5 files changed, 20 insertions, 15 deletions
diff --git a/source/blender/src/editface.c b/source/blender/src/editface.c
index 11887003e12..f6feceb7f8e 100644
--- a/source/blender/src/editface.c
+++ b/source/blender/src/editface.c
@@ -885,7 +885,7 @@ void rotate_uv_tface()
}
BIF_undo_push("Rotate UV face");
- makeDispList(OBACT);
+ mesh_changed(OBACT);
allqueue(REDRAWVIEW3D, 0);
allqueue(REDRAWIMAGE, 0);
}
@@ -1226,9 +1226,11 @@ void set_faceselect() /* toggle */
BIF_undo_push("Set UV Faceselect");
}
else if((G.f & (G_WEIGHTPAINT|G_VERTEXPAINT|G_TEXTUREPAINT))==0) {
- if(me) reveal_tface();
+ if(me) {
+ reveal_tface();
+ mesh_changed(ob);
+ }
setcursor_space(SPACE_VIEW3D, CURSOR_STD);
- makeDispList(ob);
BIF_undo_push("End UV Faceselect");
}
countall();
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c
index 75a64a40d68..df8bb319537 100644
--- a/source/blender/src/editobject.c
+++ b/source/blender/src/editobject.c
@@ -1153,7 +1153,7 @@ void make_parent(void)
mode= PAROBJECT;
if((cu->flag & CU_PATH)==0) {
cu->flag |= CU_PATH|CU_FOLLOW;
- makeDispList(par); // force creation of path data
+ makeDispListCurveTypes(par); // force creation of path data
}
else cu->flag |= CU_FOLLOW;
}
@@ -1881,7 +1881,7 @@ void split_font()
text_to_curve(OBACT, 0); // pass 1: only one letter, adapt position
text_to_curve(OBACT, 0); // pass 2: remake
freedisplist(&OBACT->disp);
- makeDispList(OBACT);
+ makeDispListCurveTypes(OBACT);
OBACT->flag &= ~SELECT;
BASACT->flag &= ~SELECT;
@@ -2269,7 +2269,7 @@ void convertmenu(void)
cu= ob->data;
dl= cu->disp.first;
- if(dl==0) makeDispList(ob); // force creation
+ if(dl==0) makeDispListCurveTypes(ob); // force creation
nurbs_to_mesh(ob); /* also does users */
@@ -2347,7 +2347,7 @@ void flip_subdivison(Object *ob, int level)
allqueue(REDRAWVIEW3D, 0);
allqueue(REDRAWOOPS, 0);
allqueue(REDRAWBUTSEDIT, 0);
- makeDispList(ob); // no dependency?
+ mesh_changed(ob);
BIF_undo_push("Switch subsurf on/off");
}
diff --git a/source/blender/src/editsima.c b/source/blender/src/editsima.c
index 8cb75c59050..96b9b1de3f7 100644
--- a/source/blender/src/editsima.c
+++ b/source/blender/src/editsima.c
@@ -761,7 +761,7 @@ void transform_tface_uv(int mode, int context) // 2 args, for callback
G.moving= 0;
prop_size*= 3;
- makeDispList(OBACT);
+ mesh_changed(OBACT);
allqueue(REDRAWVIEW3D, 0);
if(event!=ESCKEY && event!=RIGHTMOUSE)
diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c
index 9c46f2f5e16..b5096bf8228 100644
--- a/source/blender/src/toolbox.c
+++ b/source/blender/src/toolbox.c
@@ -1808,8 +1808,8 @@ static void tb_do_mesh(void *arg, int event){
case 2: G.f ^= G_DRAWEDGES; break;
case 3: G.f ^= G_DRAWFACES; break;
case 4: G.f ^= G_DRAWNORMALS; break;
- case 5: me->flag ^= ME_SUBSURF; makeDispList(OBACT); break;
- case 6: me->flag ^= ME_OPT_EDGES; makeDispList(OBACT); break;
+ case 5: me->flag ^= ME_SUBSURF; mesh_changed(OBACT); break;
+ case 6: me->flag ^= ME_OPT_EDGES; mesh_changed(OBACT); break;
}
addqueue(curarea->win, REDRAW, 1);
}
diff --git a/source/blender/src/vpaint.c b/source/blender/src/vpaint.c
index b85010ce646..f3363c63bdf 100644
--- a/source/blender/src/vpaint.c
+++ b/source/blender/src/vpaint.c
@@ -766,7 +766,7 @@ void wpaint_undo (void){
me->dvert= MEM_mallocN(sizeof(MDeformVert)*me->totvert, "deformVert");
copy_dverts(me->dvert, wpaintundobuf, totwpaintundo);
- makeDispList(OBACT);
+ mesh_changed(OBACT);
scrarea_do_windraw(curarea);
}
@@ -940,7 +940,7 @@ void weight_paint(void)
me->mcol= 0;
}
- makeDispList(ob);
+ mesh_changed(ob);
// this flag is event for softbody to refresh weightpaint values
if(ob->soft) ob->softflag |= OB_SB_REDO;
@@ -1152,8 +1152,9 @@ void set_wpaint(void) /* toggle */
}
else {
freefastshade(); /* to be sure */
- if (ob)
- makeDispList(ob);
+ if (me) {
+ mesh_changed(ob);
+ }
if(!(G.f & G_FACESELECT))
setcursor_space(SPACE_VIEW3D, CURSOR_STD);
}
@@ -1200,7 +1201,9 @@ void set_vpaint(void) /* toggle */
}
else {
freefastshade(); /* to be sure */
- if (ob) makeDispList(ob);
+ if (me) {
+ mesh_changed(ob);
+ }
if((G.f & G_FACESELECT)==0) setcursor_space(SPACE_VIEW3D, CURSOR_STD);
}
}