Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/cloth.c
| Show First 20 Lines • Show All 277 Lines • ▼ Show 20 Lines | static int do_step_cloth( | ||||
| for (i = 0; i < clmd->clothObject->mvert_num; i++, verts++) { | for (i = 0; i < clmd->clothObject->mvert_num; i++, verts++) { | ||||
| /* save the previous position. */ | /* save the previous position. */ | ||||
| copy_v3_v3(verts->xold, verts->xconst); | copy_v3_v3(verts->xold, verts->xconst); | ||||
| copy_v3_v3(verts->txold, verts->x); | copy_v3_v3(verts->txold, verts->x); | ||||
| /* Get the current position. */ | /* Get the current position. */ | ||||
| copy_v3_v3(verts->xconst, mvert[i].co); | copy_v3_v3(verts->xconst, mvert[i].co); | ||||
| mul_m4_v3(ob->obmat, verts->xconst); | mul_m4_v3(ob->obmat, verts->xconst); | ||||
| /* T88188 (this seems to somewhat work, but unsure about consequences) */ | |||||
| /* verts->mass = clmd->sim_parms->mass; */ | |||||
| /* also SIM_mass_spring_set_vertex_mass() would need to be called. */ | |||||
| } | } | ||||
| effectors = BKE_effectors_create(depsgraph, ob, NULL, clmd->sim_parms->effector_weights, false); | effectors = BKE_effectors_create(depsgraph, ob, NULL, clmd->sim_parms->effector_weights, false); | ||||
| if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_DYNAMIC_BASEMESH) { | if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_DYNAMIC_BASEMESH) { | ||||
| cloth_update_verts(ob, clmd, result); | cloth_update_verts(ob, clmd, result); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,622 Lines • Show Last 20 Lines | |||||