File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -878,12 +878,28 @@ void ofxVisualProgramming::clearObjectsMap(){
878878 // remove scripts objects filepath reference from scripts objects files map
879879 ofFile tempsofp (patchObjects.at (eraseIndexes.at (x))->getFilepath ());
880880 string fileExt = ofToUpper (tempsofp.getExtension ());
881- if (fileExt == " LUA" || fileExt == " PY" || fileExt == " SH" || fileExt == " FRAG " ){
881+ if (fileExt == " LUA" || fileExt == " PY" || fileExt == " SH" ){
882882 map<string,string>::iterator sofpIT = scriptsObjectsFilesPaths.find (tempsofp.getFileName ());
883883 if (sofpIT != scriptsObjectsFilesPaths.end ()){
884884 // found it, remove it
885885 scriptsObjectsFilesPaths.erase (sofpIT);
886886 }
887+ }else if (fileExt == " FRAG" ){
888+ // remove .frag
889+ map<string,string>::iterator sofpIT = scriptsObjectsFilesPaths.find (tempsofp.getFileName ());
890+ if (sofpIT != scriptsObjectsFilesPaths.end ()){
891+ // found it, remove it
892+ scriptsObjectsFilesPaths.erase (sofpIT);
893+ }
894+ // remove .vert
895+ string pf_fsName = tempsofp.getFileName ();
896+ string pf_vsName = tempsofp.getEnclosingDirectory ()+tempsofp.getFileName ().substr (0 ,pf_fsName.find_last_of (' .' ))+" .vert" ;
897+ ofFile tempVert (pf_vsName);
898+ map<string,string>::iterator sofpITV = scriptsObjectsFilesPaths.find (tempVert.getFileName ());
899+ if (sofpITV != scriptsObjectsFilesPaths.end ()){
900+ // found it, remove it
901+ scriptsObjectsFilesPaths.erase (sofpITV);
902+ }
887903 }
888904
889905 patchObjects.at (eraseIndexes.at (x))->removeObjectContent (true );
You can’t perform that action at this time.
0 commit comments