57 info.
max_level, lmd->use_multiple_levels ? lmd->level_end : lmd->level_start);
69 const bool cache_is_ready)
130 if (!node || !node->is_layer()) {
135 if (layer.start_frame_at(frame) == frame) {
153 md->
flags &= (~MOD_LINEART_IS_BAKED);
179 if (!node || !node->is_layer()) {
185 if (layer.start_frame_at(frame) == frame) {
186 drawing = grease_pencil->get_drawing_at(layer, frame);
189 drawing = grease_pencil->insert_frame(layer, frame);
206 lmd->
cache = local_lc;
211 ob->object_to_world(),
245 bool touched =
false;
264 bool is_first =
true;
360 bool bake_all_targets,
365 if (!bake_all_targets) {
368 WM_report(
RPT_ERROR,
"No active object, or active object isn't a Grease Pencil object");
459 if (!node || !node->is_layer()) {
465 grease_pencil->remove_frames(layer, layer.sorted_keys());
466 grease_pencil->insert_frame(layer, 0);
470 lmd->
flags &= (~MOD_LINEART_IS_BAKED);
505 ot->
name =
"Bake Line Art";
506 ot->
description =
"Bake Line Art for current Grease Pencil object";
507 ot->
idname =
"OBJECT_OT_lineart_bake_strokes";
519 ot->
name =
"Clear Baked Line Art";
520 ot->
description =
"Clear all strokes in current Grease Pencil object";
521 ot->
idname =
"OBJECT_OT_lineart_clear";
#define CTX_DATA_BEGIN(C, Type, instance, member)
wmWindow * CTX_wm_window(const bContext *C)
Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
Low-level operations for curves.
Low-level operations for grease pencil.
General operations, lookup, etc. for materials.
int BKE_object_material_index_get(Object *ob, const Material *ma)
bool BKE_modifier_is_enabled(const Scene *scene, ModifierData *md, int required_mode)
void BKE_report(ReportList *reports, eReportType type, const char *message)
void BKE_scene_frame_set(Scene *scene, float frame)
void BKE_scene_graph_update_for_newframe(Depsgraph *depsgraph)
A KD-tree for nearest neighbor search.
#define LISTBASE_FOREACH(type, var, list)
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_graph_build_from_view_layer(Depsgraph *graph)
Scene * DEG_get_evaluated_scene(const Depsgraph *graph)
@ eModifierType_GreasePencilLineart
void append(const T &value)
IndexRange index_range() const
bke::CurvesGeometry & strokes_for_write()
draw_view in_light_buf[] float
static bool bake_strokes(Object *ob, Depsgraph *dg, LineartCache **lc, GreasePencilLineartModifierData *md, int frame, bool is_first)
static int lineart_bake_strokes_invoke(bContext *C, wmOperator *op, const wmEvent *)
static bool bake_single_target(LineartBakeJob *bj, Object *ob, int frame)
static void lineart_bake_startjob(void *customdata, wmJobWorkerStatus *worker_status)
static void lineart_bake_endjob(void *customdata)
static bool clear_strokes(Object *ob, ModifierData *md, int frame)
static void guard_modifiers(LineartBakeJob &bj)
static void lineart_bake_job_free(void *customdata)
static bool lineart_mod_is_disabled(Scene *scene, GreasePencilLineartModifierData *md)
static int lineart_bake_strokes_exec(bContext *C, wmOperator *op)
void ED_operatortypes_grease_pencil_lineart()
static void lineart_gpencil_clear_strokes_exec_common(Object *ob)
static void OBJECT_OT_lineart_bake_strokes(wmOperatorType *ot)
static int lineart_bake_common(bContext *C, wmOperator *op, bool bake_all_targets, bool do_background)
static int lineart_bake_strokes_common_modal(bContext *C, wmOperator *op, const wmEvent *)
static int lineart_gpencil_clear_strokes_exec(bContext *C, wmOperator *op)
static void OBJECT_OT_lineart_clear(wmOperatorType *ot)
void MOD_lineart_chain_clear_picked_flag(LineartCache *lc)
void MOD_lineart_clear_cache(LineartCache **lc)
void MOD_lineart_destroy_render_data_v3(GreasePencilLineartModifierData *lmd)
void MOD_lineart_gpencil_generate_v3(const LineartCache *cache, const blender::float4x4 &inverse_mat, Depsgraph *depsgraph, blender::bke::greasepencil::Drawing &drawing, const int8_t source_type, Object *source_object, Collection *source_collection, const int level_start, const int level_end, const int mat_nr, const int16_t edge_types, const uchar mask_switches, const uchar material_mask_bits, const uchar intersection_mask, const float thickness, const float opacity, const uchar shadow_selection, const uchar silhouette_mode, const char *source_vgname, const char *vgname, const int modifier_flags, const int modifier_calculation_flags)
bool MOD_lineart_compute_feature_lines_v3(Depsgraph *depsgraph, GreasePencilLineartModifierData &lmd, LineartCache **cached_result, bool enable_stroke_depth_offset)
bool active_grease_pencil_poll(bContext *C)
void get_lineart_modifier_limits(const Object &ob, blender::ed::greasepencil::LineartLimitInfo &info)
void set_lineart_modifier_limits(GreasePencilLineartModifierData &lmd, const blender::ed::greasepencil::LineartLimitInfo &info, const bool cache_is_ready)
GreasePencilLineartModifierData * get_first_lineart_modifier(const Object &ob)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
unsigned char shadow_selection
unsigned char material_mask_bits
struct Object * source_object
struct LineartCache * cache
char level_start_override
char source_vertex_group[64]
struct Material * target_material
unsigned char mask_switches
struct Collection * source_collection
char shadow_use_silhouette_override
unsigned char intersection_mask
short edge_types_override
char shadow_selection_override
unsigned char silhouette_selection
blender::Vector< Object * > objects
uint8_t silhouette_selection
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* modal)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
void WM_report(eReportType type, const char *message)
void WM_main_add_notifier(uint type, void *reference)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_set_locked_interface(wmWindowManager *wm, bool lock)
void WM_jobs_timer(wmJob *wm_job, double time_step, uint note, uint endnote)
void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job)
wmJob * WM_jobs_get(wmWindowManager *wm, wmWindow *win, const void *owner, const char *name, const eWM_JobFlag flag, const eWM_JobType job_type)
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 *customdata))
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))