fix save multiple frames
This commit is contained in:
@@ -2207,7 +2207,7 @@ bool Canvas::project_save_thread(std::string file_path, bool show_progress)
|
||||
int duration = m_layers[i]->frame_duration(fi);
|
||||
fwrite(&duration, sizeof(int), 1, fp);
|
||||
}
|
||||
|
||||
bool gpu = m_layers[i]->frame(fi).gpu_load();
|
||||
m_layers[i]->optimize(fi);
|
||||
auto snap = m_layers[i]->snapshot(fi);
|
||||
for (int plane_index = 0; plane_index < 6; plane_index++)
|
||||
@@ -2240,6 +2240,8 @@ bool Canvas::project_save_thread(std::string file_path, bool show_progress)
|
||||
pb->m_progress->SetWidthP(p);
|
||||
LOG("progress: %f", p);
|
||||
}
|
||||
if (!gpu)
|
||||
m_layers[i]->frame(fi).gpu_unload();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ LayerFrame& Layer::frame(int frame /*= -1*/)
|
||||
{
|
||||
if (frame == -1)
|
||||
frame = m_frame_index;
|
||||
return m_frames[m_frame_index];
|
||||
return m_frames[frame];
|
||||
}
|
||||
|
||||
TextureCube Layer::gen_cube()
|
||||
|
||||
Reference in New Issue
Block a user