From f87696f7622af8ee7874243f03e1ebd141280ab4 Mon Sep 17 00:00:00 2001 From: Joakim Kilby Date: Thu, 19 Feb 2015 15:21:09 +0100 Subject: [PATCH] changed to relative path for placeholder image and removed directory searching for playbook file. function now accepts an actual playbook file --- src/util/imagesequencer.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/util/imagesequencer.cpp b/src/util/imagesequencer.cpp index c4180d101c..b84c03bb8b 100644 --- a/src/util/imagesequencer.cpp +++ b/src/util/imagesequencer.cpp @@ -158,9 +158,10 @@ bool replace(std::string& str, const std::string& from, const std::string& to) { } bool ImageSequencer::parsePlaybook(const std::string& dir, const std::string& type, std::string year){ - ghoul::filesystem::Directory playbookDir(dir, true); - std::vector dirlist = playbookDir.read(true, false); - for (auto path : dirlist){ + //ghoul::filesystem::Directory playbookDir(dir, true); + //std::vector dirlist = playbookDir.read(true, false); + //for (auto path : dirlist){ + std::string path = dir; if (size_t position = path.find_last_of(".") + 1){ if (position != std::string::npos){ ghoul::filesystem::File currentFile(path); @@ -185,7 +186,7 @@ bool ImageSequencer::parsePlaybook(const std::string& dir, const std::string& ty timestr = year + " " + timestr; openspace::SpiceManager::ref().getETfromDate(timestr, et); - std::string defaultImagePath = dir + "/placeholder.png"; + std::string defaultImagePath = absPath("${OPENSPACE_DATA}/placeholder.png"); createImage(et, et + shutter, defaultImagePath); } } while (!file.eof()); @@ -224,7 +225,7 @@ bool ImageSequencer::parsePlaybook(const std::string& dir, const std::string& ty openspace::SpiceManager::ref().getDateFromET(et, str); std::cout << str << std::endl; */ - std::string defaultImagePath = dir + "/placeholder.png"; + std::string defaultImagePath = absPath("${OPENSPACE_DATA}/placeholder.png"); createImage(et, et + shutter, defaultImagePath); } } while (!file.eof()); @@ -232,7 +233,7 @@ bool ImageSequencer::parsePlaybook(const std::string& dir, const std::string& ty } } - } + //} return true; // add check }