Commit graph

2094 commits

Author SHA1 Message Date
Remco Burema
fbf4d42f06 Active quality group can be None.
part of CURA-6600
2019-08-27 15:22:26 +02:00
Jaime van Kessel
8f75a12d27 Fix network config syncing 2019-08-27 14:46:33 +02:00
Jaime van Kessel
d1a8ce54a1 Merge branch 'feature_intent' of github.com:Ultimaker/Cura into feature_intent_container_tree 2019-08-27 14:18:41 +02:00
Jaime van Kessel
1d9d411732 Merge branch 'master' of github.com:Ultimaker/Cura into feature_intent 2019-08-27 14:17:57 +02:00
Ghostkeeper
3f5563514c
Remove _current_quality_changes_group shadow administration
Get the quality changes group back from whichever one is actually active on the stack. This prevents the two from getting out of sync, which makes the code easier to maintain.

Contributes to issue CURA-6600.
2019-08-27 13:03:29 +02:00
Ghostkeeper
62395d5503
Remove _current_quality_group shadow administration
This was causing asynchronicities.

Contributes to issue CURA-6600.
2019-08-27 12:39:19 +02:00
Ghostkeeper
89a5fe41fe
Fix getting empty quality containers
Contributes to issue CURA-6600.
2019-08-27 11:19:02 +02:00
Ghostkeeper
6f67e6b55f
Simplify activeQualityType() and remove dependency on _current_quality_group
The shadow administration is annoying so I'm removing it.

Contributes to issue CURA-6600.
2019-08-27 11:16:00 +02:00
Ghostkeeper
84c6ec36dc
Catch case where there is no global stack
Contributes to issue CURA-6600.
2019-08-27 11:14:07 +02:00
Ghostkeeper
78db68369e
Simplify activeQualityOrQualityChangesName
Removed duplicate fallback mechanism if quality is empty. And removed dependency on shadow administration in _current_quality_group.

Contributes to issue CURA-6600.
2019-08-27 11:11:17 +02:00
Ghostkeeper
01796b99cd
Simplify getting layer height
The stack already makes it fall through properly, so there's no need to implement the fallback again here.

The only change is that it now displays 0.1mm as default layer height if there is no quality profile active. I don't think this makes a difference since we don't show the layer height then anyway. And technically it would be more correct too.

Contributes to issue CURA-6600.
2019-08-27 11:06:35 +02:00
Ghostkeeper
0db99e8f21
Get quality groups from container tree
Rather than from the quality manager.

Contributes to issue CURA-6600.
2019-08-27 11:03:46 +02:00
Lipu Fei
69e9dc1313 Allow importing "not supported" profiles
CURA-6542
2019-08-27 09:08:19 +02:00
Ghostkeeper
8f34b3dd73
Set quality profiles to preferred quality upon stack creation
A good default.
Possible bug: If there are multiple matching quality profiles but the preferred quality profiles matches none or multiple of them, a random one is chosen. The random profile for the global stack may not match the random one for the extruder?

Contributes to issue CURA-6600.
2019-08-27 09:07:23 +02:00
Jaime van Kessel
108b22932b Override saveDirtyContainers with Cura specific logic 2019-08-26 14:55:30 +02:00
Ghostkeeper
3de5aa3307
Remove _initMachineState
It seems to only set profiles to whatever was already in the stack.

Contributes to issue CURA-6600.
2019-08-23 14:43:50 +02:00
Ghostkeeper
f1f25e5350
Get Quality Groups from container tree rather than quality manager
The quality manager is deprecated after all.

Contributes to issue CURA-6600.
2019-08-23 14:23:18 +02:00
Ghostkeeper
617419ccc6
Use .container property of nodes to switch profiles
This also fixes a crash when switching nozzles since the variant was set to a list of profiles rather than just one profile.

Contributes to issue CURA-6600.
2019-08-23 13:51:24 +02:00
Ghostkeeper
8e06786e7b
Use ContainerTree when updating material upon nozzle switch
Rather than the material manager which is deprecated.

Contributes to issue CURA-6600.
2019-08-22 17:27:39 +02:00
Ghostkeeper
431c8f4900
Build stack using container tree's preferred material/nozzle
No need to really implement the fallbacks any more for when there are no materials. Only for when the preferred material can't be found.

