Skip to content

Commit

Permalink
Draft/Arch: cleanup of startup scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed May 18, 2016
1 parent 21ba33d commit 3996726
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 27 deletions.
8 changes: 8 additions & 0 deletions src/Mod/Arch/Init.py
Expand Up @@ -20,3 +20,11 @@
#* USA *
#* *
#***************************************************************************

# add import/export types
FreeCAD.addImportType("Industry Foundation Classes (*.ifc)","importIFC")
FreeCAD.addExportType("Industry Foundation Classes (*.ifc)","importIFC")
FreeCAD.addExportType("Wavefront OBJ - Arch module (*.obj)","importOBJ")
FreeCAD.addExportType("WebGL file (*.html)","importWebGL")
FreeCAD.addImportType("Collada (*.dae)","importDAE")
FreeCAD.addExportType("Collada (*.dae)","importDAE")
17 changes: 4 additions & 13 deletions src/Mod/Arch/InitGui.py
Expand Up @@ -82,18 +82,12 @@ def QT_TRANSLATE_NOOP(scope, text): return text
FreeCADGui.addLanguagePath(":/translations")
FreeCADGui.addPreferencePage(":/ui/preferences-arch.ui","Arch")
FreeCADGui.addPreferencePage(":/ui/preferences-archdefaults.ui","Arch")
FreeCADGui.addPreferencePage(":/ui/preferences-ifc.ui","Import-Export")
FreeCADGui.addPreferencePage(":/ui/preferences-dae.ui","Import-Export")
if hasattr(FreeCADGui,"draftToolBar"):
if not hasattr(FreeCADGui.draftToolBar,"loadedPreferences"):
FreeCADGui.addPreferencePage(":/ui/preferences-draft.ui","Draft")
FreeCADGui.addPreferencePage(":/ui/preferences-draftsnap.ui","Draft")
FreeCADGui.addPreferencePage(":/ui/preferences-draftvisual.ui","Draft")
FreeCADGui.addPreferencePage(":/ui/preferences-drafttexts.ui","Draft")
FreeCADGui.addPreferencePage(":/ui/preferences-dxf.ui","Import-Export")
FreeCADGui.addPreferencePage(":/ui/preferences-dwg.ui","Import-Export")
FreeCADGui.addPreferencePage(":/ui/preferences-svg.ui","Import-Export")
FreeCADGui.addPreferencePage(":/ui/preferences-oca.ui","Import-Export")
FreeCADGui.draftToolBar.loadedPreferences = True
Log ('Loading Arch module... done\n')

Expand All @@ -119,12 +113,9 @@ def GetClassName(self):

FreeCADGui.addWorkbench(ArchWorkbench)

# add import/export types
FreeCAD.addImportType("Industry Foundation Classes (*.ifc)","importIFC")
FreeCAD.addExportType("Industry Foundation Classes (*.ifc)","importIFC")
FreeCAD.addExportType("Wavefront OBJ - Arch module (*.obj)","importOBJ")
FreeCAD.addExportType("WebGL file (*.html)","importWebGL")
FreeCAD.addImportType("Collada (*.dae)","importDAE")
FreeCAD.addExportType("Collada (*.dae)","importDAE")
# File format pref pages are independent and can be loaded at startup
import Arch_rc
FreeCADGui.addPreferencePage(":/ui/preferences-ifc.ui","Import-Export")
FreeCADGui.addPreferencePage(":/ui/preferences-dae.ui","Import-Export")


11 changes: 11 additions & 0 deletions src/Mod/Draft/Init.py
Expand Up @@ -19,3 +19,14 @@
#* USA *
#* *
#***************************************************************************

# add Import/Export types
App.addImportType("Autodesk DXF (*.dxf)","importDXF")
App.addImportType("SVG as geometry (*.svg)","importSVG")
App.addImportType("Open CAD Format (*.oca *.gcad)","importOCA")
App.addImportType("Common airfoil data (*.dat)","importAirfoilDAT")
App.addExportType("Autodesk DXF (*.dxf)","importDXF")
App.addExportType("Flattened SVG (*.svg)","importSVG")
App.addExportType("Open CAD Format (*.oca)","importOCA")
App.addImportType("Autodesk DWG (*.dwg)","importDWG")
App.addExportType("Autodesk DWG (*.dwg)","importDWG")
20 changes: 6 additions & 14 deletions src/Mod/Draft/InitGui.py
Expand Up @@ -100,10 +100,6 @@ def QT_TRANSLATE_NOOP(scope, text):
FreeCADGui.addPreferencePage(":/ui/preferences-draftsnap.ui","Draft")
FreeCADGui.addPreferencePage(":/ui/preferences-draftvisual.ui","Draft")
FreeCADGui.addPreferencePage(":/ui/preferences-drafttexts.ui","Draft")
FreeCADGui.addPreferencePage(":/ui/preferences-dxf.ui","Import-Export")
FreeCADGui.addPreferencePage(":/ui/preferences-dwg.ui","Import-Export")
FreeCADGui.addPreferencePage(":/ui/preferences-svg.ui","Import-Export")
FreeCADGui.addPreferencePage(":/ui/preferences-oca.ui","Import-Export")
FreeCADGui.draftToolBar.loadedPreferences = True
Log ('Loading Draft module...done\n')

Expand Down Expand Up @@ -141,13 +137,9 @@ def GetClassName(self):

FreeCADGui.addWorkbench(DraftWorkbench)

# add Import/Export types
App.addImportType("Autodesk DXF (*.dxf)","importDXF")
App.addImportType("SVG as geometry (*.svg)","importSVG")
App.addImportType("Open CAD Format (*.oca *.gcad)","importOCA")
App.addImportType("Common airfoil data (*.dat)","importAirfoilDAT")
App.addExportType("Autodesk DXF (*.dxf)","importDXF")
App.addExportType("Flattened SVG (*.svg)","importSVG")
App.addExportType("Open CAD Format (*.oca)","importOCA")
App.addImportType("Autodesk DWG (*.dwg)","importDWG")
App.addExportType("Autodesk DWG (*.dwg)","importDWG")
# File format pref pages are independent and can be loaded at startup
import Draft_rc
FreeCADGui.addPreferencePage(":/ui/preferences-dxf.ui","Import-Export")
FreeCADGui.addPreferencePage(":/ui/preferences-dwg.ui","Import-Export")
FreeCADGui.addPreferencePage(":/ui/preferences-svg.ui","Import-Export")
FreeCADGui.addPreferencePage(":/ui/preferences-oca.ui","Import-Export")

0 comments on commit 3996726

Please sign in to comment.