Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_undo.c
| Show First 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | if (gpd_ptr) { | ||||
| for (gpl = new_gpd->layers.first; gpl; gpl = gpl->next) { | for (gpl = new_gpd->layers.first; gpl; gpl = gpl->next) { | ||||
| /* make a copy of source layer and its data */ | /* make a copy of source layer and its data */ | ||||
| gpld = BKE_gpencil_layer_duplicate(gpl); | gpld = BKE_gpencil_layer_duplicate(gpl); | ||||
| BLI_addtail(&gpd->layers, gpld); | BLI_addtail(&gpd->layers, gpld); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* drawing batch cache is dirty now */ | |||||
| BKE_gpencil_batch_cache_dirty(new_gpd); | |||||
| new_gpd->flag |= GP_DATA_CACHE_IS_DIRTY; | |||||
| } | } | ||||
| WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL); | WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL); | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| void gpencil_undo_init(bGPdata *gpd) | void gpencil_undo_init(bGPdata *gpd) | ||||
| ▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines | |||||