diff options
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_intern.h')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_intern.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h index df9cb2e9a01..2a608d44a0b 100644 --- a/source/blender/editors/gpencil/gpencil_intern.h +++ b/source/blender/editors/gpencil/gpencil_intern.h @@ -378,8 +378,8 @@ typedef enum eGPencil_PaintModes { GP_PAINTMODE_SET_CP, } eGPencil_PaintModes; -/* maximum sizes of gp-session buffer */ -#define GP_STROKE_BUFFER_MAX 5000 +/* chunk size for gp-session buffer (the total size is a multiple of this number) */ +#define GP_STROKE_BUFFER_CHUNK 2048 /* stroke editing ----- */ @@ -486,9 +486,11 @@ void GPENCIL_OT_stroke_simplify_fixed(struct wmOperatorType *ot); void GPENCIL_OT_stroke_separate(struct wmOperatorType *ot); void GPENCIL_OT_stroke_split(struct wmOperatorType *ot); void GPENCIL_OT_stroke_smooth(struct wmOperatorType *ot); +void GPENCIL_OT_stroke_sample(struct wmOperatorType *ot); void GPENCIL_OT_stroke_merge(struct wmOperatorType *ot); void GPENCIL_OT_stroke_cutter(struct wmOperatorType *ot); void GPENCIL_OT_stroke_trim(struct wmOperatorType *ot); +void GPENCIL_OT_stroke_merge_by_distance(struct wmOperatorType *ot); void GPENCIL_OT_brush_presets_create(struct wmOperatorType *ot); @@ -583,6 +585,7 @@ typedef enum ACTCONT_TYPES { struct GP_EditableStrokes_Iter { float diff_mat[4][4]; + float inverse_diff_mat[4][4]; }; /** @@ -598,7 +601,7 @@ struct GP_EditableStrokes_Iter { #define GP_EDITABLE_STROKES_BEGIN(gpstroke_iter, C, gpl, gps) \ { \ struct GP_EditableStrokes_Iter gpstroke_iter = {{{0}}}; \ - Depsgraph *depsgraph_ = CTX_data_depsgraph(C); \ + Depsgraph *depsgraph_ = CTX_data_ensure_evaluated_depsgraph(C); \ Object *obact_ = CTX_data_active_object(C); \ bGPdata *gpd_ = CTX_data_gpencil_data(C); \ const bool is_multiedit_ = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd_); \ @@ -607,8 +610,11 @@ struct GP_EditableStrokes_Iter { for (bGPDframe *gpf_ = init_gpf_; gpf_; gpf_ = gpf_->next) { \ if ((gpf_ == gpl->actframe) || ((gpf_->flag & GP_FRAME_SELECT) && is_multiedit_)) { \ ED_gpencil_parent_location(depsgraph_, obact_, gpd_, gpl, gpstroke_iter.diff_mat); \ + invert_m4_m4(gpstroke_iter.inverse_diff_mat, gpstroke_iter.diff_mat); \ /* loop over strokes */ \ - for (bGPDstroke *gps = gpf_->strokes.first; gps; gps = gps->next) { \ + bGPDstroke *gpsn_; \ + for (bGPDstroke *gps = gpf_->strokes.first; gps; gps = gpsn_) { \ + gpsn_ = gps->next; \ /* skip strokes that are invalid for current view */ \ if (ED_gpencil_stroke_can_use(C, gps) == false) \ continue; \ |