2372 Commits

Author SHA1 Message Date
Lipu Fei
5ed89525fb selectedObjectExtruders should handle no extruder case
CURA-3756
2017-05-18 10:29:55 +02:00
Jaime van Kessel
29e8325c12 Only try to remove extruders if the machine has any 2017-05-18 09:56:13 +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
Ghostkeeper
739fd2bbcb
Merge branch 'master' of github.com:Ultimaker/Cura 2017-05-17 16:33:37 +02:00
Ghostkeeper
e64e7daec5
Merge branch 'fix_create_material' of https://github.com/fieldOfView/Cura into fieldOfView-fix_create_material 2017-05-17 16:28:17 +02:00
Ghostkeeper
f65043ecc8
Add spaces around binary operators and after comma
Just a little code style thing.

Contributes to issue CURA-3828.
2017-05-17 16:17:48 +02:00
Lipu Fei
b027437ef3 Activate a new machine (if any) before removing a machine
CURA-3756
2017-05-17 15:57:12 +02:00
Lipu Fei
386e5db489 When removing a machine's extruders, also clean up _extruder_trains
CURA-3756
2017-05-17 15:57:12 +02:00
Lipu Fei
3b3d9c4dae Minor code refactoring in ExtruderManager
CURA-3756
2017-05-17 15:57:12 +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
fieldOfView
7b393064aa Fix creating materials for 1.75mm machines that have machine/variant materials
Instead of cloning the 2.85 mm generic PLA material and setting its diameter, we now clone the generic PLA with the same diameter as the current machine. This will also clone all the machine-specific settings included in that base file.
2017-05-17 12:20:00 +02:00
fieldOfView
75519d754b Fix creating materials for 1.75mm machines 2017-05-17 11:49:13 +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
9686df285d Merge branch 'master' of github.com:Ultimaker/Cura into transparent_limit_to_extruder 2017-05-17 10:26:48 +02:00
Lipu Fei
121ebd79cf Fix circular import problem caused by moving SettingVersion into CuraApplication
CURA-3756
2017-05-16 14:55:34 +02:00
Lipu Fei
40d70b5f39 Fix version upgrade for project loading
CURA-3756
2017-05-16 14:38:27 +02:00
Jaime van Kessel
1b4564bdb1 Added missing typing import 2017-05-16 14:37:47 +02:00
Jaime van Kessel
e921808cd6 We now try to remove the right container when removing extruder 2017-05-16 14:13:20 +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
c4e6336828 Merge branch 'transparent_limit_to_extruder' of github.com:ultimaker/Cura into transparent_limit_to_extruder
* 'transparent_limit_to_extruder' of github.com:ultimaker/Cura:
  Removed unused imports
  Fixed type hinting for Extruder stack
  Fixed two remaining failing unit tests
  Fixes unit fallthrough unit test
2017-05-16 13:41:13 +02:00
Arjen Hiemstra
c5c67ee8be Merge branch 'master' of github.com:ultimaker/Cura into transparent_limit_to_extruder
* 'master' of github.com:ultimaker/Cura: (94 commits)
  Re-enable Japanese from language selection menu
  Add Japanese translations for setting descriptions
  Update PVA profiles
  Changed profile names
  Simplified some code
  Changed final spot where we still used findContainer when looking for container with specific type
  Directly use property instead of searching
  Added a type hinting to QualityManager
  JSON description fix: warn users when not to use spiralize (CURA-3636)
  Add setting_version every time we create InstanceContainer
  Increase warning value for gradual infill steps
  Convert all metadata fields to string
  cleanup: prime => prime blob and lil doc (CURA-3634)
  fix: don't make disallowed area if blob is disabled (CURA-3634)
  Be robust against older specification version numbers
  Read setting_version from version attribute on root
  Added bunch of typing to extruder manager
  Fix resolve strategy "new" for user instance container
  Added missing typehinting
  Row element was not used
  ...
2017-05-16 10:57:06 +02:00
jack
85a29e967f Merge pull request #1757 from fieldOfView/fix_material_uniqueness
Fix material uniqueness
2017-05-16 09:44:10 +02:00
Jaime van Kessel
910a55fd50 Simplified some code 2017-05-15 14:17:42 +02:00
Jaime van Kessel
d93c5e667b Changed final spot where we still used findContainer when looking for container with specific type 2017-05-15 14:02:07 +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
Ghostkeeper
ccda155882
Add setting_version every time we create InstanceContainer
Except when we fill the instancecontainer via deserialising. Because then we want to retain the original version number.

Contributes to issue CURA-3427.
2017-05-15 10:39:53 +02:00
Jaime van Kessel
81d3ce46f1 Added bunch of typing to extruder manager 2017-05-12 16:56:12 +02:00
Jaime van Kessel
ba4d62e8ca Added missing typehinting 2017-05-12 16:45:58 +02:00
Jaime van Kessel
68c7cd1ae5 Merge branch 'master' of github.com:Ultimaker/Cura 2017-05-12 16:40:19 +02:00
Jaime van Kessel
bfc65cb4a9 Added typing to active stack 2017-05-12 16:40:02 +02:00
Jaime van Kessel
fb6d86dc88 Also override getTop(), as curaContainerStack enforces it being a instanceContainer
This helps with the type hinting.
2017-05-12 16:39:24 +02:00
Ghostkeeper
0cc4f90920
Merge branch 'master' of github.com:Ultimaker/Cura 2017-05-12 16:34:19 +02:00
Jaime van Kessel
7ee5a66c64 CuraContainerStack now overrides getBottom, so it always returns a definition 2017-05-12 16:32:00 +02:00
Jaime van Kessel
77204fc4b0 Type hinting & unused code removal 2017-05-12 16:27:37 +02:00
Jaime van Kessel
2b64e92a99 Removed unused imports 2017-05-12 16:13:09 +02:00
Ghostkeeper
5bc613c3e0
Don't use string for default version
No need to go via string and cast that to int, just return int directly.

Contributes to issue CURA-3427.
2017-05-12 14:44:46 +02:00
Jaime van Kessel
167f616a7c Decreased interval of extruder timer 2017-05-12 14:34:45 +02:00
Jaime van Kessel
ef2aa3b2b2 Empty InstanceContainers are now correctly handled by setActiveMaterial again
CURA-3789
2017-05-12 13:59:31 +02:00
Ghostkeeper
0f5814e52f
Add setting_version and check against it
This breaks all profiles since they have the wrong setting version, of course. Have to change that in every instance container now...

Contributes to issue CURA-3427.
2017-05-12 12:58:15 +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
fieldOfView
f5347a4593 Add documentation and a spot of logging 2017-05-11 16:37:32 +02:00
fieldOfView
24159aaf66 Fix activating newly created materials 2017-05-11 14:08:15 +02:00
fieldOfView
5339055f9a Fix unlinking materials 2017-05-11 13:10:32 +02:00
fieldOfView
0d67d42300 Fix created materials being a linked to themselves 2017-05-11 12:53:53 +02:00
fieldOfView
e45f04f391 Merge branch 'master' into fix_material_uniqueness 2017-05-11 12:23:01 +02:00
Jaime van Kessel
fd340a1270 Empty containers now also trigger extruder model update 2017-05-10 16:25:23 +02:00
Jaime van Kessel
27d6bebf32 Adding a new printer now activates it again
CURA-3783
2017-05-10 16:12:01 +02:00
Jaime van Kessel
bfb76540d0 InstanceContainerchanged is now also on a timer.
This greatly reduces the signal storm resulting from changing quality / material in multi extrusion machines.

CURA-3780
2017-05-10 13:22:34 +02:00