Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12269/src/net/sourceforge/bprocessor/gui/actions
Modified Files:
FileImportActionListener.java ImportFileReader.java
Log Message:
Progress on library, not working 100% yet
Index: FileImportActionListener.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/FileImportActionListener.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** FileImportActionListener.java 12 Nov 2007 14:15:28 -0000 1.14
--- FileImportActionListener.java 12 Nov 2007 19:18:07 -0000 1.15
***************
*** 27,30 ****
--- 27,31 ----
import net.sourceforge.bprocessor.gui.GUI;
import net.sourceforge.bprocessor.model.LibraryObj;
+ import net.sourceforge.bprocessor.model.Persistence;
import net.sourceforge.bprocessor.model.Project;
import net.sourceforge.bprocessor.model.Space;
***************
*** 111,115 ****
s.setUnion(true);
LibraryObj lo = new LibraryObj(Byte.MAX_VALUE, lfile, s);
! Project.getInstance().addCalalogObject(lo);
ImportFileReader.importObjFile(lfile, s, info.objPanel.getScale(),
info.objPanel.getDirection(), info.objPanel.getCalcNormals());
--- 112,116 ----
s.setUnion(true);
LibraryObj lo = new LibraryObj(Byte.MAX_VALUE, lfile, s);
! Project.getLibraryObjects().add(lo);
ImportFileReader.importObjFile(lfile, s, info.objPanel.getScale(),
info.objPanel.getDirection(), info.objPanel.getCalcNormals());
***************
*** 117,120 ****
--- 118,123 ----
Project.getInstance().changed(s);
Project.getInstance().checkpoint();
+ //FIXME dont do this here
+ Persistence.saveLibrary();
} catch (Exception ex) {
log.error("Could not open file: " + lfile, ex);
Index: ImportFileReader.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/ImportFileReader.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** ImportFileReader.java 12 Nov 2007 14:15:28 -0000 1.13
--- ImportFileReader.java 12 Nov 2007 19:18:07 -0000 1.14
***************
*** 192,195 ****
--- 192,198 ----
}
loadMaterials(new File(f.getParent() + "\\" + name), materialMap);
+ } else if (lineContent[0].equals("") || lineContent[0].equals("#")) {
+ //Just comments
+ continue;
} else {
log.warn("Did not understand line " + lineNum + " : " + line);
***************
*** 197,201 ****
}
for (Space s : groups) {
! if (!s.getEnvelope().isEmpty()) {
into.add(s);
}
--- 200,204 ----
}
for (Space s : groups) {
! if (!s.collect().isEmpty()) {
into.add(s);
}
***************
*** 205,212 ****
}
for (Vertex v : verts) {
! into.addProtected(v);
}
for (Edge e : edges) {
! into.addProtected(e);
}
for (Surface s : surfaces) {
--- 208,215 ----
}
for (Vertex v : verts) {
! into.add(v);
}
for (Edge e : edges) {
! into.add(e);
}
for (Surface s : surfaces) {
***************
*** 214,218 ****
s.calcNormals();
}
! into.addProtected(s);
}
into.changed();
--- 217,221 ----
s.calcNormals();
}
! into.add(s);
}
into.changed();
|