Change initGui to use "import Lattice2"

Because otherwise I will forget to add new features to the module
structure.
This commit is contained in:
DeepSOIC 2015-12-17 02:04:22 +03:00
parent ef18bd6f91
commit 1eafb8faba
4 changed files with 42 additions and 60 deletions

View File

@ -43,64 +43,48 @@ class Lattice2Workbench (Workbench):
self.__class__.Icon = os.path.dirname(lattice2Dummy.__file__) + u"/PyResources/icons/Lattice2.svg".replace("/", os.path.sep) self.__class__.Icon = os.path.dirname(lattice2Dummy.__file__) + u"/PyResources/icons/Lattice2.svg".replace("/", os.path.sep)
def Initialize(self): def Initialize(self):
cmdsArrayTools = []
cmdsCompoundTools = []
cmdsMiscTools = []
cmdsDocTools = []
import lattice2Placement as mod import Lattice2
cmdsArrayTools = cmdsArrayTools + mod.exportedCommands cmdsArrayTools = ([]
import lattice2LinearArray as mod + Lattice2.ArrayFeatures.Placement.exportedCommands
cmdsArrayTools = cmdsArrayTools + mod.exportedCommands + Lattice2.ArrayFeatures.LinearArray.exportedCommands
import lattice2PolarArray as mod + Lattice2.ArrayFeatures.PolarArray.exportedCommands
cmdsArrayTools = cmdsArrayTools + mod.exportedCommands + Lattice2.ArrayFeatures.ArrayFromShape.exportedCommands
import lattice2ArrayFromShape as mod + Lattice2.ArrayFeatures.Invert.exportedCommands
cmdsArrayTools = cmdsArrayTools + mod.exportedCommands + Lattice2.ArrayFeatures.JoinArrays.exportedCommands
+ Lattice2.ArrayFeatures.ArrayFilter.exportedCommands
import lattice2Invert as mod + Lattice2.ArrayFeatures.ProjectArray.exportedCommands
cmdsArrayTools = cmdsArrayTools + mod.exportedCommands + Lattice2.ArrayFeatures.PopulateCopies.exportedCommands
import lattice2JoinArrays as mod + Lattice2.ArrayFeatures.PopulateChildren.exportedCommands
cmdsArrayTools = cmdsArrayTools + mod.exportedCommands + Lattice2.ArrayFeatures.Resample.exportedCommands
import lattice2ArrayFilter as mod + Lattice2.ArrayFeatures.PopulateCopies.exportedCommands
cmdsArrayTools = cmdsArrayTools + mod.exportedCommands )
import lattice2ProjectArray as mod self.appendToolbar('Lattice2ArrayFeatres', cmdsArrayTools)
cmdsArrayTools = cmdsArrayTools + mod.exportedCommands
import lattice2Resample as mod
cmdsArrayTools = cmdsArrayTools + mod.exportedCommands
import lattice2PopulateCopies as mod
cmdsArrayTools = cmdsArrayTools + mod.exportedCommands
import lattice2PopulateChildren as mod
cmdsArrayTools = cmdsArrayTools + mod.exportedCommands
import lattice2Downgrade as mod
cmdsCompoundTools = cmdsCompoundTools + mod.exportedCommands
import CompoundFilter2 as mod
cmdsCompoundTools = cmdsCompoundTools + mod.exportedCommands
import FuseCompound2 as mod
cmdsCompoundTools = cmdsCompoundTools + mod.exportedCommands
import lattice2Inspect as mod
cmdsCompoundTools = cmdsCompoundTools + mod.exportedCommands
import lattice2BoundBox as mod
cmdsMiscTools = cmdsMiscTools + mod.exportedCommands
import lattice2ShapeString as mod
cmdsMiscTools = cmdsMiscTools + mod.exportedCommands
import lattice2SubstituteObject as mod
cmdsMiscTools = cmdsMiscTools + mod.exportedCommands
import lattice2RecomputeLocker as mod
cmdsDocTools = cmdsDocTools + mod.exportedCommands
self.appendToolbar('Lattice2ArrayTools', cmdsArrayTools)
self.appendToolbar('Lattice2CompoundTools', cmdsCompoundTools)
self.appendToolbar('Lattice2MiscTools', cmdsMiscTools)
self.appendToolbar('Lattice2DocTools', cmdsDocTools)
#FreeCADGui.addIconPath( '' )
#FreeCADGui.addPreferencePage( '','Lattice2' )
self.appendMenu('Lattice2', cmdsArrayTools) self.appendMenu('Lattice2', cmdsArrayTools)
cmdsCompoundTools = ([]
+ Lattice2.CompoundFeatures.Downgrade.exportedCommands
+ Lattice2.CompoundFeatures.CompoundFilter.exportedCommands
+ Lattice2.CompoundFeatures.FuseCompound.exportedCommands
+ Lattice2.CompoundFeatures.BoundBox.exportedCommands
+ Lattice2.CompoundFeatures.ShapeString.exportedCommands
)
self.appendToolbar('Lattice2CompoundFeatures', cmdsCompoundTools)
self.appendMenu('Lattice2', cmdsCompoundTools) self.appendMenu('Lattice2', cmdsCompoundTools)
self.appendMenu('Lattice2', cmdsMiscTools)
self.appendMenu('Recomputes', cmdsDocTools) cmdsGuiTools = ([]
+ Lattice2.GuiTools.Inspect.exportedCommands
+ Lattice2.GuiTools.SubstituteObject.exportedCommands
)
self.appendToolbar('Lattice2GuiTools', cmdsGuiTools)
self.appendMenu('Lattice2', cmdsGuiTools)
cmdsRecomputeLocker = ([]
+ Lattice2.GuiTools.RecomputeLocker.exportedCommands
)
self.appendToolbar('Lattice2RecomputeLocker', cmdsRecomputeLocker)
self.appendMenu('Recomputes', cmdsRecomputeLocker)
def Activated(self): def Activated(self):
pass pass

View File

@ -29,8 +29,6 @@ import Lattice2CodeModules as Code
import Lattice2CompoundFeatures as CompoundFeatures import Lattice2CompoundFeatures as CompoundFeatures
import Lattice2GPFeatures as GPFeatures
import Lattice2ArrayFeatures as ArrayFeatures import Lattice2ArrayFeatures as ArrayFeatures
import Lattice2GuiTools as GuiTools import Lattice2GuiTools as GuiTools

View File

@ -1,3 +1,5 @@
import CompoundFilter2 as CompoundFilter import CompoundFilter2 as CompoundFilter
import FuseCompound2 as FuseCompound import FuseCompound2 as FuseCompound
import lattice2Downgrade as Downgrade import lattice2Downgrade as Downgrade
import lattice2BoundBox as BoundBox
import lattice2ShapeString as ShapeString

View File

@ -1,2 +0,0 @@
import lattice2BoundBox as BoundBox
import lattice2ShapeString as ShapeString