62 Commits

Author SHA1 Message Date
Jaime van Kessel
f0002e265b
Mark recently constructed stacks as not dirty
The stacks would get marked dirty for setting some metadata, but since thats
part of their construction, they aren't really dirty.

Previously, every single stack that was loaded would be marked as dirty, which causes unneeded
saving.
2020-06-18 17:39:58 +02:00
Nino van Hooff
89f0970a88 Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
Nino van Hooff
58ffc9dcae Merge remote-tracking branch 'origin/master' into doxygen_to_restructuredtext_comments
# Conflicts:
#	cura/API/__init__.py
#	cura/Settings/CuraContainerRegistry.py
#	cura/Settings/ExtruderManager.py
#	plugins/PostProcessingPlugin/scripts/PauseAtHeight.py
#	plugins/UM3NetworkPrinting/src/Cloud/CloudApiClient.py
#	plugins/UM3NetworkPrinting/src/Cloud/ToolPathUploader.py
#	plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDeviceManager.py
2020-05-28 17:31:24 +02:00
Nino van Hooff
c2c96faf5f Convert remaining doxygen to rst 2020-05-28 17:13:44 +02:00
Ghostkeeper
b231a4b3a2
Remove unnecessary re-adding of extruders
This was originally added for backwards compatibility with old versions of Uranium. However the link between Cura versions and Uranium versions is already very strong (Cura crashes with old Uranium versions) so this is not necessary.
It was also adding warnings in our log that these extruders had already been added to the printer.

Done during Turbo Testing and Tooling, to clean up our log files.
2020-05-15 14:26:44 +02:00
Lipu Fei
227b76d6f0 Remove deprecated currentExtruderPositions
CURA-6858
2019-10-22 14:11:31 +02:00
Jaime van Kessel
0ff9d72c4c
Remove use of deprecated extruders property 2019-09-13 17:27:16 +02:00
Ghostkeeper
05b32548f3
Code style: Start comments with a space
Contributes to issue CURA-5876.
2018-12-06 16:27:56 +01:00
Ghostkeeper
82d8410d18
Don't emit enabledChanged signal if it didn't change
Contributes to issue CURA-5876.
2018-12-04 13:58:54 +01:00
Ghostkeeper
1c96c81ba9
Remove unnecessary extra setMetaDataEntry
This is a relic from when you first had to add the metadata entry. Now it does nothing any more because it's being set directly afterwards to the actual value that is desired in the end.

Contributes to issue CURA-5876.
2018-11-30 11:11:17 +01:00
Diego Prado Gesto
94ef0b92fe Fix typo in the getCompatibleMaterialDiameter function.
Contributes to CURA-5834.
2018-10-23 10:25:13 +02:00
Lipu Fei
97e6354c13 Fix material update upon extruder-compatible diameter change
CURA-5834

Material models and the material container on an extruder need to be
updated when the extruder's compatible diameter gets changes.
2018-10-19 13:48:52 +02:00
Lipu Fei
ea10d5e608 Rename to comptabileMaterialDiameter
CURA-5834

This property returns the material diameter an extruder is compatible
with, so this makes it more clear.
2018-10-19 11:36:12 +02:00
Diego Prado Gesto
e1fd9b03a4 Remove all dependencies of the CuraContainerStack with the
ContainerRegistry.

That will be very helpful for creating unit tests. Also this is not
needed because the next stack is always set in the machine or extruder
manager when switching printers.

Contributes to CURA-5628.
2018-08-14 15:35:00 +02:00
Lipu Fei
af02dc2758 Only use setMetaDataEntry() 2018-07-11 11:14:57 +02:00
Ghostkeeper
51f24bc8c8
Call getMachineManager on CuraApplication
Because Application doesn't have it. Its child class has.

Contributes to issue CURA-5330.
2018-06-04 09:53:20 +02:00
Ghostkeeper
49c684a741
Add function typing
Contributes to issue CURA-5330.
2018-06-04 09:51:34 +02:00
Ghostkeeper
2fbcc22123
Fix adding printers due to unused 'parent' parameter
The 'parent' parameter was unused, so I removed it. But I didn't remove all things that called it, apparently. I just removed some. I didn't try the stackbuilder.

