Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_interpolate.c
| Show First 20 Lines • Show All 505 Lines • ▼ Show 20 Lines | |||||
| /* ----------------------- */ | /* ----------------------- */ | ||||
| /* Invoke handler: Initialize the operator */ | /* Invoke handler: Initialize the operator */ | ||||
| static int gpencil_interpolate_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) | static int gpencil_interpolate_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) | ||||
| { | { | ||||
| wmWindow *win = CTX_wm_window(C); | wmWindow *win = CTX_wm_window(C); | ||||
| bGPdata *gpd = CTX_data_gpencil_data(C); | bGPdata *gpd = CTX_data_gpencil_data(C); | ||||
| bGPDlayer *gpl = CTX_data_active_gpencil_layer(C); | bGPDlayer *gpl = CTX_data_active_gpencil_layer(C); | ||||
| Depsgraph *depsgraph = CTX_data_depsgraph(C); | Scene *scene = CTX_data_scene(C); | ||||
| int cfra_eval = (int)DEG_get_ctime(depsgraph); | int cfra_eval = CFRA; | ||||
| bGPDframe *actframe = gpl->actframe; | bGPDframe *actframe = gpl->actframe; | ||||
| tGPDinterpolate *tgpi = NULL; | tGPDinterpolate *tgpi = NULL; | ||||
| /* cannot interpolate if not between 2 frames */ | /* cannot interpolate if not between 2 frames */ | ||||
| if (ELEM(NULL, actframe, actframe->next)) { | if (ELEM(NULL, actframe, actframe->next)) { | ||||
| BKE_report( | BKE_report( | ||||
| op->reports, | op->reports, | ||||
| RPT_ERROR, | RPT_ERROR, | ||||
| ▲ Show 20 Lines • Show All 420 Lines • ▼ Show 20 Lines | |||||
| static int gpencil_interpolate_seq_exec(bContext *C, wmOperator *op) | static int gpencil_interpolate_seq_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| bGPdata *gpd = CTX_data_gpencil_data(C); | bGPdata *gpd = CTX_data_gpencil_data(C); | ||||
| bGPDlayer *active_gpl = CTX_data_active_gpencil_layer(C); | bGPDlayer *active_gpl = CTX_data_active_gpencil_layer(C); | ||||
| bGPDframe *actframe = active_gpl->actframe; | bGPDframe *actframe = active_gpl->actframe; | ||||
| Object *ob = CTX_data_active_object(C); | Object *ob = CTX_data_active_object(C); | ||||
| ToolSettings *ts = CTX_data_tool_settings(C); | ToolSettings *ts = CTX_data_tool_settings(C); | ||||
| Depsgraph *depsgraph = CTX_data_depsgraph(C); | Scene *scene = CTX_data_scene(C); | ||||
| int cfra_eval = (int)DEG_get_ctime(depsgraph); | int cfra_eval = CFRA; | ||||
| GP_Interpolate_Settings *ipo_settings = &ts->gp_interpolate; | GP_Interpolate_Settings *ipo_settings = &ts->gp_interpolate; | ||||
| eGP_Interpolate_SettingsFlag flag = ipo_settings->flag; | eGP_Interpolate_SettingsFlag flag = ipo_settings->flag; | ||||
| /* cannot interpolate if not between 2 frames */ | /* cannot interpolate if not between 2 frames */ | ||||
| if (ELEM(NULL, actframe, actframe->next)) { | if (ELEM(NULL, actframe, actframe->next)) { | ||||
| BKE_report( | BKE_report( | ||||
| op->reports, | op->reports, | ||||
| ▲ Show 20 Lines • Show All 253 Lines • Show Last 20 Lines | |||||