Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_meshdeform.c
| Show First 20 Lines • Show All 352 Lines • ▼ Show 20 Lines | static void meshdeformModifier_do(ModifierData *md, | ||||
| Object *ob_target = mmd->object; | Object *ob_target = mmd->object; | ||||
| cagemesh = BKE_modifier_get_evaluated_mesh_from_evaluated_object(ob_target); | cagemesh = BKE_modifier_get_evaluated_mesh_from_evaluated_object(ob_target); | ||||
| if (cagemesh == NULL) { | if (cagemesh == NULL) { | ||||
| BKE_modifier_set_error(ctx->object, md, "Cannot get mesh from cage object"); | BKE_modifier_set_error(ctx->object, md, "Cannot get mesh from cage object"); | ||||
| return; | return; | ||||
| } | } | ||||
| /* compute matrices to go in and out of cage object space */ | /* compute matrices to go in and out of cage object space */ | ||||
| invert_m4_m4(imat, ob_target->obmat); | invert_m4_m4(imat, ob_target->object_to_world); | ||||
| mul_m4_m4m4(cagemat, imat, ob->obmat); | mul_m4_m4m4(cagemat, imat, ob->object_to_world); | ||||
| mul_m4_m4m4(cmat, mmd->bindmat, cagemat); | mul_m4_m4m4(cmat, mmd->bindmat, cagemat); | ||||
| invert_m4_m4(iobmat, cmat); | invert_m4_m4(iobmat, cmat); | ||||
| copy_m3_m4(icagemat, iobmat); | copy_m3_m4(icagemat, iobmat); | ||||
| /* bind weights if needed */ | /* bind weights if needed */ | ||||
| if (!mmd->bindcagecos) { | if (!mmd->bindcagecos) { | ||||
| /* progress bar redraw can make this recursive. */ | /* progress bar redraw can make this recursive. */ | ||||
| if (!DEG_is_active(ctx->depsgraph)) { | if (!DEG_is_active(ctx->depsgraph)) { | ||||
| ▲ Show 20 Lines • Show All 310 Lines • Show Last 20 Lines | |||||