Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/gpencil_modifier.c
| Show First 20 Lines • Show All 610 Lines • ▼ Show 20 Lines | static int gpencil_remap_time_get(Depsgraph *depsgraph, Scene *scene, Object *ob, bGPDlayer *gpl) | ||||
| int remap_cfra = cfra_eval; | int remap_cfra = cfra_eval; | ||||
| if (time_remap) { | if (time_remap) { | ||||
| remap_cfra = gpencil_time_modifier(depsgraph, scene, ob, gpl, cfra_eval, is_render); | remap_cfra = gpencil_time_modifier(depsgraph, scene, ob, gpl, cfra_eval, is_render); | ||||
| } | } | ||||
| return remap_cfra; | return remap_cfra; | ||||
| } | } | ||||
| /** Get the current frame re-timed with time modifiers. | /** | ||||
| * Get the current frame re-timed with time modifiers. | |||||
| * \param depsgraph: Current depsgraph. | * \param depsgraph: Current depsgraph. | ||||
| * \param scene: Current scene | * \param scene: Current scene | ||||
| * \param ob: Grease pencil object | * \param ob: Grease pencil object | ||||
| * \param gpl: Grease pencil layer | * \param gpl: Grease pencil layer | ||||
| * \return New frame number | * \return New frame number | ||||
| */ | */ | ||||
| bGPDframe *BKE_gpencil_frame_retime_get(Depsgraph *depsgraph, | bGPDframe *BKE_gpencil_frame_retime_get(Depsgraph *depsgraph, | ||||
| Scene *scene, | Scene *scene, | ||||
| ▲ Show 20 Lines • Show All 113 Lines • ▼ Show 20 Lines | if (ob->runtime.gpd_eval != NULL) { | ||||
| ob->runtime.gpd_eval = NULL; | ob->runtime.gpd_eval = NULL; | ||||
| ob->data = ob->runtime.gpd_orig; | ob->data = ob->runtime.gpd_orig; | ||||
| } | } | ||||
| ob->runtime.gpd_eval = gpencil_copy_for_eval(ob->runtime.gpd_orig); | ob->runtime.gpd_eval = gpencil_copy_for_eval(ob->runtime.gpd_orig); | ||||
| gpencil_assign_object_eval(ob); | gpencil_assign_object_eval(ob); | ||||
| BKE_gpencil_update_orig_pointers(ob_orig, ob); | BKE_gpencil_update_orig_pointers(ob_orig, ob); | ||||
| } | } | ||||
| /** Calculate gpencil modifiers. | /** | ||||
| * Calculate gpencil modifiers. | |||||
| * \param depsgraph: Current depsgraph | * \param depsgraph: Current depsgraph | ||||
| * \param scene: Current scene | * \param scene: Current scene | ||||
| * \param ob: Grease pencil object | * \param ob: Grease pencil object | ||||
| */ | */ | ||||
| void BKE_gpencil_modifiers_calc(Depsgraph *depsgraph, Scene *scene, Object *ob) | void BKE_gpencil_modifiers_calc(Depsgraph *depsgraph, Scene *scene, Object *ob) | ||||
| { | { | ||||
| bGPdata *gpd = (bGPdata *)ob->data; | bGPdata *gpd = (bGPdata *)ob->data; | ||||
| const bool is_edit = GPENCIL_ANY_EDIT_MODE(gpd); | const bool is_edit = GPENCIL_ANY_EDIT_MODE(gpd); | ||||
| ▲ Show 20 Lines • Show All 206 Lines • Show Last 20 Lines | |||||