Page MenuHome

UV Editor: Area Stretching Overlay
ClosedPublic

Authored by Jeroen Bakker (jbakker) on Sep 3 2019, 3:08 PM.

Details

Summary

Support for UV Stretching overlay during multi object editing. In the
VBO the ratios per fase are stored and in the shader these ratios will
be compared with the global ratios.

Due to previous implementation the ratios per mesh are calculated by the draw manager. Just before drawing the ratios of all selected objects are sum'd and send to the shader. Inside the shader the actual ratio comparison and coloring takes place.

The current implementation does not fit well with the draw module. The
plan is to move the drawing of other spaces to the draw manager what
might lead to better fit. Currently the solution is unclear and this
requirement will become an attentionpoint for the future design.

Diff Detail

Repository
rB Blender

Event Timeline

Jeroen Bakker (jbakker) retitled this revision from UV Editor: Area Stretching Overlay to [WIP] UV Editor: Area Stretching Overlay.Sep 3 2019, 3:36 PM
Jeroen Bakker (jbakker) planned changes to this revision.Sep 3 2019, 3:38 PM
  • refactor by getting all batches in the first loop + tot per mesh. The second loop will do the call commands based on the batches

Refactored the drawing so it calls the DRW api in a nicer fasion.

Added clarifications

Jeroen Bakker (jbakker) retitled this revision from [WIP] UV Editor: Area Stretching Overlay to UV Editor: Area Stretching Overlay.Sep 3 2019, 5:02 PM

One nitpick but otherwise, Looks good to me.

source/blender/draw/intern/draw_cache_extract.h
238

Add a note about when it is valid.

Only valid after DRW_mesh_batch_cache_create_requested has been called.

source/blender/editors/uvedit/uvedit_draw.c
213

This function looks weird. I preferred the way it was before with additional parameters to DRW_mesh_batch_cache_get_edituv_faces_stretch_angle.

Here this function seems really hacky but I agree the other way is not optimal either as you have to know when to dereference the pointer.

This revision is now accepted and ready to land.Sep 3 2019, 5:14 PM
This revision was automatically updated to reflect the committed changes.
Jeroen Bakker (jbakker) marked an inline comment as done.