Fix: uninitialized UVs when painting in sculpt mode

Because of a mistake in commit 6c774feba2 the uv vbo was not
initialized in the pbvh.
This commit is contained in:
Martijn Versteegh 2023-01-12 11:37:41 +01:00
parent c5f9bf95cd
commit 16fc928068
1 changed files with 10 additions and 0 deletions

View File

@ -721,6 +721,16 @@ struct PBVHBatches {
});
}
break;
case CD_PROP_FLOAT2: {
float2 *mloopuv = static_cast<float2 *>(
CustomData_get_layer_named(args->ldata, CD_PROP_FLOAT2, vbo.name.c_str()));
foreach_faces([&](int /*buffer_i*/, int tri_i, int /*vertex_i*/, const MLoopTri *tri) {
*static_cast<float2 *>(GPU_vertbuf_raw_step(&access)) = mloopuv[tri->tri[tri_i]];
});
break;
}
}
}