95 bool only_use_existing_gp_frames =
false;
96 bGPDframe *gpf = (only_use_existing_gp_frames ?
115 lmd->
cache = local_lc;
177 bool touched =
false;
195 bool is_first =
true;
284 bool bake_all_targets,
289 if (!bake_all_targets) {
343 float pseduo_progress;
344 short pseduo_do_update;
439 ot->
name =
"Bake Line Art";
440 ot->
description =
"Bake Line Art for current GPencil object";
441 ot->
idname =
"OBJECT_OT_lineart_bake_strokes";
450 ot->
name =
"Bake Line Art (All)";
451 ot->
description =
"Bake all Grease Pencil objects that have a line art modifier";
452 ot->
idname =
"OBJECT_OT_lineart_bake_strokes_all";
461 ot->
name =
"Clear Baked Line Art";
462 ot->
description =
"Clear all strokes in current GPencil object";
463 ot->
idname =
"OBJECT_OT_lineart_clear";
470 ot->
name =
"Clear Baked Line Art (All)";
471 ot->
description =
"Clear all strokes in all Grease Pencil objects that have a line art modifier";
472 ot->
idname =
"OBJECT_OT_lineart_clear_all";
typedef float(TangentPoint)[2]
struct Scene * CTX_data_scene(const bContext *C)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
#define CTX_DATA_BEGIN(C, Type, instance, member)
struct Object * CTX_data_active_object(const bContext *C)
struct Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
struct bGPDframe * BKE_gpencil_frame_addnew(struct bGPDlayer *gpl, int cframe)
void BKE_gpencil_free_frames(struct bGPDlayer *gpl)
bool BKE_gpencil_layer_frame_delete(struct bGPDlayer *gpl, struct bGPDframe *gpf)
int BKE_gpencil_object_material_index_get(struct Object *ob, struct Material *ma)
struct bGPDframe * BKE_gpencil_layer_frame_find(struct bGPDlayer *gpl, int cframe)
struct bGPDlayer * BKE_gpencil_layer_get_by_name(struct bGPdata *gpd, char *name, int first_if_not_found)
struct bGPDframe * BKE_gpencil_layer_frame_get(struct bGPDlayer *gpl, int cframe, eGP_GetFrame_Mode addnew)
GpencilLineartLimitInfo BKE_gpencil_get_lineart_modifier_limits(const struct Object *ob)
void BKE_gpencil_set_lineart_modifier_limits(struct GpencilModifierData *md, const struct GpencilLineartLimitInfo *info, bool is_first_lineart)
const GpencilModifierTypeInfo * BKE_gpencil_modifier_get_info(GpencilModifierType type)
void BKE_report(ReportList *reports, eReportType type, const char *message)
void BKE_scene_graph_update_for_newframe(struct Depsgraph *depsgraph)
void BKE_scene_frame_set(struct Scene *scene, float frame)
void BLI_linklist_free(LinkNode *list, LinkNodeFreeFP freefunc)
void void BLI_linklist_prepend(LinkNode **listp, void *ptr) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
@ eGpencilModifierMode_Render
@ eGpencilModifierMode_Realtime
@ eGpencilModifierType_Lineart
Read Guarded memory(de)allocation.
ATTR_WARN_UNUSED_RESULT const BMLoop * l
void MOD_lineart_chain_clear_picked_flag(LineartCache *lc)
void MOD_lineart_clear_cache(struct LineartCache **lc)
void MOD_lineart_destroy_render_data(LineartGpencilModifierData *lmd)
bool MOD_lineart_compute_feature_lines(Depsgraph *depsgraph, LineartGpencilModifierData *lmd, LineartCache **cached_result, bool enable_stroke_depth_offset)
void MOD_lineart_gpencil_generate(LineartCache *cache, Depsgraph *depsgraph, Object *ob, bGPDlayer *gpl, bGPDframe *gpf, int8_t source_type, void *source_reference, int level_start, int level_end, int mat_nr, int16_t edge_types, uchar mask_switches, uchar material_mask_bits, uchar intersection_mask, int16_t thickness, float opacity, uchar shadow_selection, uchar silhouette_mode, const char *source_vgname, const char *vgname, int modifier_flags, int modifier_calculation_flags)
static bool lineart_mod_is_disabled(GpencilModifierData *md)
void OBJECT_OT_lineart_bake_strokes_all(wmOperatorType *ot)
static int lineart_gpencil_bake_strokes_all_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static int lineart_gpencil_clear_strokes_exec(bContext *C, wmOperator *UNUSED(op))
static void lineart_gpencil_bake_endjob(void *customdata)
static bool clear_strokes(Object *ob, GpencilModifierData *md, int frame)
void OBJECT_OT_lineart_bake_strokes(wmOperatorType *ot)
static void lineart_gpencil_guard_modifiers(LineartBakeJob *bj)
static int lineart_gpencil_bake_strokes_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
void OBJECT_OT_lineart_clear_all(wmOperatorType *ot)
void OBJECT_OT_lineart_clear(wmOperatorType *ot)
static int lineart_gpencil_clear_strokes_all_exec(bContext *C, wmOperator *op)
static int lineart_gpencil_bake_strokes_exec(bContext *C, wmOperator *op)
static bool lineart_gpencil_bake_single_target(LineartBakeJob *bj, Object *ob, int frame)
static void lineart_gpencil_bake_startjob(void *customdata, short *stop, short *do_update, float *progress)
static bool bake_strokes(Object *ob, Depsgraph *dg, LineartCache **lc, GpencilModifierData *md, int frame, bool is_first)
static int lineart_gpencil_bake_common(bContext *C, wmOperator *op, bool bake_all_targets, bool do_background)
void WM_operatortypes_lineart(void)
static int lineart_gpencil_bake_strokes_all_exec(bContext *C, wmOperator *op)
static int lineart_gpencil_bake_strokes_commom_modal(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static void lineart_gpencil_clear_strokes_exec_common(Object *ob)
struct LineartBakeJob LineartBakeJob
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
bool(* isDisabled)(struct GpencilModifierData *md, int userRenderParams)
struct Collection * source_collection
unsigned char mask_switches
struct LineartCache * cache
char source_vertex_group[64]
unsigned char shadow_selection
unsigned char intersection_mask
struct Material * target_material
unsigned char material_mask_bits
unsigned char silhouette_selection
struct Object * source_object
ListBase greasepencil_modifiers
struct LineartCache * lineart_cache
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_main_add_notifier(unsigned int type, void *reference)
void WM_report(eReportType type, const char *message)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_set_locked_interface(wmWindowManager *wm, bool lock)
void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job)
void WM_jobs_callbacks(wmJob *wm_job, wm_jobs_start_callback startjob, void(*initjob)(void *), void(*update)(void *), void(*endjob)(void *))
bool WM_jobs_test(const wmWindowManager *wm, const void *owner, int job_type)
void WM_jobs_customdata_set(wmJob *wm_job, void *customdata, void(*free)(void *))
void WM_jobs_timer(wmJob *wm_job, double timestep, unsigned int note, unsigned int endnote)
wmJob * WM_jobs_get(wmWindowManager *wm, wmWindow *win, const void *owner, const char *name, int flag, int job_type)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))