diff options
author | Jacques Lucke <jacques@blender.org> | 2022-03-17 12:03:46 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-03-17 12:04:02 +0300 |
commit | b6702aa604f2b022186e4d6663531341d4082947 (patch) | |
tree | 11f4d7564419c89db077ed69db47503021d832a3 /source/blender/editors/sculpt_paint/curves_sculpt_intern.hh | |
parent | 884b167f74b2ec9e800cc64476bc036035139e02 (diff) |
Curves: separate sculpt brushes into separate files
This makes it easier to work on these brushes in parallel.
Diffstat (limited to 'source/blender/editors/sculpt_paint/curves_sculpt_intern.hh')
-rw-r--r-- | source/blender/editors/sculpt_paint/curves_sculpt_intern.hh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_intern.hh b/source/blender/editors/sculpt_paint/curves_sculpt_intern.hh new file mode 100644 index 00000000000..14d7ec01251 --- /dev/null +++ b/source/blender/editors/sculpt_paint/curves_sculpt_intern.hh @@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#include "curves_sculpt_intern.h" + +#include "BLI_math_vector.hh" + +namespace blender::ed::sculpt_paint { + +struct StrokeExtension { + bool is_first; + float2 mouse_position; +}; + +/** + * Base class for stroke based operations in curves sculpt mode. + */ +class CurvesSculptStrokeOperation { + public: + virtual ~CurvesSculptStrokeOperation() = default; + virtual void on_stroke_extended(bContext *C, const StrokeExtension &stroke_extension) = 0; +}; + +std::unique_ptr<CurvesSculptStrokeOperation> new_comb_operation(); +std::unique_ptr<CurvesSculptStrokeOperation> new_delete_operation(); +std::unique_ptr<CurvesSculptStrokeOperation> new_snake_hook_operation(); + +} // namespace blender::ed::sculpt_paint |