Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_curve.c
| Show First 20 Lines • Show All 160 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| Paint *p = BKE_paint_get_active_from_context(C); | Paint *p = BKE_paint_get_active_from_context(C); | ||||
| Main *bmain = CTX_data_main(C); | Main *bmain = CTX_data_main(C); | ||||
| if (p && p->brush) { | if (p && p->brush) { | ||||
| p->brush->paint_curve = BKE_paint_curve_add(bmain, "PaintCurve"); | p->brush->paint_curve = BKE_paint_curve_add(bmain, "PaintCurve"); | ||||
| } | } | ||||
| WM_event_add_notifier(C, NC_PAINTCURVE | NA_ADDED, NULL); | |||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| void PAINTCURVE_OT_new(wmOperatorType *ot) | void PAINTCURVE_OT_new(wmOperatorType *ot) | ||||
| { | { | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "Add New Paint Curve"; | ot->name = "Add New Paint Curve"; | ||||
| ot->description = "Add new paint curve"; | ot->description = "Add new paint curve"; | ||||
| ▲ Show 20 Lines • Show All 558 Lines • Show Last 20 Lines | |||||