Closed GCoiffier closed 5 months ago
Hello Guillaume, Modify the 'snapshot()' function in 'skin_imgui/widgets/render_area.cpp' as follows:
void RenderArea::snapshot(const std::string& filename, bool make_current) {
if(rendering_context_ == nullptr) {
Logger::warn("RenderArea")
<< "Cannot take a snapshot, not initialized yet"
<< std::endl;
} else {
Image image;
draw_memorized_frame(); // add this line (it draws the memorized 3D graphics frame over the GUI)
rendering_context_->snapshot(&image, make_current);
ImageLibrary::instance()->save_image(filename,&image);
}
}
then use main.render_area.snapshot()
. I'm adding now a with_gui
parameter that will allow to chose between the two behaviors.
Pushed new version, if you update, now snapshot()
works by default as you would expect (only captures 3D rendering, not the GUI).
Thanks! Works great!
Hi Bruno,
I have this old screenshot script that used to take a picture per object in my scene:
However, in the newer version of Graphite, the variable
win
is not defined anymore. I found a snapshot function atmain.render_area.snapshot
but it takes a picture of the whole window, including GUI, while I want to snapshot only the mesh viewer. Is there a way to do so ? Maybe a command to hide all GUI elements beforehand ?