| 90 | } |
| 91 | |
| 92 | ref<Grid> Grid::createFromFile(ref<Device> pDevice, const std::filesystem::path& path, const std::string& gridname) |
| 93 | { |
| 94 | if (!std::filesystem::exists(path)) |
| 95 | { |
| 96 | logWarning("Error when loading grid. Can't open grid file '{}'.", path); |
| 97 | return nullptr; |
| 98 | } |
| 99 | |
| 100 | if (hasExtension(path, "nvdb")) |
| 101 | { |
| 102 | return createFromNanoVDBFile(pDevice, path, gridname); |
| 103 | } |
| 104 | else if (hasExtension(path, "vdb")) |
| 105 | { |
| 106 | return createFromOpenVDBFile(pDevice, path, gridname); |
| 107 | } |
| 108 | else |
| 109 | { |
| 110 | logWarning("Error when loading grid. Unsupported grid file '{}'.", path); |
| 111 | return nullptr; |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | void Grid::renderUI(Gui::Widgets& widget) |
| 116 | { |
nothing calls this directly
no test coverage detected