diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-06 16:58:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-07 01:15:07 +0300 |
commit | b4a77a351e31256c91e573b85b7252e3ca6d61e7 (patch) | |
tree | 9db5ba44e217789f632f90d44babafa4aea1da5f /source/blender/editors/space_view3d | |
parent | d5c24f2030ecbd109f54bd49c254fd028c30cc00 (diff) |
Cleanup: add trailing commas to structs
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 20 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_gizmo_camera.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_view.c | 12 |
3 files changed, 21 insertions, 15 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 4ac2121c7a4..0586f11452a 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -2659,12 +2659,13 @@ static void view3d_from_minmax( C, v3d, ar, smooth_viewtx, &(const V3D_SmoothParams) { .camera_old = v3d->camera, .ofs = new_ofs, - .dist = ok_dist ? &new_dist : NULL}); + .dist = ok_dist ? &new_dist : NULL, + }); } else { ED_view3d_smooth_view( C, v3d, ar, smooth_viewtx, - &(const V3D_SmoothParams) {.ofs = new_ofs, .dist = ok_dist ? &new_dist : NULL}); + &(const V3D_SmoothParams) { .ofs = new_ofs, .dist = ok_dist ? &new_dist : NULL, }); } /* smooth view does viewlock RV3D_BOXVIEW copy */ @@ -3497,7 +3498,7 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op) ED_view3d_smooth_view( C, v3d, ar, smooth_viewtx, - &(const V3D_SmoothParams) {.ofs = new_ofs, .dist = &new_dist}); + &(const V3D_SmoothParams) { .ofs = new_ofs, .dist = &new_dist, }); if (rv3d->viewlock & RV3D_BOXVIEW) { view3d_boxview_sync(CTX_wm_area(C), ar); @@ -3642,7 +3643,7 @@ static void axis_set_view( /* to camera */ ED_view3d_smooth_view( C, v3d, ar, smooth_viewtx, - &(const V3D_SmoothParams) {.camera_old = v3d->camera, .ofs = rv3d->ofs, .quat = quat}); + &(const V3D_SmoothParams) { .camera_old = v3d->camera, .ofs = rv3d->ofs, .quat = quat, }); } else if (orig_persp == RV3D_CAMOB && v3d->camera) { /* from camera */ @@ -3657,7 +3658,7 @@ static void axis_set_view( ED_view3d_smooth_view( C, v3d, ar, smooth_viewtx, - &(const V3D_SmoothParams) {.ofs = ofs, .quat = quat, .dist = &dist}); + &(const V3D_SmoothParams) { .ofs = ofs, .quat = quat, .dist = &dist, }); } else { /* rotate around selection */ @@ -3674,7 +3675,7 @@ static void axis_set_view( /* no camera involved */ ED_view3d_smooth_view( C, v3d, ar, smooth_viewtx, - &(const V3D_SmoothParams) {.quat = quat, .dyn_ofs = dyn_ofs_pt}); + &(const V3D_SmoothParams) { .quat = quat, .dyn_ofs = dyn_ofs_pt, }); } } @@ -3872,7 +3873,8 @@ static int view_camera_exec(bContext *C, wmOperator *op) C, v3d, ar, smooth_viewtx, &(const V3D_SmoothParams) { .camera = v3d->camera, .ofs = rv3d->ofs, .quat = rv3d->viewquat, - .dist = &rv3d->dist, .lens = &v3d->lens}); + .dist = &rv3d->dist, .lens = &v3d->lens, + }); } else { /* return to settings of last view */ @@ -3998,7 +4000,7 @@ static int vieworbit_exec(bContext *C, wmOperator *op) ED_view3d_smooth_view( C, v3d, ar, smooth_viewtx, - &(const V3D_SmoothParams) {.quat = quat_new, .dyn_ofs = dyn_ofs_pt}); + &(const V3D_SmoothParams) { .quat = quat_new, .dyn_ofs = dyn_ofs_pt, }); return OPERATOR_FINISHED; } @@ -4188,7 +4190,7 @@ static int viewroll_exec(bContext *C, wmOperator *op) ED_view3d_smooth_view( C, v3d, ar, smooth_viewtx, - &(const V3D_SmoothParams) {.quat = quat_new, .dyn_ofs = dyn_ofs_pt}); + &(const V3D_SmoothParams) { .quat = quat_new, .dyn_ofs = dyn_ofs_pt, }); viewops_data_free(C, op); return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_view3d/view3d_gizmo_camera.c b/source/blender/editors/space_view3d/view3d_gizmo_camera.c index bf37f9c3b49..6d6f3700c29 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_camera.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_camera.c @@ -348,7 +348,7 @@ static void gizmo_render_border_prop_matrix_set( BLI_rctf_resize(border, len_v3(matrix[0]), len_v3(matrix[1])); BLI_rctf_recenter(border, matrix[3][0], matrix[3][1]); - BLI_rctf_isect(&(rctf){.xmin = 0, .ymin = 0, .xmax = 1, .ymax = 1}, border, border); + BLI_rctf_isect(&(rctf){ .xmin = 0, .ymin = 0, .xmax = 1, .ymax = 1, }, border, border); } static bool WIDGETGROUP_camera_view_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt)) @@ -416,7 +416,7 @@ static void WIDGETGROUP_camera_view_draw_prepare(const bContext *C, wmGizmoGroup ED_view3d_calc_camera_border(scene, depsgraph, ar, v3d, rv3d, &viewgroup->state.view_border, false); } else { - viewgroup->state.view_border = (rctf){.xmin = 0, .ymin = 0, .xmax = ar->winx, .ymax = ar->winy}; + viewgroup->state.view_border = (rctf){ .xmin = 0, .ymin = 0, .xmax = ar->winx, .ymax = ar->winy, }; } wmGizmo *gz = viewgroup->border; diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index e3b31a65aec..24143c31463 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -605,7 +605,8 @@ static void sync_viewport_camera_smoothview(bContext *C, View3D *v3d, Object *ob .ofs = other_rv3d->ofs, .quat = other_rv3d->viewquat, .dist = &other_rv3d->dist, - .lens = &other_v3d->lens}); + .lens = &other_v3d->lens, + }); } else { other_v3d->camera = ob; @@ -651,7 +652,8 @@ static int view3d_setobjectascamera_exec(bContext *C, wmOperator *op) &(const V3D_SmoothParams) { .camera_old = camera_old, .camera = v3d->camera, .ofs = rv3d->ofs, .quat = rv3d->viewquat, - .dist = &rv3d->dist, .lens = &v3d->lens}); + .dist = &rv3d->dist, .lens = &v3d->lens, + }); } if (v3d->scenelock) { @@ -1245,7 +1247,8 @@ static bool view3d_localview_init( &(const V3D_SmoothParams) { .camera_old = camera_old, .ofs = ofs_new, .quat = rv3d->viewquat, - .dist = ok_dist ? &dist_new : NULL, .lens = &v3d->lens}); + .dist = ok_dist ? &dist_new : NULL, .lens = &v3d->lens, + }); } } @@ -1303,7 +1306,8 @@ static void restore_localviewdata( &(const V3D_SmoothParams) { .camera_old = camera_old_rv3d, .camera = camera_new_rv3d, .ofs = rv3d->localvd->ofs, .quat = rv3d->localvd->viewquat, - .dist = &rv3d->localvd->dist}); + .dist = &rv3d->localvd->dist, + }); if (free) { MEM_freeN(rv3d->localvd); |