Enabled brep files in the library

This commit is contained in:
Yorik van Havre 2014-08-31 17:32:10 -03:00
parent ec05ab49b6
commit f13416141f

View file

@ -78,7 +78,7 @@ class ExpDockWidget(QtGui.QDockWidget):
# setting up a directory model that shows only fcstd and step # setting up a directory model that shows only fcstd and step
self.dirmodel = ExpFileSystemModel() self.dirmodel = ExpFileSystemModel()
self.dirmodel.setRootPath(LIBRARYPATH) self.dirmodel.setRootPath(LIBRARYPATH)
self.dirmodel.setNameFilters(["*.fcstd","*.FcStd","*.FCSTD","*.stp","*.STP","*.step","*.STEP"]) self.dirmodel.setNameFilters(["*.fcstd","*.FcStd","*.FCSTD","*.stp","*.STP","*.step","*.STEP", "*.brep", "*.BREP"])
self.dirmodel.setNameFilterDisables(0) self.dirmodel.setNameFilterDisables(0)
self.folder_view = QtGui.QTreeView(); self.folder_view = QtGui.QTreeView();
@ -95,7 +95,7 @@ class ExpDockWidget(QtGui.QDockWidget):
def clicked(self, index): def clicked(self, index):
path = self.dirmodel.filePath(index) path = self.dirmodel.filePath(index)
if path.lower().endswith(".stp") or path.lower().endswith(".step"): if path.lower().endswith(".stp") or path.lower().endswith(".step") or path.lower().endswith(".brep"):
Part.show(Part.read(path)) Part.show(Part.read(path))
else: else:
FreeCADGui.ActiveDocument.mergeProject(path) FreeCADGui.ActiveDocument.mergeProject(path)