diff options
author | Jacques Lucke <jacques@blender.org> | 2022-02-21 14:01:30 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-02-21 14:01:30 +0300 |
commit | fcb84e32e007fffeb9bcc573917d31857c9dd0cc (patch) | |
tree | a2544b5cce460b7e6aee2089c0b2f5c0285fccb2 /source/blender/editors/sculpt_paint | |
parent | 7f2beb79c656bcacc7d0492da13df8379cf44311 (diff) |
Cleanup: use namespace and code sections
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/curves_sculpt_ops.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc index 137a43ea661..3f732f6ac79 100644 --- a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc +++ b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc @@ -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); } |