Cleanup: add trailing commas
authorCampbell Barton <ideasman42@gmail.com>
Wed, 30 Jan 2019 21:28:56 +0000 (08:28 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 30 Jan 2019 21:30:45 +0000 (08:30 +1100)
Improve clang-format output.

13 files changed:
source/blender/draw/engines/basic/basic_engine.c
source/blender/draw/engines/eevee/eevee_engine.c
source/blender/draw/engines/external/external_engine.c
source/blender/draw/engines/workbench/workbench_engine.c
source/blender/draw/intern/draw_builtin_shader.c
source/blender/draw/intern/draw_common.c
source/blender/draw/intern/draw_manager_shader.c
source/blender/draw/modes/edit_lattice_mode.c
source/blender/draw/modes/edit_mesh_mode.c
source/blender/draw/modes/object_mode.c
source/blender/draw/modes/overlay_mode.c
source/blender/draw/modes/paint_vertex_mode.c
source/blender/draw/modes/paint_weight_mode.c

index f6a6d89..508cdec 100644 (file)
@@ -234,7 +234,7 @@ RenderEngineType DRW_engine_viewport_basic_type = {
        BASIC_ENGINE, N_("Basic"), RE_INTERNAL,
        NULL, NULL, NULL, NULL, NULL, NULL, NULL,
        &draw_engine_basic_type,
-       {NULL, NULL, NULL}
+       {NULL, NULL, NULL},
 };
 
 
index bb8314a..8414814 100644 (file)
@@ -467,7 +467,7 @@ RenderEngineType DRW_engine_viewport_eevee_type = {
        NULL, &DRW_render_to_image, NULL, NULL, NULL, NULL,
        &EEVEE_render_update_passes,
        &draw_engine_eevee_type,
-       {NULL, NULL, NULL}
+       {NULL, NULL, NULL},
 };
 
 
index fee0dda..7a9a1cf 100644 (file)
@@ -226,7 +226,7 @@ RenderEngineType DRW_engine_viewport_external_type = {
        EXTERNAL_ENGINE, N_("External"), RE_INTERNAL,
        NULL, NULL, NULL, NULL, NULL, NULL, NULL,
        &draw_engine_external_type,
-       {NULL, NULL, NULL}
+       {NULL, NULL, NULL},
 };
 
 #undef EXTERNAL_ENGINE
index 5d87137..487adf9 100644 (file)
@@ -43,7 +43,7 @@ RenderEngineType DRW_engine_viewport_workbench_type = {
        NULL, &DRW_render_to_image, NULL, NULL, NULL, NULL,
        &workbench_render_update_passes,
        &draw_engine_workbench_solid,
-       {NULL, NULL, NULL}
+       {NULL, NULL, NULL},
 };
 
 
index 2c3d656..2c57ae2 100644 (file)
@@ -79,7 +79,8 @@ static GPUShader *drw_shader_get_builtin_shader_clipped(eGPUBuiltinShader shader
                .vert = (const char *[]){world_clip_lib, shader_code.vert, NULL},
                .geom = (const char *[]){shader_code.geom ? world_clip_lib : NULL, shader_code.geom, NULL},
                .frag = (const char *[]){shader_code.frag, NULL},
-               .defs = (const char *[]){world_clip_def, shader_code.defs, NULL}});
+               .defs = (const char *[]){world_clip_def, shader_code.defs, NULL},
+       });
 }
 
 GPUShader *DRW_shader_get_builtin_shader(eGPUBuiltinShader shader_id, eDRW_ShaderSlot slot)
index 676c401..826e62f 100644 (file)
@@ -513,7 +513,8 @@ DRWShadingGroup *shgroup_instance_empty_axes(DRWPass *pass, struct GPUBatch *geo
                sh_data->empty_axes_sh = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_object_empty_axes_vert_glsl, NULL},
                        .frag = (const char *[]){datatoc_gpu_shader_flat_color_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, NULL}});
