parse abr from PS 2018, restore xmp injection, check uniform hash collision

This commit is contained in:
2019-02-25 23:23:14 +01:00
parent 87044e06c4
commit d3768f43c9
11 changed files with 93 additions and 28 deletions

View File

@@ -37,23 +37,20 @@ bool NodePanelStroke::import_abr(const std::string& path)
name = m[2].str();
ext = m[3].str();
if (!str_iequals(ext, "abr"))
if (!str_iequals(ext, "abr") || !Asset::exist(path))
return false;
if (!abr.open(path))
{
LOG("ABR read failed");
return false;
}
int tot = abr.m_samples.size() + abr.m_patterns.size() + abr.m_presets.size();
std::atomic_int count(0);
async_start();
auto pb = App::I.show_progress("Importing ABR");
app_redraw();
async_update();
async_end();
abr.open(path);
int tot = abr.m_samples.size() + abr.m_patterns.size() + abr.m_presets.size();
std::atomic_int count(0);
parallel_for(abr.m_samples.size(), [&](size_t i)
//for (const auto& samp : abr.m_samples)
{