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.
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.
For example, if the community distributes Cura in a different way, they
can set CURA_BUILDTYPE via 'cmake -DCURA_BUILDTYPE=' and whenever Cura
is launched " (PPA)" will be appended. Of course, this could be done by
appending " (PPA)" to CURA_VERSION, but in case of my Ubuntu/Debian
packaging it will only need one modification in debian/changelog to
change the version. During build (debian/rules) this version will be
read from debian/changelog.
Changing the version number across different files, is a waste of time.
Finally, we can use that field in the future to indicate debug or other
other special builds.
This is a new data type. It behaves and saves just like an integer, but it's actually just an index of the extruder to use.
Contributes to issues CURA-1278 and CURA-351.
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.
This will consequently also load all extruder stacks of the current machine whenever the current machine changes.
Contributes to issues CURA-1278 and CURA-351.
These characters are just for visualisation in the code. They should never be used during the normal operation of the program, nor should they be saved to the file. So just replace them immediately.
Contributes to issue CURA-1278.
The definition is derived with inheritance, just like the printers. Therefore I decided to call this 'ExtruderStack' in line with how the resource type for the printer is named.
Contributes to issue CURA-1278.
Contributes to CURA-1278
* settings_rework: (224 commits)
Improve slice trigger documentation
Import Cura in materials preferences page so we can use the active definition id
Add layer height to high quality profile so we have something that changes
Update example XML material to use the right product names
Filter available materials by the machine definition
Show the add machine dialog when we do not have an active machine
Create machine-specific material containers for machine specific overrides in XML material files
When creating a new container stack, add empty containers for things where we cannot find containers
Add preferred variant, material and quality to UM2+ definition
Account for global container stack being None in the backend plugin
Use the global stack instance variable and account for it potentially being None
Store the global container stack as an instance property
Added wildcard to filtering
Per object settings filter now uses correct bool types (instead of strings)
Removed stray = sign.
Fix creating print job name
Disable asynchronous loading of SettingItem when Qt Version < 5.5
Document QTbug
Properly serialise all settings to g-code file
Document GCodeWriter class
...