support of user defined Povray or Lux templates

This commit is contained in:
wmayer
2018-10-03 14:29:34 +02:00
parent 39d072bf82
commit 41f0dc1fe8
4 changed files with 70 additions and 42 deletions

View File

@@ -59,7 +59,7 @@ void RayProject::onDocumentRestored()
fi.setFile(PageResult.getValue());
std::string path = App::Application::getResourceDir() + "Mod/Raytracing/Templates/" + fi.fileName();
// try to find the template in user dir/Templates first
Base::FileInfo tempfi(App::Application::getUserAppDataDir() + "Templates/" + fi.fileName());
Base::FileInfo tempfi(App::Application::getUserAppDataDir() + "data/Mod/Raytracing/Templates/" + fi.fileName());
if (tempfi.exists())
path = tempfi.filePath();
Template.setValue(path);