Example #1
0
	def __init__( self, fileName ):
		"Add empty lists."
		self.maximumZ = - 999999999.0
		self.minimumZ = 999999999.0
		self.layerThickness = None
		self.rotatedBoundaryLayers = []
		self.untilDotName = gcodec.getUntilDot( fileName )
Example #2
0
 def __init__(self, fileName):
     "Add empty lists."
     self.maximumZ = -999999999.0
     self.minimumZ = 999999999.0
     self.layerThickness = None
     self.rotatedBoundaryLayers = []
     self.untilDotName = gcodec.getUntilDot(fileName)
Example #3
0
	def getPhotoButtonGridIncrement( self, commandFunction, fileName ):
		"Get a PhotoImage button, grid the button and increment the grid position."
		photoImage = preferences.Tkinter.PhotoImage( file = os.path.join( self.imagesDirectoryPath, fileName ), master = self.root )
		untilDotFileName = gcodec.getUntilDot( fileName )
		self.photoImages[ untilDotFileName ] = photoImage
		photoButton = preferences.Tkinter.Button( self.root, activebackground = 'black', command = commandFunction, image = photoImage, text = untilDotFileName )
		photoButton.grid( row = self.row, column = self.column, sticky = preferences.Tkinter.W )
		self.column += 1
		return photoButton
Example #4
0
	def addPhotoImage( self, fileName, gridPosition ):
		"Get a PhotoImage button, grid the button and increment the grid position."
		photoImage = None
		try:
			photoImage = settings.Tkinter.PhotoImage( file = os.path.join( self.imagesDirectoryPath, fileName ), master = gridPosition.master )
		except:
			print( 'Image %s was not found in the images directory, so a text button will be substituted.' % fileName )
		untilDotFileName = gcodec.getUntilDot( fileName )
		self.photoImages[ untilDotFileName ] = photoImage
		return untilDotFileName
Example #5
0
 def addPhotoImage(self, fileName, gridPosition):
     "Get a PhotoImage button, grid the button and increment the grid position."
     photoImage = None
     try:
         photoImage = settings.Tkinter.PhotoImage(
             file=os.path.join(self.imagesDirectoryPath, fileName),
             master=gridPosition.master)
     except:
         print(
             'Image %s was not found in the images directory, so a text button will be substituted.'
             % fileName)
     untilDotFileName = gcodec.getUntilDot(fileName)
     self.photoImages[untilDotFileName] = photoImage
     return untilDotFileName
Example #6
0
def addToCraftMenu( menu ):
	"Add a craft plugin menu."
	preferences.ToolDialog().addPluginToMenu( menu, gcodec.getUntilDot( os.path.abspath( __file__ ) ) )
	menu.add_separator()
	directoryPath = getPluginsDirectoryPath()
	directoryFolders = preferences.getFolders( directoryPath )
	pluginFilenames = getPluginFilenames()
	for pluginFilename in pluginFilenames:
		pluginFolderName = pluginFilename + '_plugins'
		pluginPath = os.path.join( directoryPath, pluginFilename )
		if pluginFolderName in directoryFolders:
			addSubmenus( menu, pluginFilename, os.path.join( directoryPath, pluginFolderName ), pluginPath )
		else:
			preferences.ToolDialog().addPluginToMenu( menu, pluginPath )
Example #7
0
def addToCraftMenu(menu):
    "Add a craft plugin menu."
    settings.ToolDialog().addPluginToMenu(
        menu, gcodec.getUntilDot(os.path.abspath(__file__)))
    menu.add_separator()
    directoryPath = getPluginsDirectoryPath()
    directoryFolders = settings.getFolders(directoryPath)
    pluginFileNames = getPluginFileNames()
    for pluginFileName in pluginFileNames:
        pluginFolderName = pluginFileName + '_plugins'
        pluginPath = os.path.join(directoryPath, pluginFileName)
        if pluginFolderName in directoryFolders:
            addSubmenus(menu, pluginFileName,
                        os.path.join(directoryPath, pluginFolderName),
                        pluginPath)
        else:
            settings.ToolDialog().addPluginToMenu(menu, pluginPath)