Alembic: fix updating of GUI when export progress is made

The `do_update` variable wasn't set after changing the `progress`
variable, causing the GUI only to update on redraw (f.e. when the user
was waving the mouse around).
This commit is contained in:
Sybren A. Stüvel 2019-09-17 14:10:47 +02:00
parent a3c8afc7cd
commit 398de6a86f
3 changed files with 4 additions and 3 deletions

View File

@ -263,7 +263,7 @@ void AbcExporter::getFrameSet(unsigned int nr_of_samples, std::set<double> &fram
}
}
void AbcExporter::operator()(float *progress, bool *was_canceled)
void AbcExporter::operator()(short *do_update, float *progress, bool *was_canceled)
{
std::string scene_name;
@ -333,6 +333,7 @@ void AbcExporter::operator()(float *progress, bool *was_canceled)
for (; begin != end; ++begin) {
*progress = (++i / size);
*do_update = 1;
if (G.is_break) {
*was_canceled = true;

View File

@ -104,7 +104,7 @@ class AbcExporter {
AbcExporter(Main *bmain, const char *filename, ExportSettings &settings);
~AbcExporter();
void operator()(float *progress, bool *was_canceled);
void operator()(short *do_update, float *progress, bool *was_canceled);
protected:
void getShutterSamples(unsigned int nr_of_samples,

View File

@ -261,7 +261,7 @@ static void export_startjob(void *customdata, short *stop, short *do_update, flo
const int orig_frame = CFRA;
data->was_canceled = false;
exporter(progress, &data->was_canceled);
exporter(do_update, progress, &data->was_canceled);
if (CFRA != orig_frame) {
CFRA = orig_frame;