diff options
| author | yum <yum.food.vr@gmail.com> | 2023-08-10 14:02:56 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2023-08-10 14:02:56 -0700 |
| commit | 8fcc40142d08ad2dce1300191de1ed502d23714f (patch) | |
| tree | 8f9741c43b774b21fa518533c0da181bc2e87287 /GUI | |
| parent | 5f33e4efdaa5cdb3773d7eb111b1f74b74721f29 (diff) | |
Bugfix: shader no longer shows up as pinkv0.14.0
Fix up .mat to point to correct textures/shader. Also delete templates
after copying shaders.
Diffstat (limited to 'GUI')
| -rw-r--r-- | GUI/GUI/GUI/PythonWrapper.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/GUI/GUI/GUI/PythonWrapper.cpp b/GUI/GUI/GUI/PythonWrapper.cpp index 9c4fd85..2223706 100644 --- a/GUI/GUI/GUI/PythonWrapper.cpp +++ b/GUI/GUI/GUI/PythonWrapper.cpp @@ -663,6 +663,25 @@ bool PythonWrapper::GenerateAnimator( Log(out, "success!\n"); } { + Log(out, "Deleting shader templates... "); + try { + if (std::filesystem::exists(tastt_shaders_path) && std::filesystem::is_directory(tastt_shaders_path)) { + for (const auto& entry : std::filesystem::directory_iterator(tastt_shaders_path)) { + if (entry.is_regular_file()) { + if (entry.path().stem().string().ends_with("_template")) { + std::filesystem::remove(entry.path()); + } + } + } + } + } + catch (const std::exception& e) { + Log(out, "failed!\n"); + Log(out, "Error: {}\n", e.what()); + } + Log(out, "success!\n"); + } + { Log(out, "Copying canned fonts... "); auto opts = std::filesystem::copy_options(); opts |= std::filesystem::copy_options::overwrite_existing; |
