Skip to content

Commit b7f3108

Browse files
committed
Fix setting relationships to update UI properly.
1 parent 1bce215 commit b7f3108

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

cura/BuildVolume.py

+1
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,7 @@ def _updateUsedExtruders(self):
810810
for extruder in global_container_stack.extruderList:
811811
used = extruder in used_extruders
812812
extruder.definitionChanges.setProperty("extruder_used", "value", used)
813+
global_container_stack.definitionChanges.setProperty("extruders_used", "value", [extruder.position for extruder in used_extruders])
813814

814815
def _nodeActiveExtruderChanged(self):
815816
self._updateDisallowedAreasAndRebuild()

resources/definitions/fdmextruder.def.json

+11
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@
2727
"settable_per_meshgroup": false,
2828
"type": "extruder"
2929
},
30+
"extruder_used":
31+
{
32+
"default_value": true,
33+
"description": "Is this extruder used for printing. This setting is controlled by Cura automatically.",
34+
"label": "Extruder Used",
35+
"settable_globally": false,
36+
"settable_per_extruder": true,
37+
"settable_per_mesh": false,
38+
"settable_per_meshgroup": false,
39+
"type": "bool"
40+
},
3041
"extruder_prime_pos_z":
3142
{
3243
"default_value": 0,

resources/definitions/fdmprinter.def.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -289,16 +289,16 @@
289289
"settable_per_extruder": false,
290290
"settable_per_meshgroup": false
291291
},
292-
"extruder_used":
292+
"extruders_used":
293293
{
294-
"default_value": true,
295-
"description": "Is this extruder used for printing. This setting is controlled by Cura automatically.",
296-
"label": "Extruder Used",
297-
"settable_globally": false,
298-
"settable_per_extruder": true,
294+
"default_value": [],
295+
"description": "A list of extruder positions that are used. This setting is controlled by Cura automatically.",
296+
"label": "Extruders Used",
297+
"settable_globally": true,
298+
"settable_per_extruder": false,
299299
"settable_per_mesh": false,
300300
"settable_per_meshgroup": false,
301-
"type": "bool"
301+
"type": "[int]"
302302
},
303303
"machine_nozzle_tip_outer_diameter":
304304
{
@@ -2494,7 +2494,7 @@
24942494
"enabled": "machine_heated_build_volume",
24952495
"settable_per_mesh": false,
24962496
"settable_per_extruder": false,
2497-
"depends_on_settings": [ "extruder_used" ]
2497+
"depends_on_settings": [ "extruders_used" ]
24982498
},
24992499
"material_print_temperature":
25002500
{
@@ -2608,7 +2608,7 @@
26082608
"settable_per_mesh": false,
26092609
"settable_per_extruder": false,
26102610
"settable_per_meshgroup": false,
2611-
"depends_on_settings": [ "extruder_used" ]
2611+
"depends_on_settings": [ "extruders_used" ]
26122612
},
26132613
"material_bed_temperature_layer_0":
26142614
{

0 commit comments

Comments
 (0)