Hi there, this is my first post :) I would like to export from code what my 2D godot scene is rendering (even better just a canvas layer or node). Is that possible ? I saw a command save_png for the image class, but i dunno how to convert my scene to an image. Do you have any useful suggestion ? Thanks in advance :)
Export a node or viewport to png
Thanks, it seems useful indeed :) get_viewport().queue_screen_capture() and get_viewport().get_screen_capture() are my friends !
- Edited
Nice! If the suggestion was acceptable, could you please mark "yes" on "Did this answer the question" just below the answer?
Thanks :)
Sure, gimme please one day or 2 to check, and i will mark this post as solved :)
16 days later
Hi !
So, FINALLY i :D i was able to try. It works but maybe its a pain to manage sizes and what's visible. Maybe i found an interesting way to manage what is captured with more accuracy there : https://godotengine.org/qa/12979/how-to-merge-two-png-files-during-runtime-and-save-to-disk