Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_convert.c
| Show First 20 Lines • Show All 1,773 Lines • ▼ Show 20 Lines | if ((t->scene->toolsettings->automerge) && ((t->flag & T_EDIT) && t->obedit_type == OB_MESH)) { | ||||
| FOREACH_TRANS_DATA_CONTAINER (t, tc) { | FOREACH_TRANS_DATA_CONTAINER (t, tc) { | ||||
| BMEditMesh *em = BKE_editmesh_from_object(tc->obedit); | BMEditMesh *em = BKE_editmesh_from_object(tc->obedit); | ||||
| BMesh *bm = em->bm; | BMesh *bm = em->bm; | ||||
| char hflag; | char hflag; | ||||
| bool has_face_sel = (bm->totfacesel != 0); | bool has_face_sel = (bm->totfacesel != 0); | ||||
| if (tc->mirror.axis_flag) { | if (tc->mirror.axis_flag) { | ||||
| TransData *td; | TransDataMirror *tdm; | ||||
| int i; | int i; | ||||
| /* Rather then adjusting the selection (which the user would notice) | /* Rather then adjusting the selection (which the user would notice) | ||||
| * tag all mirrored verts, then auto-merge those. */ | * tag all mirrored verts, then auto-merge those. */ | ||||
| BM_mesh_elem_hflag_disable_all(bm, BM_VERT, BM_ELEM_TAG, false); | BM_mesh_elem_hflag_disable_all(bm, BM_VERT, BM_ELEM_TAG, false); | ||||
| for (i = 0, td = tc->data; i < tc->data_len; i++, td++) { | for (i = tc->mirror.data_len, tdm = tc->mirror.data; i--; tdm++) { | ||||
| if (td->extra) { | BM_elem_flag_enable((BMVert *)tdm->extra, BM_ELEM_TAG); | ||||
| BM_elem_flag_enable((BMVert *)td->extra, BM_ELEM_TAG); | |||||
| } | |||||
| } | } | ||||
| hflag = BM_ELEM_SELECT | BM_ELEM_TAG; | hflag = BM_ELEM_SELECT | BM_ELEM_TAG; | ||||
| } | } | ||||
| else { | else { | ||||
| hflag = BM_ELEM_SELECT; | hflag = BM_ELEM_SELECT; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | if (t->flag & T_EDIT) { | ||||
| if (canceled == 0) { | if (canceled == 0) { | ||||
| /* we need to delete the temporary faces before automerging */ | /* we need to delete the temporary faces before automerging */ | ||||
| if (t->mode == TFM_EDGE_SLIDE) { | if (t->mode == TFM_EDGE_SLIDE) { | ||||
| /* handle multires re-projection, done | /* handle multires re-projection, done | ||||
| * on transform completion since it's | * on transform completion since it's | ||||
| * really slow -joeedh */ | * really slow -joeedh */ | ||||
| projectEdgeSlideData(t, true); | projectEdgeSlideData(t, true); | ||||
| FOREACH_TRANS_DATA_CONTAINER (t, tc) { | |||||
| EdgeSlideData *sld = tc->custom.mode.data; | |||||
| if (sld == NULL) { | |||||
| continue; | |||||
| } | |||||
| /* Free temporary faces to avoid auto-merging and deleting | |||||
| * during cleanup - psy-fi. */ | |||||
| freeEdgeSlideTempFaces(sld); | |||||
| } | |||||
| } | } | ||||
| else if (t->mode == TFM_VERT_SLIDE) { | else if (t->mode == TFM_VERT_SLIDE) { | ||||
| /* as above */ | /* as above */ | ||||
| projectVertSlideData(t, true); | projectVertSlideData(t, true); | ||||
| FOREACH_TRANS_DATA_CONTAINER (t, tc) { | |||||
| VertSlideData *sld = tc->custom.mode.data; | |||||
| freeVertSlideTempFaces(sld); | |||||
| } | |||||
| } | } | ||||
| if (t->obedit_type == OB_MESH) { | if (t->obedit_type == OB_MESH) { | ||||
| special_aftertrans_update__mesh(C, t); | special_aftertrans_update__mesh(C, t); | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| if (t->mode == TFM_EDGE_SLIDE) { | if (t->mode == TFM_EDGE_SLIDE) { | ||||
| ▲ Show 20 Lines • Show All 871 Lines • Show Last 20 Lines | |||||