24 Commits

Author SHA1 Message Date
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