+                       .defs = (const char *[]){world_clip_def_or_empty, NULL},
+               });
        }
 
        DRW_shgroup_instance_format(g_formats.instance_sized, {
index 67bf195..300e99d 100644 (file)
@@ -311,7 +311,8 @@ static const char *string_join_array_maybe_alloc(const char **str_arr, bool *r_i
  *         .vert = (const char *[]){shader_lib_glsl, shader_vert_glsl, NULL},
  *         .geom = (const char *[]){shader_geom_glsl, NULL},
  *         .frag = (const char *[]){shader_frag_glsl, NULL},
- *         .defs = (const char *[]){"#define DEFINE\n", test ? "#define OTHER_DEFINE\n" : "", NULL}});
+ *         .defs = (const char *[]){"#define DEFINE\n", test ? "#define OTHER_DEFINE\n" : "", NULL},
+ * });
  * \endcode
  *
  */
index 938f8b3..c31d1c2 100644 (file)
@@ -168,7 +168,8 @@ static void EDIT_LATTICE_engine_init(void *vedata)
                            datatoc_common_globals_lib_glsl,
                            datatoc_edit_lattice_overlay_frag_glsl,
                            NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, NULL}});
+                       .defs = (const char *[]){world_clip_def_or_empty, NULL},
+               });
 
        }
 }
index 7f9e0cb..1f43993 100644 (file)
@@ -281,7 +281,8 @@ static void EDIT_MESH_engine_init(void *vedata)
                sh_data->weight_face = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_common_globals_lib_glsl, datatoc_paint_weight_vert_glsl, NULL},
                        .frag = (const char *[]){datatoc_common_globals_lib_glsl, datatoc_paint_weight_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, NULL}});
+                       .defs = (const char *[]){world_clip_def_or_empty, NULL},
+               });
        }
 
        if (!sh_data->overlay_vert) {
@@ -289,19 +290,22 @@ static void EDIT_MESH_engine_init(void *vedata)
                sh_data->overlay_vert = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){lib, datatoc_edit_mesh_overlay_points_vert_glsl, NULL},
                        .frag = (const char *[]){datatoc_gpu_shader_point_varying_color_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, "#define VERTEX_FACING\n", NULL}});
+                       .defs = (const char *[]){world_clip_def_or_empty, "#define VERTEX_FACING\n", NULL},
+               });
 
                sh_data->overlay_lvert = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){lib, datatoc_edit_mesh_overlay_points_vert_glsl, NULL},
                        .frag = (const char *[]){datatoc_gpu_shader_point_varying_color_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, NULL}});
+                       .defs = (const char *[]){world_clip_def_or_empty, NULL},
+               });
                MEM_freeN(lib);
        }
        if (!sh_data->overlay_facedot) {
                sh_data->overlay_facedot = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_common_globals_lib_glsl, datatoc_edit_mesh_overlay_facedot_vert_glsl, NULL},
                        .frag = (const char *[]){datatoc_common_globals_lib_glsl, datatoc_edit_mesh_overlay_facedot_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, "#define VERTEX_FACING\n", NULL}});
+                       .defs = (const char *[]){world_clip_def_or_empty, "#define VERTEX_FACING\n", NULL},
+               });
        }
        if (!sh_data->overlay_mix) {
                sh_data->overlay_mix = DRW_shader_create_fullscreen(datatoc_edit_mesh_overlay_mix_frag_glsl, NULL);
@@ -310,28 +314,32 @@ static void EDIT_MESH_engine_init(void *vedata)
                sh_data->overlay_facefill = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_common_globals_lib_glsl, datatoc_edit_mesh_overlay_facefill_vert_glsl, NULL},
                        .frag = (const char *[]){datatoc_common_globals_lib_glsl, datatoc_edit_mesh_overlay_facefill_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, NULL}});
+                       .defs = (const char *[]){world_clip_def_or_empty, NULL},
+               });
        }
        if (!sh_data->normals_face) {
                sh_data->normals_face = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_edit_normals_vert_glsl, NULL},
                        .geom = (const char *[]){world_clip_lib_or_empty, datatoc_edit_normals_geom_glsl, NULL},
                        .frag = (const char *[]){datatoc_gpu_shader_uniform_color_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, "#define FACE_NORMALS\n", NULL}});
