Commit graph

2094 commits

Author SHA1 Message Date
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
Remco Burema
af467d4e16 Merge branch 'feature_intent_per_quality' of https://github.com/Ultimaker/Cura into feature_intent_per_quality 2019-07-02 14:44:56 +02:00
Remco Burema
270cf28ea1 Fix comments code review IntentManager.
part of CURA-6091
2019-07-02 14:43:56 +02:00
Jaime van Kessel
be1fd2e003 Merge branch 'master' of github.com:Ultimaker/Cura into feature_intent_per_quality 2019-07-02 13:52:46 +02:00
Jaime van Kessel
0cb83d2c92 Merge branch 'master' of github.com:Ultimaker/Cura into feature_intent 2019-07-02 13:51:52 +02:00
Remco Burema
fee6ec417f Merge branch 'master' into feature_intent_per_quality 2019-07-02 10:21:20 +02:00
Jaime van Kessel
a7d419f497 Fix deprecation decorator breaking the getExtruder function 2019-07-01 11:18:54 +02:00
Jaime van Kessel
f329d7aed9 Made typing hint a bit more specific 2019-06-28 15:08:46 +02:00
Remco Burema
810fee37eb Start to test other IntentManager functions.
Very rudimentary at the moment, need to split the method into 3, and make a class for the setup.
This also uncovered that the currentAvailableIntents doesn't (unless the global stack is missing) retrun any default intents, while currentAvailableIntentCategories does do that.
Since it's not clear how we're going to handle that right now, I made a TODO in the code, which of course will have to be fixed before this/these branch/es are merged.

part of CURA-6091
2019-06-28 12:10:39 +02:00
Remco Burema
e8a1c68d92 Added (partial) test for 'currentAvailableIntents'.
part of CURA-6091
2019-06-27 17:07:26 +02:00
Remco Burema
9e3f3c194c Small refactor: Dont retrieve global-stack twice.
Part of CURA-6091
2019-06-25 18:00:58 +02:00
Remco Burema
308fcb6b9f Fix typing for IntentManager
Part of CURA-6091.
2019-06-21 15:39:27 +02:00
Remco Burema
f03c239041 Update some documentation. [CURA-6091] 2019-06-20 17:57:15 +02:00
Remco Burema
d076bfae77 Merge branch 'feature_intent_per_quality' of https://github.com/Ultimaker/Cura into feature_intent_per_quality 2019-06-20 17:49:41 +02:00
Remco Burema
fd80a6c1b6 Change some leftover pseudo-code to real code.
Part of CURA-6091.
2019-06-20 17:48:52 +02:00
Ghostkeeper
ede6efb799
Missing documentation
Contributes to issue CURA-6091.
2019-06-20 16:09:56 +02:00
Ghostkeeper
96c111553a
Implement selectDefaultIntent
Bit of a weird one.

Contributes to issue CURA-6091.
2019-06-20 15:30:57 +02:00
Ghostkeeper
aa0bf2f6ba
Implement selectIntent
Selects a certain intent profile, applying it to the stack.

Contributes to issue CURA-6091.
2019-06-20 15:27:07 +02:00
Ghostkeeper
744fbec38c
Implement defaultIntent
We keep this function in as a way of documentation.

Contributes to issue CURA-6091.
2019-06-20 15:12:53 +02:00
Ghostkeeper
2b775497b5
Implement complete code for currentAvailableIntentCategories
There is an inconsistency here with the available quality types. It's documented in the function for now.

Contributes to issue CURA-6091.
2019-06-20 15:06:24 +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
Ghostkeeper
c83b9d158b
Final implementation of intentMetadatas and intentCategories
Instead of pseudocode.

Contributes to issue CURA-6091.
2019-06-20 14:02:34 +02:00
Ghostkeeper
64e3a99ad3
Also select correct quality level on the stack when changing intent
Contributes to issue CURA-6091.
2019-06-19 16:52:54 +02:00
Ghostkeeper
fa65875824
Add psuedocode/boilerplate for intent manager
This won't run. Don't try to import this class yet. It's outlining what we need to implement to get intents per stack.

It does no form of caching at this point. Build first, optimise later, right.

Contributes to issue CURA-6091.
2019-06-19 14:29:19 +02:00
Ghostkeeper
5ab1881a21
Merge branch 'master' into feature_intent
Conflicts:
	plugins/VersionUpgrade/VersionUpgrade41to42/VersionUpgrade41to42.py -> There is a new version upgrade in master, so the old one is sort of obsolete. We may have to move this part to a new version upgrade for 4.3.
	plugins/VersionUpgrade/VersionUpgrade41to42/__init__.py
2019-06-19 13:10:36 +02:00
Ghostkeeper
7fbdccffdb
Add typing 2019-06-18 12:00:22 +02:00
Ghostkeeper
02b0242807
Fix translatability of caution message
Never put the formatting within the i18nc call. Always put the formatted string inside, but the formatting call outside of the function, like this:

    catalog.i18nc('@info', 'I am {age} years old.').format(age = my_age)

Otherwise, when looking up the translation for the string, it's going to try to look up the translation for the formatted string (with the age already filled in). It won't be able to find that because this sentence was not translated for all possible ages of a human.
In this case I can make it even easier on the translator because the list must always follow after the text.
2019-06-14 11:00:52 +02:00
Jaime van Kessel
a98f88e6a3 Also move _getMachineTypeNameFromId to DiscoveredPrintersModel
As this is only used by that model, there is no point in keeping it in the machine manager
2019-06-07 15:04:19 +02:00
Jaime van Kessel
5eee3fc368 Move hasHumanReadableMachienTypeName to discovered printers 2019-06-07 15:01:30 +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
Jaime van Kessel
1759e01b27 Make _geSettingFromAllExtruders use zip
This is a bit cleaner to use
2019-06-07 13:40:41 +02:00
Remco Burema
6f928ad97c Merge branch 'master' into feature_intent 2019-06-07 10:39:52 +02:00