122 Commits

Author SHA1 Message Date
Lipu Fei
d01ec7872d Fix quality lookup
CURA-5694

For a machine, if it has extruder-specific qualities, when we look up
extruder qualities, we should NOT fall back to use the global qualities.
2018-09-10 14:23:46 +02:00
Lipu Fei
9aea0e5109 Fix quality lookup logic for extruders
CURA-5694

 - Add convenience functions into GlobalStack
 - Use "has_variants" and "has_materials" instead of
 "has_variant_materials"
 - Remove "has_variant_materials"
 - For extruder qualities, skip global qualities if the machine has
   variants or materials
2018-09-06 08:12:55 +02:00
Lipu Fei
f42dc24d95 Do not show gcode.gz as an option in save file dialog
CURA-5649
2018-08-16 15:16:32 +02:00
Lipu Fei
e0ad7a9fb4 Add answer commments to some puzzling code 2018-08-13 14:24:25 +02:00
Ian Paschal
5ede82eddc
Merge pull request #4233 from Ultimaker/CURA-5538-fix-on-at-a-time
CURA-5538 Fix one at a time
2018-08-13 13:14:30 +02:00
Lipu Fei
bd47dfef75 Revert "Revert "Merge pull request #4203 from Ultimaker/CURA-5538-fix-one-at-a-time-order-2""
This reverts commit 89ed2bcff80a7a414f77c455baa0023c631eae7c.
2018-08-13 11:23:10 +02:00
Ian Paschal
89ed2bcff8 Revert "Merge pull request #4203 from Ultimaker/CURA-5538-fix-one-at-a-time-order-2"
This reverts commit 82e1a7c5fc43a12d1498779d392286c6e49ee4ea, reversing
changes made to 1915659393b72f7e4d4dbd9b73e92b8a665efcdc.
2018-08-10 11:45:25 +02:00
Lipu Fei
95481b8560 Fix print order for one-at-a-time mode 2018-08-06 17:23:01 +02:00
Lipu Fei
066a00653a Add one more layer to the decision tree 2018-08-02 17:15:34 +02:00
Lipu Fei
af02dc2758 Only use setMetaDataEntry() 2018-07-11 11:14:57 +02:00
Ghostkeeper
a6ffbbde8f
Add missing typing
Contributes to issue CURA-5330.
2018-06-01 14:53:54 +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
a6676fb477 Merge branch 'master' of github.com:Ultimaker/Cura 2018-05-07 12:57:33 +02:00
Diego Prado Gesto
b576423747 Adapt ovewritten method signature 2018-05-07 11:49:30 +02:00
Jack Ha
00d8427e42 Add sanity check for GlobalStack CURA-5045 2018-05-07 10:30:45 +02: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
df46241225 CURA-4606 CURA-5012 corrected and moved approximateMaterialDiameter to ExtruderStack 2018-02-27 13:03:08 +01:00
Jack Ha
def86defe6 CURA-4848 Global stack now does its infinite resolve prevention on per thread basis 2018-01-23 16:17:38 +01:00
Jack Ha
cde3799702 CURA-4848 removing the debugging list because it's not a threading issue 2018-01-23 14:46:44 +01:00
Jack Ha
07e6875199 CURA-4848 added logging for when the crash occurs 2018-01-23 14:24:00 +01:00
Ghostkeeper
dad99f5292
Merge branch 'master' into feature_local_container_server
Contributes to issue CURA-4243.
2017-11-29 13:06:08 +01:00
Ghostkeeper
e48b151d40
Express getConfigurationTypeFromSerialized as function of its parent
This prevents code duplication a bit and allows us to make it a classmethod.

Contributes to issue CURA-4243.
2017-11-01 16:17:26 +01:00
Ghostkeeper
3a9c8d16a2
Fix remaining references to instance_container._id
These must've slipped through the cracks.

Contributes to issue CURA-4243.
2017-10-30 15:07:46 +01:00
ChrisTerBeke
59580c0ade Remove commented out code - CURA-4482 2017-10-26 11:52:58 +02:00
ChrisTerBeke
f0ed3bc588 Always populate extruder stacks when creating global stack - CURA-4482 2017-10-26 11:05:35 +02:00
Diego Prado Gesto
71e8de13a8 Fix retrieving setting values with "extruderValues()" and "resolveOrValue()"
CURA-4358

Using the context for override the extruderValues() and resolveOrValue()
functions, for getting the correct values. Also indicate in the context
to skip the first container in the stacks (user container)
2017-10-11 11:05:01 +02: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
Lipu Fei
b20711ef7c Remove incorrect maximum extruder count check
CURA-4188
2017-08-17 16:36:57 +02:00
Lipu Fei
e67286c0d8 Do not add extruder stacks for single-extrusion machines
CURA-4167

In the current architecture, single-extrusion machines don't have
extruder stacks.
2017-08-15 14:19:23 +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
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
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
Lipu Fei
b2f0623ecf Do not add and register Extruders if they are already there
CURA-3756
2017-05-17 17:07:36 +02:00
Arjen Hiemstra
3b73979a2c Do not add an extruder if it has no position set
Otherwise we get very weird values in the extruders dict

Contributes to CURA-3738
2017-05-17 13:47:14 +02:00
Arjen Hiemstra
63e586ab5b Ensure the value of limit_to_extruder is an extruder before accessing it
Contributes to CURA-3738
2017-05-17 13:47:14 +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
Arjen Hiemstra
02f0418889 Prevent infinite recursion relating to limit_to_extruder
With limit_to_extruder, we always try to get the value of a setting from
an extruder. However, if the setting is not settable_per_extruder we
bypass the extruder and go directly to the global stack. This would
cause an infinite recursion.

Contributes to CURA-3738
2017-05-16 13:42:28 +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
3f9a5fbcbb Changed logging so it doesn't look like it's printing lists 2017-05-08 14:22:36 +02:00
Jack Ha
8680c6d79d Changed addExtruder exception to a warning to let Custom FDM Printer work again. Removed unused imports. CURA-3757 2017-05-08 11:27:19 +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
Arjen Hiemstra
8e1580d8d9 Document GlobalStack 2017-04-18 17:37:26 +02:00
Arjen Hiemstra
323107ef5c Fix GlobalStack::getProperty
It used to only consider user values in the "user" containers, now it
also accounts for values in the other instance containers.
2017-04-11 13:51:01 +02:00
Arjen Hiemstra
73e1af49ee Track which settings we are trying to "resolve"
This prevents infinite recursions when a resolve function tries to get
its own value.
2017-04-10 18:06:24 +02:00
Arjen Hiemstra
09e5765f22 Do not try to validate against machine_extruder_count when there is no machine_extruder_count 2017-04-10 18:06:24 +02:00
Arjen Hiemstra
433537a2f0 Add type metadata to Extruder/Global stack
For backward compatibility with old code that still checks for "type".
2017-04-06 17:49:22 +02:00
Arjen Hiemstra
608e62e081 Do not try to get resolve when extruder count == 1 or for nonexistant properties 2017-04-06 02:22:45 +02:00
Arjen Hiemstra
a16b5d73b6 Partial fix for infinite recursion when trying to call getProperty 2017-04-04 17:41:21 +02:00