diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2016-08-04 16:03:18 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2016-08-04 16:11:21 +0300 |
commit | 357480f8c3710cdd6331c86a8ee0f28bfaf4f507 (patch) | |
tree | 37968285c7ffc565dfb4d30158bd3a1306cbfdee /source/blender/editors/gpencil | |
parent | 5f63797c0985c9be8e0bf57fcc9aa1893a896af7 (diff) |
Cleanup: Use BKE_gpencil prefix
This is a good point to change this as grease-pencil-v2 branch was just merged, so I hope merge conflicts with other branches are minimal.
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/drawgpencil.c | 6 | ||||
-rw-r--r-- | source/blender/editors/gpencil/editaction_gpencil.c | 12 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_brush.c | 4 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_convert.c | 10 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_data.c | 150 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 20 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 32 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_select.c | 10 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_undo.c | 6 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 24 |
10 files changed, 137 insertions, 137 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index bd09616243b..4ef76f5ee25 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -1359,7 +1359,7 @@ static void gp_draw_data_layers( continue; /* get frame to draw */ - gpf = gpencil_layer_getframe(gpl, cfra, 0); + gpf = BKE_gpencil_layer_getframe(gpl, cfra, 0); if (gpf == NULL) continue; @@ -1533,7 +1533,7 @@ static void gp_draw_data_all(Scene *scene, bGPdata *gpd, int offsx, int offsy, i if (gpd_source) { ToolSettings *ts = scene->toolsettings; - bGPDbrush *brush = gpencil_brush_getactive(ts); + bGPDbrush *brush = BKE_gpencil_brush_getactive(ts); if (brush != NULL) { gp_draw_data(brush, ts->gp_sculpt.alpha, gpd_source, offsx, offsy, winx, winy, cfra, dflag); @@ -1546,7 +1546,7 @@ static void gp_draw_data_all(Scene *scene, bGPdata *gpd, int offsx, int offsy, i * if gpd_source == gpd, we don't have any object/track data and we can skip */ if (gpd_source == NULL || (gpd_source && gpd_source != gpd)) { ToolSettings *ts = scene->toolsettings; - bGPDbrush *brush = gpencil_brush_getactive(ts); + bGPDbrush *brush = BKE_gpencil_brush_getactive(ts); if (brush != NULL) { gp_draw_data(brush, ts->gp_sculpt.alpha, gpd, offsx, offsy, winx, winy, cfra, dflag); diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c index 738496a67c6..bd4856f1b93 100644 --- a/source/blender/editors/gpencil/editaction_gpencil.c +++ b/source/blender/editors/gpencil/editaction_gpencil.c @@ -253,7 +253,7 @@ bool ED_gplayer_frames_delete(bGPDlayer *gpl) gpfn = gpf->next; if (gpf->flag & GP_FRAME_SELECT) - changed |= gpencil_layer_delframe(gpl, gpf); + changed |= BKE_gpencil_layer_delframe(gpl, gpf); } return changed; @@ -277,7 +277,7 @@ void ED_gplayer_frames_duplicate(bGPDlayer *gpl) bGPDframe *gpfd; /* duplicate frame, and deselect self */ - gpfd = gpencil_frame_duplicate(gpf); + gpfd = BKE_gpencil_frame_duplicate(gpf); gpf->flag &= ~GP_FRAME_SELECT; BLI_insertlinkafter(&gpl->frames, gpf, gpfd); @@ -323,7 +323,7 @@ static int gp_anim_copy_cfra = 0; /* This function frees any MEM_calloc'ed copy/paste buffer data */ void ED_gpencil_anim_copybuf_free(void) { - free_gpencil_layers(&gp_anim_copybuf); + BKE_gpencil_free_layers(&gp_anim_copybuf); BLI_listbase_clear(&gp_anim_copybuf); gp_anim_copy_firstframe = 999999999; @@ -364,7 +364,7 @@ bool ED_gpencil_anim_copybuf_copy(bAnimContext *ac) /* if frame is selected, make duplicate it and its strokes */ if (gpf->flag & GP_FRAME_SELECT) { /* make a copy of this frame */ - bGPDframe *new_frame = gpencil_frame_duplicate(gpf); + bGPDframe *new_frame = BKE_gpencil_frame_duplicate(gpf); BLI_addtail(&copied_frames, new_frame); /* extend extents for keyframes encountered */ @@ -475,7 +475,7 @@ bool ED_gpencil_anim_copybuf_paste(bAnimContext *ac, const short offset_mode) gpfs->framenum += offset; /* get frame to copy data into (if no frame returned, then just ignore) */ - gpf = gpencil_layer_getframe(gpld, gpfs->framenum, 1); + gpf = BKE_gpencil_layer_getframe(gpld, gpfs->framenum, 1); if (gpf) { bGPDstroke *gps, *gpsn; @@ -498,7 +498,7 @@ bool ED_gpencil_anim_copybuf_paste(bAnimContext *ac, const short offset_mode) /* if no strokes (i.e. new frame) added, free gpf */ if (BLI_listbase_is_empty(&gpf->strokes)) - gpencil_layer_delframe(gpld, gpf); + BKE_gpencil_layer_delframe(gpld, gpf); } /* unapply offset from buffer-frame */ diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c index 1bb3b7e1ae7..fcb2ce02bde 100644 --- a/source/blender/editors/gpencil/gpencil_brush.c +++ b/source/blender/editors/gpencil/gpencil_brush.c @@ -841,7 +841,7 @@ static void gp_brush_clone_add(bContext *C, tGP_BrushEditData *gso) Scene *scene = gso->scene; bGPDlayer *gpl = CTX_data_active_gpencil_layer(C); - bGPDframe *gpf = gpencil_layer_getframe(gpl, CFRA, true); + bGPDframe *gpf = BKE_gpencil_layer_getframe(gpl, CFRA, true); bGPDstroke *gps; float delta[3]; @@ -1185,7 +1185,7 @@ static void gpsculpt_brush_init_stroke(tGP_BrushEditData *gso) */ // XXX: should this be allowed when framelock is enabled? if (gpf->framenum != cfra) { - gpencil_frame_addcopy(gpl, cfra); + BKE_gpencil_frame_addcopy(gpl, cfra); } } } diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c index 95ea13c399a..c502ed1aa83 100644 --- a/source/blender/editors/gpencil/gpencil_convert.c +++ b/source/blender/editors/gpencil/gpencil_convert.c @@ -1123,7 +1123,7 @@ static void gp_layer_to_curve(bContext *C, ReportList *reports, bGPdata *gpd, bG struct Main *bmain = CTX_data_main(C); View3D *v3d = CTX_wm_view3d(C); /* may be NULL */ Scene *scene = CTX_data_scene(C); - bGPDframe *gpf = gpencil_layer_getframe(gpl, CFRA, 0); + bGPDframe *gpf = BKE_gpencil_layer_getframe(gpl, CFRA, 0); bGPDstroke *gps, *prev_gps = NULL; Object *ob; Curve *cu; @@ -1235,7 +1235,7 @@ static bool gp_convert_check_has_valid_timing(bContext *C, bGPDlayer *gpl, wmOpe int i; bool valid = true; - if (!gpl || !(gpf = gpencil_layer_getframe(gpl, CFRA, 0)) || !(gps = gpf->strokes.first)) + if (!gpl || !(gpf = BKE_gpencil_layer_getframe(gpl, CFRA, 0)) || !(gps = gpf->strokes.first)) return false; do { @@ -1292,8 +1292,8 @@ static int gp_convert_poll(bContext *C) * and if we are not in edit mode! */ return ((sa && sa->spacetype == SPACE_VIEW3D) && - (gpl = gpencil_layer_getactive(gpd)) && - (gpf = gpencil_layer_getframe(gpl, CFRA, 0)) && + (gpl = BKE_gpencil_layer_getactive(gpd)) && + (gpf = BKE_gpencil_layer_getframe(gpl, CFRA, 0)) && (gpf->strokes.first) && (scene->obedit == NULL)); } @@ -1302,7 +1302,7 @@ static int gp_convert_layer_exec(bContext *C, wmOperator *op) { PropertyRNA *prop = RNA_struct_find_property(op->ptr, "use_timing_data"); bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDlayer *gpl = gpencil_layer_getactive(gpd); + bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd); Scene *scene = CTX_data_scene(C); const int mode = RNA_enum_get(op->ptr, "type"); const bool norm_weights = RNA_boolean_get(op->ptr, "use_normalize_weights"); diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c index e915446e461..ee01c6db66f 100644 --- a/source/blender/editors/gpencil/gpencil_data.c +++ b/source/blender/editors/gpencil/gpencil_data.c @@ -97,7 +97,7 @@ static int gp_data_add_exec(bContext *C, wmOperator *op) bGPdata *gpd = (*gpd_ptr); id_us_min(&gpd->id); - *gpd_ptr = gpencil_data_addnew(DATA_("GPencil")); + *gpd_ptr = BKE_gpencil_data_addnew(DATA_("GPencil")); } /* notifiers */ @@ -184,10 +184,10 @@ static int gp_layer_add_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } if (*gpd_ptr == NULL) - *gpd_ptr = gpencil_data_addnew(DATA_("GPencil")); + *gpd_ptr = BKE_gpencil_data_addnew(DATA_("GPencil")); /* add new layer now */ - gpencil_layer_addnew(*gpd_ptr, DATA_("GP_Layer"), true); + BKE_gpencil_layer_addnew(*gpd_ptr, DATA_("GP_Layer"), true); /* notifiers */ WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); @@ -214,7 +214,7 @@ void GPENCIL_OT_layer_add(wmOperatorType *ot) static int gp_layer_remove_exec(bContext *C, wmOperator *op) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDlayer *gpl = gpencil_layer_getactive(gpd); + bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd); /* sanity checks */ if (ELEM(NULL, gpd, gpl)) @@ -230,12 +230,12 @@ static int gp_layer_remove_exec(bContext *C, wmOperator *op) * - if this is the only layer, this naturally becomes NULL */ if (gpl->prev) - gpencil_layer_setactive(gpd, gpl->prev); + BKE_gpencil_layer_setactive(gpd, gpl->prev); else - gpencil_layer_setactive(gpd, gpl->next); + BKE_gpencil_layer_setactive(gpd, gpl->next); /* delete the layer now... */ - gpencil_layer_delete(gpd, gpl); + BKE_gpencil_layer_delete(gpd, gpl); /* notifiers */ WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); @@ -267,7 +267,7 @@ enum { static int gp_layer_move_exec(bContext *C, wmOperator *op) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDlayer *gpl = gpencil_layer_getactive(gpd); + bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd); int direction = RNA_enum_get(op->ptr, "type"); @@ -321,7 +321,7 @@ void GPENCIL_OT_layer_move(wmOperatorType *ot) static int gp_layer_copy_exec(bContext *C, wmOperator *UNUSED(op)) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDlayer *gpl = gpencil_layer_getactive(gpd); + bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd); bGPDlayer *new_layer; /* sanity checks */ @@ -329,12 +329,12 @@ static int gp_layer_copy_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_CANCELLED; /* make copy of layer, and add it immediately after the existing layer */ - new_layer = gpencil_layer_duplicate(gpl); + new_layer = BKE_gpencil_layer_duplicate(gpl); BLI_insertlinkafter(&gpd->layers, gpl, new_layer); /* ensure new layer has a unique name, and is now the active layer */ BLI_uniquename(&gpd->layers, new_layer, DATA_("GP_Layer"), '.', offsetof(bGPDlayer, info), sizeof(new_layer->info)); - gpencil_layer_setactive(gpd, new_layer); + BKE_gpencil_layer_setactive(gpd, new_layer); /* notifiers */ WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); @@ -362,7 +362,7 @@ void GPENCIL_OT_layer_duplicate(wmOperatorType *ot) static int gp_hide_exec(bContext *C, wmOperator *op) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDlayer *layer = gpencil_layer_getactive(gpd); + bGPDlayer *layer = BKE_gpencil_layer_getactive(gpd); bool unselected = RNA_boolean_get(op->ptr, "unselected"); /* sanity checks */ @@ -530,7 +530,7 @@ void GPENCIL_OT_unlock_all(wmOperatorType *ot) static int gp_isolate_layer_exec(bContext *C, wmOperator *op) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDlayer *layer = gpencil_layer_getactive(gpd); + bGPDlayer *layer = BKE_gpencil_layer_getactive(gpd); bGPDlayer *gpl; int flags = GP_LAYER_LOCKED; bool isolate = false; @@ -606,7 +606,7 @@ void GPENCIL_OT_layer_isolate(wmOperatorType *ot) static int gp_merge_layer_exec(bContext *C, wmOperator *op) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDlayer *gpl_current = gpencil_layer_getactive(gpd); + bGPDlayer *gpl_current = BKE_gpencil_layer_getactive(gpd); bGPDlayer *gpl_next = gpl_current->next; if (ELEM(NULL, gpd, gpl_current, gpl_next)) { @@ -626,13 +626,13 @@ static int gp_merge_layer_exec(bContext *C, wmOperator *op) bGPDframe *frame = BLI_ghash_lookup(gh_frames_cur, SET_INT_IN_POINTER(gpf->framenum)); if (!frame) { /* nothing found, create new */ - frame = gpencil_frame_addnew(gpl_current, gpf->framenum); + frame = BKE_gpencil_frame_addnew(gpl_current, gpf->framenum); } /* add to tail all strokes */ BLI_movelisttolist(&frame->strokes, &gpf->strokes); } /* Now delete next layer */ - gpencil_layer_delete(gpd, gpl_next); + BKE_gpencil_layer_delete(gpd, gpl_next); BLI_ghash_free(gh_frames_cur, NULL, NULL); /* notifiers */ @@ -681,7 +681,7 @@ static int gp_layer_change_exec(bContext *C, wmOperator *op) /* Get layer or create new one */ if (layer_num == -1) { /* Create layer */ - gpl = gpencil_layer_addnew(gpd, DATA_("GP_Layer"), true); + gpl = BKE_gpencil_layer_addnew(gpd, DATA_("GP_Layer"), true); } else { /* Try to get layer */ @@ -694,7 +694,7 @@ static int gp_layer_change_exec(bContext *C, wmOperator *op) } /* Set active layer */ - gpencil_layer_setactive(gpd, gpl); + BKE_gpencil_layer_setactive(gpd, gpl); /* updates */ WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); @@ -736,7 +736,7 @@ enum { static int gp_stroke_arrange_exec(bContext *C, wmOperator *op) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDlayer *gpl = gpencil_layer_getactive(gpd); + bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd); bGPDstroke *gps; /* sanity checks */ @@ -861,8 +861,8 @@ static int gp_stroke_change_color_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_CANCELLED; } - palette = gpencil_palette_getactive(gpd); - color = gpencil_palettecolor_getactive(palette); + palette = BKE_gpencil_palette_getactive(gpd); + color = BKE_gpencil_palettecolor_getactive(palette); if (ELEM(NULL, palette, color)) { return OPERATOR_CANCELLED; } @@ -919,7 +919,7 @@ static int gp_stroke_lock_color_exec(bContext *C, wmOperator *UNUSED(op)) if (ELEM(NULL, gpd)) return OPERATOR_CANCELLED; - palette = gpencil_palette_getactive(gpd); + palette = BKE_gpencil_palette_getactive(gpd); if (ELEM(NULL, palette)) return OPERATOR_CANCELLED; @@ -970,7 +970,7 @@ void GPENCIL_OT_stroke_lock_color(wmOperatorType *ot) static int gp_stroke_apply_thickness_exec(bContext *C, wmOperator *UNUSED(op)) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDlayer *gpl = gpencil_layer_getactive(gpd); + bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd); /* sanity checks */ if (ELEM(NULL, gpd, gpl, gpl->frames.first)) @@ -1213,10 +1213,10 @@ enum { static int gp_stroke_join_exec(bContext *C, wmOperator *op) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDlayer *activegpl = gpencil_layer_getactive(gpd); + bGPDlayer *activegpl = BKE_gpencil_layer_getactive(gpd); bGPDstroke *gps, *gpsn; - bGPDpalette *palette = gpencil_palette_getactive(gpd); - bGPDpalettecolor *palcolor = gpencil_palettecolor_getactive(palette); + bGPDpalette *palette = BKE_gpencil_palette_getactive(gpd); + bGPDpalettecolor *palcolor = BKE_gpencil_palettecolor_getactive(palette); bGPDframe *gpf_a = NULL; bGPDstroke *stroke_a = NULL; @@ -1283,12 +1283,12 @@ static int gp_stroke_join_exec(bContext *C, wmOperator *op) if (stroke_a) { BLI_insertlinkbefore(&gpf_a->strokes, stroke_a, new_stroke); BLI_remlink(&gpf->strokes, stroke_a); - free_gpencil_stroke(stroke_a); + BKE_gpencil_free_stroke(stroke_a); stroke_a = NULL; } if (stroke_b) { BLI_remlink(&gpf->strokes, stroke_b); - free_gpencil_stroke(stroke_b); + BKE_gpencil_free_stroke(stroke_b); stroke_b = NULL; } } @@ -1302,7 +1302,7 @@ static int gp_stroke_join_exec(bContext *C, wmOperator *op) if (new_stroke) { /* Add a new frame if needed */ if (activegpl->actframe == NULL) - activegpl->actframe = gpencil_frame_addnew(activegpl, gpf_a->framenum); + activegpl->actframe = BKE_gpencil_frame_addnew(activegpl, gpf_a->framenum); BLI_addtail(&activegpl->actframe->strokes, new_stroke); } @@ -1405,7 +1405,7 @@ static int gp_brush_add_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } /* add new brush now */ - gpencil_brush_addnew(ts, DATA_("GP_Brush"), true); + BKE_gpencil_brush_addnew(ts, DATA_("GP_Brush"), true); /* notifiers */ WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); @@ -1432,7 +1432,7 @@ void GPENCIL_OT_brush_add(wmOperatorType *ot) static int gp_brush_remove_exec(bContext *C, wmOperator *op) { ToolSettings *ts = CTX_data_tool_settings(C); - bGPDbrush *brush = gpencil_brush_getactive(ts); + bGPDbrush *brush = BKE_gpencil_brush_getactive(ts); /* sanity checks */ if (ELEM(NULL, ts, brush)) @@ -1449,12 +1449,12 @@ static int gp_brush_remove_exec(bContext *C, wmOperator *op) * - if this is the only brush, this naturally becomes NULL */ if (brush->prev) - gpencil_brush_setactive(ts, brush->prev); + BKE_gpencil_brush_setactive(ts, brush->prev); else - gpencil_brush_setactive(ts, brush->next); + BKE_gpencil_brush_setactive(ts, brush->next); /* delete the brush now... */ - gpencil_brush_delete(ts, brush); + BKE_gpencil_brush_delete(ts, brush); /* notifiers */ WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); @@ -1501,7 +1501,7 @@ static int gp_brush_change_exec(bContext *C, wmOperator *op) /* Get brush or create new one */ if (brush_num == -1) { /* Create brush */ - brush = gpencil_brush_addnew(ts, DATA_("GP_Brush"), true); + brush = BKE_gpencil_brush_addnew(ts, DATA_("GP_Brush"), true); } else { /* Try to get brush */ @@ -1514,7 +1514,7 @@ static int gp_brush_change_exec(bContext *C, wmOperator *op) } /* Set active brush */ - gpencil_brush_setactive(ts, brush); + BKE_gpencil_brush_setactive(ts, brush); /* updates */ WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); @@ -1552,7 +1552,7 @@ enum { static int gp_brush_move_exec(bContext *C, wmOperator *op) { ToolSettings *ts = CTX_data_tool_settings(C); - bGPDbrush *brush = gpencil_brush_getactive(ts); + bGPDbrush *brush = BKE_gpencil_brush_getactive(ts); int direction = RNA_enum_get(op->ptr, "type"); @@ -1610,7 +1610,7 @@ void GPENCIL_OT_brush_move(wmOperatorType *ot) static int gp_brush_presets_create_exec(bContext *C, wmOperator *UNUSED(op)) { ToolSettings *ts = CTX_data_tool_settings(C); - gpencil_brush_init_presets(ts); + BKE_gpencil_brush_init_presets(ts); /* notifiers */ WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); @@ -1645,7 +1645,7 @@ static int gp_brush_copy_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - bGPDbrush *brush = gpencil_brush_getactive(ts); + bGPDbrush *brush = BKE_gpencil_brush_getactive(ts); bGPDbrush *newbrush; /* sanity checks */ @@ -1653,7 +1653,7 @@ static int gp_brush_copy_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; /* create a brush and duplicate data */ - newbrush = gpencil_brush_addnew(ts, brush->info, true); + newbrush = BKE_gpencil_brush_addnew(ts, brush->info, true); newbrush->thickness = brush->thickness; newbrush->draw_smoothfac = brush->draw_smoothfac; newbrush->draw_smoothlvl = brush->draw_smoothlvl; @@ -1677,7 +1677,7 @@ static int gp_brush_copy_exec(bContext *C, wmOperator *op) newbrush->cur_strength = curvemapping_copy(brush->cur_strength); newbrush->cur_jitter = curvemapping_copy(brush->cur_jitter); - gpencil_brush_setactive(ts, newbrush); + BKE_gpencil_brush_setactive(ts, newbrush); /* notifiers */ WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); @@ -1718,7 +1718,7 @@ static int gp_brush_select_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - gpencil_brush_setactive(ts, brush); + BKE_gpencil_brush_setactive(ts, brush); /* notifiers */ WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); @@ -1760,10 +1760,10 @@ static int gp_palette_add_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } if (*gpd_ptr == NULL) - *gpd_ptr = gpencil_data_addnew(DATA_("GPencil")); + *gpd_ptr = BKE_gpencil_data_addnew(DATA_("GPencil")); /* add new palette now */ - gpencil_palette_addnew(*gpd_ptr, DATA_("GP_Palette"), true); + BKE_gpencil_palette_addnew(*gpd_ptr, DATA_("GP_Palette"), true); /* notifiers */ WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); @@ -1790,7 +1790,7 @@ void GPENCIL_OT_palette_add(wmOperatorType *ot) static int gp_palette_remove_exec(bContext *C, wmOperator *op) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDpalette *palette = gpencil_palette_getactive(gpd); + bGPDpalette *palette = BKE_gpencil_palette_getactive(gpd); /* sanity checks */ if (ELEM(NULL, gpd, palette)) @@ -1807,12 +1807,12 @@ static int gp_palette_remove_exec(bContext *C, wmOperator *op) * - if this is the only palette, this naturally becomes NULL */ if (palette->prev) - gpencil_palette_setactive(gpd, palette->prev); + BKE_gpencil_palette_setactive(gpd, palette->prev); else - gpencil_palette_setactive(gpd, palette->next); + BKE_gpencil_palette_setactive(gpd, palette->next); /* delete the palette now... */ - gpencil_palette_delete(gpd, palette); + BKE_gpencil_palette_delete(gpd, palette); /* notifiers */ WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); @@ -1859,7 +1859,7 @@ static int gp_palette_change_exec(bContext *C, wmOperator *op) /* Get palette or create new one */ if (palette_num == -1) { /* Create palette */ - palette = gpencil_palette_addnew(gpd, DATA_("GP_Palette"), true); + palette = BKE_gpencil_palette_addnew(gpd, DATA_("GP_Palette"), true); } else { /* Try to get palette */ @@ -1872,7 +1872,7 @@ static int gp_palette_change_exec(bContext *C, wmOperator *op) } /* Set active palette */ - gpencil_palette_setactive(gpd, palette); + BKE_gpencil_palette_setactive(gpd, palette); /* updates */ WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); @@ -1911,7 +1911,7 @@ static int gp_palette_lock_layer_exec(bContext *C, wmOperator *UNUSED(op)) if (ELEM(NULL, gpd)) return OPERATOR_CANCELLED; - palette = gpencil_palette_getactive(gpd); + palette = BKE_gpencil_palette_getactive(gpd); if (ELEM(NULL, palette)) return OPERATOR_CANCELLED; @@ -1972,15 +1972,15 @@ static int gp_palettecolor_add_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } if (*gpd_ptr == NULL) - *gpd_ptr = gpencil_data_addnew(DATA_("GPencil")); + *gpd_ptr = BKE_gpencil_data_addnew(DATA_("GPencil")); /* verify palette */ - bGPDpalette *palette = gpencil_palette_getactive(*gpd_ptr); + bGPDpalette *palette = BKE_gpencil_palette_getactive(*gpd_ptr); if (palette == NULL) - palette = gpencil_palette_addnew(*gpd_ptr, DATA_("GP_Palette"), true); + palette = BKE_gpencil_palette_addnew(*gpd_ptr, DATA_("GP_Palette"), true); /* add new palette color now */ - gpencil_palettecolor_addnew(palette, DATA_("Color"), true); + BKE_gpencil_palettecolor_addnew(palette, DATA_("Color"), true); /* notifiers */ WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); @@ -2007,8 +2007,8 @@ void GPENCIL_OT_palettecolor_add(wmOperatorType *ot) static int gp_palettecolor_remove_exec(bContext *C, wmOperator *UNUSED(op)) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDpalette *palette = gpencil_palette_getactive(gpd); - bGPDpalettecolor *color = gpencil_palettecolor_getactive(palette); + bGPDpalette *palette = BKE_gpencil_palette_getactive(gpd); + bGPDpalettecolor *color = BKE_gpencil_palettecolor_getactive(palette); /* sanity checks */ if (ELEM(NULL, gpd, palette, color)) @@ -2019,15 +2019,15 @@ static int gp_palettecolor_remove_exec(bContext *C, wmOperator *UNUSED(op)) * - if this is the only color, this naturally becomes NULL */ if (color->prev) - gpencil_palettecolor_setactive(palette, color->prev); + BKE_gpencil_palettecolor_setactive(palette, color->prev); else - gpencil_palettecolor_setactive(palette, color->next); + BKE_gpencil_palettecolor_setactive(palette, color->next); /* delete the strokes */ - gpencil_palettecolor_delete_strokes(gpd, color->info); + BKE_gpencil_palettecolor_delete_strokes(gpd, color->info); /* delete the palette color now... */ - gpencil_palettecolor_delete(palette, color); + BKE_gpencil_palettecolor_delete(palette, color); /* notifiers */ WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); @@ -2054,8 +2054,8 @@ void GPENCIL_OT_palettecolor_remove(wmOperatorType *ot) static int gp_isolate_palettecolor_exec(bContext *C, wmOperator *op) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDpalette *palette = gpencil_palette_getactive(gpd); - bGPDpalettecolor *active_color = gpencil_palettecolor_getactive(palette); + bGPDpalette *palette = BKE_gpencil_palette_getactive(gpd); + bGPDpalettecolor *active_color = BKE_gpencil_palettecolor_getactive(palette); bGPDpalettecolor *palcolor; int flags = PC_COLOR_LOCKED; @@ -2131,8 +2131,8 @@ void GPENCIL_OT_palettecolor_isolate(wmOperatorType *ot) static int gp_palettecolor_hide_exec(bContext *C, wmOperator *op) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDpalette *palette = gpencil_palette_getactive(gpd); - bGPDpalettecolor *palcolor = gpencil_palettecolor_getactive(palette); + bGPDpalette *palette = BKE_gpencil_palette_getactive(gpd); + bGPDpalettecolor *palcolor = BKE_gpencil_palettecolor_getactive(palette); bool unselected = RNA_boolean_get(op->ptr, "unselected"); @@ -2190,7 +2190,7 @@ static int gp_palettecolor_reveal_poll(bContext *C) static int gp_palettecolor_reveal_exec(bContext *C, wmOperator *UNUSED(op)) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDpalette *palette = gpencil_palette_getactive(gpd); + bGPDpalette *palette = BKE_gpencil_palette_getactive(gpd); bGPDpalettecolor *palcolor; /* sanity checks */ @@ -2228,7 +2228,7 @@ void GPENCIL_OT_palettecolor_reveal(wmOperatorType *ot) static int gp_palettecolor_lock_all_exec(bContext *C, wmOperator *UNUSED(op)) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDpalette *palette = gpencil_palette_getactive(gpd); + bGPDpalette *palette = BKE_gpencil_palette_getactive(gpd); bGPDpalettecolor *palcolor; /* sanity checks */ @@ -2266,7 +2266,7 @@ void GPENCIL_OT_palettecolor_lock_all(wmOperatorType *ot) static int gp_palettecolor_unlock_all_exec(bContext *C, wmOperator *UNUSED(op)) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDpalette *palette = gpencil_palette_getactive(gpd); + bGPDpalette *palette = BKE_gpencil_palette_getactive(gpd); bGPDpalettecolor *palcolor; /* sanity checks */ @@ -2309,8 +2309,8 @@ enum { static int gp_palettecolor_move_exec(bContext *C, wmOperator *op) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDpalette *palette = gpencil_palette_getactive(gpd); - bGPDpalettecolor *palcolor = gpencil_palettecolor_getactive(palette); + bGPDpalette *palette = BKE_gpencil_palette_getactive(gpd); + bGPDpalettecolor *palcolor = BKE_gpencil_palettecolor_getactive(palette); int direction = RNA_enum_get(op->ptr, "direction"); @@ -2367,8 +2367,8 @@ void GPENCIL_OT_palettecolor_move(wmOperatorType *ot) static int gp_palettecolor_select_exec(bContext *C, wmOperator *UNUSED(op)) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDpalette *palette = gpencil_palette_getactive(gpd); - bGPDpalettecolor *palcolor = gpencil_palettecolor_getactive(palette); + bGPDpalette *palette = BKE_gpencil_palette_getactive(gpd); + bGPDpalettecolor *palcolor = BKE_gpencil_palettecolor_getactive(palette); /* sanity checks */ if (ELEM(NULL, gpd, palette, palcolor)) @@ -2426,8 +2426,8 @@ void GPENCIL_OT_palettecolor_select(wmOperatorType *ot) static int gp_palettecolor_copy_exec(bContext *C, wmOperator *UNUSED(op)) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDpalette *palette = gpencil_palette_getactive(gpd); - bGPDpalettecolor *palcolor = gpencil_palettecolor_getactive(palette); + bGPDpalette *palette = BKE_gpencil_palette_getactive(gpd); + bGPDpalettecolor *palcolor = BKE_gpencil_palettecolor_getactive(palette); bGPDpalettecolor *newcolor; /* sanity checks */ @@ -2435,7 +2435,7 @@ static int gp_palettecolor_copy_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_CANCELLED; /* create a new color and duplicate data */ - newcolor = gpencil_palettecolor_addnew(palette, palcolor->info, true); + newcolor = BKE_gpencil_palettecolor_addnew(palette, palcolor->info, true); copy_v4_v4(newcolor->color, palcolor->color); copy_v4_v4(newcolor->fill, palcolor->fill); newcolor->flag = palcolor->flag; diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 621ebea6603..b298769c6dc 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -462,7 +462,7 @@ static int gp_strokes_paste_exec(bContext *C, wmOperator *op) } else if (gpl == NULL) { /* no active layer - let's just create one */ - gpl = gpencil_layer_addnew(gpd, DATA_("GP_Layer"), true); + gpl = BKE_gpencil_layer_addnew(gpd, DATA_("GP_Layer"), true); } else if ((gpencil_layer_is_editable(gpl) == false) && (type == GP_COPY_MERGE)) { BKE_report(op->reports, RPT_ERROR, "Can not paste strokes when active layer is hidden or locked"); @@ -525,7 +525,7 @@ static int gp_strokes_paste_exec(bContext *C, wmOperator *op) gpl = CTX_data_active_gpencil_layer(C); } } - gpf = gpencil_layer_getframe(gpl, CFRA, true); + gpf = BKE_gpencil_layer_getframe(gpl, CFRA, true); if (gpf) { bGPDstroke *new_stroke = MEM_dupallocN(gps); new_stroke->tmp_layerinfo[0] = '\0'; @@ -597,7 +597,7 @@ static int gp_move_to_layer_exec(bContext *C, wmOperator *op) /* Get layer or create new one */ if (layer_num == -1) { /* Create layer */ - target_layer = gpencil_layer_addnew(gpd, DATA_("GP_Layer"), true); + target_layer = BKE_gpencil_layer_addnew(gpd, DATA_("GP_Layer"), true); } else { /* Try to get layer */ @@ -642,7 +642,7 @@ static int gp_move_to_layer_exec(bContext *C, wmOperator *op) /* Paste them all in one go */ if (strokes.first) { Scene *scene = CTX_data_scene(C); - bGPDframe *gpf = gpencil_layer_getframe(target_layer, CFRA, true); + bGPDframe *gpf = BKE_gpencil_layer_getframe(target_layer, CFRA, true); BLI_movelisttolist(&gpf->strokes, &strokes); BLI_assert((strokes.first == strokes.last) && (strokes.first == NULL)); @@ -679,7 +679,7 @@ void GPENCIL_OT_move_to_layer(wmOperatorType *ot) static int gp_actframe_delete_poll(bContext *C) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDlayer *gpl = gpencil_layer_getactive(gpd); + bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd); /* only if there's an active layer with an active frame */ return (gpl && gpl->actframe); @@ -690,8 +690,8 @@ static int gp_actframe_delete_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDlayer *gpl = gpencil_layer_getactive(gpd); - bGPDframe *gpf = gpencil_layer_getframe(gpl, CFRA, 0); + bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd); + bGPDframe *gpf = BKE_gpencil_layer_getframe(gpl, CFRA, 0); /* if there's no existing Grease-Pencil data there, add some */ if (gpd == NULL) { @@ -704,7 +704,7 @@ static int gp_actframe_delete_exec(bContext *C, wmOperator *op) } /* delete it... */ - gpencil_layer_delframe(gpl, gpf); + BKE_gpencil_layer_delframe(gpl, gpf); /* notifiers */ WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); @@ -746,13 +746,13 @@ static int gp_actframe_delete_all_exec(bContext *C, wmOperator *op) CTX_DATA_BEGIN(C, bGPDlayer *, gpl, editable_gpencil_layers) { /* try to get the "active" frame - but only if it actually occurs on this frame */ - bGPDframe *gpf = gpencil_layer_getframe(gpl, CFRA, 0); + bGPDframe *gpf = BKE_gpencil_layer_getframe(gpl, CFRA, 0); if (gpf == NULL) continue; /* delete it... */ - gpencil_layer_delframe(gpl, gpf); + BKE_gpencil_layer_delframe(gpl, gpf); /* we successfully modified something */ success = true; diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 403d632b5da..eefdee70304 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -544,7 +544,7 @@ static short gp_stroke_addpoint(tGPsdata *p, const int mval[2], float pressure, } else if (p->paintmode == GP_PAINTMODE_DRAW_POLY) { - bGPDlayer *gpl = gpencil_layer_getactive(gpd); + bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd); /* get pointer to destination point */ pt = (tGPspoint *)(gpd->sbuffer); @@ -920,8 +920,8 @@ static void gp_stroke_newfrombuffer(tGPsdata *p) MEM_freeN(depth_arr); } /* Save palette color */ - bGPDpalette *palette = gpencil_palette_getactive(p->gpd); - bGPDpalettecolor *palcolor = gpencil_palettecolor_getactive(palette); + bGPDpalette *palette = BKE_gpencil_palette_getactive(p->gpd); + bGPDpalettecolor *palcolor = BKE_gpencil_palettecolor_getactive(palette); gps->palcolor = palcolor; strcpy(gps->colorname, palcolor->info); @@ -1221,7 +1221,7 @@ static bGPDpalettecolor *gp_create_new_color(bGPDpalette *palette) { bGPDpalettecolor *palcolor; - palcolor = gpencil_palettecolor_addnew(palette, DATA_("Color"), true); + palcolor = BKE_gpencil_palettecolor_addnew(palette, DATA_("Color"), true); return palcolor; } @@ -1234,12 +1234,12 @@ static void gp_init_drawing_brush(ToolSettings *ts, tGPsdata *p) /* if not exist, create a new one */ if (BLI_listbase_is_empty(&ts->gp_brushes)) { /* create new brushes */ - gpencil_brush_init_presets(ts); - brush = gpencil_brush_getactive(ts); + BKE_gpencil_brush_init_presets(ts); + brush = BKE_gpencil_brush_getactive(ts); } else { /* Use the current */ - brush = gpencil_brush_getactive(ts); + brush = BKE_gpencil_brush_getactive(ts); } /* be sure curves are initializated */ curvemapping_initialize(brush->cur_sensitivity); @@ -1263,23 +1263,23 @@ static void gp_init_palette(tGPsdata *p) /* if not exist, create a new palette */ if (BLI_listbase_is_empty(&gpd->palettes)) { /* create new palette */ - palette = gpencil_palette_addnew(gpd, DATA_("GP_Palette"), true); + palette = BKE_gpencil_palette_addnew(gpd, DATA_("GP_Palette"), true); /* now create a default color */ palcolor = gp_create_new_color(palette); } else { /* Use the current palette and color */ - palette = gpencil_palette_getactive(gpd); + palette = BKE_gpencil_palette_getactive(gpd); /* the palette needs one color */ if (BLI_listbase_is_empty(&palette->colors)) { palcolor = gp_create_new_color(palette); } else { - palcolor = gpencil_palettecolor_getactive(palette); + palcolor = BKE_gpencil_palettecolor_getactive(palette); } /* in some situations can be null, so use first */ if (palcolor == NULL) { - gpencil_palettecolor_setactive(palette, palette->colors.first); + BKE_gpencil_palettecolor_setactive(palette, palette->colors.first); palcolor = palette->colors.first; } } @@ -1439,7 +1439,7 @@ static bool gp_session_initdata(bContext *C, tGPsdata *p) else { /* if no existing GPencil block exists, add one */ if (*gpd_ptr == NULL) - *gpd_ptr = gpencil_data_addnew("GPencil"); + *gpd_ptr = BKE_gpencil_data_addnew("GPencil"); p->gpd = *gpd_ptr; } @@ -1514,9 +1514,9 @@ static void gp_paint_initstroke(tGPsdata *p, eGPencil_PaintModes paintmode) ToolSettings *ts = scene->toolsettings; /* get active layer (or add a new one if non-existent) */ - p->gpl = gpencil_layer_getactive(p->gpd); + p->gpl = BKE_gpencil_layer_getactive(p->gpd); if (p->gpl == NULL) { - p->gpl = gpencil_layer_addnew(p->gpd, "GP_Layer", true); + p->gpl = BKE_gpencil_layer_addnew(p->gpd, "GP_Layer", true); if (p->custom_color[3]) copy_v3_v3(p->gpl->color, p->custom_color); @@ -1544,7 +1544,7 @@ static void gp_paint_initstroke(tGPsdata *p, eGPencil_PaintModes paintmode) /* Add a new frame if needed (and based off the active frame, * as we need some existing strokes to erase) */ - gpl->actframe = gpencil_layer_getframe(gpl, CFRA, GP_GETFRAME_ADD_COPY); + gpl->actframe = BKE_gpencil_layer_getframe(gpl, CFRA, GP_GETFRAME_ADD_COPY); /* XXX: we omit GP_FRAME_PAINT here for now, * as it is only really useful for doing @@ -1580,7 +1580,7 @@ static void gp_paint_initstroke(tGPsdata *p, eGPencil_PaintModes paintmode) else add_frame_mode = GP_GETFRAME_ADD_NEW; - p->gpf = gpencil_layer_getframe(p->gpl, CFRA, add_frame_mode); + p->gpf = BKE_gpencil_layer_getframe(p->gpl, CFRA, add_frame_mode); if (p->gpf == NULL) { p->status = GP_STATUS_ERROR; diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c index 612b35aa608..4cb966c6378 100644 --- a/source/blender/editors/gpencil/gpencil_select.c +++ b/source/blender/editors/gpencil/gpencil_select.c @@ -266,7 +266,7 @@ static void gp_select_same_layer(bContext *C) CTX_DATA_BEGIN(C, bGPDlayer *, gpl, editable_gpencil_layers) { - bGPDframe *gpf = gpencil_layer_getframe(gpl, CFRA, 0); + bGPDframe *gpf = BKE_gpencil_layer_getframe(gpl, CFRA, 0); bGPDstroke *gps; bool found = false; @@ -709,7 +709,7 @@ static bool gp_stroke_do_circle_sel( } /* Ensure that stroke selection is in sync with its points */ - gpencil_stroke_sync_selection(gps); + BKE_gpencil_stroke_sync_selection(gps); } return changed; @@ -871,7 +871,7 @@ static int gpencil_border_select_exec(bContext *C, wmOperator *op) } /* Ensure that stroke selection is in sync with its points */ - gpencil_stroke_sync_selection(gps); + BKE_gpencil_stroke_sync_selection(gps); } GP_EDITABLE_STROKES_END; @@ -981,7 +981,7 @@ static int gpencil_lasso_select_exec(bContext *C, wmOperator *op) } /* Ensure that stroke selection is in sync with its points */ - gpencil_stroke_sync_selection(gps); + BKE_gpencil_stroke_sync_selection(gps); } GP_EDITABLE_STROKES_END; @@ -1152,7 +1152,7 @@ static int gpencil_select_exec(bContext *C, wmOperator *op) hit_point->flag &= ~GP_SPOINT_SELECT; /* ensure that stroke is selected correctly */ - gpencil_stroke_sync_selection(hit_stroke); + BKE_gpencil_stroke_sync_selection(hit_stroke); } } diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c index 1d7582eb18b..793ed2a07d0 100644 --- a/source/blender/editors/gpencil/gpencil_undo.c +++ b/source/blender/editors/gpencil/gpencil_undo.c @@ -100,14 +100,14 @@ int ED_undo_gpencil_step(bContext *C, int step, const char *name) bGPdata *gpd = *gpd_ptr; bGPDlayer *gpl, *gpld; - free_gpencil_layers(&gpd->layers); + BKE_gpencil_free_layers(&gpd->layers); /* copy layers */ BLI_listbase_clear(&gpd->layers); for (gpl = new_gpd->layers.first; gpl; gpl = gpl->next) { /* make a copy of source layer and its data */ - gpld = gpencil_layer_duplicate(gpl); + gpld = BKE_gpencil_layer_duplicate(gpl); BLI_addtail(&gpd->layers, gpld); } } @@ -153,7 +153,7 @@ void gpencil_undo_push(bGPdata *gpd) /* create new undo node */ undo_node = MEM_callocN(sizeof(bGPundonode), "gpencil undo node"); - undo_node->gpd = gpencil_data_duplicate(G.main, gpd, true); + undo_node->gpd = BKE_gpencil_data_duplicate(G.main, gpd, true); cur_node = undo_node; diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index f2c542da0aa..ed9a591dcbe 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -225,7 +225,7 @@ bool ED_gpencil_has_keyframe_v3d(Scene *scene, Object *ob, int cfra) /* just check both for now... */ // XXX: this could get confusing (e.g. if only on the object, but other places don't show this) if (scene->gpd) { - bGPDlayer *gpl = gpencil_layer_getactive(scene->gpd); + bGPDlayer *gpl = BKE_gpencil_layer_getactive(scene->gpd); if (gpl) { if (gpl->actframe) { // XXX: assumes that frame has been fetched already @@ -239,7 +239,7 @@ bool ED_gpencil_has_keyframe_v3d(Scene *scene, Object *ob, int cfra) } if (ob && ob->gpd) { - bGPDlayer *gpl = gpencil_layer_getactive(ob->gpd); + bGPDlayer *gpl = BKE_gpencil_layer_getactive(ob->gpd); if (gpl) { if (gpl->actframe) { // XXX: assumes that frame has been fetched already @@ -269,7 +269,7 @@ int gp_add_poll(bContext *C) int gp_active_layer_poll(bContext *C) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDlayer *gpl = gpencil_layer_getactive(gpd); + bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd); return (gpl != NULL); } @@ -278,7 +278,7 @@ int gp_active_layer_poll(bContext *C) int gp_active_brush_poll(bContext *C) { ToolSettings *ts = CTX_data_tool_settings(C); - bGPDbrush *brush = gpencil_brush_getactive(ts); + bGPDbrush *brush = BKE_gpencil_brush_getactive(ts); return (brush != NULL); } @@ -287,7 +287,7 @@ int gp_active_brush_poll(bContext *C) int gp_active_palette_poll(bContext *C) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDpalette *palette = gpencil_palette_getactive(gpd); + bGPDpalette *palette = BKE_gpencil_palette_getactive(gpd); return (palette != NULL); } @@ -296,8 +296,8 @@ int gp_active_palette_poll(bContext *C) int gp_active_palettecolor_poll(bContext *C) { bGPdata *gpd = ED_gpencil_data_get_active(C); - bGPDpalette *palette = gpencil_palette_getactive(gpd); - bGPDpalettecolor *palcolor = gpencil_palettecolor_getactive(palette); + bGPDpalette *palette = BKE_gpencil_palette_getactive(gpd); + bGPDpalettecolor *palcolor = BKE_gpencil_palettecolor_getactive(palette); return (palcolor != NULL); } @@ -470,20 +470,20 @@ bGPDpalettecolor *ED_gpencil_stroke_getcolor(bGPdata *gpd, bGPDstroke *gps) return gps->palcolor; /* get palette */ - palette = gpencil_palette_getactive(gpd); + palette = BKE_gpencil_palette_getactive(gpd); if (palette == NULL) { - palette = gpencil_palette_addnew(gpd, DATA_("GP_Palette"), true); + palette = BKE_gpencil_palette_addnew(gpd, DATA_("GP_Palette"), true); } /* get color */ - palcolor = gpencil_palettecolor_getbyname(palette, gps->colorname); + palcolor = BKE_gpencil_palettecolor_getbyname(palette, gps->colorname); if (palcolor == NULL) { if (gps->palcolor == NULL) { - palcolor = gpencil_palettecolor_addnew(palette, DATA_("Color"), true); + palcolor = BKE_gpencil_palettecolor_addnew(palette, DATA_("Color"), true); /* set to a different color */ ARRAY_SET_ITEMS(palcolor->color, 1.0f, 0.0f, 1.0f, 0.9f); } else { - palcolor = gpencil_palettecolor_addnew(palette, gps->colorname, true); + palcolor = BKE_gpencil_palettecolor_addnew(palette, gps->colorname, true); /* set old color and attributes */ bGPDpalettecolor *gpscolor = gps->palcolor; copy_v4_v4(palcolor->color, gpscolor->color); |