import computedBrush from ABR

This commit is contained in:
2019-02-24 00:40:22 +01:00
parent 3a1a48a0d0
commit 4d5b64e5bc
3 changed files with 38 additions and 10 deletions

View File

@@ -101,6 +101,17 @@ bool NodePanelStroke::import_abr(const std::string& path)
thumb.save(path_thumb);
async_start();
NodeButtonBrush* brush = new NodeButtonBrush;
m_pattern_popup->m_container->add_child(brush);
brush->init();
brush->create();
brush->loaded();
brush->set_icon(path_thumb.c_str());
brush->thumb_path = path_thumb;
brush->high_path = path_high;
brush->brush_name = name;
brush->m_user_brush = true;
brush->on_click = std::bind(&NodePanelBrush::handle_click, m_pattern_popup, std::placeholders::_1);
count++;
float prog = (float)count / (float)tot;
pb->m_progress->SetWidthP(prog * 100.f);