mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 00:07:51 -06:00
Move towards making extruder manager a first class citizen - CURA-4482
This commit is contained in:
parent
723f6ce226
commit
b91824aab1
9 changed files with 121 additions and 108 deletions
|
@ -47,21 +47,20 @@ class SettingInheritanceManager(QObject):
|
|||
|
||||
@pyqtSlot(str, str, result = "QStringList")
|
||||
def getOverridesForExtruder(self, key, extruder_index):
|
||||
multi_extrusion = self._global_container_stack.getProperty("machine_extruder_count", "value") > 1
|
||||
if not multi_extrusion:
|
||||
return self._settings_with_inheritance_warning
|
||||
extruder = ExtruderManager.getInstance().getExtruderStack(extruder_index)
|
||||
if not extruder:
|
||||
Logger.log("w", "Unable to find extruder for current machine with index %s", extruder_index)
|
||||
return []
|
||||
result = []
|
||||
|
||||
definitions = self._global_container_stack.definition.findDefinitions(key=key)
|
||||
extruder_stack = ExtruderManager.getInstance().getExtruderStack(extruder_index)
|
||||
if not extruder_stack:
|
||||
Logger.log("w", "Unable to find extruder for current machine with index %s", extruder_index)
|
||||
return result
|
||||
|
||||
definitions = self._global_container_stack.definition.findDefinitions(key = key)
|
||||
if not definitions:
|
||||
Logger.log("w", "Could not find definition for key [%s] (2)", key)
|
||||
return []
|
||||
result = []
|
||||
return result
|
||||
|
||||
for key in definitions[0].getAllKeys():
|
||||
if self._settingIsOverwritingInheritance(key, extruder):
|
||||
if self._settingIsOverwritingInheritance(key, extruder_stack):
|
||||
result.append(key)
|
||||
|
||||
return result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue