Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_uvwarp.c
| Show First 20 Lines • Show All 155 Lines • ▼ Show 20 Lines | if (!CustomData_has_layer(&mesh->ldata, CD_MLOOPUV)) { | ||||
| return mesh; | return mesh; | ||||
| } | } | ||||
| else if (ELEM(NULL, umd->object_src, umd->object_dst)) { | else if (ELEM(NULL, umd->object_src, umd->object_dst)) { | ||||
| modifier_setError(md, "From/To objects must be set"); | modifier_setError(md, "From/To objects must be set"); | ||||
| return mesh; | return mesh; | ||||
| } | } | ||||
| /* make sure anything moving UVs is available */ | /* make sure anything moving UVs is available */ | ||||
| matrix_from_obj_pchan(mat_src, DEG_get_evaluated_object(ctx->depsgraph, umd->object_src), umd->bone_src); | matrix_from_obj_pchan(mat_src, umd->object_src, umd->bone_src); | ||||
| matrix_from_obj_pchan(mat_dst, DEG_get_evaluated_object(ctx->depsgraph, umd->object_dst), umd->bone_dst); | matrix_from_obj_pchan(mat_dst, umd->object_dst, umd->bone_dst); | ||||
| invert_m4_m4(imat_dst, mat_dst); | invert_m4_m4(imat_dst, mat_dst); | ||||
| mul_m4_m4m4(warp_mat, imat_dst, mat_src); | mul_m4_m4m4(warp_mat, imat_dst, mat_src); | ||||
| /* apply warp */ | /* apply warp */ | ||||
| if (!is_zero_v2(umd->center)) { | if (!is_zero_v2(umd->center)) { | ||||
| float mat_cent[4][4]; | float mat_cent[4][4]; | ||||
| float imat_cent[4][4]; | float imat_cent[4][4]; | ||||
| ▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines | |||||