diff options
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/drawgpencil.c | 34 | ||||
-rw-r--r-- | source/blender/editors/gpencil/editaction_gpencil.c | 12 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_brush.c | 10 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_convert.c | 4 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 4 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 42 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_select.c | 12 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_undo.c | 4 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 4 |
9 files changed, 63 insertions, 63 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 338fac03fef..f4d4ce7fb63 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -573,7 +573,7 @@ static void gp_draw_stroke_point( gp_calc_2d_stroke_fxy(fpt, sflag, offsx, offsy, winx, winy, co); /* if thickness is less than GP_DRAWTHICKNESS_SPECIAL, simple dot looks ok - * - also mandatory in if Image Editor 'image-based' dot + * - also mandatory in if Image Editor 'image-based' dot */ if ((thickness < GP_DRAWTHICKNESS_SPECIAL) || ((dflag & GP_DRAWDATA_IEDITHACK) && (sflag & GP_STROKE_2DSPACE))) @@ -723,7 +723,7 @@ static void gp_draw_stroke_2d(bGPDspoint *points, int totpoints, short thickness /* if the first segment, start of segment is segment's normal */ if (i == 0) { /* draw start cap first - * - make points slightly closer to center (about halfway across) + * - make points slightly closer to center (about halfway across) */ mt[0] = m2[0] * pthick * 0.5f; mt[1] = m2[1] * pthick * 0.5f; @@ -764,8 +764,8 @@ static void gp_draw_stroke_2d(bGPDspoint *points, int totpoints, short thickness normalize_v2(mb); /* calculate gradient to apply - * - as basis, use just pthick * bisector gradient - * - if cross-section not as thick as it should be, add extra padding to fix it + * - as basis, use just pthick * bisector gradient + * - if cross-section not as thick as it should be, add extra padding to fix it */ mt[0] = mb[0] * pthick; mt[1] = mb[1] * pthick; @@ -815,7 +815,7 @@ static void gp_draw_stroke_2d(bGPDspoint *points, int totpoints, short thickness /* draw end cap as last step - * - make points slightly closer to center (about halfway across) + * - make points slightly closer to center (about halfway across) */ mt[0] = m2[0] * pthick * 0.5f; mt[1] = m2[1] * pthick * 0.5f; @@ -1407,11 +1407,11 @@ static void gp_draw_data_layers( #undef GP_DRAWFLAG_APPLY /* Draw 'onionskins' (frame left + right) - * - It is only possible to show these if the option is enabled - * - The "no onions" flag prevents ghosts from appearing during animation playback/scrubbing - * and in renders - * - The per-layer "always show" flag however overrides the playback/render restriction, - * allowing artists to selectively turn onionskins on/off during playback + * - It is only possible to show these if the option is enabled + * - The "no onions" flag prevents ghosts from appearing during animation playback/scrubbing + * and in renders + * - The per-layer "always show" flag however overrides the playback/render restriction, + * allowing artists to selectively turn onionskins on/off during playback */ if ((gpl->flag & GP_LAYER_ONIONSKIN) && ((dflag & GP_DRAWDATA_NO_ONIONS) == 0 || (gpl->flag & GP_LAYER_GHOST_ALWAYS))) @@ -1427,11 +1427,11 @@ static void gp_draw_data_layers( gpl->opacity, gpl->tintcolor, false, false, diff_mat); /* Draw verts of selected strokes - * - when doing OpenGL renders, we don't want to be showing these, as that ends up flickering - * - locked layers can't be edited, so there's no point showing these verts - * as they will have no bearings on what gets edited - * - only show when in editmode, since operators shouldn't work otherwise - * (NOTE: doing it this way means that the toggling editmode shows visible change immediately) + * - when doing OpenGL renders, we don't want to be showing these, as that ends up flickering + * - locked layers can't be edited, so there's no point showing these verts + * as they will have no bearings on what gets edited + * - only show when in editmode, since operators shouldn't work otherwise + * (NOTE: doing it this way means that the toggling editmode shows visible change immediately) */ /* XXX: perhaps we don't want to show these when users are drawing... */ if ((G.f & G_RENDER_OGL) == 0 && @@ -1590,8 +1590,8 @@ static void gp_draw_data_all(Scene *scene, bGPdata *gpd, int offsx, int offsy, i /* ............................ * XXX - * We need to review the calls below, since they may be/are not that suitable for - * the new ways that we intend to be drawing data... + * We need to review the calls below, since they may be/are not that suitable for + * the new ways that we intend to be drawing data... * ............................ */ /* draw grease-pencil sketches to specified 2d-view that uses ibuf corrections */ diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c index 9d9ec51119b..3a3953579a6 100644 --- a/source/blender/editors/gpencil/editaction_gpencil.c +++ b/source/blender/editors/gpencil/editaction_gpencil.c @@ -308,10 +308,10 @@ void ED_gplayer_frames_keytype_set(bGPDlayer *gpl, short type) /* -------------------------------------- */ /* Copy and Paste Tools */ /* - The copy/paste buffer currently stores a set of GP_Layers, with temporary - * GP_Frames with the necessary strokes + * GP_Frames with the necessary strokes * - Unless there is only one element in the buffer, names are also tested to check for compatibility. * - All pasted frames are offset by the same amount. This is calculated as the difference in the times of - * the current frame and the 'first keyframe' (i.e. the earliest one in all channels). + * the current frame and the 'first keyframe' (i.e. the earliest one in all channels). * - The earliest frame is calculated per copy operation. */ @@ -483,10 +483,10 @@ bool ED_gpencil_anim_copybuf_paste(bAnimContext *ac, const short offset_mode) /* This should be the right frame... as it may be a pre-existing frame, * must make sure that only compatible stroke types get copied over - * - We cannot just add a duplicate frame, as that would cause errors - * - For now, we don't check if the types will be compatible since we - * don't have enough info to do so. Instead, we simply just paste, - * af it works, it will show up. + * - We cannot just add a duplicate frame, as that would cause errors + * - For now, we don't check if the types will be compatible since we + * don't have enough info to do so. Instead, we simply just paste, + * if it works, it will show up. */ for (gps = gpfs->strokes.first; gps; gps = gps->next) { /* make a copy of stroke, then of its points array */ diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c index 228a2afeb83..a5c6fd8b8cf 100644 --- a/source/blender/editors/gpencil/gpencil_brush.c +++ b/source/blender/editors/gpencil/gpencil_brush.c @@ -539,9 +539,9 @@ static bool gp_brush_pinch_apply(tGP_BrushEditData *gso, bGPDstroke *gps, int i, float vec[3]; /* Scale down standard influence value to get it more manageable... - * - No damping = Unmanageable at > 0.5 strength - * - Div 10 = Not enough effect - * - Div 5 = Happy medium... (by trial and error) + * - No damping = Unmanageable at > 0.5 strength + * - Div 10 = Not enough effect + * - Div 5 = Happy medium... (by trial and error) */ inf = gp_brush_influence_calc(gso, radius, co) / 5.0f; @@ -1253,7 +1253,7 @@ static bool gpsculpt_brush_do_stroke( } else { /* Loop over the points in the stroke, checking for intersections - * - an intersection means that we touched the stroke + * - an intersection means that we touched the stroke */ for (i = 0; (i + 1) < gps->totpoints; i++) { /* Get points to work with */ @@ -1287,7 +1287,7 @@ static bool gpsculpt_brush_do_stroke( { /* Check if point segment of stroke had anything to do with * brush region (either within stroke painted, or on its lines) - * - this assumes that linewidth is irrelevant + * - this assumes that linewidth is irrelevant */ if (gp_stroke_inside_circle(gso->mval, gso->mval_prev, radius, pc1[0], pc1[1], pc2[0], pc2[1])) { /* Apply operation to these points */ diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c index e0c2e116b8a..9f94cf3beb8 100644 --- a/source/blender/editors/gpencil/gpencil_convert.c +++ b/source/blender/editors/gpencil/gpencil_convert.c @@ -141,7 +141,7 @@ static const EnumPropertyItem *rna_GPConvert_mode_items(bContext *UNUSED(C), Poi /* --- */ /* convert the coordinates from the given stroke point into 3d-coordinates - * - assumes that the active space is the 3D-View + * - assumes that the active space is the 3D-View */ static void gp_strokepoint_convertcoords( bContext *C, bGPDlayer *gpl, bGPDstroke *gps, bGPDspoint *source_pt, @@ -1150,7 +1150,7 @@ static void gp_layer_to_curve(bContext *C, ReportList *reports, bGPdata *gpd, bG } /* init the curve object (remove rotation and get curve data from it) - * - must clear transforms set on object, as those skew our results + * - must clear transforms set on object, as those skew our results */ ob = BKE_object_add_only_object(bmain, OB_CURVE, gpl->info); cu = ob->data = BKE_curve_add(bmain, gpl->info, OB_CURVE); diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 936cf571b4a..2c87bd86da1 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -2091,8 +2091,8 @@ typedef enum eGP_ReprojectModes { static bool gp_strokes_reproject_poll(bContext *C) { /* 2 Requirements: - * - 1) Editable GP data - * - 2) 3D View only (2D editors don't have projection issues) + * - 1) Editable GP data + * - 2) 3D View only (2D editors don't have projection issues) */ return (gp_stroke_edit_poll(C) && ED_operator_view3d_active(C)); } diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 0eb74f137ca..27cde27fdf7 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -241,7 +241,7 @@ static void gp_get_3d_reference(tGPsdata *p, float vec[3]) Object *ob = (Object *)p->ownerPtr.data; /* active Object - * - use relative distance of 3D-cursor from object center + * - use relative distance of 3D-cursor from object center */ sub_v3_v3v3(vec, fp, ob->loc); } @@ -266,14 +266,14 @@ static bool gp_stroke_filtermval(tGPsdata *p, const int mval[2], int pmval[2]) return true; /* check if mouse moved at least certain distance on both axes (best case) - * - aims to eliminate some jitter-noise from input when trying to draw straight lines freehand + * - aims to eliminate some jitter-noise from input when trying to draw straight lines freehand */ else if ((dx > MIN_MANHATTEN_PX) && (dy > MIN_MANHATTEN_PX)) return true; /* check if the distance since the last point is significant enough - * - prevents points being added too densely - * - distance here doesn't use sqrt to prevent slowness... we should still be safe from overflows though + * - prevents points being added too densely + * - distance here doesn't use sqrt to prevent slowness... we should still be safe from overflows though */ else if ((dx * dx + dy * dy) > MIN_EUCLIDEAN_PX * MIN_EUCLIDEAN_PX) return true; @@ -351,7 +351,7 @@ static void gp_stroke_convertcoords(tGPsdata *p, const int mval[2], float out[3] if (gpd->sbuffer_sflag & GP_STROKE_3DSPACE) { if (gpencil_project_check(p) && (ED_view3d_autodist_simple(p->ar, mval, out, 0, depth))) { /* projecting onto 3D-Geometry - * - nothing more needs to be done here, since view_autodist_simple() has already done it + * - nothing more needs to be done here, since view_autodist_simple() has already done it */ } else { @@ -365,8 +365,8 @@ static void gp_stroke_convertcoords(tGPsdata *p, const int mval[2], float out[3] * works OK, but it could of course be improved. * * TODO: - * - investigate using nearest point(s) on a previous stroke as - * reference point instead or as offset, for easier stroke matching + * - investigate using nearest point(s) on a previous stroke as + * reference point instead or as offset, for easier stroke matching */ gp_get_3d_reference(p, rvec); @@ -507,7 +507,7 @@ static short gp_stroke_addpoint(tGPsdata *p, const int mval[2], float pressure, } else { /* just reset the endpoint to the latest value - * - assume that pointers for this are always valid... + * - assume that pointers for this are always valid... */ pt = ((tGPspoint *)(gpd->sbuffer) + 1); @@ -673,8 +673,8 @@ static short gp_stroke_addpoint(tGPsdata *p, const int mval[2], float pressure, } /* simplify a stroke (in buffer) before storing it - * - applies a reverse Chaikin filter - * - code adapted from etch-a-ton branch (editarmature_sketch.c) + * - applies a reverse Chaikin filter + * - code adapted from etch-a-ton branch (editarmature_sketch.c) */ static void gp_stroke_simplify(tGPsdata *p) { @@ -693,15 +693,15 @@ static void gp_stroke_simplify(tGPsdata *p) return; /* clear buffer (but don't free mem yet) so that we can write to it - * - firstly set sbuffer to NULL, so a new one is allocated - * - secondly, reset flag after, as it gets cleared auto + * - firstly set sbuffer to NULL, so a new one is allocated + * - secondly, reset flag after, as it gets cleared auto */ gpd->sbuffer = NULL; gp_session_validatebuffer(p); gpd->sbuffer_sflag = flag; /* macro used in loop to get position of new point - * - used due to the mixture of datatypes in use here + * - used due to the mixture of datatypes in use here */ #define GP_SIMPLIFY_AVPOINT(offs, sfac) \ { \ @@ -763,7 +763,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p) int depth_margin = (ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE) ? 4 : 0; /* get total number of points to allocate space for - * - drawing straight-lines only requires the endpoints + * - drawing straight-lines only requires the endpoints */ if (p->paintmode == GP_PAINTMODE_DRAW_STRAIGHT) totelem = (gpd->sbuffer_size >= 2) ? 2 : gpd->sbuffer_size; @@ -1189,7 +1189,7 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p, { /* Check if point segment of stroke had anything to do with * eraser region (either within stroke painted, or on its lines) - * - this assumes that linewidth is irrelevant + * - this assumes that linewidth is irrelevant */ if (gp_stroke_inside_circle(mval, mvalo, radius, pc1[0], pc1[1], pc2[0], pc2[1])) { if ((gp_stroke_eraser_is_occluded(p, pt1, pc1[0], pc1[1]) == false) || @@ -1197,8 +1197,8 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p, { /* Point is affected: */ /* 1) Adjust thickness - * - Influence of eraser falls off with distance from the middle of the eraser - * - Second point gets less influence, as it might get hit again in the next segment + * - Influence of eraser falls off with distance from the middle of the eraser + * - Second point gets less influence, as it might get hit again in the next segment */ pt1->pressure -= gp_stroke_eraser_calc_influence(p, mval, radius, pc1) * strength; pt2->pressure -= gp_stroke_eraser_calc_influence(p, mval, radius, pc2) * strength / 2.0f; @@ -1411,7 +1411,7 @@ static bool gp_session_initdata(bContext *C, tGPsdata *p) /* RegionView3D *rv3d = ar->regiondata; */ /* set current area - * - must verify that region data is 3D-view (and not something else) + * - must verify that region data is 3D-view (and not something else) */ /* CAUTION: If this is the "toolbar", then this will change on the first stroke */ p->sa = curarea; @@ -2488,9 +2488,9 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) } /* toggle painting mode upon mouse-button movement - * - LEFTMOUSE = standard drawing (all) / straight line drawing (all) / polyline (toolbox only) - * - RIGHTMOUSE = polyline (hotkey) / eraser (all) - * (Disabling RIGHTMOUSE case here results in bugs like [#32647]) + * - LEFTMOUSE = standard drawing (all) / straight line drawing (all) / polyline (toolbox only) + * - RIGHTMOUSE = polyline (hotkey) / eraser (all) + * (Disabling RIGHTMOUSE case here results in bugs like [#32647]) * also making sure we have a valid event value, to not exit too early */ if (ELEM(event->type, LEFTMOUSE, RIGHTMOUSE) && (ELEM(event->val, KM_PRESS, KM_RELEASE))) { diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c index a21c5618877..7bb0c005184 100644 --- a/source/blender/editors/gpencil/gpencil_select.c +++ b/source/blender/editors/gpencil/gpencil_select.c @@ -109,10 +109,10 @@ static int gpencil_select_all_exec(bContext *C, wmOperator *op) } /* if deselecting, we need to deselect strokes across all frames - * - Currently, an exception is only given for deselection - * Selecting and toggling should only affect what's visible, - * while deselecting helps clean up unintended/forgotten - * stuff on other frames + * - Currently, an exception is only given for deselection + * Selecting and toggling should only affect what's visible, + * while deselecting helps clean up unintended/forgotten + * stuff on other frames */ if (action == SEL_DESELECT) { /* deselect strokes across editable layers @@ -702,7 +702,7 @@ static bool gp_stroke_do_circle_sel( } else { /* Loop over the points in the stroke, checking for intersections - * - an intersection means that we touched the stroke + * - an intersection means that we touched the stroke */ for (i = 0; (i + 1) < gps->totpoints; i++) { /* get points to work with */ @@ -730,7 +730,7 @@ static bool gp_stroke_do_circle_sel( /* check if point segment of stroke had anything to do with * eraser region (either within stroke painted, or on its lines) - * - this assumes that linewidth is irrelevant + * - this assumes that linewidth is irrelevant */ if (gp_stroke_inside_circle(mval, mvalo, radius, x0, y0, x1, y1)) { /* change selection of stroke, and then of both points diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c index d35df8bc380..23d80f66630 100644 --- a/source/blender/editors/gpencil/gpencil_undo.c +++ b/source/blender/editors/gpencil/gpencil_undo.c @@ -155,8 +155,8 @@ void gpencil_undo_push(bGPdata *gpd) } /* limit number of undo steps to the maximum undo steps - * - to prevent running out of memory during **really** - * long drawing sessions (triggering swapping) + * - to prevent running out of memory during **really** + * long drawing sessions (triggering swapping) */ /* TODO: Undo-memory constraint is not respected yet, but can be added if we have any need for it */ if (U.undosteps && !BLI_listbase_is_empty(&undo_nodes)) { diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index e6f3b40024f..2b49b2bd3d1 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -914,8 +914,8 @@ bool gp_smooth_stroke_thickness(bGPDstroke *gps, int i, float inf) ptc = &gps->points[after]; /* the optimal value is the corresponding to the interpolation of the pressure - * at the distance of point b - */ + * at the distance of point b + */ float fac = line_point_factor_v3(&ptb->x, &pta->x, &ptc->x); float optimal = (1.0f - fac) * pta->pressure + fac * ptc->pressure; |