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:
authorJeroen Bakker <j.bakker@atmind.nl>2019-09-03 14:42:11 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2019-09-04 09:08:27 +0300
commit64f8f7db7cce0c8923afcabb523f7400f744387e (patch)
treec60fe2a51846a9b19860fbe016d1d64cea098880 /source/blender/draw/intern/draw_cache_extract.h
parent0cb730146b09b4a38abcc04e9d4660d6c2f43945 (diff)
Fix T63755: Area Stretching Overlay
Support for UV Stretching overlay during multi object editing. The VBO now holds the ratios per fase. In the shader these ratios will be compared against the global ratios. The global rations are created from all selected objects. The current implementation does not fit well with the draw module. The plan is to move the drawing of other spaces towards the draw manager what leads to a better fit. Currently the details on this solution is unclear but this requirement will become an attentionpoint in the future design. Reviewed By: fclem Differential Revision: https://developer.blender.org/D5665
Diffstat (limited to 'source/blender/draw/intern/draw_cache_extract.h')
-rw-r--r--source/blender/draw/intern/draw_cache_extract.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/source/blender/draw/intern/draw_cache_extract.h b/source/blender/draw/intern/draw_cache_extract.h
index 9305dc6eef7..70778ca6014 100644
--- a/source/blender/draw/intern/draw_cache_extract.h
+++ b/source/blender/draw/intern/draw_cache_extract.h
@@ -136,8 +136,8 @@ typedef enum DRWBatchFlag {
MBC_EDIT_LNOR = (1 << 6),
MBC_EDIT_FACEDOTS = (1 << 7),
MBC_EDIT_MESH_ANALYSIS = (1 << 8),
- MBC_EDITUV_FACES_STRECH_AREA = (1 << 9),
- MBC_EDITUV_FACES_STRECH_ANGLE = (1 << 10),
+ MBC_EDITUV_FACES_STRETCH_AREA = (1 << 9),
+ MBC_EDITUV_FACES_STRETCH_ANGLE = (1 << 10),
MBC_EDITUV_FACES = (1 << 11),
MBC_EDITUV_EDGES = (1 << 12),
MBC_EDITUV_VERTS = (1 << 13),
@@ -157,7 +157,7 @@ typedef enum DRWBatchFlag {
} DRWBatchFlag;
#define MBC_EDITUV \
- (MBC_EDITUV_FACES_STRECH_AREA | MBC_EDITUV_FACES_STRECH_ANGLE | MBC_EDITUV_FACES | \
+ (MBC_EDITUV_FACES_STRETCH_AREA | MBC_EDITUV_FACES_STRETCH_ANGLE | MBC_EDITUV_FACES | \
MBC_EDITUV_EDGES | MBC_EDITUV_VERTS | MBC_EDITUV_FACEDOTS | MBC_WIRE_LOOPS_UVS)
#define FOREACH_MESH_BUFFER_CACHE(batch_cache, mbc) \
@@ -183,8 +183,8 @@ typedef struct MeshBatchCache {
GPUBatch *edit_fdots;
GPUBatch *edit_mesh_analysis;
/* Edit UVs */
- GPUBatch *edituv_faces_strech_area;
- GPUBatch *edituv_faces_strech_angle;
+ GPUBatch *edituv_faces_stretch_area;
+ GPUBatch *edituv_faces_stretch_angle;
GPUBatch *edituv_faces;
GPUBatch *edituv_edges;
GPUBatch *edituv_verts;
@@ -234,6 +234,12 @@ typedef struct MeshBatchCache {
/* Valid only if edge_detection is up to date. */
bool is_manifold;
+ /* Total areas for drawing UV Stretching. Contains the summed area in mesh
+ * space (`tot_area`) and the summed area in uv space (`tot_uvarea`).
+ *
+ * Only valid after `DRW_mesh_batch_cache_create_requested` has been called. */
+ float tot_area, tot_uv_area;
+
bool no_loose_wire;
} MeshBatchCache;