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

Method DrawObjectGUI

samples/luxcoreui/filmoutputswindow.cpp:306–623  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

304}
305
306bool FilmOutputsWindow::DrawObjectGUI(Properties &props, bool &modifiedProps) {
307 //--------------------------------------------------------------------------
308 // To add a new output
309 //--------------------------------------------------------------------------
310
311 if (ImGui::CollapsingHeader("New Film output", NULL, true, true)) {
312 // Film output name
313 ImGui::InputText("Output name", newOutputNameBuff, 4 * 1024);
314 const string prefix = "film.outputs." + string(newOutputNameBuff);
315
316 // Film output type
317 ImGui::Combo("Film output type", &newType, typeTable.GetTagList());
318 ImGui::SameLine();
319 ImGui::TextDisabled("(?)");
320 if (ImGui::IsItemHovered())
321 ImGui::SetTooltip("%s", (prefix + ".type").c_str());
322
323 // Film output file name
324 static string imageExts[4] = {
325 ".exr",
326 ".hdr",
327 ".png",
328 ".jpg"
329 };
330 string imageExt;
331
332 ImGui::InputText("", newFileNameBuff, 4 * 1024);
333 ImGui::SameLine();
334 const string tag = typeTable.GetTag(newType);
335 if ((tag == "RGB_IMAGEPIPELINE") ||
336 (tag == "RGBA_IMAGEPIPELINE") ||
337 (tag == "ALPHA") ||
338 (tag == "MATERIAL_ID_MASK") ||
339 (tag == "DIRECT_SHADOW_MASK") ||
340 (tag == "INDIRECT_SHADOW_MASK") ||
341 (tag == "RADIANCE_GROUP") ||
342 (tag == "UV") ||
343 (tag == "RAYCOUNT") ||
344 (tag == "BY_MATERIAL_ID") ||
345 (tag == "IRRADIANCE") ||
346 (tag == "OBJECT_ID_MASK") ||
347 (tag == "BY_OBJECT_ID") ||
348 (tag == "SAMPLECOUNT") ||
349 (tag == "CONVERGENCE") ||
350 (tag == "MATERIAL_ID_COLOR") ||
351 (tag == "ALBEDO") ||
352 (tag == "NOISE")) {
353 ImGui::Combo("File name", &newFileType, "EXR\0HDR\0PNG\0JPG\0\0");
354 imageExt = imageExts[newFileType];
355 } else if ((tag == "MATERIAL_ID") ||
356 (tag == "OBJECT_ID")) {
357 ImGui::Combo("File name", &newFileType, "PNG\0JPG\0\0");
358 imageExt = imageExts[newFileType + 2];
359 } else {
360 ImGui::Combo("File name", &newFileType, "EXR\0HDR\0\0");
361 imageExt = imageExts[newFileType];
362 }
363 ImGui::SameLine();

Callers

nothing calls this directly

Calls 15

GetTagListMethod · 0.80
c_strMethod · 0.80
GetAllNamesMethod · 0.80
Get<string>Method · 0.80
GetMethod · 0.80
SetMethod · 0.80
Get<int>Method · 0.80
GetValMethod · 0.80
DeleteAllMethod · 0.80
ToStringFunction · 0.50
GetTagMethod · 0.45
GetRadianceGroupCountMethod · 0.45

Tested by

no test coverage detected