52 info.
max_level, lmd->use_multiple_levels ? lmd->level_end : lmd->level_start);
64 const bool cache_is_ready)
130 if (
layer.start_frame_at(frame) == frame) {
179 if (
layer.start_frame_at(frame) == frame) {
185 if (!drawing) [[unlikely]] {
196 if (should_compute_again) {
205 lmd->
cache = local_lc;
210 ob->world_to_object(),
233 if (should_compute_again) {
242 bool touched =
false;
261 bool is_first =
true;
282 for (
const int object : bj.
objects.index_range()) {
317 for (
const int object : bj->
objects.index_range()) {
346 for (
const int object : bj->
objects.index_range()) {
360 bool bake_all_targets,
365 if (!bake_all_targets) {
369 "No active object, or active object isn't a Grease Pencil object");
400 "Baking Line Art...",
516 return TIP_(
"Bake Line Art for all Grease Pencil objects");
523 ot->
name =
"Bake Line Art";
524 ot->
description =
"Bake Line Art for current Grease Pencil object";
525 ot->
idname =
"OBJECT_OT_lineart_bake_strokes";
542 return TIP_(
"Clear all strokes in all Grease Pencil object");
549 ot->
name =
"Clear Baked Line Art";
550 ot->
description =
"Clear all strokes in current Grease Pencil object";
551 ot->
idname =
"OBJECT_OT_lineart_clear";
557 RNA_def_boolean(ot->
srna,
"clear_all",
false,
"Clear All",
"Clear all Line Art modifier bakes");
#define CTX_DATA_BEGIN(C, Type, instance, member)
Low-level operations for curves.
Low-level operations for grease pencil.
General operations, lookup, etc. for materials.
#define CTX_IFACE_(context, msgid)
bke::CurvesGeometry & strokes_for_write()
bool active_grease_pencil_poll(bContext *C)
void get_lineart_modifier_limits(const Object &ob, ed::greasepencil::LineartLimitInfo &info)
GreasePencilLineartModifierData * get_first_lineart_modifier(const Object &ob)
void set_lineart_modifier_limits(GreasePencilLineartModifierData &lmd, const ed::greasepencil::LineartLimitInfo &info, const bool cache_is_ready)
void WM_main_add_notifier(uint type, void *reference)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))
void BKE_scene_graph_update_for_newframe(Depsgraph *depsgraph)
static wmOperatorStatus lineart_bake_strokes_common_modal(bContext *C, wmOperator *op, const wmEvent *)
void DEG_graph_build_from_view_layer(Depsgraph *graph)
void WM_jobs_callbacks(wmJob *wm_job, wm_jobs_start_callback startjob, void(*initjob)(void *), void(*update)(void *), void(*endjob)(void *))
@ REGION_DRAW_LOCK_BAKING
void BKE_spacedata_draw_locks(ARegionDrawLockFlags lock_flags)
Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
static wmOperatorStatus lineart_bake_strokes_invoke(bContext *C, wmOperator *op, const wmEvent *)
@ eModifierType_GreasePencilLineart
void MOD_lineart_clear_cache(LineartCache **lc)
wmWindow * CTX_wm_window(const bContext *C)
void WM_jobs_customdata_set(wmJob *wm_job, void *customdata, void(*free)(void *customdata))
static bool clear_strokes(Object *ob, ModifierData *md, int frame)
void BKE_scene_frame_set(Scene *scene, float frame)
bool MOD_lineart_compute_feature_lines_v3(Depsgraph *depsgraph, GreasePencilLineartModifierData &lmd, LineartCache **cached_result, bool enable_stroke_depth_offset)
void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job)
void MOD_lineart_chain_clear_picked_flag(LineartCache *lc)
void WM_locked_interface_set(wmWindowManager *wm, bool lock)
void WM_locked_interface_set_with_flags(wmWindowManager *wm, short lock_flags)
static void OBJECT_OT_lineart_clear(wmOperatorType *ot)
void DEG_id_tag_update(ID *id, unsigned int flags)
void BKE_report(ReportList *reports, eReportType type, const char *message)
bool WM_jobs_has_running(const wmWindowManager *window_manager, const void *owner, const eWM_JobType type, const eWM_JobFlag exclude_flags)
static wmOperatorStatus lineart_gpencil_clear_strokes_exec(bContext *C, wmOperator *op)
void MOD_lineart_gpencil_generate_v3(const LineartCache *cache, const float4x4 &inverse_mat, Depsgraph *depsgraph, 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 bool fill_strokes, const uchar shadow_selection, const uchar silhouette_mode, const char *source_vgname, const char *vgname, const int modifier_flags, const int modifier_calculation_flags)
wmWindowManager * CTX_wm_manager(const bContext *C)
void MOD_lineart_destroy_render_data_v3(GreasePencilLineartModifierData *lmd)
void WM_global_report(eReportType type, const char *message)
static wmOperatorStatus lineart_bake_common(bContext *C, wmOperator *op, bool bake_all_targets, bool do_background)
int BKE_object_material_index_get(Object *ob, const Material *ma)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
static wmOperatorStatus lineart_bake_strokes_exec(bContext *C, wmOperator *op)
static void lineart_gpencil_clear_strokes_exec_common(Object *ob)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
static void OBJECT_OT_lineart_bake_strokes(wmOperatorType *ot)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
static void lineart_bake_endjob(void *customdata)
static bool bake_strokes(Object *ob, Depsgraph *dg, LineartCache **lc, GreasePencilLineartModifierData *lmd, int frame, bool is_first)
wmJob * WM_jobs_get(wmWindowManager *wm, wmWindow *win, const void *owner, const char *name, const eWM_JobFlag flag, const eWM_JobType job_type)
static bool lineart_mod_is_disabled(Scene *scene, GreasePencilLineartModifierData *md)
void ED_operatortypes_grease_pencil_lineart()
static void lineart_bake_startjob(void *customdata, wmJobWorkerStatus *worker_status)
static bool bake_single_target(LineartBakeJob *bj, Object *ob, int frame)
static void lineart_bake_job_free(void *customdata)
Scene * CTX_data_scene(const bContext *C)
@ LINEART_GPENCIL_USE_CACHE
@ LINEART_GPENCIL_IS_BAKED
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
static std::string lineart_clear_get_description(bContext *, wmOperatorType *ot, PointerRNA *properties)
Scene * DEG_get_evaluated_scene(const Depsgraph *graph)
bool BKE_modifier_is_enabled(const Scene *scene, ModifierData *md, int required_mode)
static void guard_modifiers(LineartBakeJob &bj)
Object * CTX_data_active_object(const bContext *C)
void WM_jobs_timer(wmJob *wm_job, double time_step, uint note, uint endnote, void(*timer_step)(void *))
static std::string lineart_bake_strokes_get_description(bContext *, wmOperatorType *ot, PointerRNA *properties)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
char source_vertex_group[64]
unsigned char fill_strokes
eGreasePencilLineartMaskSwitches mask_switches
unsigned char material_mask_bits
char shadow_use_silhouette_override
eGreasePencilLineartFlags flags
unsigned char shadow_selection
GreasePencilLineartModifierSource source_type
unsigned char intersection_mask
char shadow_selection_override
struct Material * target_material
char level_start_override
struct LineartCache * cache
short edge_types_override
struct Object * source_object
struct Collection * source_collection
unsigned char silhouette_selection
Vector< Object * > objects
ListBaseT< ModifierData > modifiers
eObject_DrawExtraFlag dtx
uint8_t silhouette_selection
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
const char * translation_context
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) modal(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
std::string(*) get_description(bContext *C, wmOperatorType *ot, PointerRNA *ptr)
struct ReportList * reports