Contributes to issue CURA-5330.
2018-06-01 14:02:32 +02:00
Diego Prado Gesto
b576423747 Adapt ovewritten method signature 2018-05-07 11:49:30 +02:00
Ian Paschal
d7b0f11ddf CURA-4400 Fixed project loading
"enabled" metadata is now read from saved projects (.3mf)
2018-03-20 11:17:39 +01:00
Jack Ha
906ebe12e1 CURA-4400 fix disallowed areas by fixing the limit_to_extruder -1 value 2018-03-19 11:46:43 +01:00
Jack Ha
bad637eb14 CURA-4400 fixed merge conflicts 2018-03-05 16:47:40 +01:00
Jack Ha
b0801d40e3 CURA-4400 added metadata entry for enabled instead of internal variable 2018-03-05 12:47:32 +01:00
Lipu Fei
a2c2282b44 Use context to evaluate materialDiameter 2018-03-03 15:50:33 +01:00
Jack Ha
86c13e86c7 CURA-4400 first version that disables extruder and updates available quality profiles 2018-02-28 12:56:00 +01:00
Jack Ha
df46241225 CURA-4606 CURA-5012 corrected and moved approximateMaterialDiameter to ExtruderStack 2018-02-27 13:03:08 +01:00
Lipu Fei
9ddc6a52b7 Refactor fix for extruder stack material diameters and nozzle sizes 2018-02-26 11:40:21 +01:00
Lipu Fei
c432d4ffbb WIP: Simplify global stack and extruder stack activation and fixes 2018-02-20 11:16:51 +01:00
Lipu Fei
f4d69918fb WIP: Remove findDefault..()s 2018-02-16 14:23:11 +01:00
Lipu Fei
3927c70625 Fix material_diameter handling in ExtruderStacks
CURA-4898
2018-01-31 13:32:45 +01:00
Lipu Fei
1c605a5108 Fix different strategies for machine and quality in project loading
CURA-4839
2018-01-23 10:58:43 +01:00
ChrisTerBeke
129f9cc16c Fixes for custom FMD printer material diameter upgrade and storage - CURA-4835 2018-01-22 17:18:09 +01:00
ChrisTerBeke
e17fbb0db2 Remove copying 1st extruder value to all extruders as that breaks re-loading from files 2018-01-22 16:05:43 +01:00
ChrisTerBeke
f589ce9570 Copy first extruder values when they are available when upgrading - CURA-4835 2018-01-22 11:25:23 +01:00
Lipu Fei
7c85db4a18 Fix material_diameter copy over for Extruders
CURA-4835
2018-01-19 12:30:56 +01:00
Lipu Fei
a7d51326c0 Move extruder-specific DC settings
CURA-4708

Read code comments.
2017-12-22 14:06:11 +01:00
Lipu Fei
18c7a5acf3 Pass optional file_name for deserialization
CURA-4613

Some upgrades depend on the file_name, so the file_name is needed in
this case.
2017-11-23 11:28:16 +01:00
ChrisTerBeke
657a91c525 Merge pull request #2685 from Ultimaker/container_stack_improvements
Container stack improvements
2017-11-20 17:42:26 +01:00
Mark
9a193ad5c5 Changing AGPLv3 to LGPLv3 2017-09-28 13:00:43 +02:00
Lipu Fei
365379f735 Add missing context in getProperty() in global and extruder stacks
CURA-4186

All getProperty() calls should use the provided context.
2017-08-24 17:01:03 +02:00
Lipu Fei
759d44dbef Add stack context for function evaluation
CURA-4186
2017-08-23 14:39:08 +02:00
Ghostkeeper
cf1309c650
Don't update next stack if there is no next stack
Not all extruder stacks have a next stack. Well currently every extruder stack should have a next stack, but the code is built around the possibility that there isn't a next stack elsewhere too.

Contributes to issue CURA-4121.
2017-08-07 09:47:53 +02:00
Lipu Fei
18fddf50c7 Add type hinting for container_id in ExtruderStack
CURA-4049
2017-07-18 09:22:45 +02:00
Arjen Hiemstra
95b825a4c5 Emit propertiesChanged on the global stack from the extruder stack
But only when the setting that changed has a relation that is not
settable per extruder.

Fixes CURA-3521
2017-07-11 12:03:23 +02:00
Lipu Fei
9ff7852055 Only use limit_to_extruder when the extruder exists
CURA-3756
2017-05-19 13:37:38 +02:00
Arjen Hiemstra
a7bf205dbc Turn GlobalStack's extruders property into a dict
We do not load the extruders in a fixed order, thus we cannot assume
that addExtruder is called in the right order. This means that index 0
of the extruders is not necessarily the extruder with position 0. So
instead, use the extruder position as a dict key.

Contributes to CURA-3738
2017-05-17 10:58:28 +02:00
Jaime van Kessel
ba8842f489 Removed unused imports 2017-05-15 11:56:19 +02:00
Jaime van Kessel
2cc56c5edf Fixed type hinting for Extruder stack 2017-05-15 11:55:32 +02:00
Arjen Hiemstra
fdc6fbbac1 Handle limit_to_extruder in {Extruder,Global}Stack getProperty
This way we do not need to special case limit_to_extruder and instead
always use limit_to_extruder if it is set.

Contributest to CURA-3738
2017-05-11 17:50:12 +02:00
Jaime van Kessel
8d80f20db7 Added way to dynamicly set loading order
This is to ensure that Global stacks are loaded before extruders, so once the extruders are deseralized, they can always find the next (global) stack

CURA-3497
2017-05-03 09:54:00 +02:00