Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/uvedit/uvedit_smart_stitch.c
| Show First 20 Lines • Show All 1,929 Lines • ▼ Show 20 Lines | static StitchState *stitch_init(bContext *C, | ||||
| state = MEM_callocN(sizeof(StitchState), "stitch state obj"); | state = MEM_callocN(sizeof(StitchState), "stitch state obj"); | ||||
| /* initialize state */ | /* initialize state */ | ||||
| state->obedit = obedit; | state->obedit = obedit; | ||||
| state->em = em; | state->em = em; | ||||
| /* in uv synch selection, all uv's are visible */ | /* in uv synch selection, all uv's are visible */ | ||||
| if (ts->uv_flag & UV_SYNC_SELECTION) { | if (ts->uv_flag & UV_SYNC_SELECTION) { | ||||
| state->element_map = BM_uv_element_map_create(state->em->bm, false, true, true); | state->element_map = BM_uv_element_map_create(state->em->bm, scene, false, false, true, true); | ||||
| } | } | ||||
| else { | else { | ||||
| state->element_map = BM_uv_element_map_create(state->em->bm, true, true, true); | state->element_map = BM_uv_element_map_create(state->em->bm, scene, true, false, true, true); | ||||
| } | } | ||||
| if (!state->element_map) { | if (!state->element_map) { | ||||
| state_delete(state); | state_delete(state); | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| ED_uvedit_get_aspect(scene, obedit, em->bm, &aspx, &aspy); | ED_uvedit_get_aspect(scene, obedit, em->bm, &aspx, &aspy); | ||||
| state->aspect = aspx / aspy; | state->aspect = aspx / aspy; | ||||
| ▲ Show 20 Lines • Show All 907 Lines • Show Last 20 Lines | |||||