43 Commits

Author SHA1 Message Date
Arjen Hiemstra
386aec32a8 Merge branch 'settings_rework'
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
  ...
2016-05-25 15:12:25 +02:00
Ghostkeeper
754932f83a Move LegacyProfileReader to new setting structure
Untested as the profile manager is not functional at the moment.

Contributes to issue CURA-1278.
2016-05-20 16:22:10 +02:00
Tim Kuipers
883d138f67 Merge branch '2.1' 2016-05-13 12:19:19 +02:00
Ghostkeeper
76f78295c4
Translation correction suggested by BagelOrb
BagelOrb indicated the translation wrongly at first. This is apparently correct.

Contributes to issue CURA-1549.
2016-05-12 10:28:18 +02:00
Ghostkeeper
c79d064107
Convert raft_airgap settings to float before computing
Can't subtract strings from each other, after all.

Contributes to issue CURA-1549.
2016-05-11 18:26:18 +02:00
Ghostkeeper
5a7486a32e
Add conversion of First Layer Airgap from legacy
First Layer Airgap's internal name is raft_airgap (yeah don't ask).

Contributes to issue CURA-1549.
2016-05-11 17:27:14 +02:00
Ghostkeeper
de9a66e1f4 Merge branch '2.1'
Conflicts:
	plugins/RemovableDriveOutputDevice/OSXRemovableDrivePlugin.py
	plugins/RemovableDriveOutputDevice/WindowsRemovableDrivePlugin.py
	plugins/USBPrinting/PrinterConnection.py
	resources/machines/fdmprinter.json
	resources/profiles/ultimaker2+/abs_0.4_high.curaprofile
2016-03-17 15:24:00 +01:00
Thomas-Karl Pietrowski
6993e9e695 Renaming locals to copied_locals
"locals" is something that comes with Python. Better renaming it.
2016-03-14 17:16:23 +01:00
Ghostkeeper
9bf12cf7b2
Remove double profile entry from D̩̙̹͈̜ͭ̌̃ͫ͊I̤̝̻͎̖̗͖͌̐̔C̪̐ͣ̅͛̆̇̅Ț̻̄͌̐ͪ̋ͨͫȈ̭̬̪͕̖̙̪̻̿ͥO̱͖̟͓̞͗ͧ͋ͮṆ̱̥͍̦͎̋ͭ̒͛A̻̯̳̩͈̱̤͎̽ͥͨ̋͐̀R̦̯̠ͩͮͮ̓̃ͭÝ̫̜̺̻̼̉̄̏͌ͭ̏͗̊ ̣̪̠̙̜͐ͥŐ͎̞̺̦̬̜͋̓F̩̣͖̤͇͍̍ͬ̽̉̏̿̾̓͒ͅ ̩̬̥̯ͮ̀ͮͮ͑̃̎ͅD͈̪ͧͣO̘̪̟̗̹͓̅̊ͅǑ͈M̟̦̭͙͈͕̖̊̅ͤ̓ͅ 2016-03-04 16:22:31 +01:00
Jaime van Kessel
9c5e169f2b Loaded profiles are now marked as dirty so they are saved correctly
CURA-936
2016-03-01 16:24:43 +01:00
Jaime van Kessel
e90fd95495 Profile importing now checks if it's the right file type
Contributes to CURA-936
2016-03-01 15:16:50 +01:00
fieldOfView
27062d8e99 Always make sure imported profiles are available for the currently active machine
The profile name of an imported legacy profile gets set in ProfilesModel.importProfile()

Contributes to CURA-874
2016-02-16 21:50:57 +01:00
Ghostkeeper
f09b927288 Add check if resulting profile is empty
If it is, a warning is logged.

Contributes to issue CURA-37.
2016-01-26 13:58:00 +01:00
Ghostkeeper
e7b2586d36 Don't add to profile if setting is legacy default
If a setting is equal to the legacy setting's default value, then it doesn't get added to the profile either.

Contributes to issue CURA-37.
2016-01-26 13:50:46 +01:00
Ghostkeeper
c0b5832a59 Remove debug prints
Shouldn't have committed those. Sorry!

Contributes to issue CURA-37.
2016-01-26 13:32:52 +01:00
Ghostkeeper
5374d253e9 Evaluate to old defaults if setting is missing
If the setting is missing from the legacy profile, let it evaluate to the default in the legacy Cura.

Contributes to issue CURA-37.
2016-01-26 13:27:42 +01:00
Ghostkeeper
fbd5471f5b Set machine_nozzle_size when importing legacy profile
Machine_nozzle_size was just a machine setting when this dictionary of doom was made.

Contributes to issue CURA-37.
2016-01-21 15:01:50 +01:00
Ghostkeeper
e23a9ea997 Move the changing of the setting after import out of try-except
It should never give an exception, so if it does, crash and burn the application.

Contributes to issue CURA-37.
2016-01-20 14:42:32 +01:00
Ghostkeeper
db2af1fa0d Fix line width
The Expression of Doom is put into the Dictionary of Doom!

Contributes to issue CURA-37.
2016-01-14 11:53:32 +01:00
Ghostkeeper
e82988f5e4 Correctly parse legacy speed settings with strange floats
If the legacy profile contains float values serialised to '0.0' or '0.00' instead of just '0', this now works correctly instead of evaluating the string comparison to false.

