46 return ob->
data !=
nullptr;
108 if (
G.background ==
false) {
119 ot->
name =
"Strokes Paint Mode Toggle";
120 ot->
idname =
"GREASE_PENCIL_OT_paintmode_toggle";
121 ot->
description =
"Enter/Exit paint mode for Grease Pencil strokes";
129 ot->
srna,
"back",
false,
"Return to Previous Mode",
"Return to previous mode");
146 return ob->
data !=
nullptr;
206 if (
G.background ==
false) {
223 ot->
name =
"Strokes Sculpt Mode Toggle";
224 ot->
idname =
"GREASE_PENCIL_OT_sculptmode_toggle";
225 ot->
description =
"Enter/Exit sculpt mode for Grease Pencil strokes";
233 ot->
srna,
"back",
false,
"Return to Previous Mode",
"Return to previous mode");
248 return ob->
data !=
nullptr;
301 if (
G.background ==
false) {
312 ot->
name =
"Strokes Weight Mode Toggle";
313 ot->
idname =
"GREASE_PENCIL_OT_weightmode_toggle";
314 ot->
description =
"Enter/Exit weight paint mode for Grease Pencil strokes";
322 ot->
srna,
"back",
false,
"Return to Previous Mode",
"Return to previous mode");
343 return ob->
data !=
nullptr;
400 if (
G.background ==
false) {
411 ot->
name =
"Strokes Vertex Mode Toggle";
412 ot->
idname =
"GREASE_PENCIL_OT_vertexmode_toggle";
413 ot->
description =
"Enter/Exit vertex paint mode for Grease Pencil strokes";
421 ot->
srna,
"back",
false,
"Return to Previous Mode",
"Return to previous mode");
void BKE_brush_init_gpencil_settings(Brush *brush)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
ToolSettings * CTX_data_tool_settings(const bContext *C)
RegionView3D * CTX_wm_region_view3d(const bContext *C)
wmMsgBus * CTX_wm_message_bus(const bContext *C)
void BKE_gpencil_palette_ensure(struct Main *bmain, struct Scene *scene)
const uchar PAINT_CURSOR_SCULPT_GREASE_PENCIL[3]
void BKE_paint_brushes_ensure(Main *bmain, Paint *paint)
const uchar PAINT_CURSOR_PAINT_GREASE_PENCIL[3]
Paint * BKE_paint_get_active_from_paintmode(Scene *sce, PaintMode mode)
void BKE_paint_init(Main *bmain, Scene *sce, PaintMode mode, const uchar col[3], bool ensure_brushes=true)
bool BKE_paint_ensure(ToolSettings *ts, Paint **r_paint)
Brush * BKE_paint_brush(Paint *paint)
void BKE_paint_brushes_validate(Main *bmain, Paint *paint)
void DEG_id_tag_update(ID *id, unsigned int flags)
@ OB_MODE_VERTEX_GREASE_PENCIL
@ OB_MODE_PAINT_GREASE_PENCIL
@ OB_MODE_SCULPT_GREASE_PENCIL
@ OB_MODE_WEIGHT_GREASE_PENCIL
void ED_paint_cursor_start(Paint *paint, bool(*poll)(bContext *C))
#define ND_GPENCIL_EDITMODE
void ED_operatortypes_grease_pencil_modes()
static void GREASE_PENCIL_OT_sculptmode_toggle(wmOperatorType *ot)
static int weightmode_toggle_exec(bContext *C, wmOperator *op)
static void GREASE_PENCIL_OT_weightmode_toggle(wmOperatorType *ot)
static bool sculptmode_toggle_poll(bContext *C)
static bool grease_pencil_poll_vertex_cursor(bContext *C)
static bool paintmode_toggle_poll(bContext *C)
static bool brush_cursor_poll(bContext *C)
static int vertexmode_toggle_exec(bContext *C, wmOperator *op)
static bool weightmode_toggle_poll(bContext *C)
static bool sculpt_poll_view3d(bContext *C)
static int sculptmode_toggle_exec(bContext *C, wmOperator *op)
static void GREASE_PENCIL_OT_paintmode_toggle(wmOperatorType *ot)
static bool vertexmode_toggle_poll(bContext *C)
static void GREASE_PENCIL_OT_vertexmode_toggle(wmOperatorType *ot)
static int paintmode_toggle_exec(bContext *C, wmOperator *op)
static bool grease_pencil_poll_weight_cursor(bContext *C)
void posemode_set_for_weight_paint(bContext *C, Main *bmain, Object *ob, bool is_mode_set)
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)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
struct BrushGpencilSettings * gpencil_settings
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
#define WM_msg_publish_rna_prop(mbus, id_, data_, type_, prop_)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))