Cleanup: add trailing commas to structs
authorCampbell Barton <ideasman42@gmail.com>
Sun, 6 Jan 2019 13:06:58 +0000 (00:06 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 6 Jan 2019 13:34:48 +0000 (00:34 +1100)
Needed for clang formatting to workaround bug/limit, see: T53211

42 files changed:
source/blender/blenfont/intern/blf_glyph.c
source/blender/blenkernel/intern/CCGSubSurf_legacy.c
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/collision.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/keyconfig.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/mask_rasterize.c
source/blender/blenkernel/intern/mesh_evaluate.c
source/blender/blenkernel/intern/multires.c
source/blender/blenkernel/intern/multires_reshape.c
source/blender/blenkernel/intern/paint.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/shrinkwrap.c
source/blender/blenkernel/intern/smoke.c
source/blender/blenkernel/intern/subdiv_ccg.c
source/blender/blenkernel/intern/tracking_stabilize.c
source/blender/bmesh/intern/bmesh_interp.c
source/blender/bmesh/intern/bmesh_mesh.c
source/blender/draw/engines/eevee/eevee_lightcache.c
source/blender/draw/engines/eevee/eevee_lightprobes.c
source/blender/draw/engines/eevee/eevee_lights.c
source/blender/editors/armature/armature_select.c
source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c
source/blender/editors/interface/interface_draw.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/screen/screen_draw.c
source/blender/editors/space_nla/nla_draw.c
source/blender/editors/space_outliner/outliner_collections.c
source/blender/editors/space_sequencer/sequencer_scopes.c
source/blender/editors/space_view3d/view3d_draw_legacy.c
source/blender/editors/transform/transform_snap_object.c
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_matrix.c
source/blender/gpu/intern/gpu_vertex_format.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_workspace.c
source/blender/modifiers/intern/MOD_surfacedeform.c
source/blender/modifiers/intern/MOD_uvwarp.c
source/blender/nodes/shader/node_shader_tree.c
source/creator/creator.c

index 8fcba1f..d223afa 100644 (file)
@@ -100,7 +100,7 @@ KerningCacheBLF *blf_kerning_cache_new(FontBLF *font)
                        /* Cannot fail since it has been added just before. */
                        GlyphBLF *g_prev = blf_glyph_search(font->glyph_cache, j);
 
-                       FT_Vector delta = {.x = 0, .y = 0};
+                       FT_Vector delta = { .x = 0, .y = 0, };
                        if (FT_Get_Kerning(font->face, g_prev->idx, g->idx, kc->mode, &delta) == 0) {
                                kc->table[i][j] = (int)delta.x >> 6;
                        }
index 756935b..dd0e29c 100644 (file)
@@ -334,7 +334,7 @@ static void ccgSubSurf__calcVertNormals(CCGSubSurf *ss,
            .effectedF = effectedF,
            .numEffectedV = numEffectedV,
            .numEffectedE = numEffectedE,
-           .numEffectedF = numEffectedF
+           .numEffectedF = numEffectedF,
        };
 
        {
@@ -677,7 +677,7 @@ static void ccgSubSurf__calcSubdivLevel(
            .numEffectedV = numEffectedV,
            .numEffectedE = numEffectedE,
            .numEffectedF = numEffectedF,
-           .curLvl = curLvl
+           .curLvl = curLvl,
        };
 
        {
index b03d009..2019554 100644 (file)
@@ -3128,7 +3128,7 @@ bool BKE_animsys_nla_remap_keyframe_value(struct NlaKeyframingContext *context,
        }
 
        /* Find the evaluation channel for the NLA stack below current strip. */
-       NlaEvalChannelKey key = { .ptr = *prop_ptr, .prop = prop };
+       NlaEvalChannelKey key = { .ptr = *prop_ptr, .prop = prop, };
        NlaEvalData *nlaeval = &context->nla_channels;
        NlaEvalChannel *nec = nlaevalchan_verify_key(nlaeval, NULL, &key);
        int real_index = nlaevalchan_validate_index(nec, index);
index 6dc49a1..a1b4426 100644 (file)
@@ -2641,7 +2641,7 @@ void BKE_armature_cached_bbone_deformation_update(Object *object)
        ArmatureBBoneDefmatsData data = {
                .pdef_info_array = pdef_info_array,
                .dualquats = dualquats,
-               .use_quaternion = use_quaternion
+               .use_quaternion = use_quaternion,
        };
        BLI_task_parallel_listbase(&pose->chanbase,
                                   &data,
index d868a06..53278d7 100644 (file)
@@ -1064,13 +1064,15 @@ static bool cloth_bvh_objcollisions_nearcheck(ClothModifierData * clmd, Collisio
 {
        *collisions = (CollPair *)MEM_mallocN(sizeof(CollPair) * numresult, "collision array");
 
-       ColDetectData data = {.clmd = clmd,
-                             .collmd = collmd,
-                             .overlap = overlap,
-                             .collisions = *collisions,
-                             .culling = culling,
-                             .use_normal = use_normal,
-                             .collided = false};
+       ColDetectData data = {
+               .clmd = clmd,
+               .collmd = collmd,
+               .overlap = overlap,
+               .collisions = *collisions,
+               .culling = culling,
+               .use_normal = use_normal,
+               .collided = false,
+       };
 
        ParallelRangeSettings settings;
        BLI_parallel_range_settings_defaults(&settings);
@@ -1083,10 +1085,12 @@ static bool cloth_bvh_objcollisions_nearcheck(ClothModifierData * clmd, Collisio
 static bool cloth_bvh_selfcollisions_nearcheck(ClothModifierData * clmd, CollPair *collisions,
                                                int numresult, BVHTreeOverlap *overlap)
 {
-       SelfColDetectData data = {.clmd = clmd,
-                                 .overlap = overlap,
-                                 .collisions = collisions,
-                                 .collided = false};
+       SelfColDetectData data = {
+               .clmd = clmd,
+               .overlap = overlap,
+               .collisions = collisions,
+               .collided = false,
+       };
 
        ParallelRangeSettings settings;
        BLI_parallel_range_settings_defaults(&settings);
index 590fe55..094f13d 100644 (file)
@@ -1580,7 +1580,7 @@ static void dynamicPaint_setInitialColor(const Scene *scene, DynamicPaintSurface
                        DynamicPaintSetInitColorData data = {
                            .surface = surface,
                            .mloop = mloop, .mlooptri = mlooptri, .mloopuv = mloopuv, .pool = pool,
-                           .scene_color_manage = scene_color_manage
+                           .scene_color_manage = scene_color_manage,
                        };
                        ParallelRangeSettings settings;
                        BLI_parallel_range_settings_defaults(&settings);
@@ -1595,7 +1595,7 @@ static void dynamicPaint_setInitialColor(const Scene *scene, DynamicPaintSurface
                        DynamicPaintSetInitColorData data = {
                            .surface = surface,
                            .mlooptri = mlooptri, .mloopuv = mloopuv,
-                           .scene_color_manage = scene_color_manage
+                           .scene_color_manage = scene_color_manage,
                        };
                        ParallelRangeSettings settings;
                        BLI_parallel_range_settings_defaults(&settings);
@@ -1756,7 +1756,7 @@ static void dynamicPaint_applySurfaceDisplace(DynamicPaintSurface *surface, Mesh
        if (surface->type == MOD_DPAINT_SURFACE_T_DISPLACE) {
                MVert *mvert = result->mvert;
 
-               DynamicPaintModifierApplyData data = {.surface = surface, .mvert = mvert};
+               DynamicPaintModifierApplyData data = { .surface = surface, .mvert = mvert, };
                ParallelRangeSettings settings;
                BLI_parallel_range_settings_defaults(&settings);
                settings.use_threading = (sData->total_points > 10000);
@@ -1903,7 +1903,7 @@ static Mesh *dynamicPaint_Modifier_apply(
                                                /* paint is stored on dry and wet layers, so mix final color first */
                                                float (*fcolor)[4] = MEM_callocN(sizeof(*fcolor) * sData->total_points, "Temp paint color");
 
-                                               DynamicPaintModifierApplyData data = {.surface = surface, .fcolor = fcolor};
+                                               DynamicPaintModifierApplyData data = { .surface = surface, .fcolor = fcolor, };
                                                {
                                                        ParallelRangeSettings settings;
                                                        BLI_parallel_range_settings_defaults(&settings);
@@ -2007,7 +2007,7 @@ static Mesh *dynamicPaint_Modifier_apply(
                                        else if (surface->type == MOD_DPAINT_SURFACE_T_WAVE) {
                                                MVert *mvert = result->mvert;
 
-                                               DynamicPaintModifierApplyData data = {.surface = surface, .mvert = mvert};
+                                               DynamicPaintModifierApplyData data = { .surface = surface, .mvert = mvert, };
                                                ParallelRangeSettings settings;
                                                BLI_parallel_range_settings_defaults(&settings);
                                                settings.use_threading = (sData->total_points > 1000);
@@ -2481,7 +2481,7 @@ static int dynamic_paint_find_neighbour_pixel(
                DynamicPaintFindIslandBorderData bdata = {
                        .vert_to_looptri_map = vert_to_looptri_map,
                        .w = w, .h = h, .px = px, .py = py,
-                       .best_index = NOT_FOUND, .best_weight = 1.0f
+                       .best_index = NOT_FOUND, .best_weight = 1.0f,
                };
 
                float pixel[2];
@@ -3236,7 +3236,7 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface, char *filenam
                return;
        }
 
-       DynamicPaintOutputSurfaceImageData data = {.surface = surface, .ibuf = ibuf};
+       DynamicPaintOutputSurfaceImageData data = { .surface = surface, .ibuf = ibuf, };
        switch (surface->type) {
                case MOD_DPAINT_SURFACE_T_PAINT:
                        switch (output_layer) {
@@ -4191,7 +4191,7 @@ static int dynamicPaint_paintMesh(Depsgraph *depsgraph, DynamicPaintSurface *sur
                                            .scene = scene, .timescale = timescale, .c_index = c_index,
                                            .mesh = mesh, .mvert = mvert, .mloop = mloop, .mlooptri = mlooptri,
                                            .brush_radius = brush_radius, .avg_brushNor = avg_brushNor, .brushVelocity = brushVelocity,
-                                           .treeData = &treeData
+                                           .treeData = &treeData,
                                        };
                                        ParallelRangeSettings settings;
                                        BLI_parallel_range_settings_defaults(&settings);
@@ -5351,7 +5351,7 @@ static void dynamicPaint_doBorderStep(DynamicPaintSurface *surface)
 
        /* Don't use prevPoint, relying on the condition that neighbors are never border pixels. */
        DynamicPaintEffectData data = {
-               .surface = surface
+               .surface = surface,
        };
 
        ParallelRangeSettings settings;
@@ -5907,7 +5907,7 @@ static int dynamicPaint_doStep(
                return 0;
 
        if (dynamic_paint_surface_needs_dry_dissolve(surface)) {
-               DynamicPaintDissolveDryData data = {.surface = surface, .timescale = timescale};
+               DynamicPaintDissolveDryData data = { .surface = surface, .timescale = timescale, };
                ParallelRangeSettings settings;
                BLI_parallel_range_settings_defaults(&settings);
                settings.use_threading = (sData->total_points > 1000);
index f2db375..0feca3a 100644 (file)
@@ -126,7 +126,7 @@ void BKE_keyconfig_pref_set_select_mouse(UserDef *userdef, int value, bool overr
        wmKeyConfigPref *kpt = BKE_keyconfig_pref_ensure(userdef, WM_KEYCONFIG_STR_DEFAULT);
        IDProperty *idprop = IDP_GetPropertyFromGroup(kpt->prop, "select_mouse");
        if (!idprop) {
-               IDPropertyTemplate tmp = { .i = value };
+               IDPropertyTemplate tmp = { .i = value, };
                IDP_AddToGroup(kpt->prop, IDP_New(IDP_INT, &tmp, "select_mouse"));
        }
        else if (override) {
index 5c867c0..7634f1e 100644 (file)
@@ -696,7 +696,7 @@ bool BKE_id_copy_ex(Main *bmain, const ID *id, ID **r_newid, const int flag, con
        }
 
        /* Update ID refcount, remap pointers to self in new ID. */
-       struct IDCopyLibManagementData data = {.id_src = id, .id_dst = *r_newid, .flag = flag};
+       struct IDCopyLibManagementData data = {.id_src = id, .id_dst = *r_newid, .flag = flag,};
        BKE_library_foreach_ID_link(bmain, *r_newid, id_copy_libmanagement_cb, &data, IDWALK_NOP);
 
        /* Do not make new copy local in case we are copying outside of main...
index ecdd30e..4127328 100644 (file)
@@ -1465,7 +1465,7 @@ void BKE_maskrasterize_buffer(MaskRasterHandle *mr_handle,
            .x_px_ofs = x_inv * 0.5f,
            .y_px_ofs = y_inv * 0.5f,
            .width = width,
-           .buffer = buffer
+           .buffer = buffer,
        };
        ParallelRangeSettings settings;
        BLI_parallel_range_settings_defaults(&settings);
index c5bcb72..b871b67 100644 (file)
@@ -324,7 +324,7 @@ void BKE_mesh_calc_normals_poly(
 
        MeshCalcNormalsData data = {
            .mpolys = mpolys, .mloop = mloop, .mverts = mverts,
-           .pnors = pnors, .lnors_weighted = lnors_weighted, .vnors = vnors
+           .pnors = pnors, .lnors_weighted = lnors_weighted, .vnors = vnors,
        };
 
        /* Compute poly normals, and prepare weighted loop normals. */
index d2f3073..2e04394 100644 (file)
@@ -291,9 +291,10 @@ Mesh *BKE_multires_create_mesh(
        Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob);
        Mesh *deformed_mesh = mesh_get_eval_deform(depsgraph, scene, ob_eval, CD_MASK_BAREMESH);
        ModifierEvalContext modifier_ctx = {
-               .depsgraph = depsgraph,
-               .object = ob_eval,
-               .flag = MOD_APPLY_USECACHE | MOD_APPLY_IGNORE_SIMPLIFY};
+               .depsgraph = depsgraph,
+               .object = ob_eval,
+               .flag = MOD_APPLY_USECACHE | MOD_APPLY_IGNORE_SIMPLIFY,
+       };
 
        const ModifierTypeInfo *mti = modifierType_getInfo(mmd->modifier.type);
        Mesh *result = mti->applyModifier(&mmd->modifier, &modifier_ctx, deformed_mesh);
@@ -1180,7 +1181,7 @@ static void multiresModifier_disp_run(DerivedMesh *dm, Mesh *me, DerivedMesh *dm
            .gridOffset = gridOffset,
            .gridSize = gridSize,
            .dGridSize = dGridSize,
-           .dSkip = dSkip
+           .dSkip = dSkip,
        };
 
        BLI_task_parallel_range(0, totpoly, &data, multires_disp_run_cb, &settings);
index af3219c..921f467 100644 (file)
@@ -1012,9 +1012,10 @@ bool multiresModifier_reshapeFromDeformModifier(
                multires_mesh, &num_deformed_verts);
        /* Apply deformation modifier on the multires, */
        const ModifierEvalContext modifier_ctx = {
-               .depsgraph = depsgraph,
-               .object = object,
-               .flag = MOD_APPLY_USECACHE | MOD_APPLY_IGNORE_SIMPLIFY};
+               .depsgraph = depsgraph,
+               .object = object,
+               .flag = MOD_APPLY_USECACHE | MOD_APPLY_IGNORE_SIMPLIFY,
+       };
        modwrap_deformVerts(
                md, &modifier_ctx, multires_mesh, deformed_verts,
                multires_mesh->totvert);
@@ -1183,16 +1184,18 @@ bool multiresModifier_reshapeFromCCG(
        multires_reshape_ensure_grids(coarse_mesh, top_level);
        /* Construct context. */
        ReshapeFromCCGTaskData data = {
-               .reshape_ctx = {
-                       .subdiv = subdiv,
-                       .coarse_mesh = coarse_mesh,
-                       .mdisps  = mdisps,
-                       .grid_paint_mask = grid_paint_mask,
-                       .top_grid_size = BKE_subdiv_grid_size_from_level(top_level),
-                       .top_level = top_level},
-               .face_ptex_offset = BKE_subdiv_face_ptex_offset_get(subdiv),
-               .key = &key,
-               .grids = subdiv_ccg->grids};
+               .reshape_ctx = {
+                       .subdiv = subdiv,
+                       .coarse_mesh = coarse_mesh,
+                       .mdisps  = mdisps,
+                       .grid_paint_mask = grid_paint_mask,
+                       .top_grid_size = BKE_subdiv_grid_size_from_level(top_level),
+                       .top_level = top_level,
+               },
+               .face_ptex_offset = BKE_subdiv_face_ptex_offset_get(subdiv),
+               .key = &key,
+               .grids = subdiv_ccg->grids,
+       };
        /* Initialize propagation to higher levels. */
        MultiresPropagateData propagate_data;
        multires_reshape_propagate_prepare(
index c5bfa41..ae5455c 100644 (file)
@@ -910,7 +910,7 @@ static void sculptsession_bm_to_me_update_data_only(Object *ob, bool reorder)
                        }
                        if (reorder)
                                BM_log_mesh_elems_reorder(ss->bm, ss->bm_log);
-                       BM_mesh_bm_to_me(NULL, ss->bm, ob->data, (&(struct BMeshToMeshParams){.calc_object_remap = false}));
+                       BM_mesh_bm_to_me(NULL, ss->bm, ob->data, (&(struct BMeshToMeshParams){.calc_object_remap = false,}));
                }
        }
 }
index 40870fb..5160e5d 100644 (file)
@@ -3474,7 +3474,7 @@ static ImBuf *do_render_strip_uncached(
                                        if (BLI_linklist_index(state->scene_parents, seq->scene) != -1) {
                                                break;
                                        }
-                                       LinkNode scene_parent = {.next = state->scene_parents, .link = seq->scene};
+                                       LinkNode scene_parent = { .next = state->scene_parents, .link = seq->scene, };
                                        state->scene_parents = &scene_parent;
                                        /* end check */
 
index 06e5cc9..a411422 100644 (file)
@@ -410,7 +410,7 @@ static void shrinkwrap_calc_nearest_vertex(ShrinkwrapCalcData *calc)
        nearest.index = -1;
        nearest.dist_sq = FLT_MAX;
 
-       ShrinkwrapCalcCBData data = {.calc = calc, .tree = calc->tree};
+       ShrinkwrapCalcCBData data = { .calc = calc, .tree = calc->tree, };
        ParallelRangeSettings settings;
        BLI_parallel_range_settings_defaults(&settings);
        settings.use_threading = (calc->numVerts > BKE_MESH_OMP_LIMIT);
@@ -676,7 +676,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
        /* After successfully build the trees, start projection vertices. */
        ShrinkwrapCalcCBData data = {
                .calc = calc, .tree = calc->tree, .aux_tree = aux_tree,
-               .proj_axis = proj_axis, .local2aux = &local2aux
+               .proj_axis = proj_axis, .local2aux = &local2aux,
        };
        ParallelRangeSettings settings;
        BLI_parallel_range_settings_defaults(&settings);
@@ -852,7 +852,7 @@ static bool target_project_solve_point_tri(
        x[2] = (dot_v3v3(tmp, r_hit_no) < 0) ? -dist : dist;
 
        /* Solve the equations iteratively. */
-       TargetProjectTriData tri_data = { .vtri_co = vtri_co, .vtri_no = vtri_no, .point_co = point_co };
+       TargetProjectTriData tri_data = { .vtri_co = vtri_co, .vtri_no = vtri_no, .point_co = point_co, };
 
        sub_v3_v3v3(tri_data.n0_minus_n2, vtri_no[0], vtri_no[2]);
        sub_v3_v3v3(tri_data.n1_minus_n2, vtri_no[1], vtri_no[2]);
@@ -1268,7 +1268,7 @@ static void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc)
        nearest.dist_sq = FLT_MAX;
 
        /* Find the nearest vertex */
-       ShrinkwrapCalcCBData data = {.calc = calc, .tree = calc->tree};
+       ShrinkwrapCalcCBData data = { .calc = calc, .tree = calc->tree, };
        ParallelRangeSettings settings;
        BLI_parallel_range_settings_defaults(&settings);
        settings.use_threading = (calc->numVerts > BKE_MESH_OMP_LIMIT);
index 5f9015a..3eebd12 100644 (file)
@@ -896,7 +896,7 @@ static void obstacles_from_mesh(
                            .tree = &treeData, .obstacle_map = obstacle_map,
                            .has_velocity = has_velocity, .vert_vel = vert_vel,
                            .velocityX = velocityX, .velocityY = velocityY, .velocityZ = velocityZ,
-                           .num_obstacles = num_obstacles
+                           .num_obstacles = num_obstacles,
                        };
                        ParallelRangeSettings settings;
                        BLI_parallel_range_settings_defaults(&settings);
index 5d81111..add8a85 100644 (file)
@@ -865,8 +865,8 @@ static void subdiv_ccg_recalc_inner_grid_normals(SubdivCCG *subdiv_ccg)
        CCGKey key;
        BKE_subdiv_ccg_key_top_level(&key, subdiv_ccg);
        RecalcInnerNormalsData data = {
-               .subdiv_ccg = subdiv_ccg,
-               .key = &key
+               .subdiv_ccg = subdiv_ccg,
+               .key = &key,
        };
        RecalcInnerNormalsTLSData tls_data = {NULL};
        ParallelRangeSettings parallel_range_settings;
index aae9985..851b3ee 100644 (file)
@@ -1598,7 +1598,7 @@ ImBuf *BKE_tracking_stabilize_frame(MovieClip *clip,
 
        TrackingStabilizeFrameInterpolationData data = {
                .ibuf = ibuf, .tmpibuf = tmpibuf, .mat = mat,
-               .interpolation = interpolation
+               .interpolation = interpolation,
        };
 
        ParallelRangeSettings settings;
index 26c62d1..bc59839 100644 (file)
@@ -508,7 +508,7 @@ void BM_loop_interp_multires_ex(
                .cd_loop_mdisp_offset = cd_loop_mdisp_offset,
                .md_dst = md_dst, .f_src_center = f_src_center,
                .axis_x = axis_x, .axis_y = axis_y, .v1 = v1, .v4 = v4, .e1 = e1, .e2 = e2,
-               .res = res, .d = 1.0f / (float)(res - 1)
+               .res = res, .d = 1.0f / (float)(res - 1),
        };
        ParallelRangeSettings settings;
        BLI_parallel_range_settings_defaults(&settings);
index 50aa3f0..8309815 100644 (file)
@@ -352,7 +352,7 @@ static void bm_mesh_edges_calc_vectors(BMesh *bm, float (*edgevec)[3], const flo
 
        BMEdgesCalcVectorsData data = {
            .vcos = vcos,
-           .edgevec = edgevec
+           .edgevec = edgevec,
        };
 
        BM_iter_parallel(bm, BM_EDGES_OF_MESH, mesh_edges_calc_vectors_cb, &data, bm->totedge >= BM_OMP_LIMIT);
@@ -464,7 +464,7 @@ static void bm_mesh_verts_calc_normals(
            .fnos = fnos,
            .edgevec = edgevec,
            .vcos = vcos,
-           .vnos = vnos
+           .vnos = vnos,
        };
 
        BM_iter_parallel(bm, BM_FACES_OF_MESH, mesh_verts_calc_normals_accum_cb, &data, bm->totface >= BM_OMP_LIMIT);
index 38983af..899db32 100644 (file)
@@ -1187,7 +1187,7 @@ void EEVEE_lightbake_update_world_quick(EEVEE_ViewLayerData *sldata, EEVEE_Data
        float filter_quality = scene->eevee.gi_filter_quality;
 
        EEVEE_LightBake lbake = {
-               .resource_only = true
+               .resource_only = true,
        };
 
        /* Create resources. */
index 0b4341f..5f58724 100644 (file)
@@ -820,7 +820,7 @@ void EEVEE_lightbake_render_world(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Dat
 {
        EEVEE_BakeRenderData brdata = {
                .vedata = vedata,
-               .face_fb = face_fb
+               .face_fb = face_fb,
        };
 
        render_cubemap(lightbake_render_world_face, &brdata, (float[3]){0.0f}, 1.0f, 10.0f);
@@ -854,7 +854,7 @@ void EEVEE_lightbake_render_scene(
        EEVEE_BakeRenderData brdata = {
                .vedata = vedata,
                .sldata = sldata,
-               .face_fb = face_fb
+               .face_fb = face_fb,
        };
 
        render_cubemap(lightbake_render_scene_face, &brdata, pos, near_clip, far_clip);
index b946a49..67cca69 100644 (file)
@@ -1236,7 +1236,7 @@ void EEVEE_draw_shadows(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
                Lamp *la = (Lamp *)ob->data;
                BoundSphere bsphere = {
                        .center = {ob->obmat[3][0], ob->obmat[3][1], ob->obmat[3][2]},
-                       .radius = light_attenuation_radius_get(la, light_threshold)
+                       .radius = light_attenuation_radius_get(la, light_threshold),
                };
                cube_visible[i] = DRW_culling_sphere_test(&bsphere);
        }
index 830798f..da82bc4 100644 (file)
@@ -269,7 +269,8 @@ void *get_nearest_bone(
                if (vc.obedit != NULL) {
                        bases = BKE_view_layer_array_from_bases_in_mode(
                                vc.view_layer, vc.v3d, &bases_len, {
-                                   .object_mode = OB_MODE_EDIT});
+                                   .object_mode = OB_MODE_EDIT,
+                               });
                }
                else {
                        bases = BKE_object_pose_base_array_get(vc.view_layer, vc.v3d, &bases_len);
index 04015ee..df0c9f0 100644 (file)
@@ -761,10 +761,10 @@ static int gizmo_cage2d_test_select(
 
        /* if gizmo does not have a scale intersection, don't do it */
        if (transform_flag & (ED_GIZMO_CAGE2D_XFORM_FLAG_SCALE | ED_GIZMO_CAGE2D_XFORM_FLAG_SCALE_UNIFORM)) {
-               const rctf r_xmin = {.xmin = -size[0], .ymin = -size[1], .xmax = -size[0] + margin[0], .ymax = size[1]};
-               const rctf r_xmax = {.xmin = size[0] - margin[0], .ymin = -size[1], .xmax = size[0], .ymax = size[1]};
-               const rctf r_ymin = {.xmin = -size[0], .ymin = -size[1], .xmax = size[0], .ymax = -size[1] + margin[1]};
-               const rctf r_ymax = {.xmin = -size[0], .ymin = size[1] - margin[1], .xmax = size[0], .ymax = size[1]};
+               const rctf r_xmin = { .xmin = -size[0], .ymin = -size[1], .xmax = -size[0] + margin[0], .ymax = size[1], };
+               const rctf r_xmax = { .xmin = size[0] - margin[0], .ymin = -size[1], .xmax = size[0], .ymax = size[1], };
+               const rctf r_ymin = { .xmin = -size[0], .ymin = -size[1], .xmax = size[0], .ymax = -size[1] + margin[1], };
+               const rctf r_ymax = { .xmin = -size[0], .ymin = size[1] - margin[1], .xmax = size[0], .ymax = size[1], };
 
                if (BLI_rctf_isect_pt_v(&r_xmin, point_local)) {
                        if (BLI_rctf_isect_pt_v(&r_ymin, point_local)) {
index 777df75..ac1578d 100644 (file)
@@ -795,7 +795,7 @@ void ui_draw_but_HISTOGRAM(ARegion *UNUSED(ar), uiBut *but, const uiWidgetColors
                .xmin = (float)recti->xmin + 1,
                .xmax = (float)recti->xmax - 1,
                .ymin = (float)recti->ymin + 1,
-               .ymax = (float)recti->ymax - 1
+               .ymax = (float)recti->ymax - 1,
        };
 
        float w = BLI_rctf_size_x(&rect);
@@ -901,7 +901,7 @@ void ui_draw_but_WAVEFORM(ARegion *UNUSED(ar), uiBut *but, const uiWidgetColors
                .xmin = (float)recti->xmin + 1,
                .xmax = (float)recti->xmax - 1,
                .ymin = (float)recti->ymin + 1,
-               .ymax = (float)recti->ymax - 1
+               .ymax = (float)recti->ymax - 1,
        };
 
        if (scopes->wavefrm_yfac < 0.5f)
@@ -1187,7 +1187,7 @@ void ui_draw_but_VECTORSCOPE(ARegion *UNUSED(ar), uiBut *but, const uiWidgetColo
                .xmin = (float)recti->xmin + 1,
                .xmax = (float)recti->xmax - 1,
                .ymin = (float)recti->ymin + 1,
-               .ymax = (float)recti->ymax - 1
+               .ymax = (float)recti->ymax - 1,
        };
 
        float w = BLI_rctf_size_x(&rect);
@@ -1639,7 +1639,7 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, const uiWidgetColors *wcol, cons
                .xmin = rect->xmin,
                .ymin = rect->ymin,
                .xmax = rect->xmax,
-               .ymax = rect->ymax
+               .ymax = rect->ymax,
        };
        rcti scissor_region = {0, ar->winx, 0, ar->winy};
        BLI_rcti_isect(&scissor_new, &scissor_region, &scissor_new);
@@ -1664,7 +1664,7 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, const uiWidgetColors *wcol, cons
                        .xmin = rect->xmin + zoomx * (-offsx),
                        .xmax = grid.xmin + zoomx,
                        .ymin = rect->ymin + zoomy * (-offsy),
-                       .ymax = grid.ymin + zoomy
+                       .ymax = grid.ymin + zoomy,
                };
 
                ui_draw_gradient(&grid, col, UI_GRAD_H, 1.0f);
@@ -1876,7 +1876,7 @@ void ui_draw_but_TRACKPREVIEW(ARegion *UNUSED(ar), uiBut *but, const uiWidgetCol
                .xmin = (float)recti->xmin + 1,
                .xmax = (float)recti->xmax - 1,
                .ymin = (float)recti->ymin + 1,
-               .ymax = (float)recti->ymax - 1
+               .ymax = (float)recti->ymax - 1,
        };
 
        int width  = BLI_rctf_size_x(&rect) + 1;
@@ -2028,7 +2028,7 @@ void ui_draw_but_NODESOCKET(ARegion *ar, uiBut *but, const uiWidgetColors *UNUSE
                .xmin = recti->xmin,
                .ymin = recti->ymin,
                .xmax = recti->xmax,
-               .ymax = recti->ymax
+               .ymax = recti->ymax,
        };
 
        rcti scissor_region = {0, ar->winx, 0, ar->winy};
index d7e3dbf..f77a7dc 100644 (file)
@@ -4433,7 +4433,7 @@ eAutoPropButsReturn uiTemplateOperatorPropertyButs(
        else {
                wmWindowManager *wm = CTX_wm_manager(C);
                PointerRNA ptr;
-               struct uiTemplateOperatorPropertyPollParam user_data = {.C = C, .op = op, .flag = flag};
+               struct uiTemplateOperatorPropertyPollParam user_data = { .C = C, .op = op, .flag = flag, };
 
                RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
 
index ca37077..90fd86c 100644 (file)
@@ -564,7 +564,7 @@ static void screen_preview_draw_areas(const bScreen *screen, const float scale[2
                        .xmin = sa->totrct.xmin * scale[0] + ofs_h,
                        .xmax = sa->totrct.xmax * scale[0] - ofs_h,
                        .ymin = sa->totrct.ymin * scale[1] + ofs_h,
-                       .ymax = sa->totrct.ymax * scale[1] - ofs_h
+                       .ymax = sa->totrct.ymax * scale[1] - ofs_h,
                };
 
                immBegin(GPU_PRIM_TRI_FAN, 4);
index 2cba6cf..e71aee4 100644 (file)
@@ -603,7 +603,7 @@ static void nla_draw_strip_text(
                .xmin = xminc,
                .ymin = yminc,
                .xmax = xmaxc,
-               .ymax = ymaxc
+               .ymax = ymaxc,
        };
 
        /* add this string to the cache of texts to draw */
index d219457..4ff818f 100644 (file)
@@ -267,7 +267,7 @@ static int collection_delete_exec(bContext *C, wmOperator *op)
        Main *bmain = CTX_data_main(C);
        Scene *scene = CTX_data_scene(C);
        SpaceOops *soops = CTX_wm_space_outliner(C);
-       struct CollectionEditData data = {.scene = scene, .soops = soops};
+       struct CollectionEditData data = {.scene = scene, .soops = soops,};
        bool hierarchy = RNA_boolean_get(op->ptr, "hierarchy");
 
        data.collections_to_edit = BLI_gset_ptr_new(__func__);
@@ -488,7 +488,7 @@ static int collection_link_exec(bContext *C, wmOperator *UNUSED(op))
        Scene *scene = CTX_data_scene(C);
        Collection *active_collection = CTX_data_layer_collection(C)->collection;
        SpaceOops *soops = CTX_wm_space_outliner(C);
-       struct CollectionEditData data = {.scene = scene, .soops = soops};
+       struct CollectionEditData data = {.scene = scene, .soops = soops,};
 
        data.collections_to_edit = BLI_gset_ptr_new(__func__);
 
@@ -536,7 +536,7 @@ static int collection_instance_exec(bContext *C, wmOperator *UNUSED(op))
        Scene *scene = CTX_data_scene(C);
        ViewLayer *view_layer = CTX_data_view_layer(C);
        SpaceOops *soops = CTX_wm_space_outliner(C);
-       struct CollectionEditData data = {.scene = scene, .soops = soops};
+       struct CollectionEditData data = {.scene = scene, .soops = soops,};
 
        data.collections_to_edit = BLI_gset_ptr_new(__func__);
 
@@ -623,7 +623,7 @@ static bool collections_view_layer_poll(bContext *C, bool clear, int flag)
        }
 
        Scene *scene = CTX_data_scene(C);
-       struct CollectionEditData data = {.scene = scene, .soops = soops};
+       struct CollectionEditData data = {.scene = scene, .soops = soops,};
        data.collections_to_edit = BLI_gset_ptr_new(__func__);
        bool result = false;
 
@@ -695,7 +695,7 @@ static int collection_view_layer_exec(bContext *C, wmOperator *op)
        Scene *scene = CTX_data_scene(C);
        ViewLayer *view_layer = CTX_data_view_layer(C);
        SpaceOops *soops = CTX_wm_space_outliner(C);
-       struct CollectionEditData data = {.scene = scene, .soops = soops};
+       struct CollectionEditData data = {.scene = scene, .soops = soops,};
        bool clear = strstr(op->idname, "clear") != NULL;
        int flag = strstr(op->idname, "holdout") ?       LAYER_COLLECTION_HOLDOUT :
                   strstr(op->idname, "indirect_only") ? LAYER_COLLECTION_INDIRECT_ONLY :
index 00811d6..1d317c2 100644 (file)
@@ -503,7 +503,7 @@ static ImBuf *make_histogram_view_from_ibuf_byte(ImBuf *ibuf)
 
        memset(bins, 0, sizeof(bins));
 
-       MakeHistogramViewData data = {.ibuf = ibuf, .bins = bins};
+       MakeHistogramViewData data = { .ibuf = ibuf, .bins = bins, };
        ParallelRangeSettings settings;
        BLI_parallel_range_settings_defaults(&settings);
        settings.use_threading = (ibuf->y >= 256);
@@ -588,7 +588,7 @@ static ImBuf *make_histogram_view_from_ibuf_float(ImBuf *ibuf)
 
        memset(bins, 0, sizeof(bins));
 
-       MakeHistogramViewData data = {.ibuf = ibuf, .bins = bins};
+       MakeHistogramViewData data = { .ibuf = ibuf, .bins = bins, };
        ParallelRangeSettings settings;
        BLI_parallel_range_settings_defaults(&settings);
        settings.use_threading = (ibuf->y >= 256);
index c9a6a9d..1dce9ce 100644 (file)
@@ -767,7 +767,7 @@ void view3d_update_depths_rect(ARegion *ar, ViewDepths *d, rcti *rect)
                .xmin = 0,
                .xmax = ar->winx - 1,
                .ymin = 0,
-               .ymax = ar->winy - 1
+               .ymax = ar->winy - 1,
        };
 
        /* Constrain rect to depth bounds */
index feca8f3..b409e60 100644 (file)
@@ -454,7 +454,7 @@ static bool raycastMesh(
                retval = data.retval;
        }
        else {
-               BVHTreeRayHit hit = {.index = -1, .dist = local_depth};
+               BVHTreeRayHit hit = { .index = -1, .dist = local_depth, };
 
                if (BLI_bvhtree_ray_cast(
                        treedata->tree, ray_start_local, ray_normal_local, 0.0f,
@@ -622,7 +622,7 @@ static bool raycastEditMesh(
                retval = data.retval;
        }
        else {
-               BVHTreeRayHit hit = {.index = -1, .dist = local_depth};
+               BVHTreeRayHit hit = { .index = -1, .dist = local_depth, };
 
                if (BLI_bvhtree_ray_cast(
                        treedata->tree, ray_start_local, ray_normal_local, 0.0f,
index 347b48b..6f93926 100644 (file)
@@ -1550,7 +1550,7 @@ typedef struct {
 } GPUAttribStack;
 
 static GPUAttribStack state = {
-       .top = 0
+       .top = 0,
 };
 
 #define AttribStack state
index 5ab8086..d86d243 100644 (file)
@@ -75,7 +75,7 @@ typedef struct {
 static MatrixState state = {
        .model_view_stack = {{MATRIX_4X4_IDENTITY}, 0},
        .projection_stack = {{MATRIX_4X4_IDENTITY}, 0},
-       .dirty = true
+       .dirty = true,
 };
 
 #undef MATRIX_4X4_IDENTITY
index ca636d2..91060fd 100644 (file)
@@ -474,12 +474,12 @@ static int convert_i16(short x)
 
 GPUPackedNormal GPU_normal_convert_i10_v3(const float data[3])
 {
-       GPUPackedNormal n = { .x = quantize(data[0]), .y = quantize(data[1]), .z = quantize(data[2]) };
+       GPUPackedNormal n = { .x = quantize(data[0]), .y = quantize(data[1]), .z = quantize(data[2]), };
        return n;
 }
 
 GPUPackedNormal GPU_normal_convert_i10_s3(const short data[3])
 {
-       GPUPackedNormal n = { .x = convert_i16(data[0]), .y = convert_i16(data[1]), .z = convert_i16(data[2]) };
+       GPUPackedNormal n = { .x = convert_i16(data[0]), .y = convert_i16(data[1]), .z = convert_i16(data[2]), };
        return n;
 }
index 2b0bfb2..b1f9cfc 100644 (file)
@@ -2840,7 +2840,7 @@ int RNA_property_int_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
 bool RNA_property_int_set_default(PointerRNA *ptr, PropertyRNA *prop, int value)
 {
        if (value != 0) {
-               IDPropertyTemplate val = { .i = value };
+               IDPropertyTemplate val = { .i = value, };
                return rna_idproperty_ui_set_default(ptr, prop, IDP_INT, &val);
        }
        else {
@@ -3160,7 +3160,7 @@ float RNA_property_float_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
 bool RNA_property_float_set_default(PointerRNA *ptr, PropertyRNA *prop, float value)
 {
        if (value != 0) {
-               IDPropertyTemplate val = { .d = value };
+               IDPropertyTemplate val = { .d = value, };
                return rna_idproperty_ui_set_default(ptr, prop, IDP_DOUBLE, &val);
        }
        else {
@@ -7464,7 +7464,7 @@ bool RNA_property_copy(Main *bmain, PointerRNA *ptr, PointerRNA *fromptr, Proper
        IDOverrideStaticPropertyOperation opop = {
            .operation = IDOVERRIDESTATIC_OP_REPLACE,
            .subitem_reference_index = index,
-           .subitem_local_index = index
+           .subitem_local_index = index,
        };
        return rna_property_override_operation_apply(
                    bmain,
@@ -7937,7 +7937,7 @@ bool RNA_struct_override_matches(
                                                IDOverrideStaticPropertyOperation opop_tmp = {
                                                    .operation = IDOVERRIDESTATIC_OP_REPLACE,
                                                    .subitem_reference_index = -1,
-                                                   .subitem_local_index = -1
+                                                   .subitem_local_index = -1,
                                                };
                                                rna_property_override_operation_apply(
                                                            bmain,
index 1a06bf7..8f5705b 100644 (file)
@@ -123,19 +123,19 @@ static bToolRef *rna_WorkSpace_tools_from_tkey(WorkSpace *workspace, const bTool
 static bToolRef *rna_WorkSpace_tools_from_space_view3d_mode(
         WorkSpace *workspace, int mode, bool create)
 {
-       return rna_WorkSpace_tools_from_tkey(workspace, &(bToolKey){ .space_type = SPACE_VIEW3D, .mode = mode}, create);
+       return rna_WorkSpace_tools_from_tkey(workspace, &(bToolKey){ .space_type = SPACE_VIEW3D, .mode = mode}, create);
 }
 
 static bToolRef *rna_WorkSpace_tools_from_space_image_mode(
         WorkSpace *workspace, int mode, bool create)
 {
-       return rna_WorkSpace_tools_from_tkey(workspace, &(bToolKey){ .space_type = SPACE_IMAGE, .mode = mode}, create);
+       return rna_WorkSpace_tools_from_tkey(workspace, &(bToolKey){ .space_type = SPACE_IMAGE, .mode = mode}, create);
 }
 
 static bToolRef *rna_WorkSpace_tools_from_space_node(
         WorkSpace *workspace, bool create)
 {
-       return rna_WorkSpace_tools_from_tkey(workspace, &(bToolKey){ .space_type = SPACE_NODE, .mode = 0}, create);
+       return rna_WorkSpace_tools_from_tkey(workspace, &(bToolKey){ .space_type = SPACE_NODE, .mode = 0}, create);
 }
 
 const EnumPropertyItem *rna_WorkSpace_tools_mode_itemf(
index d4781e4..dd9e11f 100644 (file)
@@ -269,7 +269,7 @@ BLI_INLINE void sortPolyVertsTri(unsigned int *indices, const MLoop * const mloo
 
 BLI_INLINE unsigned int nearestVert(SDefBindCalcData * const data, const float point_co[3])
 {
-       BVHTreeNearest nearest = {.dist_sq = FLT_MAX, .index = -1};
+       BVHTreeNearest nearest = { .dist_sq = FLT_MAX, .index = -1, };
        const MPoly *poly;
        const MEdge *edge;
        const MLoop *loop;
@@ -976,18 +976,20 @@ static bool surfacedeformBind(
        smd->numverts = numverts;
        smd->numpoly = tnumpoly;
 
-       SDefBindCalcData data = {.treeData = &treeData,
-                                    .vert_edges = vert_edges,
-                                    .edge_polys = edge_polys,
-                                    .mpoly = mpoly,
-                                    .medge = medge,
-                                    .mloop = mloop,
-                                    .looptri = BKE_mesh_runtime_looptri_ensure(target),
-                                    .targetCos = MEM_malloc_arrayN(tnumverts, sizeof(float[3]), "SDefTargetBindVertArray"),
-                                    .bind_verts = smd->verts,
-                                    .vertexCos = vertexCos,
-                                    .falloff = smd->falloff,
-                                    .success = MOD_SDEF_BIND_RESULT_SUCCESS};
+       SDefBindCalcData data = {
+               .treeData = &treeData,
+               .vert_edges = vert_edges,
+               .edge_polys = edge_polys,
+               .mpoly = mpoly,
+               .medge = medge,
+               .mloop = mloop,
+               .looptri = BKE_mesh_runtime_looptri_ensure(target),
+               .targetCos = MEM_malloc_arrayN(tnumverts, sizeof(float[3]), "SDefTargetBindVertArray"),
+               .bind_verts = smd->verts,
+               .vertexCos = vertexCos,
+               .falloff = smd->falloff,
+               .success = MOD_SDEF_BIND_RESULT_SUCCESS,
+       };
 
        if (data.targetCos == NULL) {
                modifier_setError((ModifierData *)smd, "Out of memory");
index c051f51..5ba9232 100644 (file)
@@ -202,9 +202,11 @@ static Mesh *applyModifier(
        mloopuv = CustomData_duplicate_referenced_layer_named(&mesh->ldata, CD_MLOOPUV, uvname, numLoops);
        MOD_get_vgroup(ctx->object, mesh, umd->vgroup_name, &dvert, &defgrp_index);
 
-       UVWarpData data = {.mpoly = mpoly, .mloop = mloop, .mloopuv = mloopuv,
-                          .dvert = dvert, .defgrp_index = defgrp_index,
-                          .warp_mat = warp_mat, .axis_u = axis_u, .axis_v = axis_v};
+       UVWarpData data = {
+               .mpoly = mpoly, .mloop = mloop, .mloopuv = mloopuv,
+               .dvert = dvert, .defgrp_index = defgrp_index,
+               .warp_mat = warp_mat, .axis_u = axis_u, .axis_v = axis_v,
+       };
        ParallelRangeSettings settings;
        BLI_parallel_range_settings_defaults(&settings);
        settings.use_threading = (numPolys > 1000);
index 6a8fce7..0e113f8 100644 (file)
@@ -715,7 +715,7 @@ void ntreeGPUMaterialNodes(bNodeTree *localtree, GPUMaterial *mat, bool *has_sur
        /* TODO(fclem): consider moving this to the gpu shader tree evaluation. */
        nTreeTags tags = {
                .ssr_id = 1.0,
-               .sss_id = 1.0
+               .sss_id = 1.0,
        };
        ntree_shader_tag_nodes(localtree, output, &tags);
 
index a32acc7..632ae7c 100644 (file)
@@ -127,7 +127,7 @@ struct ApplicationState app_state = {
        },
        .exit_code_on_error = {
                .python = 0,
-       }
+       },
 };
 
 /* -------------------------------------------------------------------- */