MCPcopy Create free account
hub / github.com/cdcseacave/openMVS / ShowOpenFileDialog

Method ShowOpenFileDialog

apps/Viewer/UI.cpp:2863–2895  ·  view source on GitHub ↗

Custom settings implementation

Source from the content-addressed store, hash-verified

2861
2862// Custom settings implementation
2863bool UI::ShowOpenFileDialog(String& filename, String& geometryFilename) {
2864 // Use portable-file-dialogs for cross-platform file dialog
2865 try {
2866 auto dialog = pfd::open_file(
2867 "Open Scene File", // title
2868 WORKING_FOLDER_FULL, // initial path (absolute)
2869 {
2870 "OpenMVS Scene Files", "*.mvs",
2871 "OpenMVS Depth Map Files", "*.dmap",
2872 "PLY Mesh / Point Cloud Files", "*.ply",
2873 "GLTF Mesh / Point Cloud Files", "*.gltf",
2874 "GLB Mesh / Point Cloud Files", "*.glb",
2875 "OBJ Mesh Files", "*.obj",
2876 "All Files", "*"
2877 }, // filters
2878 pfd::opt::multiselect // options
2879 );
2880
2881 // Get the result
2882 auto result = dialog.result();
2883 if (!result.empty()) {
2884 filename = result[0];
2885 if (result.size() > 1)
2886 geometryFilename = result[1];
2887 else
2888 geometryFilename.clear();
2889 return true;
2890 }
2891 } catch (const std::exception& e) {
2892 DEBUG("File dialog error: %s", e.what());
2893 }
2894 return false;
2895}
2896
2897bool UI::ShowSaveFileDialog(String& filename) {
2898 // Use portable-file-dialogs for cross-platform save dialog

Callers 1

Window.cppFile · 0.80

Calls 4

whatMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected