Changeset View
Changeset View
Standalone View
Standalone View
source/blender/bmesh/tools/bmesh_decimate_dissolve.c
| Show First 20 Lines • Show All 283 Lines • ▼ Show 20 Lines | void BM_mesh_decimate_dissolve_ex(BMesh *bm, | ||||
| const float angle_limit_cos_neg = -cosf(angle_limit); | const float angle_limit_cos_neg = -cosf(angle_limit); | ||||
| struct DelimitData delimit_data = {0}; | struct DelimitData delimit_data = {0}; | ||||
| const int eheap_table_len = do_dissolve_boundaries ? einput_len : max_ii(einput_len, vinput_len); | const int eheap_table_len = do_dissolve_boundaries ? einput_len : max_ii(einput_len, vinput_len); | ||||
| void *_heap_table = MEM_mallocN(sizeof(HeapNode *) * eheap_table_len, __func__); | void *_heap_table = MEM_mallocN(sizeof(HeapNode *) * eheap_table_len, __func__); | ||||
| int i; | int i; | ||||
| if (delimit & BMO_DELIM_UV) { | if (delimit & BMO_DELIM_UV) { | ||||
| const int layer_len = CustomData_number_of_layers(&bm->ldata, CD_MLOOPUV); | const int layer_len = CustomData_number_of_layers(&bm->ldata, CD_PROP_FLOAT2); | ||||
| if (layer_len == 0) { | if (layer_len == 0) { | ||||
| delimit &= ~BMO_DELIM_UV; | delimit &= ~BMO_DELIM_UV; | ||||
| } | } | ||||
| else { | else { | ||||
| delimit_data.cd_loop_type = CD_MLOOPUV; | delimit_data.cd_loop_type = CD_PROP_FLOAT2; | ||||
| delimit_data.cd_loop_size = CustomData_sizeof(delimit_data.cd_loop_type); | delimit_data.cd_loop_size = CustomData_sizeof(delimit_data.cd_loop_type); | ||||
| delimit_data.cd_loop_offset = CustomData_get_n_offset(&bm->ldata, CD_MLOOPUV, 0); | delimit_data.cd_loop_offset = CustomData_get_n_offset(&bm->ldata, CD_PROP_FLOAT2, 0); | ||||
| delimit_data.cd_loop_offset_end = delimit_data.cd_loop_size * layer_len; | delimit_data.cd_loop_offset_end = delimit_data.cd_loop_size * layer_len; | ||||
| } | } | ||||
| } | } | ||||
| /* --- first edges --- */ | /* --- first edges --- */ | ||||
| if (1) { | if (1) { | ||||
| BMEdge **earray; | BMEdge **earray; | ||||
| Heap *eheap; | Heap *eheap; | ||||
| ▲ Show 20 Lines • Show All 247 Lines • Show Last 20 Lines | |||||