[Bf-blender-cvs] [d9364e97858] sybren-usd: USD: also export the last frame

Sybren A. Stüvel noreply at git.blender.org
Fri Jul 5 18:11:21 CEST 2019


Commit: d9364e978584b4e2c8b5999cde9168374d5123c9
Author: Sybren A. Stüvel
Date:   Fri Jul 5 16:20:35 2019 +0200
Branches: sybren-usd
https://developer.blender.org/rBd9364e978584b4e2c8b5999cde9168374d5123c9

USD: also export the last frame

===================================================================

M	source/blender/usd/intern/usd_capi.cc

===================================================================

diff --git a/source/blender/usd/intern/usd_capi.cc b/source/blender/usd/intern/usd_capi.cc
index 22493b28adb..891b49b96f5 100644
--- a/source/blender/usd/intern/usd_capi.cc
+++ b/source/blender/usd/intern/usd_capi.cc
@@ -117,9 +117,9 @@ static void export_startjob(void *customdata, short *stop, short *do_update, flo
 
     if (data->params.export_animation) {
       // Writing the animated frames is 80% of the work.
-      float progress_per_frame = 0.8f / std::max(1, (scene->r.efra - scene->r.sfra));
+      float progress_per_frame = 0.8f / std::max(1, (scene->r.efra - scene->r.sfra + 1));
 
-      for (float frame = scene->r.sfra; frame < scene->r.efra; frame++) {
+      for (float frame = scene->r.sfra; frame <= scene->r.efra; frame++) {
         printf("\033[35;1mFRAME\033[0m %f\n", frame);
         // Update the scene for the next frame to render.
         scene->r.cfra = static_cast<int>(frame);



More information about the Bf-blender-cvs mailing list