2 Profile is a script to set the craft types setting for the skeinforge chain.
4 Profile presents the user with a choice of the craft types in the profile_plugins folder. The chosen craft type is used to determine the craft type profile for the skeinforge chain. The default craft type is extrusion.
8 from __future__ import absolute_import
9 #Init has to be imported first because it has code to workaround the python bug where relative imports don't work if the module is imported as a main module.
12 from fabmetheus_utilities import archive
14 def getCraftTypeName():
17 def getProfileName(craftTypeName):
18 return 'Cura profile:' + craftTypeName
20 def addListsToCraftTypeRepository(fileNameHelp, repository):
21 #print('addListsToCraftTypeRepository:', fileNameHelp, repository)
22 repository.name = fileNameHelp.split('.')[-2]
23 repository.preferences = []
25 def getCraftTypePluginModule( craftTypeName = ''):
26 "Get the craft type plugin module"
27 if craftTypeName == '':
28 craftTypeName = getCraftTypeName()
29 profilePluginsDirectoryPath = getPluginsDirectoryPath()
30 return archive.getModuleWithDirectoryPath( profilePluginsDirectoryPath, craftTypeName )
32 def getPluginsDirectoryPath():
33 "Get the plugins directory path."
34 return archive.getSkeinforgePluginsPath('profile_plugins')