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
10 from fabmetheus_utilities import archive
12 def getCraftTypeName():
15 def getProfileName(craftTypeName):
16 return 'Cura profile:' + craftTypeName
18 def addListsToCraftTypeRepository(fileNameHelp, repository):
19 #print('addListsToCraftTypeRepository:', fileNameHelp, repository)
20 repository.name = fileNameHelp.split('.')[-2]
21 repository.preferences = []
23 def getCraftTypePluginModule( craftTypeName = ''):
24 "Get the craft type plugin module"
25 if craftTypeName == '':
26 craftTypeName = getCraftTypeName()
27 profilePluginsDirectoryPath = getPluginsDirectoryPath()
28 return archive.getModuleWithDirectoryPath( profilePluginsDirectoryPath, craftTypeName )
30 def getPluginsDirectoryPath():
31 "Get the plugins directory path."
32 return archive.getSkeinforgePluginsPath('profile_plugins')