+                       .defs = (const char *[]){world_clip_def_or_empty, "#define FACE_NORMALS\n", NULL},
+               });
        }
        if (!sh_data->normals_loop) {
                sh_data->normals_loop = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_edit_normals_vert_glsl, NULL},
                        .geom = (const char *[]){world_clip_lib_or_empty, datatoc_edit_normals_geom_glsl, NULL},
                        .frag = (const char *[]){datatoc_gpu_shader_uniform_color_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, "#define LOOP_NORMALS\n", NULL}});
+                       .defs = (const char *[]){world_clip_def_or_empty, "#define LOOP_NORMALS\n", NULL},
+               });
        }
        if (!sh_data->normals) {
                sh_data->normals = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_edit_normals_vert_glsl, NULL},
                        .geom = (const char *[]){world_clip_lib_or_empty, datatoc_edit_normals_geom_glsl, NULL},
                        .frag = (const char *[]){datatoc_gpu_shader_uniform_color_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, NULL}});
+                       .defs = (const char *[]){world_clip_def_or_empty, NULL},
+               });
        }
        if (!sh_data->depth) {
                sh_data->depth = DRW_shader_create_3D_depth_only(draw_ctx->shader_slot);
index a9286fc..278aee0 100644 (file)
@@ -414,12 +414,14 @@ static void OBJECT_engine_init(void *vedata)
                sh_data->outline_prepass = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_gpu_shader_3D_vert_glsl, NULL},
                        .frag = (const char *[]){datatoc_object_outline_prepass_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, NULL}});
+                       .defs = (const char *[]){world_clip_def_or_empty, NULL},
+               });
                sh_data->outline_prepass_wire = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_object_outline_prepass_vert_glsl, NULL},
                        .geom = (const char *[]){world_clip_lib_or_empty, datatoc_object_outline_prepass_geom_glsl, NULL},
                        .frag = (const char *[]){datatoc_object_outline_prepass_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, NULL}});
+                       .defs = (const char *[]){world_clip_def_or_empty, NULL},
+               });
 
                sh_data->outline_resolve = DRW_shader_create_fullscreen(datatoc_object_outline_resolve_frag_glsl, NULL);
 
@@ -456,11 +458,13 @@ static void OBJECT_engine_init(void *vedata)
                        sh_data->object_empty_image = DRW_shader_create_from_arrays({
                                .vert = (const char *[]){world_clip_lib_or_empty, datatoc_object_empty_image_vert_glsl, NULL},
                                .frag = (const char *[]){datatoc_object_empty_image_frag_glsl, NULL},
-                               .defs = (const char *[]){world_clip_def_or_empty, empty_image_defs, NULL}});
+                               .defs = (const char *[]){world_clip_def_or_empty, empty_image_defs, NULL},
+                       });
                        sh_data->object_empty_image_wire = DRW_shader_create_from_arrays({
                                .vert = (const char *[]){world_clip_lib_or_empty, datatoc_object_empty_image_vert_glsl, NULL},
                                .frag = (const char *[]){datatoc_object_empty_image_frag_glsl, NULL},
-                               .defs = (const char *[]){world_clip_def_or_empty, "#define USE_WIRE\n", empty_image_defs, NULL}});
+                               .defs = (const char *[]){world_clip_def_or_empty, "#define USE_WIRE\n", empty_image_defs, NULL},
+                       });
                }
 
                /* Grid */
@@ -488,7 +492,8 @@ static void OBJECT_engine_init(void *vedata)
                sh_data->loose_points = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_gpu_shader_3D_vert_glsl, NULL},
                        .frag = (const char *[]){datatoc_object_loose_points_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, NULL}});
+                       .defs = (const char *[]){world_clip_def_or_empty, NULL},
+               });
        }
 
        {
index dc8ea53..89eb3d4 100644 (file)
@@ -119,7 +119,8 @@ static void overlay_engine_init(void *vedata)
                sh_data->face_orientation = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_overlay_face_orientation_vert_glsl, NULL},
                        .frag = (const char *[]){datatoc_overlay_face_orientation_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, NULL}});
+                       .defs = (const char *[]){world_clip_def_or_empty, NULL},
+               });
        }
 
        if (!sh_data->face_wireframe) {
@@ -127,18 +128,19 @@ static void overlay_engine_init(void *vedata)
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_overlay_face_wireframe_vert_glsl, NULL},
                        .geom = (const char *[]){world_clip_lib_or_empty, datatoc_overlay_face_wireframe_geom_glsl, NULL},
                        .frag = (const char *[]){datatoc_gpu_shader_depth_only_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, "#define SELECT_EDGES\n", NULL}});
