diff options
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_fill.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_fill.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index 8d3137ed3db..96f405fab2f 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -250,8 +250,9 @@ static void gp_draw_datablock(tGPDfill *tgpf, const float ink[4]) ED_gpencil_parent_location(tgpw.depsgraph, ob, gpd, gpl, tgpw.diff_mat); /* do not draw layer if hidden */ - if (gpl->flag & GP_LAYER_HIDE) + if (gpl->flag & GP_LAYER_HIDE) { continue; + } /* if active layer and no keyframe, create a new one */ if (gpl == tgpf->gpl) { @@ -262,8 +263,9 @@ static void gp_draw_datablock(tGPDfill *tgpf, const float ink[4]) /* get frame to draw */ bGPDframe *gpf = BKE_gpencil_layer_getframe(gpl, cfra_eval, GP_GETFRAME_USE_PREV); - if (gpf == NULL) + if (gpf == NULL) { continue; + } for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) { /* check if stroke can be drawn */ @@ -453,7 +455,7 @@ static void get_pixel(const ImBuf *ibuf, const int idx, float r_col[4]) /* set pixel data (rgba) at index */ static void set_pixel(ImBuf *ibuf, int idx, const float col[4]) { - //BLI_assert(idx <= ibuf->x * ibuf->y); + // BLI_assert(idx <= ibuf->x * ibuf->y); if (ibuf->rect) { uint *rrect = &ibuf->rect[idx]; uchar ccol[4]; @@ -930,7 +932,8 @@ static void gpencil_get_depth_array(tGPDfill *tgpf) view3d_region_operator_needs_opengl(tgpf->win, tgpf->ar); ED_view3d_autodist_init(tgpf->depsgraph, tgpf->ar, tgpf->v3d, 0); - /* since strokes are so fine, when using their depth we need a margin otherwise they might get missed */ + /* Since strokes are so fine, when using their depth we need a margin + * otherwise they might get missed. */ int depth_margin = 0; /* get an array of depths, far depths are blended */ @@ -959,8 +962,9 @@ static void gpencil_get_depth_array(tGPDfill *tgpf) if (found_depth == false) { /* eeh... not much we can do.. :/, ignore depth in this case */ - for (i = totpoints - 1; i >= 0; i--) + for (i = totpoints - 1; i >= 0; i--) { tgpf->depth_arr[i] = 0.9999f; + } } else { if (interp_depth) { @@ -1346,8 +1350,9 @@ static int gpencil_fill_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE /* try to initialize context data needed */ if (!gpencil_fill_init(C, op)) { gpencil_fill_exit(C, op); - if (op->customdata) + if (op->customdata) { MEM_freeN(op->customdata); + } return OPERATOR_CANCELLED; } else { |