Getting render progress from the command line when using motion blur....

I’m trying to extract the render progress as a percentile from a render job. I’ve got working code for Cycles, but am having some trouble with Blender Internal. Scenes with motion blur output something like this when rendered from the command line:


Fra:1 Mem:14.39M (24.78M, peak 43.52M) Blur 1 | Preparing Scene dataFra:1 Mem:17.22M (24.78M, peak 46.88M) Blur 1 | Preparing Scene data
Fra:1 Mem:17.22M (24.78M, peak 46.88M) Blur 1 | Creating Shadowbuffers
Fra:1 Mem:17.22M (24.78M, peak 46.88M) Blur 1 | Raytree.. preparing
Fra:1 Mem:19.54M (24.78M, peak 46.88M) Blur 1 | Raytree.. building
Fra:1 Mem:19.43M (24.78M, peak 47.84M) Blur 1 | Raytree finished
Fra:1 Mem:19.43M (24.78M, peak 47.84M) Blur 1 | Creating Environment maps
Fra:1 Mem:19.43M (24.78M, peak 47.84M) Blur 1 | Caching Point Densities
Fra:1 Mem:19.43M (24.78M, peak 47.84M) Blur 1 Sce: Scene Ve:10583 Fa:16911 La:0
Fra:1 Mem:19.43M (24.78M, peak 47.84M) Blur 1 | Loading voxel datasets
Fra:1 Mem:19.43M (24.78M, peak 47.84M) Blur 1 Sce: Scene Ve:10583 Fa:16911 La:0
Fra:1 Mem:19.43M (24.78M, peak 47.84M) Blur 1 | SSS preprocessing
Fra:1 Mem:19.43M (24.78M, peak 47.84M) Blur 1 | Volume preprocessing
Fra:1 Mem:19.43M (24.78M, peak 47.84M) Blur 1 Sce: Scene Ve:10583 Fa:16911 La:0
Fra:1 Mem:19.43M (24.78M, peak 47.84M) Blur 1 Sce: Scene Ve:10583 Fa:16911 La:0
Fra:1 Mem:34.38M (54.18M, peak 91.35M) Blur 1 | Scene, Part 5-64
....and so on.

It then goes on to do the same for Blur 2, 3, 4 and so on. While I can parse the Part 5-64 into a percentile (5/64*100), it will repeat for each Blur pass.

Is there any way around this?

My guess that there isn’t, as the progress bar in the Blender GUI does the same, going several times from zero to full, for each blur pass.

Ragnar

Found a quick workaround for this. I can simply check if motion blur is on, and how many sample it’s using, and take that into account when calculating the overall progress. It makes things a bit more complicated, but should work.