How to copy the statistics info?

If you’d rather not leave Blender at all to store or view the saved data, you can 1-click generate and store the data as a new text data-bock.

Code

import bpy

clipboard = bpy.context.window_manager.clipboard = str(bpy.context.scene.statistics(bpy.context.view_layer))
clipboard.encode("utf8")
bpy.ops.text.new()
bpy.ops.text.paste()

The one limitation for this that the received data is copied to the clipboard. At the moment it doesn’t auto delete the copied data after saving it (still working on that), but I should find a way in a few minutes or tomorrow.

Basically what this script does is get the scene statistics data that you can see in the 3D Viewport or global Blender footer.

4 Likes