Commit: 69e8ee78510d9a9a3a891ebd45bc132d70eb8176 Author: Luca Rood Date: Thu Jan 12 02:05:28 2017 -0200 Branches: cloth-improvements https://developer.blender.org/rB69e8ee78510d9a9a3a891ebd45bc132d70eb8176
Fix collision extra solve update and remove redundant result applies =================================================================== M source/blender/blenkernel/intern/collision.c M source/blender/physics/intern/BPH_mass_spring.cpp =================================================================== diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index bc722fc5fb..120b444ce0 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -893,7 +893,7 @@ int cloth_bvh_objcollision(Object *ob, ClothModifierData *clmd, float step, floa if (collobjs) MEM_freeN(collobjs); - return 1|MIN2 ( ret, 1 ); + return MIN2 ( ret, 1 ); } BLI_INLINE void max_v3_v3v3(float r[3], const float a[3], const float b[3]) diff --git a/source/blender/physics/intern/BPH_mass_spring.cpp b/source/blender/physics/intern/BPH_mass_spring.cpp index 5e23a83c9d..90c5819a43 100644 --- a/source/blender/physics/intern/BPH_mass_spring.cpp +++ b/source/blender/physics/intern/BPH_mass_spring.cpp @@ -988,12 +988,12 @@ static void cloth_collision_solve_extra(Object *ob, ClothModifierData *clmd, Lis } } - // X = Xnew; - BPH_mass_spring_apply_result(id); - if (do_extra_solve) { ImplicitSolverResult result; + // X = Xnew; + BPH_mass_spring_apply_result(id); + /* initialize forces to zero */ BPH_mass_spring_clear_forces(id); @@ -1005,8 +1005,6 @@ static void cloth_collision_solve_extra(Object *ob, ClothModifierData *clmd, Lis // cloth_record_result(clmd, &result, clmd->sim_parms->stepsPerFrame); /* note: positions are advanced only once in the main solver step! */ - - BPH_mass_spring_apply_result(id); } } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs