Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_image_proj.c
| Show First 20 Lines • Show All 5,918 Lines • ▼ Show 20 Lines | BM_mesh_bm_from_me( | ||||
| bm, me, (&(struct BMeshFromMeshParams){ | bm, me, (&(struct BMeshFromMeshParams){ | ||||
| .calc_face_normal = true, | .calc_face_normal = true, | ||||
| })); | })); | ||||
| /* select all uv loops first - pack parameters needs this to make sure charts are registered */ | /* select all uv loops first - pack parameters needs this to make sure charts are registered */ | ||||
| ED_uvedit_select_all(bm); | ED_uvedit_select_all(bm); | ||||
| ED_uvedit_unwrap_cube_project(bm, 1.0, false, NULL); | ED_uvedit_unwrap_cube_project(bm, 1.0, false, NULL); | ||||
| /* set the margin really quickly before the packing operation*/ | /* set the margin really quickly before the packing operation*/ | ||||
| scene->toolsettings->uvcalc_margin = 0.001f; | scene->toolsettings->uvcalc_margin = 0.001f; | ||||
| ED_uvedit_pack_islands(scene, ob, bm, false, false, true); | ED_uvedit_pack_islands_single(scene, ob, bm, false, false, true); | ||||
| BM_mesh_bm_to_me(bm, me, (&(struct BMeshToMeshParams){0})); | BM_mesh_bm_to_me(bm, me, (&(struct BMeshToMeshParams){0})); | ||||
| BM_mesh_free(bm); | BM_mesh_free(bm); | ||||
| if (synch_selection) | if (synch_selection) | ||||
| scene->toolsettings->uv_flag |= UV_SYNC_SELECTION; | scene->toolsettings->uv_flag |= UV_SYNC_SELECTION; | ||||
| BKE_paint_proj_mesh_data_check(scene, ob, NULL, NULL, NULL, NULL); | BKE_paint_proj_mesh_data_check(scene, ob, NULL, NULL, NULL, NULL); | ||||
| Show All 31 Lines | |||||