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:
authorCampbell Barton <ideasman42@gmail.com>2018-07-08 14:19:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-08 14:19:10 +0300
commit73d2d75eeda3b15e1ca1a3136ad9818cd230dbbc (patch)
tree093ffa7e907c1896ac7f015dc634cd2fbc989af4 /source/blender/editors/animation
parent9fb912518425e52e7b13c35dd79770c2715c8dd6 (diff)
Cleanup: rename 'ct' to 'len' for editors
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/keyframes_draw.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c
index e06c443e8f0..78ce24db503 100644
--- a/source/blender/editors/animation/keyframes_draw.c
+++ b/source/blender/editors/animation/keyframes_draw.c
@@ -585,20 +585,20 @@ static void draw_keylist(View2D *v2d, DLRBT_Tree *keys, DLRBT_Tree *blocks, floa
copy_v4_v4(unsel_mhcol, unsel_color);
unsel_mhcol[3] *= 0.8f;
- unsigned int block_ct = 0;
+ uint block_len = 0;
for (ActKeyBlock *ab = blocks->first; ab; ab = ab->next) {
if (actkeyblock_is_valid(ab, keys)) {
- block_ct++;
+ block_len++;
}
}
- if (block_ct > 0) {
+ if (block_len > 0) {
Gwn_VertFormat *format = immVertexFormat();
uint pos_id = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
uint color_id = GWN_vertformat_attr_add(format, "color", GWN_COMP_F32, 4, GWN_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_FLAT_COLOR);
- immBegin(GWN_PRIM_TRIS, 6 * block_ct);
+ immBegin(GWN_PRIM_TRIS, 6 * block_len);
for (ActKeyBlock *ab = blocks->first; ab; ab = ab->next) {
if (actkeyblock_is_valid(ab, keys)) {
if (ab->flag & ACTKEYBLOCK_FLAG_MOVING_HOLD) {
@@ -622,16 +622,16 @@ static void draw_keylist(View2D *v2d, DLRBT_Tree *keys, DLRBT_Tree *blocks, floa
if (keys) {
/* count keys */
- unsigned int key_ct = 0;
+ uint key_len = 0;
for (ActKeyColumn *ak = keys->first; ak; ak = ak->next) {
/* optimization: if keyframe doesn't appear within 5 units (screenspace) in visible area, don't draw
* - this might give some improvements, since we current have to flip between view/region matrices
*/
if (IN_RANGE_INCL(ak->cfra, v2d->cur.xmin, v2d->cur.xmax))
- key_ct++;
+ key_len++;
}
- if (key_ct > 0) {
+ if (key_len > 0) {
/* draw keys */
Gwn_VertFormat *format = immVertexFormat();
uint pos_id = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
@@ -640,7 +640,7 @@ static void draw_keylist(View2D *v2d, DLRBT_Tree *keys, DLRBT_Tree *blocks, floa
uint outline_color_id = GWN_vertformat_attr_add(format, "outlineColor", GWN_COMP_U8, 4, GWN_FETCH_INT_TO_FLOAT_UNIT);
immBindBuiltinProgram(GPU_SHADER_KEYFRAME_DIAMOND);
GPU_enable_program_point_size();
- immBegin(GWN_PRIM_POINTS, key_ct);
+ immBegin(GWN_PRIM_POINTS, key_len);
for (ActKeyColumn *ak = keys->first; ak; ak = ak->next) {
if (IN_RANGE_INCL(ak->cfra, v2d->cur.xmin, v2d->cur.xmax)) {