diff options
author | Martin Poirier <theeth@yahoo.com> | 2009-12-04 22:08:07 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2009-12-04 22:08:07 +0300 |
commit | 56b0880d2f66ae77e34c7ac518758ea13792056f (patch) | |
tree | f8e51f73359721cdbbea0e59e00c8f3f9b0035e9 /source/blender/editors/physics/physics_pointcache.c | |
parent | e9b7482b6a0b340a7045e55809cfe88500c04d1b (diff) |
Null check for baking progressend function
Simplify end of line for console progress.
Diffstat (limited to 'source/blender/editors/physics/physics_pointcache.c')
-rw-r--r-- | source/blender/editors/physics/physics_pointcache.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c index a931e27bc83..858ff3637b1 100644 --- a/source/blender/editors/physics/physics_pointcache.c +++ b/source/blender/editors/physics/physics_pointcache.c @@ -84,11 +84,11 @@ void bake_console_progress(void *arg, int nr) { printf("\rbake: %3i%%", nr); fflush(stdout); +} - /* endline for last report */ - if (nr == 100) { - printf("\n"); - } +void bake_console_progress_end(void *arg, int nr) +{ + printf("\n"); } static int ptcache_bake_all_exec(bContext *C, wmOperator *op) @@ -113,7 +113,7 @@ static int ptcache_bake_all_exec(bContext *C, wmOperator *op) baker.progresscontext = win; } else { baker.progressbar = bake_console_progress; - baker.progressend = NULL; + baker.progressend = bake_console_progress_end; baker.progresscontext = NULL; } @@ -207,7 +207,7 @@ static int ptcache_bake_exec(bContext *C, wmOperator *op) } else { printf("\n"); /* empty first line before console reports */ baker.progressbar = bake_console_progress; - baker.progressend = NULL; + baker.progressend = bake_console_progress_end; baker.progresscontext = NULL; } |