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 Genrich <daniel.genrich@gmx.net>2008-02-28 03:01:19 +0300
committerDaniel Genrich <daniel.genrich@gmx.net>2008-02-28 03:01:19 +0300
commit905a2d374a9b418fe2d358f4c7fdbc12a6253f91 (patch)
tree11fd4523fd432d9fce60e6f73827f056a7d9f176 /source/blender/src/editmesh.c
parent62bd1b85e63d996dbe1c50fe5a47df236001e147 (diff)
Cloth: 1. Bugfix for possible memory leak reported by Kenneth Styrberg (via mailing list), 2. Bugfix for friction again, 3. Preset menu on GUI (thanks to help from nudelZ (#blendercoders), 4. Possibility to disable autoprotect cache, 5. Some cache bugs fixed, 6. Some speedup in generating cloth
Diffstat (limited to 'source/blender/src/editmesh.c')
-rw-r--r--source/blender/src/editmesh.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/src/editmesh.c b/source/blender/src/editmesh.c
index acb4134a040..34d3bc89bdb 100644
--- a/source/blender/src/editmesh.c
+++ b/source/blender/src/editmesh.c
@@ -854,6 +854,8 @@ void make_editMesh()
clmd = (ClothModifierData *) modifiers_findByType(G.obedit, eModifierType_Cloth);
cloth = clmd->clothObject;
+ clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_EDITMODE;
+
/* just to be sure also check vertcount */
/* also check if we have a protected cache */
if(cloth && (tot == cloth->numverts) && (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT))
@@ -866,7 +868,6 @@ void make_editMesh()
cloth_enabled = 1;
clmd->sim_parms->editedframe = G.scene->r.cfra;
- clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_EDITMODE;
/* inverse matrix is not uptodate... */
Mat4Invert ( G.obedit->imat, G.obedit->obmat );
@@ -1179,8 +1180,14 @@ void load_editMesh(void)
if(G.rt > 0)
printf("loadmesh --> cloth_enabled cloth_write_cache\n");
cloth_write_cache(G.obedit, clmd, clmd->sim_parms->editedframe);
- cloth_read_cache(G.obedit, clmd, G.scene->r.cfra);
- implicit_set_positions(clmd);
+
+ if(G.scene->r.cfra != clmd->sim_parms->editedframe)
+ {
+ if(cloth_read_cache(G.obedit, clmd, G.scene->r.cfra))
+ implicit_set_positions(clmd);
+ }
+ else
+ implicit_set_positions(clmd);
clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_EDITMODE;
}
@@ -1470,6 +1477,7 @@ void remake_editMesh(void)
{
make_editMesh();
allqueue(REDRAWVIEW3D, 0);
+ allqueue(REDRAWBUTSOBJECT, 0); /* needed to have nice cloth panels */
DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
BIF_undo_push("Undo all changes");
}