Ghostkeeper
6f2f15c74f
Use pre-cached quality type from node rather than re-requesting it
...
Minor performance increase.
Done during Turbo Testing and Tooling.
2019-10-04 15:35:32 +02:00
Lipu Fei
a93fd982dd
Fix renaming custom profile
...
CURA-6842
2019-10-02 23:59:48 +02:00
Ghostkeeper
b245be6970
Remove has_machine_materials metadata
...
It's not behaving as expected here. For instance, Ultimaker 3 wasn't specifying has_machine_materials and thus only the base materials would get loaded, but clearly the Ultimaker 3 has materials specialised for it.
Whether or not a printer has materials specialised for it is now determined by whether the specialisations exist in the material files. So we don't need the metadata entry any more. It seemed to have not been in use anyway, except by one printer which specified that has_machine_materials is true. I've now made it behave as if it's always true.
Contributes to issue CURA-6831.
2019-10-02 08:55:04 +02:00
Lipu Fei
bc524b2c14
Fix unit test due to QualityGroup parent changes
2019-10-01 11:26:10 +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
35907e5228
Use Pythonic way of creating list of N elements
...
Contributes to issue CURA-6600.
2019-08-28 14:17:17 +02:00
Ghostkeeper
a05f077df8
Use fdmprinter for machines that don't have printer-specific qualities
...
This encodes the behaviour of QualityManager.getMachineDefinitionIDForQualitySearch.
Contributes to issue CURA-6600.
2019-08-28 13:35:49 +02:00
Remco Burema
745390e51f
Fix typing.
...
part CURA-6600
2019-08-27 17:57:11 +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
Ghostkeeper
599dcb34bc
Fix sorting qualities by quality type
...
Otherwise the dictionary ends up being filled by container ID which then causes the quality type to not be present in the dictionary, ending up with an empty list of quality groups.
Contributes to issue CURA-6600.
2019-08-26 15:25:11 +02:00
Ghostkeeper
a90b4cc136
Fix finding global qualities: Metadata is not boolean
...
It's a string, strangely.
Contributes to issue CURA-6600.
2019-08-26 15:05:01 +02:00
Ghostkeeper
af9c5cd55c
Find global qualities for quality_definition as well
...
We don't have global qualities specific to e.g. the Ultimaker 3 Extended.
Contributes to issue CURA-6600.
2019-08-26 14:47:58 +02:00
Ghostkeeper
b1ce9b64d4
Add function to construct QualityChangesGroups for machine
...
It doesn't cache these any more, but reconstructs them when asked for.
Contributes to issue CURA-6600.
2019-08-23 17:26:57 +02:00
Ghostkeeper
46cf7aafa9
Encode empty containers in container tree if necessary
...
You can now be assured that there is ALWAYS at least one child node, except for child nodes of intent profiles which don't exist.
Contributes to issue CURA-6600.
2019-08-22 16:44:52 +02:00
Ghostkeeper
0302ae4257
Don't find any variants if the machine says it doesn't have them
...
Even if there might be a matching variant...
Contributes to issue CURA-6600.
2019-08-22 15:44:41 +02:00
Ghostkeeper
6f77c8735c
Don't load any materials for printers that don't have them
...
For instance the Ultimaker 2 shouldn't display any materials.
Contributes to issue CURA-6600.
2019-08-22 15:37:05 +02:00
Ghostkeeper
7b83e51439
Use container tree to determine default material
...
Using the new architecture here.
Contributes to issue CURA-6600.
2019-08-22 15:04:20 +02:00
Ghostkeeper
6c6dd0efad
Add signals to signal that a material got changed or removed
...
The material models need to know this.
Contributes to issue CURA-6600.
2019-08-22 09:25:25 +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
80baeb9873
Remove _added functions for nodes that can't be added during runtime
...
Among the machines, variants, materials, qualities and intents, only machines and materials can ever be added during runtime. For the rest, we don't need to listen to these signals.
Contributes to issue CURA-6600.
2019-08-16 16:28:42 +02:00
Ghostkeeper
8a51582210
Pre-fill list of qualities_per_type_per_extruder with empty dicts
...
Otherwise you get an IndexError later on.
Contributes to issue CURA-6600.
2019-08-15 17:01:21 +02:00
Ghostkeeper
44c98ba0d1
Fix import
...
Should've checked first...
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
Jaime van Kessel
719e69692c
Fix import issues
...
CURA-6600
2019-08-12 15:20:09 +02:00
Ghostkeeper
8f075b644d
Add global quality nodes to machine node
...
This means that the parent of the quality node could be one of two types. A bit confusing.
Contributes to issue CURA-6600.
2019-08-12 14:18:51 +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
f31d7798ce
Add warning for adding local copies of metadata
...
Contributes to issue CURA-6600.
2019-08-08 16:26:38 +02:00
Ghostkeeper
8ec1c31b58
Don't make parent a common property
...
Instead we use properly-typed and appropriately-named variables in each of the sub classes.
Contributes to issue CURA-6600.
2019-08-06 16:31:57 +02:00
Ghostkeeper
d3dc36c187
Find quality nodes as subnodes of material nodes
...
Similar to the materials and variants.
Contributes to issue CURA-6600.
2019-08-06 16:19:30 +02:00
Ghostkeeper
24346fc8e3
Don't add materials forbidden by the printer definition
...
Contributes to issue CURA-6600.
2019-08-06 15:21:52 +02:00
Ghostkeeper
3ef0b4292d
Only add variants that fit on my machine
...
Contributes to issue CURA-6600.
2019-08-06 15:15:02 +02:00
Ghostkeeper
bc3300baa8
Assume that the tree is always constructed after metadata has been loaded
...
Safe assumption, since the tree can only start constructing after the stacks are loaded.
Contributes to issue CURA-6600.
2019-08-06 15:13:29 +02:00
Ghostkeeper
b46d4eb2b5
Have variant nodes build their own children
...
When a variant and a variant love each other...
Contributes to issue CURA-6600.
2019-08-06 15:11:16 +02:00
Ghostkeeper
65b1a43e88
Load tree when all metadata has been loaded
...
This should build up the tree initially.
Contributes to issue CURA-6600.
2019-08-06 09:16:41 +02:00
Ghostkeeper
2565be01f3
Add variants as they get added to the registry
...
Contributes to issue CURA-6600.
2019-08-06 08:58:34 +02:00
Ghostkeeper
9fda7bd0b9
Rework container tree structure
...
This sets up a few new classes, subclasses of ContainerNode.
This is intended to simplify the current structure in the QualityManager.
Contributes to issue CURA-6600.
2019-08-05 17:39:19 +02:00