Python Viewport Render Image

Hello!

I am trying to have access to the Viewport Render Image Tool in the View Menu.
I tried using it to see if the code appear in the code listener but I did not get anything.

Is there anyway to have access to that tool with code?
I would like to be able to make a script that will take a viewport render and send it in the right folder location.

Thank you in advance for your help and have a nice day! :slight_smile:

If you turn on “Python Tooltips” under Interface -> Display, it says that Viewport Render Image is bpy.ops.render.opengl() which does seem to update the render image.

Ohhh! Interesting feature. I did not know about it.
I will have a look into it. Thank you very much :slight_smile: