forked from blender/blender
main sync #3
@ -49,9 +49,9 @@ void uv_parametrizer_face_add(ParamHandle *handle,
|
|||||||
void uv_parametrizer_edge_set_seam(ParamHandle *handle, ParamKey *vkeys);
|
void uv_parametrizer_edge_set_seam(ParamHandle *handle, ParamKey *vkeys);
|
||||||
|
|
||||||
void uv_parametrizer_construct_end(ParamHandle *handle,
|
void uv_parametrizer_construct_end(ParamHandle *handle,
|
||||||
bool fill,
|
bool fill_holes,
|
||||||
bool topology_from_uvs,
|
bool topology_from_uvs,
|
||||||
int *count_fail);
|
int *r_count_failed = nullptr);
|
||||||
void uv_parametrizer_delete(ParamHandle *handle);
|
void uv_parametrizer_delete(ParamHandle *handle);
|
||||||
|
|
||||||
/** \} */
|
/** \} */
|
||||||
|
@ -3957,49 +3957,48 @@ void uv_parametrizer_edge_set_seam(ParamHandle *phandle, ParamKey *vkeys)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void uv_parametrizer_construct_end(ParamHandle *phandle,
|
void uv_parametrizer_construct_end(ParamHandle *phandle,
|
||||||
bool fill,
|
bool fill_holes,
|
||||||
bool topology_from_uvs,
|
bool topology_from_uvs,
|
||||||
int *count_fail)
|
int *r_count_failed)
|
||||||
{
|
{
|
||||||
PChart *chart = phandle->construction_chart;
|
|
||||||
int i, j;
|
int i, j;
|
||||||
PEdge *outer;
|
|
||||||
|
|
||||||
param_assert(phandle->state == PHANDLE_STATE_ALLOCATED);
|
param_assert(phandle->state == PHANDLE_STATE_ALLOCATED);
|
||||||
|
|
||||||
phandle->ncharts = p_connect_pairs(phandle, topology_from_uvs);
|
phandle->ncharts = p_connect_pairs(phandle, topology_from_uvs);
|
||||||
phandle->charts = p_split_charts(phandle, chart, phandle->ncharts);
|
phandle->charts = p_split_charts(phandle, phandle->construction_chart, phandle->ncharts);
|
||||||
|
|
||||||
MEM_freeN(phandle->construction_chart);
|
MEM_freeN(phandle->construction_chart);
|
||||||
phandle->construction_chart = nullptr;
|
phandle->construction_chart = nullptr;
|
||||||
|
|
||||||
phash_delete(phandle->hash_verts);
|
phash_delete(phandle->hash_verts);
|
||||||
|
phandle->hash_verts = nullptr;
|
||||||
phash_delete(phandle->hash_edges);
|
phash_delete(phandle->hash_edges);
|
||||||
|
phandle->hash_edges = nullptr;
|
||||||
phash_delete(phandle->hash_faces);
|
phash_delete(phandle->hash_faces);
|
||||||
phandle->hash_verts = phandle->hash_edges = phandle->hash_faces = nullptr;
|
phandle->hash_faces = nullptr;
|
||||||
|
|
||||||
for (i = j = 0; i < phandle->ncharts; i++) {
|
for (i = j = 0; i < phandle->ncharts; i++) {
|
||||||
PVert *v;
|
PChart *chart = phandle->charts[i];
|
||||||
chart = phandle->charts[i];
|
|
||||||
|
|
||||||
|
PEdge *outer;
|
||||||
p_chart_boundaries(chart, &outer);
|
p_chart_boundaries(chart, &outer);
|
||||||
|
|
||||||
if (!topology_from_uvs && chart->nboundaries == 0) {
|
if (!topology_from_uvs && chart->nboundaries == 0) {
|
||||||
MEM_freeN(chart);
|
MEM_freeN(chart);
|
||||||
if (count_fail != nullptr) {
|
if (r_count_failed) {
|
||||||
*count_fail += 1;
|
*r_count_failed += 1;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
phandle->charts[j] = chart;
|
phandle->charts[j++] = chart;
|
||||||
j++;
|
|
||||||
|
|
||||||
if (fill && (chart->nboundaries > 1)) {
|
if (fill_holes && chart->nboundaries > 1) {
|
||||||
p_chart_fill_boundaries(phandle, chart, outer);
|
p_chart_fill_boundaries(phandle, chart, outer);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (v = chart->verts; v; v = v->nextlink) {
|
for (PVert *v = chart->verts; v; v = v->nextlink) {
|
||||||
p_vert_load_pin_select_uvs(phandle, v);
|
p_vert_load_pin_select_uvs(phandle, v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user