153 Commits

Author SHA1 Message Date
Lipu Fei
2cd9891000 WIP: Fix material QVariant type 2018-02-19 21:00:49 +01:00
Lipu Fei
3fffc2c621 WIP: Cleanup old QualityManager 2018-02-19 20:50:14 +01:00
Lipu Fei
d4db41503f WIP: Cleanup ContainerManager 2018-02-19 20:43:05 +01:00
Lipu Fei
5b37de8adb WIP: Fix quality renaming 2018-02-19 20:33:36 +01:00
Lipu Fei
486bcae677 WIP: Fix remove quality 2018-02-19 20:21:02 +01:00
Jack Ha
bd10f23311 CURA-4606 reimplemented duplicate profile 2018-02-19 16:47:04 +01:00
Jack Ha
7a78f9821f CURA-4606 fixed Create profile 2018-02-19 16:15:35 +01:00
Lipu Fei
f7f9c68fcc WIP: Refactor setMaterialName() 2018-02-16 14:23:11 +01:00
Lipu Fei
e5cc7efdf2 WIP: Cleanup ContainerManager 2018-02-16 14:23:11 +01:00
Lipu Fei
581699cd8d WIP: Make material import work 2018-02-16 14:23:11 +01:00
Lipu Fei
0b859bb308 WIP: Make material export work 2018-02-16 14:23:11 +01:00
Lipu Fei
4f29fc9ab2 WIP: make material creation work 2018-02-16 14:23:11 +01:00
Lipu Fei
779f49f545 WIP: Make material removal work in material management dialog 2018-02-16 14:23:11 +01:00
Lipu Fei
a5afaab467 WIP: Fix material duplication and metadata update 2018-02-16 14:23:11 +01:00
Lipu Fei
f024f45cfe WIP: Rework Material management page 2018-02-16 14:23:11 +01:00
Lipu Fei
f0d9fba2f5 WIP: Create MaterialManager 2018-02-16 14:20:02 +01:00
Diego Prado Gesto
701ac7f91e Merge branch 'master' of https://github.com/Ultimaker/Cura 2018-02-01 09:05:32 +01:00
alekseisasin
e5c72cfdc5 Validate material profile
CURA-4851
2018-01-31 14:58:44 +01:00
Lipu Fei
507b967946 Minor fixes
CURA-4868
2018-01-29 14:50:07 +01:00
Lipu Fei
7dfc1a4aa7 Add encoding='utf-8' for text file reading
CURA-4875

When encoding is not provided, the behaviour is system dependent and it
can break on OS X.
2018-01-29 12:29:20 +01:00
Lipu Fei
4a9fc4b7d4 Set imported containers to bedirty so they will get saved
CURA-4875
2018-01-26 14:17:18 +01:00
ChrisTerBeke
3de4940d69 Simplify creating, duplicating materials in preferences, extract logic to python, code-style fixes 2018-01-09 16:19:29 +01:00
Jack Ha
d6c6aa1c71 CURA-4715 fix updating custom profile 2017-12-18 17:03:18 +01:00
Ghostkeeper
430f3dad27
Use GlobalContainerStack.definition instead of .getBottom
If we know it's a CuraContainerStack we can use .definition safely.

Contributes to issue CURA-4243.
2017-12-08 16:57:48 +01:00
Ghostkeeper
1029d4509c
Merge branch 'master' into feature_local_container_server 2017-12-08 16:03:05 +01:00
Jack Ha
20500b5c51 Merge branch 'feature_local_container_server' of github.com:Ultimaker/Cura into feature_local_container_server 2017-12-06 11:03:47 +01:00
Jack Ha
eb171231c2 Fix removeMaterial.
The base_file must be removed first, or it gets loaded halfway during remove containers.

Contributes to issue CURA-4243.
2017-12-06 11:02:50 +01:00
Ghostkeeper
80f4c9181d
Correct variant name when duplicating materials
It needs to be the variant name (swapping spaces for underscores) to be consistent with the deserialize functions.

Contributes to issue CURA-4243.
2017-12-06 10:40:58 +01:00
Ghostkeeper
72c7d2bd76
Reconstruct ID for submaterials from unique base name
When you make the ID of the subprofile unique it doesn't get linked to the base profile any more since the '#2' gets put at the end.

Contributes to issue CURA-4243.
2017-12-04 11:04:28 +01:00
Ghostkeeper
083a4a8024
Rewrite cloning of materials
The original was based on reading the original file back, but that won't work if the files are provided by an arbitrary container provider. Instead we'll actually make a copy of all the profiles that need to be copied. It's much faster as well.

