Closed fieldOfView closed 3 years ago
Unfortunatly no it doesn't work. Your solution is correct but as the PostProcessingPlugin is launched before my custom plugin, even if the code is correct the scripts are not loaded byt the PostProcessingPlugin via the function : def loadScripts(self, path: str) -> None:
2021-01-18 14:36:53,431 - INFO - [MainThread] UM.Logger.info [122]: Loaded plugin PostProcessingPlugin ... 2021-01-18 14:36:54,382 - INFO - [MainThread] UM.Logger.info [122]: Loaded plugin SimpleShapes
It doesn't work, but that is not because the PostProcessingPlugin loads before your plugin, but because the PostProcessingPlugin does not use the resource search paths correctly :-(
https://github.com/Ultimaker/Cura/blob/4.8/plugins/PostProcessingPlugin/PostProcessingPlugin.py#L145
Instead of using getStoragePath
, it should be using getAllPathsForType
. Oh well, it was worth the try.
Whoops, that's our bad :(
Here's a fix: https://github.com/Ultimaker/Cura/pull/9147
It just might be my bad ;-)
Well, we were still paying you at that time, so it's our fault :P
Nope, this was a year and 2 days after my last day on the team... But it was your fault for not spotting it in the review ofcourse. It is always your fault.
It is always your fault.
Damn right! :D
I just merged the PR.
Ok I have modified the source code V1.3.0. Don't need to use the Copy scripts function anymore. Have been removed from the menu thanks for your help @nallath and @fieldOfView
It should be possible to use your postprocessing scripts without first having to copy them over and restart Cura. Cura should be able to find the scripts from inside your plugin folder if you move your
scripts
folder to into a folder namedresources
, and add this to your plugin initialisation:Resources.addSearchPath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources"))
This will add that resources folder to the paths Cura checks for script files.