Bugreports keep coming in... including real bad one.

- Deformed mesh didnt give correct 'orco' anymore on render
- Mesh editmode, "Separate loose parts", crash on empty mesh (no verts)
- Global undo; buttons sending redraw events gave extra undo push called
  "Make single user or local". That latter was wrong event handling for
  REDRAW event, harmless, until now :)

First one is a real showstopper... bah!
This commit is contained in:
Ton Roosendaal
2004-11-19 22:44:06 +00:00
parent fe50974370
commit a91f7ff763
4 changed files with 25 additions and 13 deletions

View File

@@ -154,6 +154,10 @@
/* do_global_buttons(event) */
// (first event)
#define B_LOCAL_ALONE 20
#define B_ACTLOCAL 24 /* __NLA */
#define B_ACTALONE 25 /* __NLA */
#define B_ARMLOCAL 26 /* __NLA */

View File

@@ -1278,13 +1278,13 @@ static void init_render_mesh(Object *ob)
me= ob->data;
/* object_deform changes imat! */
do_puno= mesh_modifier(ob, 's');
paf = give_parteff(ob);
if(paf) {
mesh_modifier(ob, 's');
if(paf->flag & PAF_STATIC) render_static_particle_system(ob, paf);
else render_particle_system(ob, paf);
mesh_modifier(ob, 'e'); // end
return;
}
@@ -1294,7 +1294,6 @@ static void init_render_mesh(Object *ob)
MTC_Mat3CpyMat4(imat, ob->imat);
if(me->totvert==0) {
mesh_modifier(ob, 'e'); // end
return;
}
@@ -1315,7 +1314,18 @@ static void init_render_mesh(Object *ob)
}
}
}
/* we do this before deform */
if(need_orco) {
if (mesh_uses_displist(me))
make_orco_displist_mesh(ob, me->subdivr);
else
make_orco_mesh(me);
}
/* after orco, because this changes mesh vertices (too) */
do_puno= mesh_modifier(ob, 's');
if (mesh_uses_displist(me)) {
dl= me->disp.first;
@@ -1349,9 +1359,6 @@ static void init_render_mesh(Object *ob)
mvert= dlm->mvert;
totvert= dlm->totvert;
if(need_orco) {
make_orco_displist_mesh(ob, me->subdivr);
}
ms= NULL; // no stick in displistmesh
}
@@ -1363,9 +1370,6 @@ static void init_render_mesh(Object *ob)
dl= find_displist(&ob->disp, DL_VERTS);
if(dl) extverts= dl->verts;
if(need_orco) {
make_orco_mesh(me);
}
ms= me->msticky;
}

View File

@@ -1270,6 +1270,8 @@ void separatemenu(void)
{
short event;
if(G.editMesh->verts.first==NULL) return;
event = pupmenu("Separate (No undo!) %t|Selected%x1|All Loose Parts%x2");
if (event==0) return;

View File

@@ -1668,9 +1668,11 @@ void do_global_buttons2(short event)
/* general: Single User is allowed when from==LOCAL
* Make Local is allowed when (from==LOCAL && id==LIB)
*/
if(event<B_LOCAL_ALONE) return;
ob= OBACT;
switch(event) {
case B_LAMPALONE: