Commit graph

2275 commits

Author SHA1 Message Date
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
Jaime van Kessel
e0c2611a0a Merge branch '4.2' of github.com:Ultimaker/Cura 2019-07-26 12:47:13 +02:00
Jaime van Kessel
a3dad0fa09 Fix issue with deprecation and pyqtSlot 2019-07-26 10:55:55 +02:00
Ghostkeeper
be4e754984
Remove cache of material manager
It doesn't make the code much simpler because the cache is also not a local variable.

Contributes to issue CURA-6679.
2019-07-24 16:04:40 +02:00
Jaime van Kessel
d8ddcba091 Fix typing ignore for breath frist iterator 2019-07-23 13:40:40 +02:00
Jaime van Kessel
9ceb9ce18b Fix typing issues
They were caused by upgrading to a higher mypy version, which found more mistakes
2019-07-23 12:58:46 +02:00
Jaime van Kessel
1c93dffc22 Added deprecation warning to getExtruderName 2019-07-19 13:36:53 +02:00
Jaime van Kessel
a436d5e0bf Added missing cast to getMachine 2019-07-19 12:43:17 +02:00
Ghostkeeper
037f1967c8
Remove override for version number in CuraContainerStack
Otherwise plug-ins can't register ContainerStacks any more.

As discussed in the CCB.
2019-07-10 14:57:26 +02:00
Lipu Fei
8863516aa4 Rename function name and fix tests
CURA-6597
2019-07-09 12:53:44 +02:00
Lipu Fei
f086c1eb11 Minor cleanup changes
CURA-6597
2019-07-09 11:57:46 +02:00
Ghostkeeper
3729e90b24
Fix getting original intent category
It's now a property so it doesn't need the brackets.

Contributes to issue CURA-6597.
2019-07-05 13:06:27 +02:00
Ghostkeeper
fd32abd53c
Add property for currently selected intent
This is necessary for the interface to highlight the correct bullet or the correct menu item.

Contributes to issue CURA-6597.
2019-07-04 11:10:06 +02:00
Ghostkeeper
926df1111b
Iterate over all extruder stacks rather than just the used ones
Otherwise it usually only iterates over the one that the model is printing with or something. We want to iterate over all extruders that are not deactivated.

Contributes to issue CURA-6597.
2019-07-04 11:06:47 +02:00
Ghostkeeper
c2b20e5cc6
Only return intents from intentMetadatas
Otherwise we also get quality profiles for the same printer...

Contributes to issue CURA-6597.
2019-07-04 09:43:25 +02:00
Ghostkeeper
3cce33be6f
Get intents for every active extruder, not every used extruder
We want the intents for basically any extruder, not just the one that would get used by a slice using the current settings for extruder_nr.

Contributes to issue CURA-6597.
2019-07-04 09:14:06 +02:00
Ghostkeeper
951b91e3d8
Filter on 'material' metadata instead of material_id
This is consistent with how the material is stored in other profiles, such as quality profiles.

Contributes to issue CURA-6597.
2019-07-04 09:09:22 +02:00
Ghostkeeper
c75b83be21
Resolve circular imports
Can't import CuraApplication because we create instances of IntentManager from the IntentsModel which is created in CuraApplication.

Contributes to issue CURA-6597.
2019-07-04 09:08:15 +02:00
Remco Burema
fea8262656 Listen to 'material-changed' since it doesn't update immediately.
part of CURA-6590
2019-07-03 16:14:08 +02:00
Lipu Fei
35e1426231
Merge branch 'feature_intent' into feature_intent_per_quality 2019-07-03 10:52:08 +02:00