Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_convert_mesh_uv.c
| Show First 20 Lines • Show All 316 Lines • ▼ Show 20 Lines | BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) { | ||||
| } | } | ||||
| if (is_prop_edit) { | if (is_prop_edit) { | ||||
| count++; | count++; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| float *prop_dists = NULL; | |||||
| /* Support other objects using PET to adjust these, unless connected is enabled. */ | /* Support other objects using PET to adjust these, unless connected is enabled. */ | ||||
| if (((is_prop_edit && !is_prop_connected) ? count : countsel) == 0) { | if (((is_prop_edit && !is_prop_connected) ? count : countsel) == 0) { | ||||
| goto finally; | goto finally; | ||||
| } | } | ||||
| if (is_island_center) { | if (is_island_center) { | ||||
| int i; | int i; | ||||
| Show All 11 Lines | FOREACH_TRANS_DATA_CONTAINER (t, tc) { | ||||
| if (sima->flag & SI_CLIP_UV) { | if (sima->flag & SI_CLIP_UV) { | ||||
| t->flag |= T_CLIP_UV; | t->flag |= T_CLIP_UV; | ||||
| } | } | ||||
| td = tc->data; | td = tc->data; | ||||
| td2d = tc->data_2d; | td2d = tc->data_2d; | ||||
| float *prop_dists = NULL; | |||||
| if (is_prop_connected) { | if (is_prop_connected) { | ||||
| prop_dists = MEM_callocN(em->bm->totloop * sizeof(float), "TransObPropDists(UV Editing)"); | prop_dists = MEM_callocN(em->bm->totloop * sizeof(float), "TransObPropDists(UV Editing)"); | ||||
| uv_set_connectivity_distance(em->bm, prop_dists, t->aspect); | uv_set_connectivity_distance(em->bm, prop_dists, t->aspect); | ||||
| } | } | ||||
| BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) { | BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) { | ||||
| BMLoop *l; | BMLoop *l; | ||||
| Show All 30 Lines | FOREACH_TRANS_DATA_CONTAINER (t, tc) { | ||||
| } | } | ||||
| if (sima->flag & SI_LIVE_UNWRAP) { | if (sima->flag & SI_LIVE_UNWRAP) { | ||||
| ED_uvedit_live_unwrap_begin(t->scene, tc->obedit); | ED_uvedit_live_unwrap_begin(t->scene, tc->obedit); | ||||
| } | } | ||||
| finally: | finally: | ||||
| if (is_prop_connected) { | if (is_prop_connected) { | ||||
| MEM_freeN(prop_dists); | MEM_SAFE_FREE(prop_dists); | ||||
| } | } | ||||
| if (is_island_center) { | if (is_island_center) { | ||||
| BM_uv_element_map_free(elementmap); | BM_uv_element_map_free(elementmap); | ||||
| MEM_freeN(island_center); | MEM_freeN(island_center); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines | |||||