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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-11-04 23:11:23 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-04 23:12:53 +0300
commit5195f03ca129a417524280278e87257dc8188646 (patch)
tree2cc6df32e949fb29a85fa6dfb7acab81149f051c /source
parent8d9d473eec3c57e08d252edfd52376de1e1a4351 (diff)
Cleanup: style, use ARRAY_SET_ITEMS macro
Diffstat (limited to 'source')
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
index d388b617d60..f255892de44 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
@@ -621,38 +621,23 @@ static void set_grid_point(
float pos[3];
/* Set the grid in the selected axis */
- switch (axis)
- {
+ switch (axis) {
case GP_LOCKAXIS_X:
{
- pos[0] = 0.0f;
- pos[1] = v1;
- pos[2] = v2;
+ ARRAY_SET_ITEMS(pos, 0.0f, v1, v2);
break;
}
case GP_LOCKAXIS_Y:
{
- pos[0] = v1;
- pos[1] = 0.0f;
- pos[2] = v2;
+ ARRAY_SET_ITEMS(pos, v1, 0.0f, v2);
break;
}
case GP_LOCKAXIS_Z:
+ default: /* view aligned */
{
- pos[0] = v1;
- pos[1] = v2;
- pos[2] = 0.0f;
+ ARRAY_SET_ITEMS(pos, v1, v2, 0.0f);
break;
}
- default:
- {
- /* aligned to view */
- pos[0] = v1;
- pos[1] = v2;
- pos[2] = 0.0f;
- break;
- }
-
}
GPU_vertbuf_attr_set(vbo, pos_id, idx, pos);