Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_surface.c
| Show First 20 Lines • Show All 148 Lines • ▼ Show 20 Lines | if (mesh_verts_num != surmd->verts_num || surmd->x == NULL || surmd->v == NULL || | ||||
| init = 1; | init = 1; | ||||
| } | } | ||||
| /* convert to global coordinates and calculate velocity */ | /* convert to global coordinates and calculate velocity */ | ||||
| MVert *verts = BKE_mesh_verts_for_write(surmd->mesh); | MVert *verts = BKE_mesh_verts_for_write(surmd->mesh); | ||||
| for (i = 0, x = surmd->x, v = surmd->v; i < mesh_verts_num; i++, x++, v++) { | for (i = 0, x = surmd->x, v = surmd->v; i < mesh_verts_num; i++, x++, v++) { | ||||
| float *vec = verts[i].co; | float *vec = verts[i].co; | ||||
| mul_m4_v3(ctx->object->obmat, vec); | mul_m4_v3(ctx->object->object_to_world, vec); | ||||
| if (init) { | if (init) { | ||||
| v->co[0] = v->co[1] = v->co[2] = 0.0f; | v->co[0] = v->co[1] = v->co[2] = 0.0f; | ||||
| } | } | ||||
| else { | else { | ||||
| sub_v3_v3v3(v->co, vec, x->co); | sub_v3_v3v3(v->co, vec, x->co); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines | |||||