Cloth: 1. Speedup of collisions (up to 50%, see new dancing ballerina stats here: http://www.dldw.de/tmp/index.php?file=i_cloth-kdop-dancingb.jpg ; 2. changed vertex paint reset behaviour to only reset cloth if vertex group is really used
This commit is contained in:
@@ -1054,11 +1054,11 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm )
|
||||
|
||||
verts = clothObj->verts;
|
||||
|
||||
if ((((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SCALING ) ||
|
||||
if (((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SCALING ) ||
|
||||
(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL )) &&
|
||||
((clmd->sim_parms->vgroup_mass>0) ||
|
||||
(clmd->sim_parms->vgroup_struct>0)||
|
||||
(clmd->sim_parms->vgroup_bend>0)))|| (clmd->sim_parms->vgroup_mass>0))
|
||||
(clmd->sim_parms->vgroup_bend>0)))
|
||||
{
|
||||
for ( i = 0; i < numverts; i++, verts++ )
|
||||
{
|
||||
|
||||
@@ -120,15 +120,7 @@ static float KDOP_AXES[13][3] =
|
||||
|
||||
///////////// choose bounding volume here! /////////////
|
||||
|
||||
// #define KDOP_26
|
||||
|
||||
// #define KDOP_14
|
||||
|
||||
// AABB:
|
||||
// #define KDOP_8
|
||||
|
||||
// OBB:
|
||||
#define KDOP_6
|
||||
#define KDOP_26
|
||||
|
||||
|
||||
|
||||
@@ -137,10 +129,9 @@ static float KDOP_AXES[13][3] =
|
||||
#define KDOP_START 0
|
||||
#endif
|
||||
|
||||
// I didn't test this one!
|
||||
#ifdef KDOP_18
|
||||
#define KDOP_END 7
|
||||
#define KDOP_START 13
|
||||
#define KDOP_END 13
|
||||
#define KDOP_START 7
|
||||
#endif
|
||||
|
||||
#ifdef KDOP_14
|
||||
|
||||
@@ -1350,11 +1350,19 @@ void weight_paint(void)
|
||||
/* this flag is event for softbody to refresh weightpaint values */
|
||||
if(ob->soft) ob->softflag |= OB_SB_REDO;
|
||||
|
||||
// same goes for cloth
|
||||
/* same goes for cloth */
|
||||
if(modifiers_isClothEnabled(ob)) {
|
||||
ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth);
|
||||
if(clmd)
|
||||
clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET;
|
||||
{
|
||||
/* check if we use the edited vertex group at all */
|
||||
if((clmd->sim_parms->vgroup_mass==ob->actdef) ||
|
||||
(clmd->sim_parms->vgroup_struct==ob->actdef)||
|
||||
(clmd->sim_parms->vgroup_bend==ob->actdef))
|
||||
{
|
||||
clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* and particles too */
|
||||
|
||||
Reference in New Issue
Block a user