Page MenuHome

Fix T72119: UV/Image Editor theme's face colors
ClosedPublic

Authored by Eitan (EitanSomething) on Fri, Jan 3, 5:33 PM.

Details

Summary

The in int flag; in gpu_shader_2D_edituvs_faces_vert.glsl don't have the values FACE_UV_ACTIVE and FACE_UV_SELECT.

This patch indicates where it could be added.

But this logic is also seen in mesh_render_data_face_flag so we need to evaluate if there is something being duplicated.

Ref T72119

Diff Detail

Repository
rB Blender

Event Timeline

Germano Cavalcante (mano-wii) retitled this revision from Fix-T72119: UV/Image Editor alpha in theme to Fix T72119: UV/Image Editor theme's face colors.Fri, Jan 3, 6:07 PM
Germano Cavalcante (mano-wii) edited the summary of this revision. (Show Details)
Jeroen Bakker (jbakker) requested changes to this revision.Mon, Jan 6, 11:02 AM

Just a minor code style.

source/blender/draw/intern/draw_cache_extract_mesh.c
2484

we use efa for edit faces

This revision now requires changes to proceed.Mon, Jan 6, 11:02 AM
Eitan (EitanSomething) marked an inline comment as done.
  • Rename variables
Germano Cavalcante (mano-wii) requested changes to this revision.Tue, Jan 7, 4:51 PM

After analyzing the code better, it seems that mesh_render_data_loop_flag is a generic function and must be followed by one of the: mesh_render_data_loop_edge_flag or mesh_render_data_face_flag to configure as requested.
I will analyze more to make sure...

This revision now requires changes to proceed.Tue, Jan 7, 4:51 PM
Germano Cavalcante (mano-wii) accepted this revision.EditedTue, Jan 7, 5:21 PM

After analyzing the code better, it seems that mesh_render_data_loop_flag is a generic function and must be followed by one of the: mesh_render_data_loop_edge_flag or mesh_render_data_face_flag to configure as requested.

Well it seems that is not the case.

But to deduplicate the code we could set all flags on the face (even those not needed):

diff --git a/source/blender/draw/intern/draw_cache_extract_mesh.c b/source/blender/draw/intern/draw_cache_extract_mesh.c
index cce1710423b..43eb6f17da0 100644
--- a/source/blender/draw/intern/draw_cache_extract_mesh.c
+++ b/source/blender/draw/intern/draw_cache_extract_mesh.c
@@ -2670,6 +2670,7 @@ static void extract_edituv_data_loop_bmesh(const MeshRenderData *mr,
   EditLoopData *eldata = data->vbo_data + l;
   memset(eldata, 0x0, sizeof(*eldata));
   mesh_render_data_loop_flag(mr, loop, data->cd_ofs, eldata);
+  mesh_render_data_face_flag(mr, loop->f, data->cd_ofs, eldata);
   mesh_render_data_loop_edge_flag(mr, loop, data->cd_ofs, eldata);
 }

I think it would be better this way. But I don't have a strong opinion.

diff edited:

  • faceuv flags are only needed for editmesh
This revision now requires review to proceed.Tue, Jan 7, 5:21 PM
This revision was not accepted when it landed; it landed in state Needs Review.Wed, Jan 8, 1:22 PM
This revision was automatically updated to reflect the committed changes.