Jaime van Kessel
331ff75315
Insert "generic color same brand" logic for qualities
...
So instead of always falling back to generic brand and generic color,
we first try to fall back to generic color with the same brand for qualities
CURA-10953
2023-09-06 12:55:36 +02:00
Jaime van Kessel
01648a329e
Convert list of all base_files into set
...
Co-authored-by: Ghostkeeper <Ghostkeeper@users.noreply.github.com>
2020-11-09 15:28:13 +01:00
Jaime van Kessel
5a14ef2a56
Simplify and speed up the extending of the qualities list
2020-11-09 14:14:32 +01:00
Nino van Hooff
89f0970a88
Remove trailing whitespace from Python files
2020-05-29 14:30:33 +02:00
Jelle Spijker
120541a8db
Updated comments in Models
...
Converted doxygen style comments to reStructuredText style in the files
found in Cura/cura/Model directory recursively using the script
dox_2_rst.py (provided in the Uranium repo). Comments were manually
checked and changed if needed.
Note: dox_2rst.py struggles with decorated functions.
2020-05-08 18:59:38 +02:00
Jaime van Kessel
81b33b8649
Add some missing typing
2020-01-10 14:58:53 +01:00
Ghostkeeper
8a9b791298
Merge branch '4.4'
...
Conflicts:
cura/Machines/MaterialNode.py -> Due to some automated formatting tool. Please disable those tools, people.
2019-12-23 16:26:25 +01:00
Kostas Karmas
cf6540f91d
Fix qualities lookup for custom materials
...
Search the qualities of the custom material based on the base_file
and not based on the id.
CURA-7070
2019-12-18 16:44:19 +01:00
Lipu Fei
6c9b8f992f
Fix quality search with material base_file
...
CURA-7070
2019-12-18 15:39:17 +01:00
Lipu Fei
4b313c2dac
Fix formatting
...
CURA-7070
2019-12-18 15:38:23 +01:00
Ghostkeeper
a9849be1b2
Code style: Space around binary operators
2019-12-16 13:15:40 +01:00
Jaime van Kessel
85ed22de4c
Add some profiling decorators to the ContainerTree
2019-10-04 13:29:22 +02:00
Lipu Fei
ad7b58e460
Get diameter from material container
...
CURA-6821
2019-10-01 15:05:35 +02:00
Lipu Fei
961e1e0d7e
Fix material node update for empty_material
...
CURA-6821
2019-10-01 10:56:17 +02:00
Lipu Fei
df105bc822
Fix update material due to compatible material diameter change
...
CURA-6821
2019-10-01 10:40:16 +02:00
Jaime van Kessel
a69a394514
Fix container tree generation for machines that only have global profiles
...
CURA-6775
2019-09-19 17:16:15 +02:00
Jaime van Kessel
fc67090a2f
Fix crash when adding UMO
2019-09-19 16:15:00 +02:00
Jaime van Kessel
7dcf083991
Fix container tree for printers that have no variants but do have qualities & materials
...
CURA-6775
2019-09-19 15:56:06 +02:00
Jaime van Kessel
7016e791c8
Fix containertree for machines without materials but with specific qualities
...
CURA-6775
2019-09-19 15:33:19 +02:00
Ghostkeeper
24fd67c360
Also try looking for material-specific profiles, not just by type
...
Type is only a fallback after the exact ID match.
This way we can also have profiles specific to Ultimaker PLA Red and such in the future.
Contributes to issue CURA-6600.
2019-08-28 13:53:21 +02:00
Ghostkeeper
fcab800a8d
Add function to find preferred quality profile
...
Not for global yet, so it doesn't appear as if anything is loaded yet.
Contributes to issue CURA-6600.
2019-08-26 17:50:46 +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
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
Ghostkeeper
04c53c7190
Fix connecting to metadata changes
...
Otherwise the number of parameters is wrong.
Contributes to issue CURA-6600.
2019-08-19 16:24:27 +02:00
Ghostkeeper
10dbf3f735
Fix getting GUID from metadata
...
I keep making this mistake. A donkey may not hit its leg twice on the same stone, but I ain't no ass.
Contributes to issue CURA-6600.
2019-08-19 16:24:00 +02:00
Ghostkeeper
30b2f943fd
Update material node when its metadata changes
...
This should keep the tree up to date if anything is added, removed or changed in the container registry.
Contributes to issue CURA-6600.
2019-08-19 15:13:19 +02:00
Ghostkeeper
41c573b087
Fix filtering by GUID
...
Get the correct metadata entry, please.
Contributes to issue CURA-6600.
2019-08-19 15:06:02 +02:00
Ghostkeeper
38937d8ac4
Remove material node when material is deleted
...
Contributes to issue CURA-6600.
2019-08-19 14:47:08 +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
71aed6858c
Fix getting GUID from metadata
...
Contributes to issue CURA-6600.
2019-08-12 17:21:26 +02:00
Ghostkeeper
ee0f2d2773
Improve documentation
...
Contributes to issue CURA-6600.
2019-08-12 17:18:22 +02:00
Ghostkeeper
42ba9a9f39
Pre-filter qualities on other properties before filtering on material
...
This prevents a LOT of double queries.
Contributes to issue CURA-6600.
2019-08-12 17:13:25 +02:00
Ghostkeeper
b1fb843f09
Implement matching qualities by material_id with same material type OR GUID
...
This fallback with the GUID makes this part a lot more complex, but in theory it should work. I hope that we can get some tests to debug this because it's 90% made from the top of my head now.
Contributes to issue CURA-6600.
2019-08-12 16:49:56 +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
8e49991087
Resolve circular imports
...
Some of these are only used for the type checks.
Contributes to issue CURA-6600.
2019-08-06 17:04:29 +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
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
Jaime van Kessel
e7d9f0ce45
Added typing for various setting classes
2018-09-10 15:24:11 +02:00
Diego Prado Gesto
6e364f0895
CURA-5330 Fix typing and code-style in the ContainerNode and all the
...
related children, and QualityGroup and its children.
Also fix the related calls in the managers.
2018-06-13 10:55:57 +02:00
Lipu Fei
c5d443109b
Split MaterialGroup and MaterialNode
2018-02-28 11:12:44 +01:00