untabify
This commit is contained in:
@@ -254,7 +254,7 @@ public:
|
|||||||
void dialog_export(std::string ext);
|
void dialog_export(std::string ext);
|
||||||
void dialog_export_layers();
|
void dialog_export_layers();
|
||||||
void dialog_export_depth();
|
void dialog_export_depth();
|
||||||
void dialog_export_cube_faces();
|
void dialog_export_cube_faces();
|
||||||
void dialog_layer_rename();
|
void dialog_layer_rename();
|
||||||
void dialog_resize();
|
void dialog_resize();
|
||||||
void dialog_preset_download();
|
void dialog_preset_download();
|
||||||
|
|||||||
@@ -539,8 +539,8 @@ void App::dialog_resize()
|
|||||||
|
|
||||||
void App::dialog_export_cube_faces()
|
void App::dialog_export_cube_faces()
|
||||||
{
|
{
|
||||||
if (canvas)
|
if (canvas)
|
||||||
{
|
{
|
||||||
canvas->m_canvas->export_cube_faces(doc_name, [this] {
|
canvas->m_canvas->export_cube_faces(doc_name, [this] {
|
||||||
#if defined(__IOS__)
|
#if defined(__IOS__)
|
||||||
message_box("Export Cube Faces", "Image and depth exported to Files/PanoPainter");
|
message_box("Export Cube Faces", "Image and depth exported to Files/PanoPainter");
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ void App::title_update()
|
|||||||
|
|
||||||
void App::init_toolbar_main()
|
void App::init_toolbar_main()
|
||||||
{
|
{
|
||||||
if (auto* button = layout[main_id]->find<NodeButton>("btn-anim"))
|
if (auto* button = layout[main_id]->find<NodeButton>("btn-anim"))
|
||||||
{
|
{
|
||||||
button->on_click = [this, button](Node*) {
|
button->on_click = [this, button](Node*) {
|
||||||
if (canvas)
|
if (canvas)
|
||||||
|
|||||||
@@ -2125,8 +2125,8 @@ bool Canvas::project_save_thread(std::string file_path, bool show_progress)
|
|||||||
|
|
||||||
auto start = file_path.rfind('/') + 1;
|
auto start = file_path.rfind('/') + 1;
|
||||||
std::string file_name = file_path.substr(start, file_path.length() - start - strlen(".ppi"));
|
std::string file_name = file_path.substr(start, file_path.length() - start - strlen(".ppi"));
|
||||||
std::string tmp_path = App::I->data_path + '/' + file_name + ".tmp.ppi";
|
std::string tmp_path = App::I->data_path + '/' + file_name + ".tmp.ppi";
|
||||||
std::string lapse_path = App::I->data_path + '/' + file_name + ".pptl";
|
std::string lapse_path = App::I->data_path + '/' + file_name + ".pptl";
|
||||||
|
|
||||||
LOG("file name %s", file_name.c_str());
|
LOG("file name %s", file_name.c_str());
|
||||||
LOG("tmp path %s", tmp_path.c_str());
|
LOG("tmp path %s", tmp_path.c_str());
|
||||||
@@ -2312,21 +2312,21 @@ bool Canvas::project_save_thread(std::string file_path, bool show_progress)
|
|||||||
m_unsaved = false;
|
m_unsaved = false;
|
||||||
m_newdoc = false;
|
m_newdoc = false;
|
||||||
|
|
||||||
// save timelapse
|
// save timelapse
|
||||||
if (Canvas::I->m_encoder)
|
if (Canvas::I->m_encoder)
|
||||||
{
|
{
|
||||||
BinaryStreamWriter sw;
|
BinaryStreamWriter sw;
|
||||||
sw.init(BinaryStream::ByteOrder::LittleEndian);
|
sw.init(BinaryStream::ByteOrder::LittleEndian);
|
||||||
Serializer::Descriptor info;
|
Serializer::Descriptor info;
|
||||||
info.class_id = "tracks-info";
|
info.class_id = "tracks-info";
|
||||||
info.name = L"Timelapse Tracks";
|
info.name = L"Timelapse Tracks";
|
||||||
info.props["has-track-360"] = std::make_shared<Serializer::Boolean>(true);
|
info.props["has-track-360"] = std::make_shared<Serializer::Boolean>(true);
|
||||||
info.props["version"] = std::make_shared<Serializer::Integer>(1);
|
info.props["version"] = std::make_shared<Serializer::Integer>(1);
|
||||||
sw << info;
|
sw << info;
|
||||||
sw << *Canvas::I->m_encoder;
|
sw << *Canvas::I->m_encoder;
|
||||||
if (!sw.save(lapse_path))
|
if (!sw.save(lapse_path))
|
||||||
LOG("cannot save timelase to %s", lapse_path.c_str());
|
LOG("cannot save timelase to %s", lapse_path.c_str());
|
||||||
}
|
}
|
||||||
#if __WEB__
|
#if __WEB__
|
||||||
webgl_sync();
|
webgl_sync();
|
||||||
#endif
|
#endif
|
||||||
@@ -2523,13 +2523,13 @@ bool Canvas::project_open_thread(std::string file_path)
|
|||||||
fclose(fp);
|
fclose(fp);
|
||||||
LOG("project restore from %s", file_path.c_str());
|
LOG("project restore from %s", file_path.c_str());
|
||||||
|
|
||||||
auto start = file_path.rfind('/') + 1;
|
auto start = file_path.rfind('/') + 1;
|
||||||
std::string file_name = file_path.substr(start, file_path.length() - start - strlen(".ppi"));
|
std::string file_name = file_path.substr(start, file_path.length() - start - strlen(".ppi"));
|
||||||
std::string lapse_path = App::I->data_path + '/' + file_name + ".pptl";
|
std::string lapse_path = App::I->data_path + '/' + file_name + ".pptl";
|
||||||
if (Asset::exist(lapse_path))
|
if (Asset::exist(lapse_path))
|
||||||
{
|
{
|
||||||
BinaryStreamReader sr;
|
BinaryStreamReader sr;
|
||||||
sr.load(lapse_path, BinaryStream::ByteOrder::LittleEndian);
|
sr.load(lapse_path, BinaryStream::ByteOrder::LittleEndian);
|
||||||
Serializer::Descriptor info;
|
Serializer::Descriptor info;
|
||||||
sr >> info;
|
sr >> info;
|
||||||
if (info.value<Serializer::Boolean>("has-track-360"))
|
if (info.value<Serializer::Boolean>("has-track-360"))
|
||||||
@@ -2538,11 +2538,11 @@ bool Canvas::project_open_thread(std::string file_path)
|
|||||||
sr >> *m_encoder;
|
sr >> *m_encoder;
|
||||||
m_encoder->init();
|
m_encoder->init();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
timelapse_reset_encoder();
|
timelapse_reset_encoder();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_current_layer_idx = 0;
|
m_current_layer_idx = 0;
|
||||||
m_current_stroke = nullptr;
|
m_current_stroke = nullptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user