add ABR brushes and presets with properties and patterns

This commit is contained in:
2019-02-10 16:52:37 +01:00
parent e629a2a7b5
commit 1d6c26f2ba
12 changed files with 379 additions and 124 deletions

View File

@@ -279,3 +279,24 @@ bool Brush::load_stencil(const std::string& path)
m_stencil_path = path;
return true;
}
bool Brush::load()
{
if (!m_brush_path.empty())
{
m_tip_texture = std::make_shared<Texture2D>();
if (!m_tip_texture->load(m_brush_path))
return false;
m_tip_texture->create_mipmaps();
m_tip_texture->auto_destroy = true;
}
if (!m_stencil_path.empty())
{
m_stencil_texture = std::make_shared<Texture2D>();
if (!m_stencil_texture->load(m_stencil_path))
return false;
m_stencil_texture->create_mipmaps();
m_stencil_texture->auto_destroy = true;
}
return true;
}