diff options
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_unwrap_ops.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_unwrap_ops.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 92efaf79de7..de1c88fe896 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -1388,7 +1388,7 @@ static void uv_map_transform_center(const Scene *scene, } case V3D_AROUND_CURSOR: /* cursor center */ { - invert_m4_m4(ob->imat, ob->obmat); + invert_m4_m4(ob->imat, ob->object_to_world); mul_v3_m4v3(r_center, ob->imat, scene->cursor.location); break; } @@ -1439,7 +1439,7 @@ static void uv_map_rotation_matrix_ex(float result[4][4], zero_v3(viewmatrix[3]); /* get rotation of the current object matrix */ - copy_m4_m4(rotobj, ob->obmat); + copy_m4_m4(rotobj, ob->object_to_world); zero_v3(rotobj[3]); /* but shifting */ @@ -1948,7 +1948,7 @@ static int unwrap_exec(bContext *C, wmOperator *op) continue; } - mat4_to_size(obsize, obedit->obmat); + mat4_to_size(obsize, obedit->object_to_world); if (!(fabsf(obsize[0] - obsize[1]) < 1e-4f && fabsf(obsize[1] - obsize[2]) < 1e-4f)) { if ((reported_errors & UNWRAP_ERROR_NONUNIFORM) == 0) { BKE_report(op->reports, @@ -1958,7 +1958,7 @@ static int unwrap_exec(bContext *C, wmOperator *op) reported_errors |= UNWRAP_ERROR_NONUNIFORM; } } - else if (is_negative_m4(obedit->obmat)) { + else if (is_negative_m4(obedit->object_to_world)) { if ((reported_errors & UNWRAP_ERROR_NEGATIVE) == 0) { BKE_report( op->reports, @@ -2538,7 +2538,7 @@ static int uv_from_view_exec(bContext *C, wmOperator *op) float objects_pos_avg[4] = {0}; for (uint ob_index = 0; ob_index < objects_len; ob_index++) { - add_v4_v4(objects_pos_avg, objects[ob_index]->obmat[3]); + add_v4_v4(objects_pos_avg, objects[ob_index]->object_to_world[3]); } mul_v4_fl(objects_pos_avg, 1.0f / objects_len); @@ -2576,7 +2576,7 @@ static int uv_from_view_exec(bContext *C, wmOperator *op) const bool camera_bounds = RNA_boolean_get(op->ptr, "camera_bounds"); struct ProjCameraInfo *uci = BLI_uvproject_camera_info( v3d->camera, - obedit->obmat, + obedit->object_to_world, camera_bounds ? (scene->r.xsch * scene->r.xasp) : 1.0f, camera_bounds ? (scene->r.ysch * scene->r.yasp) : 1.0f); @@ -2597,7 +2597,7 @@ static int uv_from_view_exec(bContext *C, wmOperator *op) } } else { - copy_m4_m4(rotmat, obedit->obmat); + copy_m4_m4(rotmat, obedit->object_to_world); BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) { if (!BM_elem_flag_test(efa, BM_ELEM_SELECT)) { |