Contributes to issue CURA-6600.
2019-08-22 17:03:01 +02:00
Jaime van Kessel
e7609fadf4 Deprecated the allActiveMaterialIds and replaced the single location where it was used
CURA-6600
2019-08-21 17:08:35 +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
ae7c717636
Re-implement getLinkedMaterials without material manager
Contributes to issue CURA-6600.
2019-08-19 15:40:29 +02:00
Ghostkeeper
b0e6bb4bc9
Update documentation for getLinkedMaterials
Contributes to issue CURA-6600.
2019-08-19 15:33:07 +02:00
Jaime van Kessel
dc26f98a3a Fix import issue
CURA-6600
2019-08-19 11:30:04 +02:00
Ghostkeeper
606bef9b5f
Use ContainerTree structure to get quality groups
Contributes to issue CURA-6600.
2019-08-15 17:01:23 +02:00
Ghostkeeper
9bcd3d8c1e
Use ContainerTree to get quality groups instead of QualityManager
Contributes to issue CURA-6600.
2019-08-15 17:01:23 +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
Remco Burema
7fb9642e45 Replace deprecated .getContainer() calls with .container
part of CURA-6600
2019-08-15 13:40:08 +02:00
Jaime van Kessel
c0f70c447e Ensure that the materials are loaded again
CURA-6600
2019-08-15 13:32:42 +02:00
Ghostkeeper
54b46abd0f
Use specific classes instead of ContainerNode superclass
Also update the usage of these nodes because the getContainer() function is deprecated.

Contributes to issue CURA-6600.
2019-08-13 17:20:58 +02:00
Ghostkeeper
5738af4bb8
No longer use deprecated MaterialManager when asking for available materials
Use the ContainerTree structure instead. That's what it's for.

Contributes to issue CURA-6600.
2019-08-13 17:20:58 +02:00
Ghostkeeper
efaa96bca3
Fix building stack from freshly-loaded definition
The definition may not have been added to the forest yet.

Contributes to issue CURA-6600.
2019-08-13 15:44:17 +02:00
Ghostkeeper
93851a95d5
Remove unused variable
Contributes to issue CURA-6600.
2019-08-13 15:04:06 +02:00
Ghostkeeper
6a8e1557c3
Merge branch 'feature_intent' into feature_intent_container_tree
Conflicts:
	.gitlab-ci.yml
	cura/Machines/MaterialManager.py
	cura/Machines/VariantManager.py
	cura/Settings/ContainerManager.py
	cura/Settings/MachineManager.py
	tests/TestMachineManager.py
2019-08-13 14:59:05 +02:00
Ghostkeeper
20201c65e6
Merge branch 'master' into feature_intent
Conflicts:
	resources/bundled_packages/cura.json -> 4.1 to 4.2 upgrade package added simultaneously
	tests/TestMachineManager.py -> Due to changes in conftest.py
	tests/conftest.py -> Simultaneously expanding the magic mocks to have some correct properties
2019-08-13 14:43:28 +02:00
Ghostkeeper
447b1b9645
Actually import MaterialManager
Because this class is being used.

Contributes to issue CURA-6600.
2019-08-12 17:14:11 +02:00
Jaime van Kessel
e08feb1099 Fix final set of broken tests
CURA-6600
2019-08-12 16:32:59 +02:00
Jaime van Kessel
e18820b846 Fix tests for ContainerManager
CURA-6600
2019-08-12 15:37:19 +02:00
Jaime van Kessel
719e69692c Fix import issues
CURA-6600
2019-08-12 15:20:09 +02:00
Ghostkeeper
98686dd088
Fix imports for CuraApplication
Also removed two unused imports.

Contributes to issue CURA-6600.
2019-08-12 15:06:04 +02:00
Ghostkeeper
9ed4713cde
Don't cache singletons in fields
This makes it harder to test these things and harder to make it perform well with lazy initialisation.

Contributes to issue CURA-6600.
2019-08-09 14:34:45 +02:00
Ghostkeeper
595b0113b3
Don't link materialsChanged signal to update in MachineManager
The materialsChanged signal only gets called when the favourites are changed, so these updates are all completely unnecessary since they just make sure that the names and such of the materials are up to date.

Contributes to issue CURA-6600.
2019-08-09 14:25:44 +02:00
Ghostkeeper
d710a58233
Don't require VariantManager any more from CuraStackBuilder
We now use the new container tree structure there.

Contributes to issue CURA-6600.
2019-08-08 17:31:26 +02:00
Ghostkeeper
648999e32b
Use regex literal instead of normal literal for regex
Hopefully this fixes the deprecation warning in newer Python versions.

Contributes to issue #6114.
2019-08-08 09:46:21 +02:00
ChrisTerBeke
b2719af0e3 Merge branch 'master' into CS-234_network_plugin_code_quality 2019-08-02 15:30:04 +02:00
Jaime van Kessel
5f692f3028 Added missing typing 2019-08-02 15:16:29 +02:00
ChrisTerBeke
92d07ddb71 Merge branch 'master' into CS-234_network_plugin_code_quality 2019-08-02 12:44:56 +02:00
Lipu Fei
c841382bbd Add more info in exceptions 2019-08-02 11:12:16 +02:00
ChrisTerBeke
1aa70748af Consistent naming, some bug fixes 2019-07-29 17:24:10 +02:00