105 Commits

Author SHA1 Message Date
Lipu Fei
bc524b2c14 Fix unit test due to QualityGroup parent changes 2019-10-01 11:26:10 +02:00
Ghostkeeper
105e782e75
Remove unused imports to MaterialManager
Contributes to issue CURA-6776.
2019-09-20 09:57:35 +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
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
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
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
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
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
Remco Burema
745390e51f Fix typing.
part CURA-6600
2019-08-27 17:57:11 +02:00
Remco Burema
d5a8b2640f Fix 'getQualityChangesGroups' now gives a list issues.
part of CURA-6600
2019-08-27 15:46:47 +02:00
Ghostkeeper
51710c2868
Use new MachineNode.getQualityChangesGroups instead of quality manager
I hope that the machine node doesn't become a collection of functions that don't fit anywhere else, but this isn't contributing to that hope. However I still think that this is particular to a certain printer, so it's within the object-oriented programming paradigm. And it's also within the scope of the class, which is getting the available profiles. So it still sort of fits.

Contributes to issue CURA-6600.
2019-08-23 17:29:32 +02:00
Remco Burema
507cb356d2 Remove (all?, most?) deprecated ContainerNode.getMetaDataEntry calls.
part of CURA-6600
2019-08-20 15:38:45 +02:00
Ghostkeeper
46e5bc897f
Fix deprecated getQualityGroups in QualityManager
It needs to get the actual extruders, not their keys.

Contributes to issue CURA-6600.
2019-08-15 17:01:23 +02:00
Ghostkeeper
3f944462ed
Use ContainerTree to get quality groups
Contributes to issue CURA-6600.
2019-08-15 17:01:22 +02:00
Ghostkeeper
02fbdd96a4
Don't return quality groups that are not available
And don't return an arbitrary group then. That arbitrary group could also be unavailable.

Contributes to issue CURA-6600.
2019-08-15 17:01:21 +02:00
Ghostkeeper
370d7adcd5
Let getDefaultQualityType use the container tree structure
Contributes to issue CURA-6600.
2019-08-15 17:01:20 +02:00
Ghostkeeper
bee5491879
Move getQualityGroups to MachineNode
It's specific to that machine and the container tree structure, so this is the best place for it we could find.

Contributes to issue CURA-6600.
2019-08-15 17:01:20 +02:00
Ghostkeeper
ca163ea5f0
Skip inactive extruders to determine available quality types
Contributes to issue CURA-6600.
2019-08-15 17:01:20 +02:00
Remco Burema
9374934d72 Merge branch 'feature_intent_container_tree' of https://github.com/Ultimaker/Cura into feature_intent_container_tree 2019-08-15 16:47:29 +02:00
Ghostkeeper
fb509a0692
Fix setting the global quality node
Otherwise you'd get a KeyError there.

Contributes to issue CURA-6600.
2019-08-15 13:41:11 +02:00
Remco Burema
7fb9642e45 Replace deprecated .getContainer() calls with .container
part of CURA-6600
2019-08-15 13:40:08 +02:00
Ghostkeeper
2bf4ac8522
No longer trigger rebuilding node tree from quality manager
Also remove part of that from the material manager while we're at it.

Contributes to issue CURA-6600.
2019-08-12 17:29:05 +02:00
Ghostkeeper
91e14a90b2
Update getQualityGroups to use the new ContainerTree structure
Look how greatly this is now simplified.
The fallbacks for which material nodes to check is not yet implemented. Will do that next.

Contributes to issue CURA-6600.
2019-08-12 14:02:19 +02:00
Ghostkeeper
65360c31ef
Let Quality/Material/Variant Managers be a proper singleton
Rather than a singleton contained within the CuraApplication class.

Contributes to issue CURA-6600.
2019-08-08 17:04:53 +02:00
Ghostkeeper
accc4ccd21
Only remove excluded materials that were added
Contributes to issue CURA-6600.
2019-08-07 09:50:53 +02:00
Ghostkeeper
8e49991087
Resolve circular imports
Some of these are only used for the type checks.

Contributes to issue CURA-6600.
2019-08-06 17:04:29 +02:00
Ghostkeeper
28e2569c86
Implement complete code for currentAvailableIntents
Slightly more complex than the original pseudocode was indicating: It needs to filter on the available quality types first in order to only show the quality types that can be printed with all extruders, but still show the union of all intents for those quality types.

Contributes to issue CURA-6091.
2019-06-20 14:48:18 +02:00
Jaime van Kessel
05a5f66856 Added few more deprecation warnings for functions that bloat the machine manager 2019-06-07 14:57:32 +02:00
Lipu Fei
58507303fa Duplicate qualities should have unique names
CURA-6426
2019-03-27 14:08:06 +01:00
Jaime van Kessel
8518aba3a5 Adds tests for QualityManager 2019-03-15 14:51:35 +01:00
Lipu Fei
2c8ed99281 Add is_experimental to Qt models and QMLs
CURA-5879
2018-11-27 15:50:03 +01:00
Ghostkeeper
27aff4e5da
Fix typing issues
Because this function now has typing, it's raising a load of issues with it.

Contributes to issue CURA-5929.
2018-11-12 12:48:49 +01:00
Jaime van Kessel
93467dc29f Ensure that weeding out the duplicates doesn't mess up the order
CURA-5898
2018-11-05 17:33:12 +01:00
Jaime van Kessel
eded0f0297 Make quality manager also include profiles with same GUID in fallback.
This ensures that if a (duplicated) material does not have a generic variant, that
the material it was copied from will be added to the fallback list.

CURA-5898
2018-11-05 11:17:39 +01:00
Lipu Fei
7ae6800a14 Fix imports in QualityManager 2018-09-28 14:01:28 +02:00
Jaime van Kessel
3b70e5eb6b Fix typing
For some reason, my MyPy started acting up once I started using the PythonPath while calling it.
2018-09-27 20:01:55 +02:00
Jaime van Kessel
c84a2213a7 Merge branch '3.5' of github.com:Ultimaker/Cura 2018-09-11 11:01:55 +02:00
Jaime van Kessel
729d78e14a Updated another set of typing 2018-09-10 16:08:31 +02:00
Jaime van Kessel
e7d9f0ce45 Added typing for various setting classes 2018-09-10 15:24:11 +02:00
Lipu Fei
d8421105d4 Fix quality lookup
CURA-5694

For a machine, if it has extruder-specific qualities, when we look up
extruder qualities, we should NOT fall back to use the global qualities.
2018-09-10 14:39:10 +02:00
Lipu Fei
d01ec7872d Fix quality lookup
CURA-5694

For a machine, if it has extruder-specific qualities, when we look up
extruder qualities, we should NOT fall back to use the global qualities.
2018-09-10 14:23:46 +02:00
Lipu Fei
9aea0e5109 Fix quality lookup logic for extruders
CURA-5694

 - Add convenience functions into GlobalStack
 - Use "has_variants" and "has_materials" instead of
 "has_variant_materials"
 - Remove "has_variant_materials"
 - For extruder qualities, skip global qualities if the machine has
   variants or materials
2018-09-06 08:12:55 +02:00
Lipu Fei
e0aea18177 Reset machines that use a removed quality changes
CURA-5675

When a custom quality gets removed, Cura should reset all machines which
use this custom quality to default.
2018-08-29 11:42:45 +02:00
Lipu Fei
8daf02063d Fix quality lookup fallback mechanism
CURA-5668

The last fallback is the global qualities, either machine-specific or
generic, but not using both. Because if a machine defines its own global
qualities, it is intended to override the existing ones, so do not
fallback again in this case.
2018-08-24 15:35:03 +02:00
Diego Prado Gesto
98a0bb5002 CURA-5570 Remove a check that caused empty list of profiles. 2018-08-13 11:15:32 +02:00
Diego Prado Gesto
825a3cd08f CURA-5570 Fix the configuration sync feature.
It crashed Cura because it was using an outdated signature of the method
getMaterialNodeByType.
2018-08-13 09:55:57 +02:00