diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-10-22 17:03:31 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-10-22 17:06:15 +0300 |
commit | 0a38352588f031e5299c84e13991c078bef4dd5d (patch) | |
tree | 6d05fe5c51b9a4ff740cd25bff308ecd88e48bba | |
parent | dc0ce14316a1c68be9bd94eb7919f2b389b176f9 (diff) |
Cleanup: clang-format, trailing space
-rw-r--r-- | intern/CMakeLists.txt | 1 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 4 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_primitive.c | 23 | ||||
-rw-r--r-- | tests/gtests/blenlib/BLI_kdopbvh_test.cc | 5 |
4 files changed, 20 insertions, 13 deletions
diff --git a/intern/CMakeLists.txt b/intern/CMakeLists.txt index 4493c68a88d..e6b561c39b9 100644 --- a/intern/CMakeLists.txt +++ b/intern/CMakeLists.txt @@ -80,4 +80,3 @@ endif() if(WITH_QUADRIFLOW) add_subdirectory(quadriflow) endif() - diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index ff5d2565c26..81f2ff4b53c 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1357,7 +1357,7 @@ class _defs_gpencil_paint: cursor='CROSSHAIR', widget=None, keymap=(), - ) + ) @ToolDef.from_fn def box(): @@ -1401,7 +1401,7 @@ class _defs_gpencil_paint: cursor='CROSSHAIR', widget=None, keymap=(), - ) + ) @ToolDef.from_fn def eyedropper(): diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c index bf7b2edb025..e19be2fe086 100644 --- a/source/blender/editors/gpencil/gpencil_primitive.c +++ b/source/blender/editors/gpencil/gpencil_primitive.c @@ -206,7 +206,7 @@ static void gpencil_primitive_constrain(tGPDprimitive *tgpi, bool line_mode) else { gpencil_primitive_to_square(tgpi, x, y); } - } +} /* Helper to rotate point around origin */ static void gp_rotate_v2_v2v2fl(float v[2], @@ -458,7 +458,12 @@ static void gpencil_primitive_status_indicators(bContext *C, tGPDprimitive *tgpi UI_MAX_DRAW_STR); } - if (ELEM(tgpi->type, GP_STROKE_CIRCLE, GP_STROKE_ARC, GP_STROKE_LINE, GP_STROKE_BOX, GP_STROKE_POLYLINE)) { + if (ELEM(tgpi->type, + GP_STROKE_CIRCLE, + GP_STROKE_ARC, + GP_STROKE_LINE, + GP_STROKE_BOX, + GP_STROKE_POLYLINE)) { if (hasNumInput(&tgpi->num)) { char str_offs[NUM_STR_REP_LEN]; @@ -1386,7 +1391,7 @@ static void gpencil_primitive_edit_event_handling( copy_v2_v2(tgpi->start, tgpi->end); copy_v2_v2(tgpi->origin, tgpi->start); gp_primitive_update_cps(tgpi); - + tgpi->flag = IN_POLYLINE; WM_cursor_modal_set(win, WM_CURSOR_CROSS); } @@ -1395,7 +1400,7 @@ static void gpencil_primitive_edit_event_handling( gp_primitive_update_cps(tgpi); gpencil_primitive_update(C, op, tgpi); } - } + } else if ((event->val == KM_PRESS) && !ELEM(tgpi->type, GP_STROKE_POLYLINE)) { /* find nearest cp based on stroke end points */ if (move == MOVE_ENDS) { @@ -1580,9 +1585,9 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e return OPERATOR_RUNNING_MODAL; } else if (tgpi->flag == IN_POLYLINE) { - + switch (event->type) { - + case ESCKEY: { /* return to normal cursor and header status */ ED_workspace_status_text(C, NULL); @@ -1598,7 +1603,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e if (event->val == KM_PRESS) { WM_cursor_modal_set(win, WM_CURSOR_CROSS); gpencil_primitive_add_segment(tgpi); - + gpencil_primitive_update(C, op, tgpi); copy_v2_v2(tgpi->start, tgpi->end); copy_v2_v2(tgpi->origin, tgpi->end); @@ -1607,7 +1612,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e } case SPACEKEY: /* confirm */ case MIDDLEMOUSE: - case RETKEY: + case RETKEY: case RIGHTMOUSE: { if (event->val == KM_PRESS) { tgpi->flag = IDLE; @@ -1665,7 +1670,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e break; } } - + copy_v2_v2(tgpi->mvalo, tgpi->mval); return OPERATOR_RUNNING_MODAL; } diff --git a/tests/gtests/blenlib/BLI_kdopbvh_test.cc b/tests/gtests/blenlib/BLI_kdopbvh_test.cc index ac0d477ee14..7e32c545e75 100644 --- a/tests/gtests/blenlib/BLI_kdopbvh_test.cc +++ b/tests/gtests/blenlib/BLI_kdopbvh_test.cc @@ -50,7 +50,10 @@ TEST(kdopbvh, Single) BLI_bvhtree_free(tree); } -static void optimal_check_callback(void *userdata, int index, const float co[3], BVHTreeNearest *nearest) +static void optimal_check_callback(void *userdata, + int index, + const float co[3], + BVHTreeNearest *nearest) { float(*points)[3] = (float(*)[3])userdata; |