Lipu Fei
d1330e5ffa
Fix updating custom quality menu model
...
CURA-6599
2019-09-25 14:36:46 +02:00
Lipu Fei
f395c92732
Fix custom profile menu
...
CURA-6599
2019-09-25 08:28:24 +02:00
Lipu Fei
f2e518da6b
Fix code style and typing
2019-09-25 08:23:57 +02:00
Lipu Fei
94e89ad4ac
Fix merge conflicts with master
2019-09-24 14:26:43 +02:00
Jaime van Kessel
f469b99471
Create intent nodes based on the selected quality type
...
Previously it would use the material type from the material, but since
the material from the node can be different to that of the quality, we need
to use the one from quality instead (This is due to the fallback system)
CURA-6807
2019-09-24 11:57:50 +02:00
Jaime van Kessel
7e3f265068
Add a function to add a MachineNode to the tree.
...
This solves the issue that machines created by the stack builder broke the material updating
CURA-6791
2019-09-23 13:18:11 +02:00
Lipu Fei
1aa6708677
Fix typing
2019-09-23 10:59:31 +02:00
Ghostkeeper
4a68e7ec95
Fix favorite materials without material manager
...
We just track it via the preference value itself rather than duplicating that in any other data structure. It's simple enough.
Contributes to issue CURA-6776.
2019-09-20 09:57:36 +02:00
Ghostkeeper
12043df367
Don't use material manager to find or remove materials
...
That remove function in the material manager was very weird...
Contributes to issue CURA-6776.
2019-09-20 09:57:36 +02:00
Ghostkeeper
105e782e75
Remove unused imports to MaterialManager
...
Contributes to issue CURA-6776.
2019-09-20 09:57:35 +02:00
Jaime van Kessel
a69a394514
Fix container tree generation for machines that only have global profiles
...
CURA-6775
2019-09-19 17:16:15 +02:00
Jaime van Kessel
fc67090a2f
Fix crash when adding UMO
2019-09-19 16:15:00 +02:00
Jaime van Kessel
7dcf083991
Fix container tree for printers that have no variants but do have qualities & materials
...
CURA-6775
2019-09-19 15:56:06 +02:00
Jaime van Kessel
7016e791c8
Fix containertree for machines without materials but with specific qualities
...
CURA-6775
2019-09-19 15:33:19 +02:00
Jaime van Kessel
830b22e381
Fix crash when adding a machine without materials
...
CURA-6775
2019-09-19 15:12:29 +02:00
Jaime van Kessel
3e474c1107
Ensure that enabling & disabling an extruder gets handled correctly
...
CURA-6775
2019-09-19 14:54:58 +02:00
Jaime van Kessel
884a3ea819
Fix selection for intents if only one of the extruders has an intent
...
CURA-6598
2019-09-19 09:54:47 +02:00
Jaime van Kessel
78ab218cc2
No longer reset to default intent when configuration changed
...
This caused the intent to be reset every time a change was made.
CURA-6600
2019-09-18 14:52:51 +02:00
Ghostkeeper
2571f54d3c
Simplify looping over quality groups
...
Contributes to issue CURA-6600.
2019-09-18 14:01:23 +02:00
Ghostkeeper
b460ffeb9b
Use removeMaterial from MaterialManagementModel
...
Contributes to issue CURA-6600.
2019-09-17 17:59:50 +02:00
Ghostkeeper
8710bb77a7
Use MaterialManagementModel to rename materials
...
It's the replacement for the deprecation.
Contributes to issue CURA-6600.
2019-09-17 17:57:32 +02:00
Ghostkeeper
9392a3553c
Use implementation from MaterialManagementModel
...
The material manager is deprecated now.
Contributes to issue CURA-6600.
2019-09-17 17:54:26 +02:00
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