Skip to content

Commit

Permalink
merge 5.7
Browse files Browse the repository at this point in the history
  • Loading branch information
saumyaj3 committed Apr 26, 2024
2 parents 6e12e14 + 7db39ae commit fb965b8
Show file tree
Hide file tree
Showing 118 changed files with 15,656 additions and 17 deletions.
5 changes: 1 addition & 4 deletions cura/Machines/Models/ActiveIntentQualitiesModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ def _onChanged(self, container: ContainerStack) -> None:
self._updateDelayed()

def _update(self):
active_extruder_stack = cura.CuraApplication.CuraApplication.getInstance().getMachineManager().activeStack
if active_extruder_stack:
self._intent_category = active_extruder_stack.intent.getMetaDataEntry("intent_category", "")

self._intent_category = IntentManager.getInstance().currentIntentCategory
new_items: List[Dict[str, Any]] = []
global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()
if not global_stack:
Expand Down
22 changes: 18 additions & 4 deletions cura/Settings/IntentManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,24 @@ def getDefaultIntent(self) -> "InstanceContainer":
@pyqtProperty(str, notify = intentCategoryChanged)
def currentIntentCategory(self) -> str:
application = cura.CuraApplication.CuraApplication.getInstance()
active_extruder_stack = application.getMachineManager().activeStack
if active_extruder_stack is None:
return ""
return active_extruder_stack.intent.getMetaDataEntry("intent_category", "")
global_stack = application.getGlobalContainerStack()

active_intent = "default"
if global_stack is None:
return active_intent

# Loop over all active extruders and check if they have an intent that isn't default.
# The logic behind this is that support materials (for instance, PVA) don't have intents, but they should be
# combinable with all other intents. So if one extruder has "engineering" as an intent and the other has
# "default" the 'dominant' intent is "engineering"
for extruder_stack in global_stack.extruderList:
if not extruder_stack.isEnabled: # Ignore disabled stacks
continue
extruder_intent = extruder_stack.intent.getMetaDataEntry("intent_category", "")
if extruder_intent != "default":
active_intent = extruder_intent

return active_intent

@pyqtSlot(str, str)
def selectIntent(self, intent_category: str, quality_type: str) -> None:
Expand Down
18 changes: 18 additions & 0 deletions cura/Settings/MachineManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,24 @@ def variantBuildplateUsable(self) -> bool:

return result

@pyqtProperty(bool, notify = currentConfigurationChanged)
def variantCoreUsableForFactor4(self) -> bool:
"""The selected core is usable if it is in second extruder of Factor4
"""
result = True
if not self._global_container_stack:
return result
if self.activeMachine.definition.id != "ultimaker_factor4":
return result

for extruder_container in self._global_container_stack.extruderList:
if extruder_container.definition.id.startswith("ultimaker_factor4_extruder_right"):
if extruder_container.material == empty_material_container:
return True
if extruder_container.variant.id.startswith("ultimaker_factor4_bb"):
return False
return True

@pyqtSlot(str, result = str)
def getDefinitionByMachineId(self, machine_id: str) -> Optional[str]:
"""Get the Definition ID of a machine (specified by ID)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion plugins/UM3NetworkPrinting/src/Cloud/machine_id_to_name.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"ultimaker_method": "MakerBot Method",
"ultimaker_methodx": "MakerBot Method X",
"ultimaker_methodxl": "MakerBot Method XL"
"ultimaker_methodxl": "MakerBot Method XL",
"ultimaker_factor4": "Ultimaker Factor 4"
}
1 change: 1 addition & 0 deletions plugins/XmlMaterialProfile/product_to_id.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"Ultimaker #+": "ultimaker#_plus",
"Ultimaker #+ Connect": "ultimaker#_plus_connect",
"Ultimaker S#": "ultimaker_s#",
"Ultimaker Factor #": "ultimaker_factor#",
"Ultimaker Original": "ultimaker_original",
"Ultimaker Original+": "ultimaker_original_plus",
"Ultimaker Original Dual Extrusion": "ultimaker_original_dual",
Expand Down
24 changes: 18 additions & 6 deletions resources/definitions/fdmprinter.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -8559,7 +8559,9 @@
"enabled": "ppr_enable",
"unit": "%",
"type": "float",
"settable_per_extruder": true
"settable_per_extruder": true,
"settable_per_mesh": false,
"settable_per_meshgroup": false
},
"flow_anomaly_limit":
{
Expand All @@ -8569,7 +8571,9 @@
"enabled": "ppr_enable",
"unit": "%",
"type": "float",
"settable_per_extruder": true
"settable_per_extruder": true,
"settable_per_mesh": false,
"settable_per_meshgroup": false
},
"print_temp_warn_limit":
{
Expand All @@ -8579,7 +8583,9 @@
"type": "float",
"default_value": 3.0,
"enabled": "ppr_enable",
"settable_per_extruder": true
"settable_per_extruder": true,
"settable_per_mesh": false,
"settable_per_meshgroup": false
},
"print_temp_anomaly_limit":
{
Expand All @@ -8589,7 +8595,9 @@
"type": "float",
"default_value": 7.0,
"enabled": "ppr_enable",
"settable_per_extruder": true
"settable_per_extruder": true,
"settable_per_mesh": false,
"settable_per_meshgroup": false
},
"bv_temp_warn_limit":
{
Expand All @@ -8599,7 +8607,9 @@
"type": "float",
"default_value": 7.5,
"enabled": "ppr_enable",
"settable_per_extruder": false
"settable_per_extruder": false,
"settable_per_mesh": false,
"settable_per_meshgroup": false
},
"bv_temp_anomaly_limit":
{
Expand All @@ -8609,7 +8619,9 @@
"type": "float",
"default_value": 10.0,
"enabled": "ppr_enable",
"settable_per_extruder": false
"settable_per_extruder": false,
"settable_per_mesh": false,
"settable_per_meshgroup": false
}
}
},
Expand Down
Loading

0 comments on commit fb965b8

Please sign in to comment.