Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_intern.h
| Show First 20 Lines • Show All 593 Lines • ▼ Show 20 Lines | |||||
| * \param gpl: The identifier to use for the layer of the stroke being processed. | * \param gpl: The identifier to use for the layer of the stroke being processed. | ||||
| * Choose a suitable value to avoid name clashes. | * Choose a suitable value to avoid name clashes. | ||||
| * \param gps: The identifier to use for current stroke being processed. | * \param gps: The identifier to use for current stroke being processed. | ||||
| * Choose a suitable value to avoid name clashes. | * Choose a suitable value to avoid name clashes. | ||||
| */ | */ | ||||
| #define GP_EDITABLE_STROKES_BEGIN(gpstroke_iter, C, gpl, gps) \ | #define GP_EDITABLE_STROKES_BEGIN(gpstroke_iter, C, gpl, gps) \ | ||||
| { \ | { \ | ||||
| struct GP_EditableStrokes_Iter gpstroke_iter = {{{0}}}; \ | 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); \ | Object *obact_ = CTX_data_active_object(C); \ | ||||
| bGPdata *gpd_ = CTX_data_gpencil_data(C); \ | bGPdata *gpd_ = CTX_data_gpencil_data(C); \ | ||||
| const bool is_multiedit_ = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd_); \ | const bool is_multiedit_ = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd_); \ | ||||
| CTX_DATA_BEGIN (C, bGPDlayer *, gpl, editable_gpencil_layers) { \ | CTX_DATA_BEGIN (C, bGPDlayer *, gpl, editable_gpencil_layers) { \ | ||||
| bGPDframe *init_gpf_ = (is_multiedit_) ? gpl->frames.first : gpl->actframe; \ | bGPDframe *init_gpf_ = (is_multiedit_) ? gpl->frames.first : gpl->actframe; \ | ||||
| for (bGPDframe *gpf_ = init_gpf_; gpf_; gpf_ = gpf_->next) { \ | for (bGPDframe *gpf_ = init_gpf_; gpf_; gpf_ = gpf_->next) { \ | ||||
| if ((gpf_ == gpl->actframe) || ((gpf_->flag & GP_FRAME_SELECT) && is_multiedit_)) { \ | if ((gpf_ == gpl->actframe) || ((gpf_->flag & GP_FRAME_SELECT) && is_multiedit_)) { \ | ||||
| ED_gpencil_parent_location(depsgraph_, obact_, gpd_, gpl, gpstroke_iter.diff_mat); \ | ED_gpencil_parent_location(depsgraph_, obact_, gpd_, gpl, gpstroke_iter.diff_mat); \ | ||||
| Show All 26 Lines | |||||