diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-05-02 09:58:29 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-05-02 21:49:38 +0300 |
commit | 36bbf8092903f55a317db94c4f7ca48c216b1a89 (patch) | |
tree | 4c110e3735a52c8c0d485cd8653215b0415be9b1 /source/blender/draw/intern/draw_cache.c | |
parent | 46662a289b53f79b9e6fa9c0ed07db8368982b12 (diff) |
Armature: Envelope: Small cleanup + don't smooth the distance display.
The actual weighting calculation is not smooth as the bone display.
The bone itself can be smooth for esthetic purpose but the distance display
should match the underlying weighting formula.
Diffstat (limited to 'source/blender/draw/intern/draw_cache.c')
-rw-r--r-- | source/blender/draw/intern/draw_cache.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c index be4c1783aff..909e577bd4f 100644 --- a/source/blender/draw/intern/draw_cache.c +++ b/source/blender/draw/intern/draw_cache.c @@ -1897,7 +1897,7 @@ Gwn_Batch *DRW_cache_bone_envelope_solid_get(void) static Gwn_VertFormat format = { 0 }; static struct { uint pos; } attr_id; if (format.attrib_ct == 0) { - attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 4, GWN_FETCH_FLOAT); + attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT); } /* Vertices */ @@ -1907,8 +1907,7 @@ Gwn_Batch *DRW_cache_bone_envelope_solid_get(void) float lon = 0.0f; for (int i = 0; i < lon_res; i++, lon += lon_inc) { float lat = 0.0f; - float co1[4], co2[4]; - co1[3] = co2[3] = 0.0f; + float co1[3], co2[3]; /* Note: the poles are duplicated on purpose, to restart the strip. */ |