enable timeline option

This commit is contained in:
2019-09-21 00:02:48 +02:00
parent dc8f2f5742
commit 1d1aef4095
8 changed files with 75 additions and 17 deletions

View File

@@ -1908,13 +1908,13 @@ void Canvas::export_depth_thread(std::string file_name)
rtt.destroy();
}
void Canvas::export_layers(std::string file_name, std::function<void()> on_complete)
void Canvas::export_layers(std::string path, std::function<void()> on_complete)
{
if (App::I->check_license())
{
std::thread t([=] {
BT_SetTerminate();
export_layers_thread(file_name);
export_layers_thread(path);
if (on_complete)
on_complete();
});
@@ -1922,14 +1922,14 @@ void Canvas::export_layers(std::string file_name, std::function<void()> on_compl
}
}
void Canvas::export_layers_thread(std::string file_name)
void Canvas::export_layers_thread(std::string path)
{
auto pb = App::I->show_progress("Export Layers", m_layers.size());
for (int i = 0; i < m_layers.size(); i++)
{
auto l = m_layers[i];
Image img = l->gen_equirect().get_image();
img.save_png(fmt::format("{}/{}-layer{:02d}-{}.png", App::I->work_path, file_name, i, l->m_name));
img.save_png(fmt::format("{}-layer{:02d}-{}.png", path, i, l->m_name));
pb->increment();
}
pb->destroy();