Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/gpencil.c
| Show First 20 Lines • Show All 142 Lines • ▼ Show 20 Lines | for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps_next) { | ||||
| BKE_gpencil_free_stroke(gps); | BKE_gpencil_free_stroke(gps); | ||||
| } | } | ||||
| BLI_listbase_clear(&gpf->strokes); | BLI_listbase_clear(&gpf->strokes); | ||||
| return changed; | return changed; | ||||
| } | } | ||||
| /* Free strokes and colors belonging to a gp-frame */ | /* Free strokes and colors belonging to a gp-frame */ | ||||
| bool BKE_gpencil_free_frame_runtime_data(bGPDframe *derived_gpf) | bool BKE_gpencil_free_frame_runtime_data(bGPDframe *eval_gpf) | ||||
| { | { | ||||
| bGPDstroke *gps_next; | bGPDstroke *gps_next; | ||||
| if (!derived_gpf) { | if (!eval_gpf) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| /* free strokes */ | /* free strokes */ | ||||
| for (bGPDstroke *gps = derived_gpf->strokes.first; gps; gps = gps_next) { | for (bGPDstroke *gps = eval_gpf->strokes.first; gps; gps = gps_next) { | ||||
| gps_next = gps->next; | gps_next = gps->next; | ||||
| BKE_gpencil_free_stroke(gps); | BKE_gpencil_free_stroke(gps); | ||||
| } | } | ||||
| BLI_listbase_clear(&derived_gpf->strokes); | BLI_listbase_clear(&eval_gpf->strokes); | ||||
| return true; | return true; | ||||
| } | } | ||||
| /* Free all of a gp-layer's frames */ | /* Free all of a gp-layer's frames */ | ||||
| void BKE_gpencil_free_frames(bGPDlayer *gpl) | void BKE_gpencil_free_frames(bGPDlayer *gpl) | ||||
| { | { | ||||
| bGPDframe *gpf_next; | bGPDframe *gpf_next; | ||||
| ▲ Show 20 Lines • Show All 2,406 Lines • Show Last 20 Lines | |||||