Fix: Debug assert extracting multiple UV maps in edit mode

This commit is contained in:
Hans Goudey 2023-03-30 08:24:22 -04:00
parent 7eda8e5367
commit 80319035e6

@ -91,7 +91,8 @@ static void extract_uv_init(const MeshRenderData *mr,
GPU_vertbuf_init_with_format(vbo, &format);
GPU_vertbuf_data_alloc(vbo, v_len);
MutableSpan<float2> uv_data(static_cast<float2 *>(GPU_vertbuf_get_data(vbo)), v_len);
MutableSpan<float2> uv_data(static_cast<float2 *>(GPU_vertbuf_get_data(vbo)),
v_len * format.attr_len);
int vbo_index = 0;
for (const int i : IndexRange(MAX_MTFACE)) {
if (uv_layers & (1 << i)) {