Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_data.c
| Show First 20 Lines • Show All 588 Lines • ▼ Show 20 Lines | enum { | ||||
| GP_FRAME_DUP_ACTIVE = 0, | GP_FRAME_DUP_ACTIVE = 0, | ||||
| GP_FRAME_DUP_ALL = 1, | GP_FRAME_DUP_ALL = 1, | ||||
| }; | }; | ||||
| static int gp_frame_duplicate_exec(bContext *C, wmOperator *op) | static int gp_frame_duplicate_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| bGPdata *gpd = ED_gpencil_data_get_active(C); | bGPdata *gpd = ED_gpencil_data_get_active(C); | ||||
| bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd); | bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd); | ||||
| Depsgraph *depsgraph = CTX_data_depsgraph(C); | Scene *scene = CTX_data_scene(C); | ||||
| int cfra_eval = (int)DEG_get_ctime(depsgraph); | int cfra_eval = CFRA; | ||||
| int mode = RNA_enum_get(op->ptr, "mode"); | int mode = RNA_enum_get(op->ptr, "mode"); | ||||
| /* sanity checks */ | /* sanity checks */ | ||||
| if (ELEM(NULL, gpd, gpl)) { | if (ELEM(NULL, gpd, gpl)) { | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 2,351 Lines • Show Last 20 Lines | |||||