0
$\begingroup$

In blender render, it is ok to render a scene and save the scene image into the local file system with the code shown below

bpy.data.scenes['Scene'].render.filepath = '/home/user/Documents/image.jpg'
bpy.ops.render.render( write_still=True ) 

Now instead of working on the blender render, I am using the blender game engine to create a game, the blender game engine is working for me. but I I don't know how can to script to save the game screenshot into the local file system?

$\endgroup$

1 Answer 1

2
$\begingroup$

This is the same code but for the game engine:

from bge import render

render.makeScreenshot('Screenshot#.png')

On Windows 10 you need to run as Admin to be able to save screenshots to the primary disk.

$\endgroup$
1
  • $\begingroup$ why On Windows 10 you need to run as Admin to be able to save screenshots to the primary disk.? $\endgroup$
    – user58715
    Commented Jul 10, 2019 at 18:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .