diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-03-13 14:33:57 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-03-13 14:34:03 +0300 |
commit | cb19bb7f57f34c25fbc6baaa802f5935c8925131 (patch) | |
tree | 586f8c700ff75ad86cc4348656dcf703796e4559 /source/blender/io/usd/intern | |
parent | cf9b3310c032c4da46fde8e8b3a8ee5941472dfc (diff) |
Cleanup: USD, removed unused export job data
The code was copied from the Alembic exporter, and some of the options are
no longer used.
Not updating the Alembic exporter itself, as this will be done in a much
larger rewrite.
Diffstat (limited to 'source/blender/io/usd/intern')
-rw-r--r-- | source/blender/io/usd/intern/usd_capi.cc | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/source/blender/io/usd/intern/usd_capi.cc b/source/blender/io/usd/intern/usd_capi.cc index 83e11cd7bf3..60ab3676847 100644 --- a/source/blender/io/usd/intern/usd_capi.cc +++ b/source/blender/io/usd/intern/usd_capi.cc @@ -49,7 +49,6 @@ extern "C" { namespace USD { struct ExportJobData { - ViewLayer *view_layer; Main *bmain; Depsgraph *depsgraph; wmWindowManager *wm; @@ -57,22 +56,13 @@ struct ExportJobData { char filename[FILE_MAX]; USDExportParams params; - short *stop; - short *do_update; - float *progress; - - bool was_canceled; bool export_ok; }; static void export_startjob(void *customdata, short *stop, short *do_update, float *progress) { ExportJobData *data = static_cast<ExportJobData *>(customdata); - - data->stop = stop; - data->do_update = do_update; - data->progress = progress; - data->was_canceled = false; + data->export_ok = false; G.is_rendering = true; WM_set_locked_interface(data->wm, true); @@ -97,7 +87,6 @@ static void export_startjob(void *customdata, short *stop, short *do_update, flo * USDC files, and creating a new UsdStage fails. */ WM_reportf( RPT_ERROR, "USD Export: unable to find suitable USD plugin to write %s", data->filename); - data->export_ok = false; return; } @@ -150,8 +139,7 @@ static void export_startjob(void *customdata, short *stop, short *do_update, flo BKE_scene_graph_update_for_newframe(data->depsgraph, data->bmain); } - data->export_ok = !data->was_canceled; - + data->export_ok = true; *progress = 1.0f; *do_update = true; } @@ -162,7 +150,7 @@ static void export_endjob(void *customdata) DEG_graph_free(data->depsgraph); - if (data->was_canceled && BLI_exists(data->filename)) { + if (!data->export_ok && BLI_exists(data->filename)) { BLI_delete(data->filename, false, false); } |