diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-18 18:17:32 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-18 18:19:44 +0300 |
commit | 4439e5d0ba3ffde3841ec44405a9bcaf800be279 (patch) | |
tree | d0955d8e18d854603da54bed39c46ef9627c4736 /source/blender/editors | |
parent | 098f75897e3ddf4bb93f64cecb322d7370127419 (diff) |
Cleanup: add trailing commas to avoid right shift
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c | 6 | ||||
-rw-r--r-- | source/blender/editors/interface/interface.c | 18 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_draw.c | 14 | ||||
-rw-r--r-- | source/blender/editors/physics/particle_object.c | 10 | ||||
-rw-r--r-- | source/blender/editors/screen/area.c | 42 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_context.c | 96 | ||||
-rw-r--r-- | source/blender/editors/space_clip/tracking_ops_orient.c | 10 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_orientations.c | 6 | ||||
-rw-r--r-- | source/blender/editors/util/ed_util.c | 6 |
9 files changed, 113 insertions, 95 deletions
diff --git a/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c index 77658b8495e..ee1d3c8eba4 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c @@ -573,8 +573,10 @@ static void cage2d_draw_circle_handles(const rctf *r, } if (transform_flag & ED_GIZMO_CAGE2D_XFORM_FLAG_ROTATE) { - const float handle[2] = {BLI_rctf_cent_x(r), - r->ymax + (margin[1] * GIZMO_MARGIN_OFFSET_SCALE)}; + const float handle[2] = { + BLI_rctf_cent_x(r), + r->ymax + (margin[1] * GIZMO_MARGIN_OFFSET_SCALE), + }; circle_fn(pos, handle[0], handle[1], rad[0], rad[1], resolu); } diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index e6148ba8c93..3edf8e5135a 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1375,14 +1375,16 @@ static bool ui_but_event_property_operator_string(const bContext *C, * * --Matt 07/2006 */ -const char ui_radial_dir_order[8] = {UI_RADIAL_W, - UI_RADIAL_E, - UI_RADIAL_S, - UI_RADIAL_N, - UI_RADIAL_NW, - UI_RADIAL_NE, - UI_RADIAL_SW, - UI_RADIAL_SE}; +const char ui_radial_dir_order[8] = { + UI_RADIAL_W, + UI_RADIAL_E, + UI_RADIAL_S, + UI_RADIAL_N, + UI_RADIAL_NW, + UI_RADIAL_NE, + UI_RADIAL_SW, + UI_RADIAL_SE, +}; const char ui_radial_dir_to_numpad[8] = {8, 9, 6, 3, 2, 1, 4, 7}; const short ui_radial_dir_to_angle[8] = {90, 45, 0, 315, 270, 225, 180, 135}; diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index efc748d39a1..671a004f9fe 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -1333,12 +1333,14 @@ void ui_draw_but_VECTORSCOPE(ARegion *UNUSED(ar), const float skin_rad = DEG2RADF(123.0f); /* angle in radians of the skin tone line */ Scopes *scopes = (Scopes *)but->poin; - const float colors[6][3] = {{0.75, 0.0, 0.0}, - {0.75, 0.75, 0.0}, - {0.0, 0.75, 0.0}, - {0.0, 0.75, 0.75}, - {0.0, 0.0, 0.75}, - {0.75, 0.0, 0.75}}; + const float colors[6][3] = { + {0.75, 0.0, 0.0}, + {0.75, 0.75, 0.0}, + {0.0, 0.75, 0.0}, + {0.0, 0.75, 0.75}, + {0.0, 0.0, 0.75}, + {0.75, 0.0, 0.75}, + }; rctf rect = { .xmin = (float)recti->xmin + 1, diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index b05dac83716..4320760cf96 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -69,10 +69,12 @@ #include "physics_intern.h" -static float I[4][4] = {{1.0f, 0.0f, 0.0f, 0.0f}, - {0.0f, 1.0f, 0.0f, 0.0f}, - {0.0f, 0.0f, 1.0f, 0.0f}, - {0.0f, 0.0f, 0.0f, 1.0f}}; +static float I[4][4] = { + {1.0f, 0.0f, 0.0f, 0.0f}, + {0.0f, 1.0f, 0.0f, 0.0f}, + {0.0f, 0.0f, 1.0f, 0.0f}, + {0.0f, 0.0f, 0.0f, 1.0f}, +}; /********************** particle system slot operators *********************/ diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index b4ea97d6e04..1aa54bcd8b5 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -776,26 +776,28 @@ static void area_azone_initialize(wmWindow *win, const bScreen *screen, ScrArea return; } - float coords[4][4] = {/* Bottom-left. */ - {sa->totrct.xmin - U.pixelsize, - sa->totrct.ymin - U.pixelsize, - sa->totrct.xmin + AZONESPOTW, - sa->totrct.ymin + AZONESPOTH}, - /* Bottom-right. */ - {sa->totrct.xmax - AZONESPOTW, - sa->totrct.ymin - U.pixelsize, - sa->totrct.xmax + U.pixelsize, - sa->totrct.ymin + AZONESPOTH}, - /* Top-left. */ - {sa->totrct.xmin - U.pixelsize, - sa->totrct.ymax - AZONESPOTH, - sa->totrct.xmin + AZONESPOTW, - sa->totrct.ymax + U.pixelsize}, - /* Top-right. */ - {sa->totrct.xmax - AZONESPOTW, - sa->totrct.ymax - AZONESPOTH, - sa->totrct.xmax + U.pixelsize, - sa->totrct.ymax + U.pixelsize}}; + float coords[4][4] = { + /* Bottom-left. */ + {sa->totrct.xmin - U.pixelsize, + sa->totrct.ymin - U.pixelsize, + sa->totrct.xmin + AZONESPOTW, + sa->totrct.ymin + AZONESPOTH}, + /* Bottom-right. */ + {sa->totrct.xmax - AZONESPOTW, + sa->totrct.ymin - U.pixelsize, + sa->totrct.xmax + U.pixelsize, + sa->totrct.ymin + AZONESPOTH}, + /* Top-left. */ + {sa->totrct.xmin - U.pixelsize, + sa->totrct.ymax - AZONESPOTH, + sa->totrct.xmin + AZONESPOTW, + sa->totrct.ymax + U.pixelsize}, + /* Top-right. */ + {sa->totrct.xmax - AZONESPOTW, + sa->totrct.ymax - AZONESPOTH, + sa->totrct.xmax + U.pixelsize, + sa->totrct.ymax + U.pixelsize}, + }; for (int i = 0; i < 4; i++) { /* can't click on bottom corners on OS X, already used for resizing */ diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index 719403531ff..d26907cdd3f 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -65,53 +65,55 @@ #include "screen_intern.h" -const char *screen_context_dir[] = {"scene", - "view_layer", - "visible_objects", - "visible_bases", - "selectable_objects", - "selectable_bases", - "selected_objects", - "selected_bases", - "editable_objects", - "editable_bases", - "selected_editable_objects", - "selected_editable_bases", - "objects_in_mode", - "objects_in_mode_unique_data", - "visible_bones", - "editable_bones", - "selected_bones", - "selected_editable_bones", - "visible_pose_bones", - "selected_pose_bones", - "selected_pose_bones_from_active_object", - "active_bone", - "active_pose_bone", - "active_base", - "active_object", - "object", - "edit_object", - "sculpt_object", - "vertex_paint_object", - "weight_paint_object", - "image_paint_object", - "particle_edit_object", - "uv_sculpt_object", - "pose_object", - "sequences", - "selected_sequences", - "selected_editable_sequences", /* sequencer */ - "gpencil_data", - "gpencil_data_owner", /* grease pencil data */ - "visible_gpencil_layers", - "editable_gpencil_layers", - "editable_gpencil_strokes", - "active_gpencil_layer", - "active_gpencil_frame", - "active_operator", - "selected_editable_fcurves", - NULL}; +const char *screen_context_dir[] = { + "scene", + "view_layer", + "visible_objects", + "visible_bases", + "selectable_objects", + "selectable_bases", + "selected_objects", + "selected_bases", + "editable_objects", + "editable_bases", + "selected_editable_objects", + "selected_editable_bases", + "objects_in_mode", + "objects_in_mode_unique_data", + "visible_bones", + "editable_bones", + "selected_bones", + "selected_editable_bones", + "visible_pose_bones", + "selected_pose_bones", + "selected_pose_bones_from_active_object", + "active_bone", + "active_pose_bone", + "active_base", + "active_object", + "object", + "edit_object", + "sculpt_object", + "vertex_paint_object", + "weight_paint_object", + "image_paint_object", + "particle_edit_object", + "uv_sculpt_object", + "pose_object", + "sequences", + "selected_sequences", + "selected_editable_sequences", /* sequencer */ + "gpencil_data", + "gpencil_data_owner", /* grease pencil data */ + "visible_gpencil_layers", + "editable_gpencil_layers", + "editable_gpencil_strokes", + "active_gpencil_layer", + "active_gpencil_frame", + "active_operator", + "selected_editable_fcurves", + NULL, +}; int ed_screen_context(const bContext *C, const char *member, bContextDataResult *result) { diff --git a/source/blender/editors/space_clip/tracking_ops_orient.c b/source/blender/editors/space_clip/tracking_ops_orient.c index e13598b0322..6efc80c5c05 100644 --- a/source/blender/editors/space_clip/tracking_ops_orient.c +++ b/source/blender/editors/space_clip/tracking_ops_orient.c @@ -399,10 +399,12 @@ static int set_plane_exec(bContext *C, wmOperator *op) int tot = 0; float vec[3][3], mat[4][4], obmat[4][4], newmat[4][4], orig[3] = {0.0f, 0.0f, 0.0f}; int plane = RNA_enum_get(op->ptr, "plane"); - float rot[4][4] = {{0.0f, 0.0f, -1.0f, 0.0f}, - {0.0f, 1.0f, 0.0f, 0.0f}, - {1.0f, 0.0f, 0.0f, 0.0f}, - {0.0f, 0.0f, 0.0f, 1.0f}}; /* 90 degrees Y-axis rotation matrix */ + float rot[4][4] = { + {0.0f, 0.0f, -1.0f, 0.0f}, + {0.0f, 1.0f, 0.0f, 0.0f}, + {1.0f, 0.0f, 0.0f, 0.0f}, + {0.0f, 0.0f, 0.0f, 1.0f}, + }; /* 90 degrees Y-axis rotation matrix */ if (count_selected_bundles(C) != 3) { BKE_report(op->reports, RPT_ERROR, "Three tracks with bundles are needed to orient the floor"); diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 8b4c1c30959..c0770392eff 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -780,8 +780,10 @@ int getTransformOrientation_ex(const bContext *C, if (BM_vert_edge_pair(v, &e_pair[0], &e_pair[1])) { bool v_pair_swap = false; - BMVert *v_pair[2] = {BM_edge_other_vert(e_pair[0], v), - BM_edge_other_vert(e_pair[1], v)}; + BMVert *v_pair[2] = { + BM_edge_other_vert(e_pair[0], v), + BM_edge_other_vert(e_pair[1], v), + }; float dir_pair[2][3]; if (BM_edge_is_boundary(e_pair[0])) { diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index 503910d1734..ccaa0d68475 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -391,8 +391,10 @@ void ED_region_draw_mouse_line_cb(const bContext *C, ARegion *ar, void *arg_info { wmWindow *win = CTX_wm_window(C); const float *mval_src = (float *)arg_info; - const float mval_dst[2] = {win->eventstate->x - ar->winrct.xmin, - win->eventstate->y - ar->winrct.ymin}; + const float mval_dst[2] = { + win->eventstate->x - ar->winrct.xmin, + win->eventstate->y - ar->winrct.ymin, + }; const uint shdr_pos = GPU_vertformat_attr_add( immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); |