diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2021-02-05 12:49:39 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2021-02-05 14:43:00 +0300 |
commit | 0a546beb1f3a6b53fdd57da892ccdf893c269010 (patch) | |
tree | 605cf585c95a3a35a3a35c03415c202c35ab2fdd /source/blender/draw/engines/overlay | |
parent | 7fb540b4cf172501db910bce3d96f14ac012706f (diff) |
Fix T85396: Display Texture Paint UV only working in editmode
Caused by rBf83aa830cd00.
Since above commit, only meshes in editmode were considered for drawing
(because
BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs was
used), but the option needs to work for texture paint mode as well, so
use BKE_view_layer_array_from_objects_in_mode_unique_data instead on
pass the draw_ctx->object_mode.
note: there is no good filter_fn to check if we have UVs if mesh is not
in editmode, this shouldnt cause much of a performance hit though.
Maniphest Tasks: T85396
Differential Revision: https://developer.blender.org/D10319
Diffstat (limited to 'source/blender/draw/engines/overlay')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_edit_uv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_edit_uv.c b/source/blender/draw/engines/overlay/overlay_edit_uv.c index 06ef56a212b..22433905b75 100644 --- a/source/blender/draw/engines/overlay/overlay_edit_uv.c +++ b/source/blender/draw/engines/overlay/overlay_edit_uv.c @@ -403,8 +403,8 @@ void OVERLAY_edit_uv_cache_init(OVERLAY_Data *vedata) * has the correct batches with the correct selection state. See T83187. */ if (pd->edit_uv.do_uv_overlay || pd->edit_uv.do_uv_shadow_overlay) { uint objects_len = 0; - Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs( - draw_ctx->view_layer, NULL, &objects_len); + Object **objects = BKE_view_layer_array_from_objects_in_mode_unique_data( + draw_ctx->view_layer, NULL, &objects_len, draw_ctx->object_mode); for (uint ob_index = 0; ob_index < objects_len; ob_index++) { Object *object_eval = DEG_get_evaluated_object(draw_ctx->depsgraph, objects[ob_index]); DRW_mesh_batch_cache_validate((Mesh *)object_eval->data); |