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

Method MenuTool

samples/luxcoreui/uimenu.cpp:420–445  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418//------------------------------------------------------------------------------
419
420void LuxCoreApp::MenuTool() {
421 if (ImGui::MenuItem("Camera edit", NULL, (currentTool == TOOL_CAMERA_EDIT))) {
422 currentTool = TOOL_CAMERA_EDIT;
423 RenderConfigParse(Properties() << Property("screen.tool.type")("CAMERA_EDIT"));
424 }
425 if (ImGui::MenuItem("Object selection", NULL, (currentTool == TOOL_OBJECT_SELECTION))) {
426 currentTool = TOOL_OBJECT_SELECTION;
427
428 Properties props;
429 props << Property("screen.tool.type")("OBJECT_SELECTION");
430
431 // Check if the session a OBJECT_ID AOV enabled
432 if(!session->GetFilm().HasOutput(Film::OUTPUT_OBJECT_ID)) {
433 // Enable OBJECT_ID AOV
434 props <<
435 Property("film.outputs.LUXCOREUI_OBJECTSELECTION_AOV.type")("OBJECT_ID") <<
436 Property("film.outputs.LUXCOREUI_OBJECTSELECTION_AOV.filename")("dummy.png");
437 }
438
439 RenderConfigParse(props);
440 }
441 if (ImGui::MenuItem("Image view", NULL, (currentTool == TOOL_IMAGE_VIEW))) {
442 currentTool = TOOL_IMAGE_VIEW;
443 RenderConfigParse(Properties() << Property("screen.tool.type")("IMAGE_VIEW"));
444 }
445}
446
447//------------------------------------------------------------------------------
448// MenuWindow

Callers

nothing calls this directly

Calls 1

HasOutputMethod · 0.45

Tested by

no test coverage detected