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:
parent
a3c8afc7cd
commit
398de6a86f
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue