Skip to content

Commit

Permalink
Start using the 'force_depends_on_settings' property.
Browse files Browse the repository at this point in the history
This is useful if the relations between settings are cross-extruder, which can happen when a setting that is currently limited to one extruder, depends on another setting (in a value-formula of the like) which is currently limited to _another_ extruder.

Note that Irenamed the 'depends_on_settings' to 'force_depends_on_settings' as the former may imply that you should do it for _all_ dependant settings, instead of it being the exception (as we expect that this will occur rarely -- for example in multi-material rafts).

CURA-12050
  • Loading branch information
rburema committed Jul 30, 2024
1 parent a027307 commit 2d89720
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions cura/CuraApplication.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,9 @@ def _initializeSettingDefinitions(cls):
SettingDefinition.addSupportedProperty("settable_globally", DefinitionPropertyType.Any, default=True,
read_only=True)

SettingDefinition.addSupportedProperty("force_depends_on_settings", DefinitionPropertyType.Any, default=[],
read_only=True)

# From which stack the setting would inherit if not defined per object (handled in the engine)
# AND for settings which are not settable_per_mesh:
# which extruder is the only extruder this setting is obtained from
Expand Down
12 changes: 8 additions & 4 deletions resources/definitions/fdmprinter.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -6499,7 +6499,8 @@
"enabled": "resolveOrValue('adhesion_type') == 'raft' and raft_interface_layers > 0",
"settable_per_mesh": false,
"settable_per_extruder": true,
"limit_to_extruder": "raft_interface_extruder_nr"
"limit_to_extruder": "raft_interface_extruder_nr",
"force_depends_on_settings": [ "raft_base_thickness" ]
},
"raft_interface_line_spacing":
{
Expand All @@ -6515,7 +6516,8 @@
"enabled": "resolveOrValue('adhesion_type') == 'raft' and raft_interface_layers > 0",
"settable_per_mesh": false,
"settable_per_extruder": true,
"limit_to_extruder": "raft_interface_extruder_nr"
"limit_to_extruder": "raft_interface_extruder_nr",
"force_depends_on_settings": [ "raft_base_thickness" ]
},
"raft_interface_z_offset":
{
Expand All @@ -6531,7 +6533,8 @@
"enabled": "resolveOrValue('adhesion_type') == 'raft' and raft_interface_layers > 0",
"settable_per_mesh": false,
"settable_per_extruder": true,
"limit_to_extruder": "raft_interface_extruder_nr"
"limit_to_extruder": "raft_interface_extruder_nr",
"force_depends_on_settings": [ "raft_base_thickness" ]
},
"raft_interface_infill_overlap":
{
Expand Down Expand Up @@ -6784,7 +6787,8 @@
"enabled": "resolveOrValue('adhesion_type') == 'raft' and raft_interface_layers > 0",
"settable_per_mesh": false,
"settable_per_extruder": true,
"limit_to_extruder": "raft_interface_extruder_nr"
"limit_to_extruder": "raft_interface_extruder_nr",
"force_depends_on_settings": [ "raft_base_thickness" ]
},
"raft_surface_speed":
{
Expand Down

0 comments on commit 2d89720

Please sign in to comment.