54 Commits

Author SHA1 Message Date
Jaime van Kessel
cc17c28978 Fixed global stack not being set as next stack for extruder trains 2016-06-10 17:26:09 +02:00
Jaime van Kessel
8c43d4c4cb Quality is now set for extruder, regardless if the machine has machine specific qualities 2016-06-10 17:04:25 +02:00
Jaime van Kessel
179b6eeaac Fixed issue where not having a machine caused extruder retrieval to fail
CURA-1689
2016-06-10 13:16:54 +02:00
Jaime van Kessel
9672b3360c Changing settings in extruder stack now also triggers reslice
CURA-1689
2016-06-10 12:26:11 +02:00
Ghostkeeper
9f3752276f
Fix check if machine's extruders are processed
Luckily this did never occur anyway since the rest of the code was sound.

Contributes to issue CURA-340.
2016-06-09 17:05:21 +02:00
Jaime van Kessel
1db74b00fd Merge branch 'feature_send_extruder_settings' of github.com:Ultimaker/Cura 2016-06-09 16:41:22 +02:00
Arjen Hiemstra
627d5e3c0d Merge branch 'master' of github.com:ultimaker/Cura
* 'master' of github.com:ultimaker/Cura:
  Determine readonly state from location in filesystem instead of a metadata property
  Change focus upon extruder switch
  Fix extruder number attached to extruders
  Fix duplicating the first item on the Profiles page
  Fix spelling
  Document setActiveExtruderIndex
  Inheritance button now works if instance containers contain functions
  JSON cleanup: removed settable_per_x when they were obvious and default (CURA-1560)
  feat: use settable_per_[mesh|extruder|meshgroup|globally] instead of global_only (CURA-1560)
  JSON feat: replaced global_only with four properties settable_per_[mesh|extruder|meshgroup] and settable_globally for fdmextruder settings (CURA-1558)
  JSON feat: replaced global_only with four properties settable_per_[mesh|extruder|meshgroup] and settable_globally (CURA-1558)
2016-06-09 13:31:08 +02:00
Arjen Hiemstra
8729dce531 Store the actual extruder stack in ExtruderManager instead of just the ID
Contributes to CURA-340
2016-06-09 13:30:17 +02:00
Jaime van Kessel
8ebc75e09a Merge branch 'master' of github.com:Ultimaker/Cura into feature_send_extruder_settings 2016-06-09 13:05:50 +02:00
Jaime van Kessel
d93044a338 Added setting sending per extruder
CURA-1681
2016-06-09 13:04:07 +02:00
Ghostkeeper
14b9294a39
Document setActiveExtruderIndex
Contributes to issues CURA-340 and CURA-1278.
2016-06-09 10:45:48 +02:00
Ghostkeeper
4d418a7c1a
When switching active extruder, get the extruder train from definition id
Not from extruder container stack ID.

Contributes to issues CURA-340 and CURA-1278.
2016-06-08 16:36:01 +02:00
Ghostkeeper
0a34577fdb
Add documentation for createExtruderTrain
Contributes to issues CURA-340 and CURA-1278.
2016-06-08 14:09:37 +02:00
Ghostkeeper
fffe9b3a94
Better naming for extruder slot
The name of the extruder stack is now the same as the name for the extruder definition. The IDs are different though!

Contributes to issues CURA-1278 and CURA-340.
2016-06-08 14:09:37 +02:00
Ghostkeeper
32f90ad867
Re-add per-extruder nozzles, materials, qualities
Slightly more efficient and correct implementation.Contributes to issue CURA-340.
2016-06-08 14:09:36 +02:00
Ghostkeeper
f6ece126c3
Don't re-create user profile if one is loaded from files
The user profiles are also saved because they are added to the container registry. So if one exists for this extruder, don't create a new blank name, but use the pre-loaded one which contained the user settings the user had before he closed down Cura previously.

Contributes to issues CURA-340 and CURA-1278.
2016-06-08 14:09:36 +02:00
Ghostkeeper
21545af5c8
Get only values from extruder trains dictionary
Instead of getting the keys, which are labeled '0' and '1', we'd like to get the values, which are the extruder train IDs themselves.

Contributes to issues CURA-340 and CURA-1278.
2016-06-08 11:29:25 +02:00
Ghostkeeper
91797c3944
Log error if the machine refers to invalid extruder train ID
This helped mostly for debugging but it should be a genuine warning.

Contributes to issues CURA-1278 and CURA-340.
2016-06-08 11:29:25 +02:00
Ghostkeeper
8b1c363932
Load current machine's extruders upon creation, start and switch of machines
This requires some trickery of initialising the extruder manager before the machine manager is initialised, so that it properly listens to global container stack changes.

Contributes to issues CURA-340 and CURA-1278.
2016-06-08 10:40:10 +02:00
Ghostkeeper
f461ed0f5f
Document singleton
Contributes to issues CURA-340 and CURA-1278.
2016-06-08 10:38:59 +02:00
Ghostkeeper
ec26579473
Remove unused _repopulate function
It is replaced by the addMachineExtruders function.

Contributes to issues CURA-340 and CURA-1278.
2016-06-08 10:38:48 +02:00
Ghostkeeper
499a0557bd
Fix checking if an extruder train already exists
Contributes to issues CURA-340 and CURA-1278.
2016-06-07 14:00:31 +02:00
Ghostkeeper
a9376cffd1
Fix logging
Specify the fully qualified name.

Contributes to issues CURA-340 and CURA-1278.
2016-06-07 14:00:31 +02:00
Ghostkeeper
8feed746bf
Re-apply part of b991743053edf2778a2395dc9ede7007b99386eb that worked
This was indeed a mistake.

Contributes to issues CURA-340 and CURA-1278.
2016-06-07 14:00:31 +02:00
Ghostkeeper
08d116590d
Revert "Fix ExtruderManager.py"
That is not a fix. That is a patch.

This reverts commit b991743053edf2778a2395dc9ede7007b99386eb.
2016-06-07 14:00:31 +02:00
fieldOfView
b991743053 Fix ExtruderManager.py 2016-06-07 13:30:13 +02:00
Ghostkeeper
253061cfa4
Remove unused import
The _uniqueName function was using this but it was moved to ContainerRegistry.

Contributes to issues CURA-340 and CURA-1278.
2016-06-07 13:24:19 +02:00
Ghostkeeper
c5b07debdc
Remove iterability from ExtruderManager
This is no longer used.

Contributes to issues CURA-1278 and CURA-340.
2016-06-07 13:24:19 +02:00
Ghostkeeper
227c0f9f8c
Move _uniqueName to ContainerRegistry
It's not specific to any type of container and we might re-use this anyway.

Contributes to issues CURA-1278 and CURA-340.
2016-06-07 13:24:19 +02:00
Ghostkeeper
66bf0831f3
Document _uniqueName
This function should really just be moved to ContainerRegistry... I'll do that later.

Contributes to issues CURA-340 and CURA-1278.
2016-06-07 11:55:14 +02:00
Ghostkeeper
dff94b4559
Make ExtruderManager a QML context item
There were two singletons of this manager: One created by QML and managed by QML, and one created by us and managed by our own singleton pattern. That won't work! So we now manage just our own singleton type, and make it a context item for QML so it can use the manager too.

Contributes to issues CURA-340 and CURA-1278.
2016-06-07 11:55:14 +02:00
Ghostkeeper
9fe5435963
Rename parameter in _uniqueName
Original means the original name. That's better.

Contributes to issues CURA-1278 and CURA-340.
2016-06-07 11:55:14 +02:00
Ghostkeeper
890303da14
Add function to add all extruder trains of a machine
This function only adds extruder trains if they have not been added already.

