49 return ob->
data !=
nullptr;
111 if (
G.background ==
false) {
122 ot->name =
"Strokes Paint Mode Toggle";
123 ot->idname =
"GREASE_PENCIL_OT_paintmode_toggle";
124 ot->description =
"Enter/Exit paint mode for Grease Pencil strokes";
132 ot->srna,
"back",
false,
"Return to Previous Mode",
"Return to previous mode");
149 return ob->
data !=
nullptr;
209 if (
G.background ==
false) {
226 ot->name =
"Strokes Sculpt Mode Toggle";
227 ot->idname =
"GREASE_PENCIL_OT_sculptmode_toggle";
228 ot->description =
"Enter/Exit sculpt mode for Grease Pencil strokes";
236 ot->srna,
"back",
false,
"Return to Previous Mode",
"Return to previous mode");
251 return ob->
data !=
nullptr;
304 if (
G.background ==
false) {
315 ot->name =
"Strokes Weight Mode Toggle";
316 ot->idname =
"GREASE_PENCIL_OT_weightmode_toggle";
317 ot->description =
"Enter/Exit weight paint mode for Grease Pencil strokes";
325 ot->srna,
"back",
false,
"Return to Previous Mode",
"Return to previous mode");
346 return ob->
data !=
nullptr;
403 if (
G.background ==
false) {
414 ot->name =
"Strokes Vertex Mode Toggle";
415 ot->idname =
"GREASE_PENCIL_OT_vertexmode_toggle";
416 ot->description =
"Enter/Exit vertex paint mode for Grease Pencil strokes";
424 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)
void BKE_paint_brushes_ensure(Main *bmain, Paint *paint)
void BKE_paint_init(Main *bmain, Scene *sce, PaintMode mode, bool ensure_brushes=true)
Paint * BKE_paint_get_active_from_paintmode(Scene *sce, PaintMode mode)
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 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 wmOperatorStatus vertexmode_toggle_exec(bContext *C, wmOperator *op)
static wmOperatorStatus weightmode_toggle_exec(bContext *C, wmOperator *op)
static bool paintmode_toggle_poll(bContext *C)
static wmOperatorStatus paintmode_toggle_exec(bContext *C, wmOperator *op)
static bool brush_cursor_poll(bContext *C)
static bool weightmode_toggle_poll(bContext *C)
static wmOperatorStatus sculptmode_toggle_exec(bContext *C, wmOperator *op)
static bool sculpt_poll_view3d(bContext *C)
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 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
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 *))