rename texture to pattern and implement initial pattern settings

This commit is contained in:
2019-02-17 23:41:17 +01:00
parent 49d9b17719
commit e4ee87e4c6
16 changed files with 379 additions and 232 deletions

View File

@@ -139,7 +139,7 @@ std::vector<std::shared_ptr<Brush>> ABR::compute_brushes(const std::string& path
//b->m_jitter_val = i.m_jitter_val;
//b->m_blend_mode = i.m_blend_mode;
//b->m_name.resize(i.m_name_len);
//b->m_stencil_path.resize(i.m_stencil_path_len);
//b->m_texture_path.resize(i.m_stencil_path_len);
auto tip_uid = wstr2str(samp->value<String>("sampledData"));
LOG("tip uid %d %s", tip_uid.size(), tip_uid.c_str());
b->m_brush_path = path + "/brushes/" + tip_uid + ".png";
@@ -147,9 +147,9 @@ std::vector<std::shared_ptr<Brush>> ABR::compute_brushes(const std::string& path
if (auto patt = p->get<Descriptor>("Txtr"))
{
auto patt_uid = wstr2str(patt->value<String>("Idnt"));
b->m_stencil_path = path + "/patterns/" + patt_uid + ".png";
b->m_pattern_path = path + "/patterns/" + patt_uid + ".png";
//b->m_brush_thumb_path = path + "/patterns/thumbs/" + patt_uid + ".png";
b->m_tip_stencil = p->value<UnitFloat>("textureDepth") * 0.01f;
b->m_pattern_opacity = p->value<UnitFloat>("textureDepth") * 0.01f;
}
ret.push_back(b);
}