From 8fcc40142d08ad2dce1300191de1ed502d23714f Mon Sep 17 00:00:00 2001 From: yum Date: Thu, 10 Aug 2023 14:02:56 -0700 Subject: Bugfix: shader no longer shows up as pink Fix up .mat to point to correct textures/shader. Also delete templates after copying shaders. --- GUI/GUI/GUI/PythonWrapper.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'GUI') 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 @@ -662,6 +662,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(); -- cgit v1.2.3