-
+                       .defs = (const char *[]){world_clip_def_or_empty, "#define SELECT_EDGES\n", NULL},
+               });
                sh_data->face_wireframe = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_overlay_face_wireframe_vert_glsl, NULL},
                        .frag = (const char *[]){datatoc_overlay_face_wireframe_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, NULL}});
-
+                       .defs = (const char *[]){world_clip_def_or_empty, NULL},
+               });
                sh_data->face_wireframe_sculpt = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_overlay_face_wireframe_vert_glsl, NULL},
                        .geom = (const char *[]){world_clip_lib_or_empty, datatoc_overlay_face_wireframe_geom_glsl, NULL},
                        .frag = (const char *[]){datatoc_overlay_face_wireframe_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, "#define USE_SCULPT\n", NULL}});
+                       .defs = (const char *[]){world_clip_def_or_empty, "#define USE_SCULPT\n", NULL},
+               });
        }
 }
 
index b7581cf..f3e3c8d 100644 (file)
@@ -111,22 +111,23 @@ static void PAINT_VERTEX_engine_init(void *UNUSED(vedata))
                sh_data->vcolor_face = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_paint_vertex_vert_glsl, NULL},
                        .frag = (const char *[]){datatoc_paint_vertex_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, NULL}});
-
+                       .defs = (const char *[]){world_clip_def_or_empty, NULL},
+               });
                sh_data->wire_overlay = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_common_globals_lib_glsl, datatoc_paint_wire_vert_glsl, NULL},
                        .frag = (const char *[]){datatoc_paint_wire_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, "#define VERTEX_MODE\n", NULL}});
-
+                       .defs = (const char *[]){world_clip_def_or_empty, "#define VERTEX_MODE\n", NULL},
+               });
                sh_data->face_overlay = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_paint_face_vert_glsl, NULL},
                        .frag = (const char *[]){datatoc_gpu_shader_uniform_color_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, NULL}});
-
+                       .defs = (const char *[]){world_clip_def_or_empty, NULL},
+               });
                sh_data->vert_overlay = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_common_globals_lib_glsl, datatoc_paint_wire_vert_glsl, NULL},
                        .frag = (const char *[]){datatoc_paint_vert_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, NULL}});
+                       .defs = (const char *[]){world_clip_def_or_empty, NULL},
+               });
        }
 }
 
index 14b9a27..f6fa6db 100644 (file)
@@ -112,22 +112,26 @@ static void PAINT_WEIGHT_engine_init(void *UNUSED(vedata))
                sh_data->weight_face = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_common_globals_lib_glsl, datatoc_paint_weight_vert_glsl, NULL},
                        .frag = (const char *[]){datatoc_common_globals_lib_glsl, datatoc_paint_weight_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, NULL}});
+                       .defs = (const char *[]){world_clip_def_or_empty, NULL},
+               });
 
                sh_data->wire_overlay = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_common_globals_lib_glsl, datatoc_paint_wire_vert_glsl, NULL},
                        .frag = (const char *[]){datatoc_paint_wire_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, "#define WEIGHT_MODE\n", NULL}});
+                       .defs = (const char *[]){world_clip_def_or_empty, "#define WEIGHT_MODE\n", NULL},
+               });
 
                sh_data->face_overlay = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_paint_face_vert_glsl, NULL},
                        .frag = (const char *[]){datatoc_gpu_shader_uniform_color_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, NULL}});
+                       .defs = (const char *[]){world_clip_def_or_empty, NULL},
+               });
 
                sh_data->vert_overlay = DRW_shader_create_from_arrays({
                        .vert = (const char *[]){world_clip_lib_or_empty, datatoc_common_globals_lib_glsl, datatoc_paint_wire_vert_glsl, NULL},
                        .frag = (const char *[]){datatoc_common_globals_lib_glsl, datatoc_paint_vert_frag_glsl, NULL},
-                       .defs = (const char *[]){world_clip_def_or_empty, NULL}});
+                       .defs = (const char *[]){world_clip_def_or_empty, NULL},
+               });
        }
 }