1040 Commits

Author SHA1 Message Date
Ghostkeeper
f0d327c0d0
Set setting_version properly on new stacks so you don't need to upgrade
I don't think stacks had a setting_version property previously.

Contributes to issue CURA-4024.
2017-07-10 11:22:35 +02:00
Ghostkeeper
81e07b1530
Use stack properties instead of .findContainer(type = ...)
Recently we changed the empty containers such that there is only one empty container instance and it doesn't have the proper type any more. Instead we have properties on the stack that allows us to find the container with the proper type. It's faster and easier to use.
We've had a few bugs about this so I decided to update all of them to remove those for the future, except the ones in plugins/MachineSettingsAction/MachineSettingsAction.py because we have a pending pull request that fixes those. Fixing them would give merge conflicts for fieldOfView.

It doesn't really belong to CURA-4024 but I'm sticking it under that nomer anyway to get it reviewed.
2017-07-10 10:35:03 +02:00
Lipu Fei
3d48024a47 Override getConfigurationTypeFromSerialized for GlobalStack
CURA-3975

GlobalStack has metadata type "machine", which is different from what is
registered in the VersionUpgradeManager "machine_stack". This commit
makes sure that Cura can find the correct upgrade route for the
GlobalStack files.
2017-07-06 10:26:02 +02:00
Jaime van Kessel
5fa2ba6052 Undo for material diameter also changes the property.
It used to only set the metadata. CURA-2822
2017-07-04 11:55:24 +02:00
Ghostkeeper
bb79e33ad5
Don't forget to update approximate diameter after resetting actual diameter
The approximate diameter needs to be in a static field because the list model filters on that field. The filter function is not clever enough to be able to filter on values being in some kind of range or rounded, so instead the decision was made that the rounded value needs to be set in a separate field so that the static filter can filter on it.

Contributes to issue CURA-2822.
2017-06-29 16:55: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
21624d7761
Merge branch '2.6' 2017-06-27 16:25:55 +02:00
Ghostkeeper
b2b9b1bede
Fix checking if container stack exists
It was checking a container stack ID against the definition containers, which doesn't match.

Contributes to issue CURA-3973.
2017-06-27 15:14:26 +02:00
Ghostkeeper
df2ec7bd73
Don't try to activate a machine that we don't have a definition for
Contributes to issue CURA-3973.
2017-06-27 14:02:35 +02:00
Jaime van Kessel
7813bfc543 No longer crash when trying to get non existing extruder stacks
CURA-3953
2017-06-26 13:16:14 +02:00
Ghostkeeper
13c9519a7c
Fix deprecated decorator
Contributes to issue CURA-2822.
2017-06-23 09:42:08 +02:00
Ghostkeeper
bc219a06fe
Add MaterialsModel to make material list update upon metadata change
This new model inherits from InstanceContainersModel. The only change is that it updates when the metadata of a material container changes. This is needed to make the list of materials update when the material diameter changes.

Contributes to issue CURA-2822.
2017-06-22 18:17:16 +02:00
Ghostkeeper
0e23930bfe
Fix checking whether the old material diameter was the same
Getting the old material diameter wasn't working properly.

Contributes to issue CURA-2822.
2017-06-22 18:17:16 +02:00
Ghostkeeper
7ea1d4cc5a
Add getContainerProperty function
The opposite of setContainerProperty.

Contributes to issue CURA-2822.
2017-06-22 18:17:15 +02:00
Ghostkeeper
f041473465
Fix applying material diameter undo
Somehow it seems to get the wrong value there though. Debugging that next...

Contributes to issue CURA-2822.
2017-06-22 18:17:15 +02:00
Ghostkeeper
c192d37daa
Fix connecting undo action to undo button
Also hiding the message afterwards. Apparently that's not done automatically.

Contributes to issue CURA-2822.
2017-06-22 18:17:15 +02:00
Ghostkeeper
b37fa6f718
Implement warning message when you change material diameter
The undo functionality currently gives an error though. Investigating...

Contributes to issue CURA-2822.
2017-06-22 18:17:15 +02:00
Ghostkeeper
121bf5897d
Deprecate _updateMaterialContainer
There are better alternatives nowadays.

Discovered during CURA-2822.
2017-06-22 18:17:15 +02:00
Ghostkeeper
fc96dfec4e
Expose approximateMaterialDiameter of the definition
This way we can request that from QML.