Contributes to issue CURA-4243.
2017-12-01 16:19:58 +01:00
ChrisTerBeke
3abf067d25 Fix loading .curaproject files with stack setups from earlier versions - CURA-4646 2017-11-30 15:24:51 +01:00
Ruben D
d29d73413f
Remove unused function
Contributes to issue CURA-4243.
2017-11-30 01:11:10 +01:00
Ghostkeeper
838e49f3da
Pass just metadata through quality manager instead of full containers
Where we only need metadata, we should pass metadata instead of full containers.
Also add some type hinting.

Contributes to issue CURA-4243.
2017-11-29 14:33:04 +01:00
Ghostkeeper
8707396ad7
Remove isReadOnly functionality
Everyone should now ask it from the container registry.

Contributes to issue CURA-4243.
2017-11-28 17:30:00 +01:00
Ghostkeeper
ebe766a7c8
Set definition by their ID
The new function for setting the definition just adds the ID to the metadata.

Contributes to issue CURA-4243.
2017-11-24 16:45:09 +01:00
Ghostkeeper
6c4c7fff4d
Use findContainersMetadata whenever possible
This ensures that we only load those containers that we actually need the data of.

Contributes to issue CURA-4243.
2017-10-20 15:09:45 +02:00
Mark
9a193ad5c5 Changing AGPLv3 to LGPLv3 2017-09-28 13:00:43 +02:00
Ghostkeeper
3316f3aa13
Add warning contexts to not translate XML tags
This went wrong a few times with previous translations. Let's hope that this prevents it from happening again.

Contributes to issue CURA-4113.
2017-08-14 14:06:20 +02:00
Lipu Fei
bb1316fc88 Check if a material is being used based on base_file
CURA-4129
2017-08-14 08:48:07 +02:00
Lipu Fei
6fd3963e8f Fix material searching in isContainerUsed()
CURA-4129

Searching for used materials should also take into account the material
container ID.
2017-08-09 09:47:36 +02:00
Lipu Fei
8c6abc85fc Rename variable in for loop
CURA-4129
2017-08-08 16:32:40 +02:00
Lipu Fei
bb1475d1fd Search for instance containers with type material
CURA-4129
2017-08-08 16:32:02 +02:00
Lipu Fei
4a34f141d1 Check if a material container is used by GUID
CURA-4129

isContainerUsed() is used to enable/disable the "Remove" button on the
Material Manager dialog. When a custom material is created, it creates
multiple containers, one for each extruder variant. In the dialog, it
only checks if the material for the currently active extruder is being
used or not. This causes a problem when 2 extruders are of different
types and one uses a custom material. Then, the "Remove" button will
not be correctly enabled/disable in the Material Manager dialog when
the other extruder is activated.
2017-08-07 13:17:47 +02:00
Ghostkeeper
034686e9fa
Don't modify list you're iterating over
It doesn't give a problem right now since we're only iterating over lists of length 1 here, but in the future this could cause weird bugs.

Contributes to issue CURA-2822.
2017-06-29 15:09:50 +02:00
Ghostkeeper
8ae49c317c
Emit metaDataChanged when changing properties
Properties is a dictionary inside the metadata dictionary. If you change one of the properties, it'll check afterwards if the dictionary is different from what it was before, but since the dictionary is passed by reference all the time, it'll think that the dictionary didn't change: The reference is still the same, so the thing it checks against is updated along.
This solution is a bit ugly but it does notice when the metadata changed inside the properties and then emits a change signal.

Contributes to issue CURA-2822.
2017-06-29 15:03:49 +02:00
Ghostkeeper
7ea1d4cc5a
Add getContainerProperty function
The opposite of setContainerProperty.

Contributes to issue CURA-2822.
2017-06-22 18:17:15 +02:00
Jaime van Kessel
7551c83612 QualityChanges are now also removed if a machine has a parentDefinition
CURA-3929
2017-06-14 11:04:22 +02:00
fieldOfView
49f2fb2cea
Fix filtering maerials after editing materials
NB: previously the "approximate_diameter" metadata was stored as a number. This caused some issues passing arguments from QML to Python. Now "approximate_diameter" is stored as a string.
2017-06-14 10:42:04 +02:00
fieldOfView
8f7471a892
Remove debug statement 2017-06-14 10:41:53 +02:00
fieldOfView
ed6f4d851c
Update documentation 2017-06-14 10:41:39 +02:00