Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2019-09-27 17:40:18 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-09-27 18:19:00 +0300
commit7bbdc6996a71612b719053e62a9f753a3852e215 (patch)
tree2780d62dc48b69c122217d2c63ac0719f38b1af8 /source/blender/draw/intern/draw_cache_impl_mesh.c
parentb22afef72c5cab001b7458defc3d042742803b9d (diff)
Fix T69941 Assert selecting UVs
Was caused by DRW_mesh_batch_cache_get_edituv_faces_stretch_area called after DRW_mesh_batch_cache_create_requested. So it was created on the wrong object/mesh.
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl_mesh.c')
-rw-r--r--source/blender/draw/intern/draw_cache_impl_mesh.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c
index e399b784145..77b9daa959d 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -882,18 +882,18 @@ GPUBatch *DRW_mesh_batch_cache_get_verts_with_select_id(Mesh *me)
* The `cache->tot_area` and cache->tot_uv_area` update are calculation are
* only valid after calling `DRW_mesh_batch_cache_create_requested`. */
GPUBatch *DRW_mesh_batch_cache_get_edituv_faces_stretch_area(Mesh *me,
- float *tot_area,
- float *tot_uv_area)
+ float **tot_area,
+ float **tot_uv_area)
{
MeshBatchCache *cache = mesh_batch_cache_get(me);
texpaint_request_active_uv(cache, me);
mesh_batch_cache_add_request(cache, MBC_EDITUV_FACES_STRETCH_AREA);
if (tot_area != NULL) {
- *tot_area = cache->tot_area;
+ *tot_area = &cache->tot_area;
}
if (tot_uv_area != NULL) {
- *tot_uv_area = cache->tot_uv_area;
+ *tot_uv_area = &cache->tot_uv_area;
}
return DRW_batch_request(&cache->batch.edituv_faces_stretch_area);
}