- bug fix, apply modifier removed modifier even on certain

errors
 - change drawimagespace to check and update object data if
   it needs a recalc. this fixes errors with a recalc being
   flushed but not actually being done before spaceimage
   redraws. Updates typically actually happen in draw loop,
   which is not a great design...
 - make shared vertexcol didn't flush update
This commit is contained in:
Daniel Dunbar 2005-08-20 07:42:25 +00:00
parent a30740c196
commit 1ac10f50f4
4 changed files with 9 additions and 16 deletions

@ -762,11 +762,13 @@ static void modifiers_applyModifier(void *obv, void *mdv)
return;
}
if (converted) {
BLI_remlink(&ob->modifiers, md);
modifier_free(md);
BIF_undo_push("Apply modifier");
}
}
static void modifiers_copyModifier(void *ob_v, void *md_v)
{

@ -3788,7 +3788,7 @@ static int bbs_mesh_verts(DerivedMesh *dm, int offset)
bglEnd();
glPointSize(1.0);
return offset + G.totvert; // XXX is G variable reliable?
return offset + G.totvert;
}
static int bbs_mesh_wire__setDrawOptions(void *userData, int index)
@ -3807,7 +3807,7 @@ static int bbs_mesh_wire(DerivedMesh *dm, int offset)
{
dm->drawMappedEdges(dm, bbs_mesh_wire__setDrawOptions, (void*) offset);
return offset + G.totedge; // XXX is G variable reliable?
return offset + G.totedge;
}
static int bbs_mesh_solid__setSolidDrawOptions(void *userData, int index, int *drawSmooth_r)

@ -1951,6 +1951,8 @@ void special_editmenu(void)
if(me->tface) mcol_to_tface(me, 1);
BIF_undo_push("Shared VertexCol");
DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
}
}
else if(G.f & G_WEIGHTPAINT) {

@ -107,17 +107,7 @@ static int compuvvert(const void *u1, const void *u2)
void object_uvs_changed(Object *ob)
{
/* Unfortunately we also have to force an eval
* here because otherwise the modifier UVs might
* not be updated. Goes back to sillyness that
* recalc is done as part of view3d draw loop!
*
* Technically should scan all SpaceImas here.
*/
DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
if(G.sima && (G.sima->flag & SI_DRAWSHADOW)) {
object_handle_update(ob);
}
allqueue(REDRAWVIEW3D, 0);
allqueue(REDRAWIMAGE, 0);
@ -127,7 +117,6 @@ void object_tface_flags_changed(Object *ob, int updateButtons)
{
if (G.f&G_FACESELECT) {
DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
object_handle_update(ob);
}
if (updateButtons) allqueue(REDRAWBUTSEDIT, 0);