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
Arjen Hiemstra
1f0f8cd6ea
Make GlobalStack a subclass of CuraContainerStack
2017-03-30 08:58:21 +02:00
Arjen Hiemstra
317576e983
Set container entry to empty if it was not found in the original container
2017-03-28 18:14:16 +02:00
Arjen Hiemstra
75931192f6
Allow setting Definition and setting Definition by ID
...
To match the other properties
2017-03-28 17:46:28 +02:00
Arjen Hiemstra
123c8bae45
Allow setting userChanges container
...
Since that makes it possible to create an external factory method for
creating stacks and makes the properties more consistent.
2017-03-28 17:46:00 +02:00
Arjen Hiemstra
2f6936c961
Fix type checking in GlobalStack
2017-03-28 17:45:15 +02:00
Arjen Hiemstra
4cea1b6d33
Fix error case in addExtruder
...
Error out when the new size is going to be more than extruderCount
instead of whether it currently is more than extruderCount.
2017-03-28 17:44:29 +02:00
Arjen Hiemstra
4005f5082b
Allow setting of properties on GlobalStack
2017-03-28 17:43:11 +02:00
Arjen Hiemstra
b6fafb06ed
Ensure we initialize the list of containers for GlobalStack
2017-03-27 17:52:38 +02:00
Arjen Hiemstra
39803cf7dd
Add missing imports to Extruder/GlobalStack
2017-03-27 17:52:16 +02:00
Arjen Hiemstra
5196ea695c
Add a notify signal to all container properties in GlobalStack
...
Contributes to CURA-3497
2017-03-27 01:35:34 +02:00
Arjen Hiemstra
de1dbfbc07
Override replaceContainer and add some type checking
...
type in this case being container type
Contributes to CURA-3497
2017-03-23 17:55:21 +01:00
Arjen Hiemstra
dc0c666a54
Disable add/insert/remove container
...
Since we want to have a fixed list of containers in the stack.
Contributes to CURA-3497
2017-03-23 17:55:21 +01:00
Arjen Hiemstra
5ad0651fd1
Add an "extruders" property and an addExtruder method
...
Contributes to CURA-3497
2017-03-23 17:55:21 +01:00
Arjen Hiemstra
462d5fac8d
Add setters for properties
...
Contributes to CURA-3497
2017-03-23 17:55:21 +01:00
Arjen Hiemstra
f97a6ebd74
Move exceptions to their own file
...
Since that keeps the GlobalStack cleaner
Contributes to CURA-3497
2017-03-23 17:55:21 +01:00
Arjen Hiemstra
411e3a3976
Fix up a bunch of things with type hints and imports
2017-03-21 17:45:07 +01:00
Arjen Hiemstra
88e8138004
Override ContainerStack::deserialize
...
This ensures we have the right set of containers in the stack
2017-03-21 17:44:36 +01:00
Arjen Hiemstra
95a6bef50f
Add properties for the individual containers in the global stack
2017-03-21 17:43:42 +01:00
Arjen Hiemstra
3ee3e0aee3
Add a private class to GlobalStack that defines the expected indices of each container type
2017-03-21 17:39:06 +01:00
Arjen Hiemstra
4904e449a0
Start overriding getProperty in GlobalStack
...
Since we have the "resolve" property, we should transparently handle it
so lookup can just use "value".
Contributes to CURA-3497
2017-03-20 17:30:00 +01:00
Arjen Hiemstra
0656dd53c3
Override setNextStack in GlobalStack and raise an error if called
...
Since the global stack should never have a next stack
Contributes to CURA-3497
2017-03-20 17:28:42 +01:00
Arjen Hiemstra
12c50dbac8
Introduce a GlobalStack class
...
This will allow us to codify some of the assumptions made about the
global stack
Contributes to CURA-3497
2017-03-20 17:26:12 +01:00