Contributes to issue CURA-37.
2016-01-13 17:04:28 +01:00
Ghostkeeper
9feb609fba Don't add a setting if evaluation failed
If the eval failed that is likely caused by a variable not existing. It now continues with evaluating other settings and just doesn't add the setting that depends on non-existing legacy settings. This happens when the imported profile is not complete or corrupt.

Contributes to issue CURA-37.
2016-01-13 16:59:05 +01:00
Ghostkeeper
7f1a746a45 Make infill_before_walls opposite
The perimeter_before_infill setting was opposite of infill_before_walls, so turn this boolean around.

Contributes to issue CURA-37.
2016-01-13 16:33:39 +01:00
Ghostkeeper
a4777ac2ed Correct wall thickness setting
The shell thickness also governs the top_bottom_thickness, which is not desired.

Contributes to issue CURA-37.
2016-01-13 16:32:38 +01:00
Ghostkeeper
8b72834c9b Remove skin_no_small_gaps_heuristic
Apparently this setting doesn't exist in the legacy Cura.

Contributes to issue CURA-37.
2016-01-13 16:24:20 +01:00
Ghostkeeper
5d4cceb47c Don't add a setting if it's the default
If the imported setting is the default in the new Cura, don't add it to the profile.

Contributes to issue CURA-37.
2016-01-13 16:16:00 +01:00
Ghostkeeper
3195684892 Parse speed settings as string
In the evaluation that's passed from the Dictionary of Doom, the settings are still strings so you can only parse the settings as string...

Contributes to issue CURA-37.
2016-01-13 15:55:09 +01:00
Ghostkeeper
ef3b5792b4 Fix retraction combing import
Retraction combing was an enum (a fact which was not documented). This enum must be parsed to a boolean. The 'no skin' option now evaluates to true since it is not implemented in the new Cura.

Contributes to issue CURA-37.
2016-01-13 15:52:38 +01:00
Ghostkeeper
731fd41ecd If specific speed setting is 0, use print_speed
Something that was not in the translation document: If a speed setting for a specific part is 0 (such as infill_speed) then the global print speed should be used.

Contributes to issue CURA-37.
2016-01-13 15:42:15 +01:00
Ghostkeeper
482f0461fc Add check for profile version
The profile reader now checks whether the profile version is the same as the target version in the Dictionary of Doom.

Contributes to issue CURA-37.
2015-12-18 10:50:54 +01:00
Ghostkeeper
68496349a9 Fix import of top and bottom thickness
The legacy settings had a boolean for these, but in the current version is should just be a float.

Contributes to issue CURA-37.
2015-12-18 10:19:28 +01:00
Ghostkeeper
84613d99c4 Fix import of platform_adhesion
This setting should never be set to None.

Contributes to issue CURA-37.
2015-12-18 10:10:08 +01:00
Ghostkeeper
d2513f9bbb Fix prime_tower_size import
It was using math.sqrt incorrectly and also was trying to divide strings by each other, while they were floats.

Contributes to issue CURA-37.
2015-12-18 10:03:34 +01:00
Ghostkeeper
0454b37243 Fix importing math to eval
We expose only math, so it can do mathematical operations on the setting values when translating.

Contributes to issue CURA-37.
2015-12-18 10:00:00 +01:00
Ghostkeeper
bfa332e227 Fix ternary operator in import of support_enable
The ternary operator of Python is different.

Contributes to issue CURA-37.
2015-12-18 09:54:35 +01:00
Ghostkeeper
5358b700ca Fix ternary operator in import of support_enable
The ternary operator of Python is different.

Contributes to issue CURA-37.
2015-12-18 09:52:50 +01:00
Ghostkeeper
99a13ba3aa Fix getting settings from JSON file
When reading a node of a JSON file, apparently it only lists the keys instead of key-value pairs. You have to get the values separately.

Contributes to issue CURA-37.
2015-12-18 09:14:55 +01:00
Ghostkeeper
6bde0e3404 Sync translation category name from JSON
The category was named 'translation' instead of 'translations'.

Contributes to issue CURA-37.
2015-12-18 09:10:52 +01:00
Ghostkeeper
644038af97 Missing imports
Test before commit. Test before commit. Test before commit. Test before commit!

Contributes to issue CURA-37.
2015-12-18 09:06:43 +01:00
Ghostkeeper
166c8a3048 Fix call to configparser.options
It needs to have the section from which to read the options.

Contributes to issue CURA-37.
2015-12-18 09:01:22 +01:00
Ghostkeeper
abb92afc27 Fix call to prepareLocals
Turns out the 'self.' is required...

Contributes to issue CURA-37.
2015-12-17 14:54:48 +01:00
Ghostkeeper
f2a95ae89c Correct the configparser
The import was missing. Also, the parser was not called on the correct stream.

Contributes to issue CURA-37.
2015-12-17 14:30:53 +01:00
Ghostkeeper
57f5e60fa5 Fix link to LegacyProfileReader
This was preventing the entire plugin from being loaded.

Contributes to issue CURA-37.
2015-12-17 14:02:29 +01:00
Ghostkeeper
513941097f Initial LegacyProfileReader plugin implementation
This plugin reads a profile from legacy Cura versions. It hasn't been tested much except that there are no syntax errors. It is currently being blocked by issue 34.

Contributes to issue CURA-37.
2015-12-17 13:49:53 +01:00