diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-10-10 10:19:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-10-10 14:04:51 +0300 |
commit | 2abfcebb0eb7989e3d1e7d03f37ecf5c088210af (patch) | |
tree | e7a1ad5912b4661d4ece743f4f7fd86e6bf4d3c4 /source/blender/editors/gpencil | |
parent | c735aca42e9f5961fec7e5d5fc196b5bd6b85f56 (diff) |
Cleanup: use C comments for descriptive text
Follow our code style guide by using C-comments for text descriptions.
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/annotate_draw.c | 4 | ||||
-rw-r--r-- | source/blender/editors/gpencil/editaction_gpencil.c | 4 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 8 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_fill.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_sculpt_paint.c | 6 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 12 |
6 files changed, 19 insertions, 17 deletions
diff --git a/source/blender/editors/gpencil/annotate_draw.c b/source/blender/editors/gpencil/annotate_draw.c index b6cbbe7712b..fe1c5efc747 100644 --- a/source/blender/editors/gpencil/annotate_draw.c +++ b/source/blender/editors/gpencil/annotate_draw.c @@ -744,8 +744,8 @@ static void annotation_draw_data( annotation_draw_data_layers(gpd, offsx, offsy, winx, winy, cfra, dflag); /* turn off alpha blending, then smooth lines */ - GPU_blend(GPU_BLEND_NONE); // alpha blending - GPU_line_smooth(false); // smooth lines + GPU_blend(GPU_BLEND_NONE); /* alpha blending */ + GPU_line_smooth(false); /* smooth lines */ GPU_depth_mask(prev_depth_mask); } diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c index 897a6e9653d..d4f3c4d7f5e 100644 --- a/source/blender/editors/gpencil/editaction_gpencil.c +++ b/source/blender/editors/gpencil/editaction_gpencil.c @@ -443,7 +443,7 @@ bool ED_gpencil_anim_copybuf_paste(bAnimContext *ac, const short offset_mode) } /* filter data */ - // TODO: try doing it with selection, then without selection imits + /* TODO: try doing it with selection, then without selection limits. */ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS); ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); @@ -649,7 +649,7 @@ static bool gpencil_frame_mirror_marker(bGPDframe *gpf, Scene *scene) } /* mirror selected gp-frames on... */ -// TODO: mirror over a specific time +/* TODO: mirror over a specific time */ void ED_gpencil_layer_mirror_frames(bGPDlayer *gpl, Scene *scene, short mode) { switch (mode) { diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index b7bf1861ff3..fa7fe27635a 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -1441,7 +1441,7 @@ static int gpencil_strokes_copy_exec(bContext *C, wmOperator *op) } /* updates (to ensure operator buttons are refreshed, when used via hotkeys) */ - WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL); // XXX? + WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL); /* XXX? */ /* done */ return OPERATOR_FINISHED; @@ -1749,11 +1749,11 @@ void GPENCIL_OT_move_to_layer(wmOperatorType *ot) ot->name = "Move Strokes to Layer"; ot->idname = "GPENCIL_OT_move_to_layer"; ot->description = - "Move selected strokes to another layer"; // XXX: allow moving individual points too? + "Move selected strokes to another layer"; /* XXX: allow moving individual points too? */ /* callbacks */ ot->exec = gpencil_move_to_layer_exec; - ot->poll = gpencil_stroke_edit_poll; // XXX? + ot->poll = gpencil_stroke_edit_poll; /* XXX? */ /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; @@ -2766,7 +2766,7 @@ static int gpencil_snap_to_grid(bContext *C, wmOperator *UNUSED(op)) continue; } - // TODO: if entire stroke is selected, offset entire stroke by same amount? + /* TODO: if entire stroke is selected, offset entire stroke by same amount? */ for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) { /* only if point is selected */ if (pt->flag & GP_SPOINT_SELECT) { diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index 247cc218c2f..a11397bd0bb 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -1269,7 +1269,7 @@ static void gpencil_stroke_from_buffer(tGPDfill *tgpf) for (int i = 0; i < gps->totpoints; i++) { BKE_gpencil_stroke_smooth(gps, i, smoothfac - reduce); } - reduce += 0.25f; // reduce the factor + reduce += 0.25f; /* reduce the factor */ } /* if axis locked, reproject to plane locked */ diff --git a/source/blender/editors/gpencil/gpencil_sculpt_paint.c b/source/blender/editors/gpencil/gpencil_sculpt_paint.c index d37e393ac77..1d500223ab8 100644 --- a/source/blender/editors/gpencil/gpencil_sculpt_paint.c +++ b/source/blender/editors/gpencil/gpencil_sculpt_paint.c @@ -760,7 +760,7 @@ static bool gpencil_brush_twist_apply(tGP_BrushEditData *gso, float rmat[3][3]; /* Express position of point relative to cursor, ready to rotate */ - // XXX: There is still some offset here, but it's close to working as expected... + /* XXX: There is still some offset here, but it's close to working as expected. */ vec[0] = (float)(co[0] - gso->mval[0]); vec[1] = (float)(co[1] - gso->mval[1]); @@ -778,7 +778,7 @@ static bool gpencil_brush_twist_apply(tGP_BrushEditData *gso, UI_view2d_region_to_view(v2d, vec[0], vec[1], &pt->x, &pt->y); } else { - // XXX + /* XXX */ copy_v2_v2(&pt->x, vec); } } @@ -2125,7 +2125,7 @@ void GPENCIL_OT_sculpt_paint(wmOperatorType *ot) /* identifiers */ ot->name = "Stroke Sculpt"; ot->idname = "GPENCIL_OT_sculpt_paint"; - ot->description = "Apply tweaks to strokes by painting over the strokes"; // XXX + ot->description = "Apply tweaks to strokes by painting over the strokes"; /* XXX */ /* api callbacks */ ot->exec = gpencil_sculpt_brush_exec; diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 8b77709bacb..5a45afe9c5a 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -335,7 +335,7 @@ bool ED_gpencil_has_keyframe_v3d(Scene *UNUSED(scene), Object *ob, int cfra) bGPDlayer *gpl = BKE_gpencil_layer_active_get(ob->data); if (gpl) { if (gpl->actframe) { - // XXX: assumes that frame has been fetched already + /* XXX: assumes that frame has been fetched already */ return (gpl->actframe->framenum == cfra); } /* XXX: disabled as could be too much of a penalty */ @@ -2531,7 +2531,7 @@ void ED_gpencil_select_toggle_all(bContext *C, int action) CTX_DATA_BEGIN (C, bGPDstroke *, gps, editable_gpencil_strokes) { if (gps->flag & GP_STROKE_SELECT) { action = SEL_DESELECT; - break; // XXX: this only gets out of the inner loop... + break; /* XXX: this only gets out of the inner loop. */ } } CTX_DATA_END; @@ -2584,9 +2584,11 @@ void ED_gpencil_select_toggle_all(bContext *C, int action) case SEL_SELECT: pt->flag |= GP_SPOINT_SELECT; break; - // case SEL_DESELECT: - // pt->flag &= ~GP_SPOINT_SELECT; - // break; +#if 0 + case SEL_DESELECT: + pt->flag &= ~GP_SPOINT_SELECT; + break; +#endif case SEL_INVERT: pt->flag ^= GP_SPOINT_SELECT; break; |