mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Fix spacing
Minor code style stuff.
This commit is contained in:
parent
cd78ab850d
commit
41e444714f
1 changed files with 6 additions and 6 deletions
|
@ -151,9 +151,9 @@ class MachineSettingsAction(MachineAction):
|
||||||
if extruder_count == 1:
|
if extruder_count == 1:
|
||||||
# Get the material and variant of the first extruder before setting the number extruders to 1
|
# Get the material and variant of the first extruder before setting the number extruders to 1
|
||||||
if machine_manager.hasMaterials:
|
if machine_manager.hasMaterials:
|
||||||
extruder_material_id = machine_manager.allActiveMaterialIds[extruder_manager.extruderIds["0"]]
|
extruder_material_id = machine_manager.allActiveMaterialIds[extruder_manager.extruderIds["0"]]
|
||||||
if machine_manager.hasVariants:
|
if machine_manager.hasVariants:
|
||||||
extruder_variant_id = machine_manager.activeVariantIds[0]
|
extruder_variant_id = machine_manager.activeVariantIds[0]
|
||||||
|
|
||||||
# Copy any settable_per_extruder setting value from the extruders to the global stack
|
# Copy any settable_per_extruder setting value from the extruders to the global stack
|
||||||
extruder_stacks = ExtruderManager.getInstance().getActiveExtruderStacks()
|
extruder_stacks = ExtruderManager.getInstance().getActiveExtruderStacks()
|
||||||
|
@ -167,7 +167,7 @@ class MachineSettingsAction(MachineAction):
|
||||||
setting_key = setting_instance.definition.key
|
setting_key = setting_instance.definition.key
|
||||||
settable_per_extruder = self._global_container_stack.getProperty(setting_key, "settable_per_extruder")
|
settable_per_extruder = self._global_container_stack.getProperty(setting_key, "settable_per_extruder")
|
||||||
if settable_per_extruder:
|
if settable_per_extruder:
|
||||||
limit_to_extruder = self._global_container_stack.getProperty(setting_key, "limit_to_extruder")
|
limit_to_extruder = self._global_container_stack.getProperty(setting_key, "limit_to_extruder")
|
||||||
|
|
||||||
if limit_to_extruder == "-1" or limit_to_extruder == extruder_index:
|
if limit_to_extruder == "-1" or limit_to_extruder == extruder_index:
|
||||||
global_user_container.setProperty(setting_key, "value", extruder_user_container.getProperty(setting_key, "value"))
|
global_user_container.setProperty(setting_key, "value", extruder_user_container.getProperty(setting_key, "value"))
|
||||||
|
@ -175,9 +175,9 @@ class MachineSettingsAction(MachineAction):
|
||||||
|
|
||||||
# Check to see if any features are set to print with an extruder that will no longer exist
|
# Check to see if any features are set to print with an extruder that will no longer exist
|
||||||
for setting_key in ["adhesion_extruder_nr", "support_extruder_nr", "support_extruder_nr_layer_0", "support_infill_extruder_nr", "support_interface_extruder_nr"]:
|
for setting_key in ["adhesion_extruder_nr", "support_extruder_nr", "support_extruder_nr_layer_0", "support_infill_extruder_nr", "support_interface_extruder_nr"]:
|
||||||
if int(self._global_container_stack.getProperty(setting_key, "value")) > extruder_count -1:
|
if int(self._global_container_stack.getProperty(setting_key, "value")) > extruder_count - 1:
|
||||||
Logger.log("i", "Lowering %s setting to match number of extruders", setting_key)
|
Logger.log("i", "Lowering %s setting to match number of extruders", setting_key)
|
||||||
self._global_container_stack.getTop().setProperty(setting_key, "value", extruder_count -1)
|
self._global_container_stack.getTop().setProperty(setting_key, "value", extruder_count - 1)
|
||||||
|
|
||||||
# Check to see if any objects are set to print with an extruder that will no longer exist
|
# Check to see if any objects are set to print with an extruder that will no longer exist
|
||||||
root_node = Application.getInstance().getController().getScene().getRoot()
|
root_node = Application.getInstance().getController().getScene().getRoot()
|
||||||
|
@ -262,7 +262,7 @@ class MachineSettingsAction(MachineAction):
|
||||||
|
|
||||||
# Set the material container to a sane default
|
# Set the material container to a sane default
|
||||||
if material_container.getId() == "empty_material":
|
if material_container.getId() == "empty_material":
|
||||||
search_criteria = { "type": "material", "definition": "fdmprinter", "id": "*pla*" }
|
search_criteria = { "type": "material", "definition": "fdmprinter", "id": "*pla*"}
|
||||||
containers = self._container_registry.findInstanceContainers(**search_criteria)
|
containers = self._container_registry.findInstanceContainers(**search_criteria)
|
||||||
if containers:
|
if containers:
|
||||||
self._global_container_stack.replaceContainer(material_index, containers[0])
|
self._global_container_stack.replaceContainer(material_index, containers[0])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue