forked from bartvdbraak/blender
Cloth: Bugfix: 1. Kicking esc again, 2. Collision modifier needed to be updated when going backward in time, 3. GUI change when no bullet there
This commit is contained in:
parent
7a7a52226f
commit
4ed28a99a7
@ -526,6 +526,9 @@ int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr)
|
||||
if(G.rt > 0)
|
||||
printf("cloth_read_cache problem: lnex - f#: %f, lastCF: %d\n", framenr, clmd->sim_parms->lastcachedframe);
|
||||
}
|
||||
|
||||
if(G.rt > 0)
|
||||
printf("cloth_read_cache: %f successfully \n", framenr);
|
||||
}
|
||||
|
||||
if(G.rt > 0)
|
||||
@ -647,7 +650,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d
|
||||
/* we're getting called two times during file load,
|
||||
resulting in a not valid G.relbase on the first time (cache makes problems)
|
||||
--> just return back */
|
||||
if((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_LOADED)&& (!G.relbase_valid))
|
||||
if((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_LOADED) && (!G.relbase_valid))
|
||||
{
|
||||
clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_LOADED;
|
||||
return dm;
|
||||
@ -732,8 +735,6 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d
|
||||
|
||||
// only be active during a specific period:
|
||||
// that's "first frame" and "last frame" on GUI
|
||||
|
||||
// TODO: enable later again after refactoring
|
||||
if ( current_time < clmd->sim_parms->firstframe )
|
||||
{
|
||||
return result;
|
||||
|
@ -1531,8 +1531,11 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase
|
||||
if(effectors) pdEndEffectors(effectors);
|
||||
|
||||
/* ask for user break */
|
||||
/*
|
||||
don't work very well, gives problems with ctrl-a + esc
|
||||
if (CT_localInterruptCallBack && CT_localInterruptCallBack())
|
||||
return 0;
|
||||
*/
|
||||
}
|
||||
|
||||
for(i = 0; i < numverts; i++)
|
||||
|
@ -5213,7 +5213,7 @@ static void collisionModifier_deformVerts(
|
||||
}
|
||||
else
|
||||
{
|
||||
collmd->time = current_time;
|
||||
collisionModifier_freeData((ModifierData *)collmd);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5124,9 +5124,6 @@ static void object_panel_cloth(Object *ob)
|
||||
char *clvg1, *clvg2;
|
||||
char clmvg [] = "Vertex Groups%t|";
|
||||
|
||||
clmdSetInterruptCallBack(blender_test_break); // make softbody module ESC aware
|
||||
G.afbreek=0; // init global break system
|
||||
|
||||
val2=0;
|
||||
|
||||
/* GENERAL STUFF */
|
||||
@ -5262,7 +5259,7 @@ static void object_panel_cloth_II(Object *ob)
|
||||
else
|
||||
uiDefBut(block, LABEL, 0, " ", 10,80,145,20, NULL, 0.0, 0, 0, 0, "");
|
||||
*/
|
||||
|
||||
#if WITH_BULLET == 1
|
||||
uiDefButBitI(block, TOG, CLOTH_COLLSETTINGS_FLAG_ENABLED, B_CLOTH_RENEW, "Enable collisions", 10,60,150,20, &clmd->coll_parms->flags, 0, 0, 0, 0, "Enable collisions with this object");
|
||||
if (clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_ENABLED)
|
||||
{
|
||||
@ -5272,6 +5269,9 @@ static void object_panel_cloth_II(Object *ob)
|
||||
}
|
||||
else
|
||||
uiDefBut(block, LABEL, 0, "",160,60,150,20, NULL, 0.0, 0, 0, 0, "");
|
||||
#else
|
||||
uiDefBut(block, LABEL, 0, "No collisions available (compile with bullet).",10,60,300,20, NULL, 0.0, 0, 0, 0, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
uiBlockEndAlign(block);
|
||||
|
Loading…
Reference in New Issue
Block a user