Contributes to issues CURA-340 and CURA-1278.
2016-06-07 11:55:14 +02:00
Jaime van Kessel
0a84867132 Fixed multiple typos / missing things in extrudermanager 2016-06-07 09:33:29 +02:00
Ghostkeeper
84a9166241 Make extrudersChanged into a pyqtSignal
This way we can listen for it on the cute side.

Contributes to issues CURA-340 and CURA-1278.
2016-06-06 15:15:33 +02:00
Ghostkeeper
64c92caa58 Update documentation of ExtruderManager class
Contributes to issues CURA-1278 and CURA-340.
2016-06-06 15:15:33 +02:00
Ghostkeeper
77c918a0a7 Remove superfluous singleton pattern
The qmlRegisterSingletonType function already makes sure it is a singleton.

Contributes to issues CURA-340 and CURA-1278.
2016-06-06 15:15:33 +02:00
Ghostkeeper
7950dfaa07 Document activeExtruderStackId
Contributes to issues CURA-340, CURA-351 and CURA-1278.
2016-06-06 15:15:33 +02:00
Ghostkeeper
70e6c8093e Explicitly return None if no global container stack
That's what it does. This is more clear than doing 'pass' or something.

Contributes to issues CURA-340 and CURA-1278.
2016-06-06 15:15:33 +02:00
Ghostkeeper
d1be5b6c02 Create extruder train for each train in a machine
We had the functionality, but this function was not yet called!

Contributes to issues CURA-1278 and CURA-340.
2016-06-06 15:15:33 +02:00
Ghostkeeper
927d33145f Move creating extruder manager logic to ExtruderManager
This logic was both in Extruder.py and in MachineManagerModel.py due to a planning mishap.

Contributes to issues CURA-1278 and CURA-340.
2016-06-06 15:15:33 +02:00
Ghostkeeper
2660b2a68f Give default empty machine_extruder_ids
Works also if the machine has no machine_extruder_ids metadata.

Contributes to issues CURA-1278 and CURA-351.
2016-06-06 15:14:58 +02:00
Ghostkeeper
d810c7ddbb
Properly reload extruders at the start
The extruder manager was too late to catch the initial global stack switch and machine switch. Now it just always reloads the extruders at the beginning.

Contributes to issues CURA-1278 and CURA-351.
2016-06-05 16:17:55 +02:00
Arjen Hiemstra
186eca160b Fix containersChanged signal handlers
Fixes CURA-1642
2016-06-02 16:25:13 +02:00
Ghostkeeper
8a8de95969
Add iteration over extruder manager
This iteration iterates over the extruders.

Contributes to issues CURA-1278 and CURA-351.
2016-06-02 14:17:12 +02:00
Ghostkeeper
8369316236
Use modern import method
This is more robust to cyclic dependencies, and also the intended way of importing these classes in Python in general.

Contributes to issues CURA-1278 and CURA-351.
2016-06-02 14:17:12 +02:00
Ghostkeeper
8a8b0016ba
Add signal for when extruder list changes
The ExtrudersModel will need to listen to this.

Contributes to issues CURA-1278 and CURA-351.
2016-06-02 14:17:12 +02:00
Ghostkeeper
06f7f90bb0
Make ExtruderManager into a singleton
This way we don't need to load it in CuraApplication but we can just load it whenever it is first needed. ExtruderManager should be robust against initialising it at any point in Cura's runtime.

Contributes to issues CURA-1278 and CURA-351.
2016-06-02 14:17:12 +02:00
Ghostkeeper
1f9805a73c
Remove unused imports
These are unused because the code was moved to Extruder.py

Contributes to issues CURA-1278 and CURA-351.
2016-06-02 14:17:12 +02:00
Ghostkeeper
73f12ffd99
Incorporate switching of global extruder stack
When the global extruder stack switches, we need to re-connect the reloading of extruders to the new containersChanged signal of the new global container stack. This now also bootstraps the listening for the first time, when the global container stack changes from None to the first stack.

Contributes to issues CURA-1278 and CURA-351.
2016-06-02 11:17:52 +02:00