Added the bucket fill tool into the multi-material gizmo. Also, the multi-material gizmo was reworked to show only options applicable for a chosen painting tool.

This commit is contained in:
Lukáš Hejl 2021-07-11 17:34:54 +02:00
parent 977ffe556d
commit 51b94f4747
5 changed files with 519 additions and 107 deletions

View file

@ -106,13 +106,23 @@ protected:
TriangleSelector::CursorType m_cursor_type = TriangleSelector::SPHERE;
bool m_triangle_splitting_enabled = true;
bool m_seed_fill_enabled = false;
float m_seed_fill_angle = 0.f;
enum class ToolType {
BRUSH,
BUCKET_FILL,
SEED_FILL
};
bool m_triangle_splitting_enabled = true;
ToolType m_tool_type = ToolType::BRUSH;
float m_seed_fill_angle = 0.f;
static constexpr float SeedFillAngleMin = 0.0f;
static constexpr float SeedFillAngleMax = 90.f;
static constexpr float SeedFillAngleStep = 1.f;
// It stores the value of the previous mesh_id to which the seed fill was applied.
// It is used to detect when the mouse has moved from one volume to another one.
int m_seed_fill_last_mesh_id = -1;
int m_seed_fill_last_mesh_id = -1;
enum class Button {
None,