paint: flip uv unwrap coords

This commit is contained in:
luboslenco
2026-05-15 10:10:39 +02:00
parent ee4ae4a3e6
commit 77f5243645
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -655,8 +655,8 @@ void proc_uv_unwrap(raw_mesh_t *mesh) {
v = 0.0f;
if (v > 1.0f)
v = 1.0f;
ta_out[i * 2] = (int16_t)(u * 32767.0f);
ta_out[i * 2 + 1] = (int16_t)((1.0f - v) * 32767.0f);
ta_out[i * 2] = (int16_t)((1.0f - u) * 32767.0f);
ta_out[i * 2 + 1] = (int16_t)(v * 32767.0f);
ia_out[i] = i;
}
+2
View File
@@ -111,6 +111,7 @@ void plugin_uv_unwrap_button() {
free(mesh->inda);
util_mesh_merge(NULL);
util_uv_uvmap_cached = false;
}
void plugin_uv_unwrap_per_object_button(mesh_object_t *mo) {
@@ -142,6 +143,7 @@ void plugin_uv_unwrap_per_object_button(mesh_object_t *mo) {
md->vertex_arrays->buffer[2]->values = mesh->texa;
md->index_array = mesh->inda;
mesh_data_build(md);
util_uv_uvmap_cached = false;
}
#endif