diff options
| author | Tim Redfern <tim@getdrop.com> | 2017-10-30 17:09:10 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@getdrop.com> | 2017-10-30 17:09:10 +0000 |
| commit | 633aee47fb7392b807e00e1827fad605fb68642b (patch) | |
| tree | f873162e6ad70db1e11164334212f1e4835eaba9 /gui/src/chainImageSet.cpp | |
| parent | 1d2e4b56b0104b36da79b3fa5762645e85ccea3a (diff) | |
drag drop json presets
Diffstat (limited to 'gui/src/chainImageSet.cpp')
| -rw-r--r-- | gui/src/chainImageSet.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gui/src/chainImageSet.cpp b/gui/src/chainImageSet.cpp index 9f2cfcc..1036e4a 100644 --- a/gui/src/chainImageSet.cpp +++ b/gui/src/chainImageSet.cpp @@ -244,6 +244,23 @@ save dragdrop pos in loadingImages and attempt to insert in the chain //return false; } +bool chainImageSet::addfiles(std::vector<string> &filenames){ + + for (auto f=filenames.begin();f!=filenames.end();f++){ + if(f->substr(f->find_last_of(".") + 1) == "json") { + images.clear(); + bool success=loadJson(*f); + + ofLogVerbose("Load %s %s\n", + f->c_str(), + success?"succeeded":"failed"); + } + else { + add(*f); + } + } + +} void chainImageSet::keyPressed(ofKeyEventArgs &keyargs){ //printf("Got key %i, modifiers:%i\n",keyargs.key,keyargs.modifiers); |