Contributes to issue CURA-2822.
2017-06-22 18:17:15 +02:00
Jaime van Kessel
41c5aaed69 Merge branch '2.6' of github.com:Ultimaker/Cura 2017-06-16 13:53:05 +02:00
Jaime van Kessel
2adf97ba2d Also apply the filtering on the quality and user profiles model
CURA-3935
2017-06-15 17:18:04 +02:00
Jaime van Kessel
c93acc12e7 Merge branch '2.6' of github.com:Ultimaker/Cura 2017-06-15 15:28:34 +02:00
Ghostkeeper
e003abf895
Only display global quality changes profiles
There's one copy for every stack. It doesn't matter which one we take as long as they have the same name. Global is always present, even in single extrusion. Seems the most logical one to display.

Contributes to issue CURA-3935.
2017-06-15 14:38:04 +02:00
Ghostkeeper
66f5b236d6
Merge branch '2.6' 2017-06-15 09:54:19 +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
Ghostkeeper
8bce6e060c
Merge branch '2.6' 2017-06-14 10:58:11 +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
fieldOfView
c9998ca6fe
Set properties for all containers with the same base_file metadata entry 2017-06-14 10:41:23 +02:00
fieldOfView
1f49a87acb
Update material_diameter when editing the material in MaterialView.qml 2017-06-14 10:41:02 +02:00
Jaime van Kessel
a7a2740690 No longer add material to qualityChanges
QualityChanges are never supposed to have Material.

CURA-3929
2017-06-14 09:41:33 +02:00
Lipu Fei
0e09094a3d Merge branch '2.6' 2017-06-13 15:06:37 +02:00
Lipu Fei
dd65248968 Only set metadata/material for quality_changes if material is not None
CURA-3929
2017-06-13 14:35:27 +02:00
Jaime van Kessel
c8d9720a8a Merge branch '2.6' of github.com:Ultimaker/Cura 2017-06-13 13:51:55 +02:00
Jaime van Kessel
ec73abecb5 Custom material now defaults to PLA.
This is not an ideal solution, but it bandaids a problem for the moment.

CURA-3911
2017-06-13 13:48:34 +02:00
Jaime van Kessel
df67ae18f1 Merge branch '2.6' of github.com:Ultimaker/Cura 2017-06-12 15:25:35 +02:00
Jaime van Kessel
9a54ff426b FindAllQualitiesForMachineMaterial only looks with basic materials if it found them
CURA-3911
2017-06-12 15:14:25 +02:00
Jaime van Kessel
a306b4dada We now properly fall back if no basic material is found
CURA-3911
2017-06-12 13:53:35 +02:00
Lipu Fei
82224c0ed0 Copy material into metadata if machine has specific material profiles when duplicating a quality profile
CURA-3929
2017-06-12 10:56:01 +02:00
Ghostkeeper
cbe4891784
Merge branch '2.6' 2017-05-30 13:36:04 +02:00
Ghostkeeper
9132a025d6
Merge branch 'feature_CURA-3810_material_info_button' of https://github.com/LipuFei/Cura into LipuFei-feature_CURA-3810_material_info_button 2017-05-30 13:32:03 +02:00
Lipu Fei
8af1cc886f Use .definition to access DefinitionContainer in qml
CURA-3810
2017-05-30 12:49:12 +02:00
Ghostkeeper
bbd852ceb7
Merge branch '2.6' 2017-05-29 15:56:02 +02:00
Lipu Fei
585bc78892 Only set material for imported quality profile if there is an active material
CURA-3881

CuraContainerRegistry._activeMaterialId() can return an empty string
if there is no active material, and in this case, importing a custom
quality file will fail.
2017-05-29 15:52:29 +02:00
Lipu Fei
85e875257b Use "/<version>/<machineName>" as the material info URL suffix
CURA-3810
2017-05-29 15:23:52 +02:00
Arjen Hiemstra
586050552b Merge branch '2.6'
* 2.6:
  Error out when trying to import a profile witha quality_type we dont have
  Add default for colour code of material
  When trying to convert None to RGBA, log it and return a usable default
2017-05-24 15:47:46 +02:00
Arjen Hiemstra
9bda7dbaae Error out when trying to import a profile witha quality_type we dont have
Rather than successfully importing the profile and then not showing
anything, we now display an error. Not the perfect solution but the
easiest for now.

Contributes to #1873
2017-05-24 15:43:49 +02:00
Lipu Fei
374b6d4e35 Merge branch '2.6' 2017-05-24 14:10:26 +02:00