Ghostkeeper
0eb3c5c0d6
Refer material manager functions through to material management model
...
That's where the materials are duplicated now. So we only maintain one implementation of that.
Contributes to issue CURA-6600.
2019-09-17 17:50:38 +02:00
Ghostkeeper
5f4051ab5c
Use getApproximateMaterialDiameter instead of rounded getCompatibleMaterialDiameter
...
There was a function to round it for us already.
Contributes to issue CURA-6600.
2019-09-17 16:41:32 +02:00
Ghostkeeper
5f2e2d5320
Use correct material diameter, rather than always 3
...
This function shouldn't be called any more anyway, though.
Contributes to issue CURA-6600.
2019-09-17 15:58:10 +02:00
Ghostkeeper
614c2970ea
Use getApproximateMaterialDiameter instead of rounded getCompatibleMaterialDiameter
...
So we don't need to round it again.
Also convert both to float to be robust against the ambiguous serialisation of floats getting in the way (e.g. '3' vs. '3.0'). Python does that sometimes.
Contributes to issue CURA-6600.
2019-09-17 15:50:38 +02:00
Ghostkeeper
977beb8dbb
Re-build container tree if has_materials changes during runtime
...
A bit of a hack and it'll be very slow. But it should work. Right now this crashes though because it still calls the Material Manager.
Contributes to issue CURA-6600.
2019-09-17 08:55:29 +02:00
Lipu Fei
e1a52f841f
Correct typing
2019-09-16 10:48:39 +02:00
Jaime van Kessel
0ff9d72c4c
Remove use of deprecated extruders property
2019-09-13 17:27:16 +02:00
Ghostkeeper
2cca95384d
Don't look for quality group for empty material
...
Just don't add it to the list of available intents then.
Contributes to issue CURA-6775.
2019-09-13 16:09:02 +02:00
Jaime van Kessel
55a8d03d42
Fix typing error
2019-09-13 13:16:48 +02:00
Ghostkeeper
f4a2f3efa6
Emit activeStackChanged as documented when containers in the active stack change
...
This fixes updating the intent models when you switch nozzles. Among other things, probably.
Contributes to issue CURA-6600.
2019-09-12 17:27:30 +02:00
Ghostkeeper
603f18ebc9
No need to sort quality groups by type alphabetically
...
Like, it would put 'draft' first and 'verydraft' last. Just makes no sense. They have unique layer heights already.
Contributes to issue CURA-6600.
2019-09-12 16:44:40 +02:00
Ghostkeeper
7d49fd7fa2
Don't import type that's only used for type checking
...
Contributes to issue CURA-6600.
2019-09-12 16:15:03 +02:00
Ghostkeeper
f1299589c9
Remove debug prints
...
Contributes to issue CURA-6600.
2019-09-12 15:49:27 +02:00
Ghostkeeper
9a5d45282a
Set intent category of quality changes group correctly
...
If any profile has a different intent than default, the entire group becomes that intent. There can only be one intent that's different from default per group.
Contributes to issue CURA-6600.
2019-09-12 14:54:24 +02:00
Ghostkeeper
cb146b586d
Emit ContainerRegistry's containerMetaDataChanged when name changes
...
If we properly call the setName() function on the container it'll emit the signal that the metadata changes.
This fixes the updating of the profiles list when you rename a container.
Contributes to issue CURA-6600.
2019-09-12 13:22:57 +02:00
Ghostkeeper
d6e010f22b
Fix iterating over all stacks
...
Contributes to issue CURA-6600.
2019-09-11 17:29:10 +02:00
Ghostkeeper
f865151e82
Don't create intent for global stack when duplicating
...
Contributes to issue CURA-6600.
2019-09-11 17:28:42 +02:00
Ghostkeeper
2b96543cd3
Store intent category in metadata of quality_changes as well
...
This is necessary in order to restore it properly.
Contributes to issue CURA_6600.
2019-09-11 16:58:11 +02:00
Ghostkeeper
0b92c3f3df
Use .container property rather than deprecated getContainer() function
...
Contributes to issue CURA-6600.
2019-09-10 14:56:16 +02:00
Lipu Fei
3f3aac7ce5
Merge pull request #6289 from Ultimaker/feature_intent_interface
...
Feature intent interface
2019-09-09 16:53:37 +02:00
Ghostkeeper
5debdd4cf6
Fix getting extruder list everywhere
...
Didn't test this beyond my own automated test, it seems.
Contributes to issue CURA-6600.
2019-09-09 16:47:29 +02:00
Ghostkeeper
8bcd9b339a
Use GlobalStack.extrudersList instead of GlobalStack.extruders to iterate
...
Otherwise the iteration can happen in any arbitrary order (due to the dict) and this can cause the result to not match to the desired combination of configurations per extruder.
Contributes to issue CURA-6600.
2019-09-06 17:20:03 +02:00
Ghostkeeper
4bdc819f12
Fix nondetermistic result with dictionary values list
...
Because global_stack.extruders.values can be returned in any order, the configurations matching with the lists doesn't always give a result.
It happened to work on my computer with the test, but there is no guarantee of that.
This is probably also going wrong in other places. I don't think we should use the .extruders property anywhere really!
Contributes to issue CURA-6600.
2019-09-06 17:15:45 +02:00
Ghostkeeper
f8472d6414
Fix changing name of profiles in quality changes group
...
Because quality changes don't have nodes any more.
Contributes to issue CURA-6600.
2019-09-02 18:00:04 +02:00
Ghostkeeper
7216a1dbd7
Refer through to correct function of QualityManagementModel
...
Contributes to issue CURA-6600.
2019-09-02 17:52:30 +02:00
Ghostkeeper
4043afd09f
Refer _createQualityChanges through to QualityManagementModel
...
That's where the function was moved.
This function is still being called from various places, even though it's protected. Should change that...
Contributes to issue CURA-6600.
2019-09-02 17:47:31 +02:00
Ghostkeeper
a1e6ba615c
Don't use isinstance to check for extruder stack vs. global
...
Just use the metadata available.
Contributes to issue CURA-6600.
2019-09-02 17:44:28 +02:00
Ghostkeeper
297b430712
Fix getting container registry
...
It's not in the fields of this class.
Contributes to issue CURA-6600.
2019-09-02 17:42:17 +02:00
Ghostkeeper
b5d32a9b70
Move createQualityChanges function to QualityManagementModel
...
This function is specific to the management page (for the most part; some things seem to call the _createQualityChanges private function nonetheless).
Contributes to issue CURA-6600.
2019-09-02 17:07:18 +02:00
Ghostkeeper
b05de3e6d8
Remove unused import
...
Contributes to issue CURA-6600.
2019-09-02 16:48:01 +02:00
Jaime van Kessel
b00b8c8c58
Merge branch 'feature_intent_container_tree' of github.com:Ultimaker/Cura into feature_intent_interface
2019-08-29 16:28:26 +02:00
Jaime van Kessel
d548404dfd
Fix typing issues
2019-08-29 16:23:10 +02:00
Jaime van Kessel
de1065f0a3
Prevent crash if extruder is not yet set
...
CURA-6598
2019-08-29 14:04:05 +02:00
Jaime van Kessel
ba0c16d968
Update intents model to use container tree
...
CURA-6598
2019-08-29 13:53:23 +02:00
Jaime van Kessel
a8b818fbdc
Ensure that right intents are added to the tree
...
CURA-6598
2019-08-29 13:52:01 +02:00
Jaime van Kessel
f4dc93fc39
Prevent crash in model if no extruder is set
...
CURA-6598
2019-08-29 11:57:03 +02:00
Jaime van Kessel
5401a4db15
Ensure that each intent gets it's own bar in recommended
...
CURA-6598
2019-08-29 11:53:19 +02:00
Jaime van Kessel
24d6d5b102
Update intent models to also house nested qualities
...
CURA-6598
2019-08-29 11:45:19 +02:00
Ghostkeeper
9614cef135
Move duplicateQualityChanges to QualityManagementModel
...
This is specific to the quality management page, so moving it here prevents QualityManager from becoming a big ball of spaghetti again.
Contributes to issue CURA-6600.
2019-08-29 09:02:18 +02:00
Ghostkeeper
b046ff6683
Fix updating quality management page profile list
...
When a custom profile gets added, deleted or renamed we need to update our model.
Contributes to issue CURA-6600.
2019-08-28 16:54:41 +02:00
Ghostkeeper
a7e5830762
Fix case if containers are None
...
This happens when the number of containers was resized.
Contributes to issue CURA-6600.
2019-08-28 16:50:14 +02:00
Ghostkeeper
5d8fff69e4
Fix referencing nodes for quality changes
...
Contributes to issue CURA-6600.
2019-08-28 16:32:20 +02:00
Ghostkeeper
5fadc7019d
Move renameQualityChangesGroup to QualityManagementModel
...
Contributes to issue CURA-6600.
2019-08-28 16:31:50 +02:00
Ghostkeeper
be49956de9
Refer to quality management model to remove quality changes
...
This function is deprecated now.
Contributes to issue CURA-6600.
2019-08-28 15:29:03 +02:00
Ghostkeeper
b3fd310d37
Move removeQualityChangesGroup to QualityManagementModel
...
This is an operation specific to the quality management page, so it should be located there.
Contributes to issue CURA-6600.
2019-08-28 15:21:33 +02:00
Ghostkeeper
35907e5228
Use Pythonic way of creating list of N elements
...
Contributes to issue CURA-6600.
2019-08-28 14:17:17 +02:00
Ghostkeeper
7c90b5dd30
Use shortcut to get current quality changes groups
...
Contributes to issue CURA-6600.
2019-08-28 13:56:37 +02:00
Ghostkeeper
24fd67c360
Also try looking for material-specific profiles, not just by type
...
Type is only a fallback after the exact ID match.
This way we can also have profiles specific to Ultimaker PLA Red and such in the future.
Contributes to issue CURA-6600.
2019-08-28 13:53:21 +02:00
Ghostkeeper
a05f077df8
Use fdmprinter for machines that don't have printer-specific qualities
...
This encodes the behaviour of QualityManager.getMachineDefinitionIDForQualitySearch.
Contributes to issue CURA-6600.
2019-08-28 13:35:49 +02:00
Ghostkeeper
c9191beb61
Fix updating intents list when printer changes
...
Contributes to issue CURA-6600.
2019-08-28 11:11:13 +02:00