MCPcopy Create free account
hub / github.com/LuxCoreRender/LuxCore / MenuFilm

Method MenuFilm

samples/luxcoreui/uimenu.cpp:292–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290//------------------------------------------------------------------------------
291
292void LuxCoreApp::MenuFilm() {
293 if (ImGui::BeginMenu("Set resolution")) {
294 if (ImGui::MenuItem("320x240"))
295 SetFilmResolution(320, 240);
296 if (ImGui::MenuItem("640x480"))
297 SetFilmResolution(640, 480);
298 if (ImGui::MenuItem("800x600"))
299 SetFilmResolution(800, 600);
300 if (ImGui::MenuItem("1024x768"))
301 SetFilmResolution(1024, 768);
302 if (ImGui::MenuItem("1280x720"))
303 SetFilmResolution(1280, 720);
304 if (ImGui::MenuItem("1920x1080"))
305 SetFilmResolution(1920, 1080);
306
307 ImGui::Separator();
308
309 if (ImGui::MenuItem("Use window resolution")) {
310 int currentFrameBufferWidth, currentFrameBufferHeight;
311 glfwGetFramebufferSize(window, &currentFrameBufferWidth, &currentFrameBufferHeight);
312
313 SetFilmResolution(currentFrameBufferWidth, currentFrameBufferHeight);
314 }
315
316 ImGui::Separator();
317
318 ImGui::TextUnformatted("Width x Height");
319 ImGui::PushItemWidth(100);
320 ImGui::InputInt("##width", &menuFilmWidth);
321 ImGui::PopItemWidth();
322 ImGui::SameLine();
323 ImGui::TextUnformatted("x");
324 ImGui::SameLine();
325 ImGui::PushItemWidth(100);
326 ImGui::InputInt("##height", &menuFilmHeight);
327 ImGui::PopItemWidth();
328 ImGui::SameLine();
329 if (ImGui::Button("Apply"))
330 SetFilmResolution(menuFilmWidth, menuFilmHeight);
331
332 ImGui::EndMenu();
333 }
334 ImGui::Separator();
335 if (session && ImGui::MenuItem("Save outputs"))
336 session->GetFilm().SaveOutputs();
337 if (session && ImGui::MenuItem("Save film"))
338 session->GetFilm().SaveFilm("film.flm");
339}
340
341//------------------------------------------------------------------------------
342// MenuImagePipeline

Callers

nothing calls this directly

Calls 3

glfwGetFramebufferSizeFunction · 0.85
SaveOutputsMethod · 0.80
SaveFilmMethod · 0.45

Tested by

no test coverage detected