mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-07 04:00:37 -06:00
changed to relative path for placeholder image and removed directory searching for playbook file. function now accepts an actual playbook file
This commit is contained in:
@@ -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<std::string> dirlist = playbookDir.read(true, false);
|
||||
for (auto path : dirlist){
|
||||
//ghoul::filesystem::Directory playbookDir(dir, true);
|
||||
//std::vector<std::string> 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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user