1040 Commits

Author SHA1 Message Date
Jaime van Kessel
3c14545e08 Merge branch 'fix_machine_name_conflicts' of https://github.com/fieldOfView/Cura 2017-05-24 11:27:05 +02:00
Ghostkeeper
1f33a0d4cd
Use per-parameter-value compression for signals
This will only emit one signal for each unique combination of parameters.

Contributes to issue CURA-3803.
2017-05-22 15:36:46 +02:00
Ghostkeeper
bec43d5b9a
Make sure that the preferred material name variable exists
Another small bug I found when looking through this MachineManager code. My IDE was complaining that the preferred_material_name was not always initialised and that preferred_material was an unused variable.

Doesn't contribute to issue CURA-3803.
2017-05-22 15:36:46 +02:00
Jaime van Kessel
c474642744 Removed debug ID
CURA-3814
2017-05-22 14:25:29 +02:00
Jaime van Kessel
92192ff411 Merge branch 'master' of github.com:Ultimaker/Cura 2017-05-22 14:10:27 +02:00
Jaime van Kessel
5aba1731f5 Renamed useOptionalExtruder to addOptional extruder
This is more in line with the other properties

CURA-3814
2017-05-22 14:05:10 +02:00
Ghostkeeper
c14294d1f7
Merge branch '2.6'
Conflicts:
cura/Settings/ExtrudersModel.py

Contributes to issue CURA-3803.
2017-05-22 14:02:48 +02:00
Ghostkeeper
5f0fb3f9bd
Don't squash signals updating materials and variants
These may have different parameters, such as which machine and extruder they are updating the material and variant of. If we only pass the last signal on, then we're missing the update of other extruders.

Contributes to issue CURA-3803.
2017-05-22 14:01:58 +02:00
Ghostkeeper
8c166ea770
Use CuraContainerStack.definition instead of ContainerStack.getBottom()
We know now that it must be a Cura Container Stack. This should be a bit faster, and makes the error message I was getting a bit more clear.

Contributes to issue CURA-3803.
2017-05-22 14:01:58 +02:00
Ghostkeeper
5ae02fb4c6
Listen to changes on all extruders
Not just the active extruder. The non-active extruder may change when loading a project file which happened to have the same printer (so no new printer is created) and the same material and variant in the active extruder but not the same material or variant in another extruder.

Contributes to issue CURA-3803.
2017-05-22 14:01:58 +02:00
Ghostkeeper
6315947156
Modify parameter types from DefinitionContainer to DefinitionContainerInterface
It may also be any other class that implements the Definition Container Interface.

Not really related to CURA-3803 but I'm putting it there anyway as I found it during that development.
2017-05-22 14:01:57 +02:00
Jaime van Kessel
b69ced5766 Set color of "Not Overriden" option to white
CURA-3814
2017-05-22 13:45:28 +02:00
Jaime van Kessel
20cb3ea01f Added "optional_extruder" setting type
CURA-3814
2017-05-22 13:24:41 +02:00
Lipu Fei
df36c7a18b Check global_stack before updating in SettingInheritanceManager
CURA-3756
2017-05-19 15:24:09 +02:00
Lipu Fei
862cbe0211 Check global_stack before updating in SettingInheritanceManager
CURA-3756
2017-05-19 15:23:30 +02:00
Ghostkeeper
76a9a9a9ab
Erase changed hotends/materials after applying changes
Otherwise we may only change one of the extruders next time, and it'll still have the other change in this dictionary from the previous time we are syncing from the printer.

Contributes to issue CURA-3788.
2017-05-19 14:39:22 +02:00
Lipu Fei
9ff7852055 Only use limit_to_extruder when the extruder exists
CURA-3756
2017-05-19 13:37:38 +02:00
fieldOfView
a134779627 Fix creating conflicting machine names 2017-05-18 13:52:20 +02:00
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