[Bf-blender-cvs] [0a546beb1f3] blender-v2.92-release: Fix T85396: Display Texture Paint UV only working in editmode
Philipp Oeser
noreply at git.blender.org
Fri Feb 5 12:45:59 CET 2021
Commit: 0a546beb1f3a6b53fdd57da892ccdf893c269010
Author: Philipp Oeser
Date: Fri Feb 5 10:49:39 2021 +0100
Branches: blender-v2.92-release
https://developer.blender.org/rB0a546beb1f3a6b53fdd57da892ccdf893c269010
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
===================================================================
M source/blender/draw/engines/overlay/overlay_edit_uv.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list