[Bf-blender-cvs] [fcb84e32e00] master: Cleanup: use namespace and code sections
Jacques Lucke
noreply at git.blender.org
Mon Feb 21 12:01:40 CET 2022
Commit: fcb84e32e007fffeb9bcc573917d31857c9dd0cc
Author: Jacques Lucke
Date: Mon Feb 21 12:01:30 2022 +0100
Branches: master
https://developer.blender.org/rBfcb84e32e007fffeb9bcc573917d31857c9dd0cc
Cleanup: use namespace and code sections
===================================================================
M source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
===================================================================
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);
}
More information about the Bf-blender-cvs
mailing list