| 304 | } |
| 305 | |
| 306 | bool 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(); |
nothing calls this directly
no test coverage detected