Changeset View
Changeset View
Standalone View
Standalone View
source/blender/io/alembic/exporter/abc_export_capi.cc
| Show First 20 Lines • Show All 150 Lines • ▼ Show 20 Lines | for (; frame_it != frames_end; frame_it++) { | ||||
| if (G.is_break || (stop != nullptr && *stop)) { | if (G.is_break || (stop != nullptr && *stop)) { | ||||
| break; | 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.cfra = static_cast<int>(frame); | ||||
| scene->r.subframe = frame - scene->r.cfra; | scene->r.subframe = frame - scene->r.cfra; | ||||
| BKE_scene_graph_update_for_newframe(data->depsgraph, data->bmain); | BKE_scene_graph_update_for_newframe(data->depsgraph); | ||||
| CLOG_INFO(&LOG, 2, "Exporting frame %.2f", frame); | CLOG_INFO(&LOG, 2, "Exporting frame %.2f", frame); | ||||
| ExportSubset export_subset = abc_archive->export_subset_for_frame(frame); | ExportSubset export_subset = abc_archive->export_subset_for_frame(frame); | ||||
| iter.set_export_subset(export_subset); | iter.set_export_subset(export_subset); | ||||
| iter.iterate_and_write(); | iter.iterate_and_write(); | ||||
| *progress += progress_per_frame; | *progress += progress_per_frame; | ||||
| *do_update = true; | *do_update = true; | ||||
| } | } | ||||
| } | } | ||||
| else { | 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.iterate_and_write(); | ||||
| } | } | ||||
| iter.release_writers(); | 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) { | if (CFRA != orig_frame) { | ||||
| CFRA = orig_frame; | CFRA = orig_frame; | ||||
| BKE_scene_graph_update_for_newframe(data->depsgraph, data->bmain); | BKE_scene_graph_update_for_newframe(data->depsgraph); | ||||
| } | } | ||||
| data->export_ok = !data->was_canceled; | data->export_ok = !data->was_canceled; | ||||
| *progress = 1.0f; | *progress = 1.0f; | ||||
| *do_update = true; | *do_update = true; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines | |||||