23 Commits

Author SHA1 Message Date
Jaime van Kessel
adf8285d20 Typing fixes
Since I was stupid enough to touch it, I was also forced to boyscout the code.
2018-10-03 16:36:58 +02:00
Jaime van Kessel
2e529452dd Moved the actual adding of containers by script to initialize
This ensures that when loading scripts (and checking they are valid) we don't start adding unneeded containers
2018-10-03 15:58:16 +02:00
Ghostkeeper
45e3355318
Catch failure to parse QML component
Don't crash the application then.
2018-08-27 10:57:58 +02:00
Lipu Fei
af02dc2758 Only use setMetaDataEntry() 2018-07-11 11:14:57 +02:00
Ghostkeeper
3ae6b8c4c1
Double-escape newlines in script string
Because they are stored twice: Once in the CFG of the script, and once in the CFG of the machine instance.

Fixes an issue reported here: https://github.com/Ultimaker/Cura/pull/3229
2018-04-26 13:30:59 +02:00
Ruben D
c65e3656bd
Fix persistence of setting names with uppercase characters
The problem was that Python's ConfigParser doesn't preserve case. Everything becomes lowercase. Some post-processing scripts have uppercase characters in their setting keys and these weren't preserved.
This fix configures the ConfigParser to pass the setting keys untransformed. The transformation function becomes the str() function which just passes the input through untransformed.
2018-03-29 00:39:57 +02:00
Ghostkeeper
e2724f53ad
Only check for loaded plug-ins at initial call to loadAllScripts
Not for every call to loadScripts.
2018-03-26 13:55:15 +02:00
Ghostkeeper
14936fdf21
Move looping over script directories to separate function
Removes some code repetition.
2018-03-26 13:50:29 +02:00
Ghostkeeper
9d63258703
Merge branch 'master' into feature_persistent_postprocessing 2018-03-22 19:19:05 +01:00
Ghostkeeper
d98cab48ac
Get scripts from either Resources or Preferences
We must retain the old directory for legacy. People might still have scripts there.
2018-03-12 09:48:03 +01:00
Ghostkeeper
a3efbc70fb
Merge branch 'fix_postprocessing_script_path' of https://github.com/fieldOfView/Cura into fieldOfView-fix_postprocessing_script_path 2018-03-12 09:42:21 +01:00
fieldOfView
c3bf0b834d Fix location of post processing scripts on Linux
On Windows and OSX, resources and preferences are stored in the same folder. On Linux, preferences are in ~/.config, resources are in ~/.local/shared. Postprocessing scripts belong in the latter, along with all the other resources (definitions, plugins, themes).

Fixes #3356
2018-02-20 09:20:01 +01:00
Lipu Fei
495fc8bbd7 WIP: Refactor BuildPlateModel and split MultiBuildPlateModel 2018-02-17 22:24:05 +01:00
Ghostkeeper
afeea6e214
Don't interrupt loading scripts when one error occurs
Instead of breaking the loading of the rest of the scripts, just don't load this particular one.
2018-02-12 11:23:43 +01:00
Ruben D
77566180f1
Remove commented code
Oops, forgot about this one.
2018-02-04 01:53:10 +01:00
Ruben D
927f193270
Only write scripts to stack upon pressing close button
This is more efficient, because we're not writing every time you modify the list of scripts. It's also more complete, since if you don't modify the list of scripts but just modify one of the settings, that setting change also gets written to the stack after closing the window.
2018-02-04 01:26:34 +01:00
Ruben D
bebcd78db0
Reset the selected script index upon changing printers
So that you're not getting into a state of viewing an invalid index. If you switch to a printer with 0 scripts attached, the index is still invalid, but it won't display anything then so you're okay.
2018-02-04 01:13:34 +01:00
Ruben D
91ab53e49c
Somewhat better documentation
Just some stuff that I saw and thought were missing.
2018-02-04 01:10:35 +01:00
Ruben D
8525131849
Create post-processing tool button on start-up
This causes the button to display immediately on start-up if there were any post-processing scripts in the current machine. If there weren't, then no button will be shown (as specified in the QML).
Previously the QML was only loaded first upon clicking the item in the extensions menu. Now it has to be loaded on start-up in order to display that button.
2018-02-04 01:08:15 +01:00
Ruben D
09f580de70
Store post-processing script list in global stack
If you switch and such, it'll load these scripts back in. They are now persistent.
2018-02-04 00:51:43 +01:00
Ruben D
7c291e36c9
Add warning for some bug that I saw
Maybe one day someone will encounter it again and decide to fix it, but I'm lazy.
2018-02-03 23:54:18 +01:00
Diego Prado Gesto
9d267cb9c7 Check if there is any gcode in the scene before executing a post process 2018-01-31 14:36:16 +01:00
ChrisTerBeke
6c0fb110fe Add post processing source files 2018-01-09 10:31:12 +01:00