diff options
Diffstat (limited to 'source/blender/io/alembic/exporter/abc_export_capi.cc')
-rw-r--r-- | source/blender/io/alembic/exporter/abc_export_capi.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/io/alembic/exporter/abc_export_capi.cc b/source/blender/io/alembic/exporter/abc_export_capi.cc index c22864a5433..5b8998a0b1a 100644 --- a/source/blender/io/alembic/exporter/abc_export_capi.cc +++ b/source/blender/io/alembic/exporter/abc_export_capi.cc @@ -64,7 +64,7 @@ struct ExportJobData { namespace blender::io::alembic { -// Construct the depsgraph for exporting. +/* Construct the depsgraph for exporting. */ static void build_depsgraph(Depsgraph *depsgraph, const bool visible_objects_only) { if (visible_objects_only) { @@ -99,12 +99,12 @@ static void export_startjob(void *customdata, } BKE_scene_graph_update_tagged(data->depsgraph, data->bmain); - // For restoring the current frame after exporting animation is done. + /* For restoring the current frame after exporting animation is done. */ Scene *scene = DEG_get_input_scene(data->depsgraph); const int orig_frame = CFRA; const bool export_animation = (data->params.frame_start != data->params.frame_end); - // Create the Alembic archive. + /* Create the Alembic archive. */ std::unique_ptr<ABCArchive> abc_archive; try { abc_archive = std::make_unique<ABCArchive>( @@ -115,15 +115,15 @@ static void export_startjob(void *customdata, error_message_stream << "Error writing to " << data->filename; const std::string &error_message = error_message_stream.str(); - // The exception message can be very cryptic (just "iostream error" on Linux, for example), so - // better not to include it in the report. + /* The exception message can be very cryptic (just "iostream error" on Linux, for example), + * so better not to include it in the report. */ CLOG_ERROR(&LOG, "%s: %s", error_message.c_str(), ex.what()); WM_report(RPT_ERROR, error_message.c_str()); data->export_ok = false; return; } catch (...) { - // Unknown exception class, so we cannot include its message. + /* Unknown exception class, so we cannot include its message. */ std::stringstream error_message_stream; error_message_stream << "Unknown error writing to " << data->filename; WM_report(RPT_ERROR, error_message_stream.str().c_str()); @@ -136,7 +136,7 @@ static void export_startjob(void *customdata, if (export_animation) { CLOG_INFO(&LOG, 2, "Exporting animation"); - // Writing the animated frames is not 100% of the work, but it's our best guess. + /* Writing the animated frames is not 100% of the work, but it's our best guess. */ const float progress_per_frame = 1.0f / std::max(size_t(1), abc_archive->total_frame_count()); ABCArchive::Frames::const_iterator frame_it = abc_archive->frames_begin(); const ABCArchive::Frames::const_iterator frames_end = abc_archive->frames_end(); @@ -148,7 +148,7 @@ static void export_startjob(void *customdata, break; } - // Update the scene for the next frame to render. + /* Update the scene for the next frame to render. */ scene->r.cfra = static_cast<int>(frame); scene->r.subframe = frame - scene->r.cfra; BKE_scene_graph_update_for_newframe(data->depsgraph); @@ -163,13 +163,13 @@ static void export_startjob(void *customdata, } } else { - // If we're not animating, a single iteration over all objects is enough. + /* If we're not animating, a single iteration over all objects is enough. */ iter.iterate_and_write(); } iter.release_writers(); - // Finish up by going back to the keyframe that was current before we started. + /* Finish up by going back to the keyframe that was current before we started. */ if (CFRA != orig_frame) { CFRA = orig_frame; BKE_scene_graph_update_for_newframe(data->depsgraph); @@ -227,8 +227,8 @@ bool ABC_export(Scene *scene, WM_jobs_timer(wm_job, 0.1, NC_SCENE | ND_FRAME, NC_SCENE | ND_FRAME); WM_jobs_callbacks(wm_job, blender::io::alembic::export_startjob, - NULL, - NULL, + nullptr, + nullptr, blender::io::alembic::export_endjob); WM_jobs_start(CTX_wm_manager(C), wm_job); @@ -236,7 +236,7 @@ bool ABC_export(Scene *scene, else { /* Fake a job context, so that we don't need NULL pointer checks while exporting. */ short stop = 0, do_update = 0; - float progress = 0.f; + float progress = 0.0f; blender::io::alembic::export_startjob(job, &stop, &do_update, &progress); blender::io::alembic::export_endjob(job); |