diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-29 12:29:41 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-29 12:29:41 +0300 |
commit | c7f67d60fbe24df942bcde49aadf480ac6622e71 (patch) | |
tree | 10f6863146a0b2d56f2dcc06856d43fd321a37f7 /source/blender/editors/gpencil | |
parent | 9bb47c512f748691a170891a74fffc0356af4800 (diff) |
Cleanup: comments (long lines) in editors
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/annotate_draw.c | 18 | ||||
-rw-r--r-- | source/blender/editors/gpencil/annotate_paint.c | 9 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_brush.c | 8 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_convert.c | 14 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 3 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 16 |
6 files changed, 41 insertions, 27 deletions
diff --git a/source/blender/editors/gpencil/annotate_draw.c b/source/blender/editors/gpencil/annotate_draw.c index 9cd1cf91476..f325422fec7 100644 --- a/source/blender/editors/gpencil/annotate_draw.c +++ b/source/blender/editors/gpencil/annotate_draw.c @@ -897,12 +897,13 @@ static void annotation_draw_data_layers( /* draw the strokes already in active frame */ annotation_draw_strokes(gpd, gpl, gpf, offsx, offsy, winx, winy, dflag, lthick, ink); - /* Draw verts of selected strokes + /* 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) + * (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_FLAG_RENDER_VIEWPORT) == 0 && (gpl->flag & GP_LAYER_LOCKED) == 0 && @@ -1114,9 +1115,13 @@ void ED_annotation_draw_2dimage(const bContext *C) annotation_draw_data_all(scene, gpd, offsx, offsy, sizex, sizey, CFRA, dflag, sa->spacetype); } -/* draw grease-pencil sketches to specified 2d-view assuming that matrices are already set correctly - * Note: this gets called twice - first time with onlyv2d=true to draw 'canvas' strokes, - * second time with onlyv2d=false for screen-aligned strokes */ +/** + * Draw grease-pencil sketches to specified 2d-view + * assuming that matrices are already set correctly. + * + * \note This gets called twice - first time with onlyv2d=true to draw 'canvas' strokes, + * second time with onlyv2d=false for screen-aligned strokes. + */ void ED_annotation_draw_view2d(const bContext *C, bool onlyv2d) { wmWindowManager *wm = CTX_wm_manager(C); @@ -1135,7 +1140,8 @@ void ED_annotation_draw_view2d(const bContext *C, bool onlyv2d) } /* special hack for Image Editor */ - /* FIXME: the opengl poly-strokes don't draw at right thickness when done this way, so disabled */ + /* FIXME: the opengl poly-strokes don't draw at right thickness when done this way, + * so disabled. */ if (ELEM(sa->spacetype, SPACE_IMAGE, SPACE_CLIP)) { dflag |= GP_DRAWDATA_IEDITHACK; } diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c index 0363fd6c754..7babbadb205 100644 --- a/source/blender/editors/gpencil/annotate_paint.c +++ b/source/blender/editors/gpencil/annotate_paint.c @@ -2205,7 +2205,8 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) p->ar = ar; } - /* we don't pass on key events, GP is used with key-modifiers - prevents Dkey to insert drivers */ + /* We don't pass on key events, GP is used with key-modifiers - + * prevents Dkey to insert drivers. */ if (ISKEYBOARD(event->type)) { if (ELEM(event->type, LEFTARROWKEY, DOWNARROWKEY, RIGHTARROWKEY, UPARROWKEY, ZKEY)) { /* allow some keys: @@ -2235,8 +2236,10 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) //printf("\tGP - handle modal event...\n"); - /* exit painting mode (and/or end current stroke) - * NOTE: cannot do RIGHTMOUSE (as is standard for canceling) as that would break polyline [#32647] + /* Exit painting mode (and/or end current stroke) + * + * NOTE: cannot do RIGHTMOUSE (as is standard for canceling) + * as that would break polyline T32647. */ if (ELEM(event->type, RETKEY, PADENTER, ESCKEY, SPACEKEY, EKEY)) { /* exit() ends the current stroke before cleaning up */ diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c index bc98cb5226b..1af01850707 100644 --- a/source/blender/editors/gpencil/gpencil_brush.c +++ b/source/blender/editors/gpencil/gpencil_brush.c @@ -1167,7 +1167,8 @@ static bool gpsculpt_brush_apply_clone(bContext *C, tGP_BrushEditData *gso) } else { /* Continuous - Just keep pasting everytime we move */ - /* TODO: The spacing of repeat should be controlled using a "stepsize" or similar property? */ + /* TODO: The spacing of repeat should be controlled using a + * "stepsize" or similar property? */ gp_brush_clone_add(C, gso); } } @@ -1406,9 +1407,10 @@ static void gpsculpt_brush_init_stroke(tGP_BrushEditData *gso) if (gpencil_layer_is_editable(gpl) && (gpl->actframe != NULL)) { bGPDframe *gpf = gpl->actframe; - /* Make a new frame to work on if the layer's frame and the current scene frame don't match up + /* Make a new frame to work on if the layer's frame + * and the current scene frame don't match up: * - This is useful when animating as it saves that "uh-oh" moment when you realize you've - * spent too much time editing the wrong frame... + * spent too much time editing the wrong frame. */ // XXX: should this be allowed when framelock is enabled? if (gpf->framenum != cfra_eval) { diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c index ded663276a4..5832f092676 100644 --- a/source/blender/editors/gpencil/gpencil_convert.c +++ b/source/blender/editors/gpencil/gpencil_convert.c @@ -328,9 +328,9 @@ static int gp_find_end_of_stroke_idx(tGpTimingData *gtd, else { float delta, min, max; - /* This code ensures that if the first gaps have been shorter than average gap_duration, - * next gaps will tend to be longer (i.e. try to recover the lateness), and vice-versa! - */ + /* This code ensures that if the first gaps + * have been shorter than average gap_duration, next gaps + * will tend to be longer (i.e. try to recover the lateness), and vice-versa! */ delta = delta_time - (gtd->gap_duration * (*nbr_done_gaps)); /* Clamp min between [-gap_randomness, 0.0], with lower delta giving higher min */ @@ -963,10 +963,10 @@ static void gp_stroke_to_bezier(bContext *C, /* Create "link points" */ /* About "zero-radius" point interpolations: - * - If we have at least two points in current curve (most common case), we linearly extrapolate - * the last segment to get the first point (p1) position and timing. - * - If we do not have those (quite odd, but may happen), we linearly interpolate the last point - * with the first point of the current stroke. + * - If we have at least two points in current curve (most common case), + * we linearly extrapolate the last segment to get the first point (p1) position and timing. + * - If we do not have those (quite odd, but may happen), + * we linearly interpolate the last point with the first point of the current stroke. * * The same goes for the second point, * first segment of the current stroke is "negatively" extrapolated diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 008ed85d52a..7b65a51e8a9 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -2212,7 +2212,8 @@ void gp_stroke_delete_tagged_points(bGPDframe *gpf, /* Watch out for special case where No islands = All points selected = Delete Stroke only */ if (num_islands) { - /* there are islands, so create a series of new strokes, adding them before the "next" stroke */ + /* There are islands, so create a series of new strokes, + * adding them before the "next" stroke. */ int idx; bGPDstroke *new_stroke = NULL; diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index f985ade9c7e..6139c1caada 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1205,10 +1205,9 @@ static void gp_stroke_newfrombuffer(tGPsdata *p) gp_randomize_stroke(gps, brush, p->rng); } - /* smooth stroke after subdiv - only if there's something to do - * for each iteration, the factor is reduced to get a better smoothing without changing too much - * the original stroke - */ + /* Smooth stroke after subdiv - only if there's something to do for each iteration, + * the factor is reduced to get a better smoothing + * without changing too much the original stroke. */ if ((brush->gpencil_settings->flag & GP_BRUSH_GROUP_SETTINGS) && (brush->gpencil_settings->draw_smoothfac > 0.0f)) { float reduce = 0.0f; @@ -3474,7 +3473,8 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) } } - /* we don't pass on key events, GP is used with key-modifiers - prevents Dkey to insert drivers */ + /* We don't pass on key events, GP is used with key-modifiers - + * prevents Dkey to insert drivers. */ if (ISKEYBOARD(event->type)) { if (ELEM(event->type, LEFTARROWKEY, DOWNARROWKEY, RIGHTARROWKEY, UPARROWKEY, ZKEY)) { /* allow some keys: @@ -3508,8 +3508,10 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) //printf("\tGP - handle modal event...\n"); - /* exit painting mode (and/or end current stroke) - * NOTE: cannot do RIGHTMOUSE (as is standard for canceling) as that would break polyline [#32647] + /* Exit painting mode (and/or end current stroke). + * + * NOTE: cannot do RIGHTMOUSE (as is standard for canceling) + * as that would break polyline T32647. */ /* if polyline and release shift must cancel */ if ((ELEM(event->type, RETKEY, PADENTER, ESCKEY, SPACEKEY, EKEY)) || |