diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2019-09-17 15:10:47 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2019-09-17 15:10:47 +0300 |
commit | 398de6a86f47eff66f3a4369033f5df3347f6d94 (patch) | |
tree | 81a3105aa96ecb554ef6ddb0841db37288cd482e /source/blender/alembic | |
parent | a3c8afc7cd9add80c353497d70dad3cd234d3adf (diff) |
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).
Diffstat (limited to 'source/blender/alembic')
-rw-r--r-- | source/blender/alembic/intern/abc_exporter.cc | 3 | ||||
-rw-r--r-- | source/blender/alembic/intern/abc_exporter.h | 2 | ||||
-rw-r--r-- | source/blender/alembic/intern/alembic_capi.cc | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/alembic/intern/abc_exporter.cc b/source/blender/alembic/intern/abc_exporter.cc index 94263f61518..69a376d00b0 100644 --- a/source/blender/alembic/intern/abc_exporter.cc +++ b/source/blender/alembic/intern/abc_exporter.cc @@ -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; diff --git a/source/blender/alembic/intern/abc_exporter.h b/source/blender/alembic/intern/abc_exporter.h index cc8d9a75765..a73289fcf95 100644 --- a/source/blender/alembic/intern/abc_exporter.h +++ b/source/blender/alembic/intern/abc_exporter.h @@ -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, diff --git a/source/blender/alembic/intern/alembic_capi.cc b/source/blender/alembic/intern/alembic_capi.cc index f9dc688c159..6547ce54a00 100644 --- a/source/blender/alembic/intern/alembic_capi.cc +++ b/source/blender/alembic/intern/alembic_capi.cc @@ -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; |