Cleanup: use namespace and code sections
This commit is contained in:
parent
7f2beb79c6
commit
fcb84e32e0
|
@ -20,6 +20,12 @@ bool CURVES_SCULPT_mode_poll(struct bContext *C)
|
|||
return ob && ob->mode & OB_MODE_SCULPT_CURVES;
|
||||
}
|
||||
|
||||
namespace blender::ed::sculpt_paint {
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* SCULPT_CURVES_OT_brush_stroke.
|
||||
*/
|
||||
|
||||
static bool stroke_get_location(bContext *C, float out[3], const float mouse[2])
|
||||
{
|
||||
out[0] = mouse[0];
|
||||
|
@ -86,6 +92,10 @@ static void SCULPT_CURVES_OT_brush_stroke(struct wmOperatorType *ot)
|
|||
paint_stroke_operator_properties(ot);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* CURVES_OT_sculptmode_toggle.
|
||||
*/
|
||||
|
||||
static bool curves_sculptmode_toggle_poll(bContext *C)
|
||||
{
|
||||
Object *ob = CTX_data_active_object(C);
|
||||
|
@ -135,8 +145,15 @@ static void CURVES_OT_sculptmode_toggle(wmOperatorType *ot)
|
|||
ot->flag = OPTYPE_UNDO | OPTYPE_REGISTER;
|
||||
}
|
||||
|
||||
} // namespace blender::ed::sculpt_paint
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* Registration.
|
||||
*/
|
||||
|
||||
void ED_operatortypes_sculpt_curves()
|
||||
{
|
||||
using namespace blender::ed::sculpt_paint;
|
||||
WM_operatortype_append(SCULPT_CURVES_OT_brush_stroke);
|
||||
WM_operatortype_append(CURVES_OT_sculptmode_toggle);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue