Cura 3.0.4, Linux, and Post Processing scripts

Discussion of Ultimaker's open-source Cura software
Post Reply
GrueMaster
Reactions:
Posts: 196
Joined: March 15th, 2017, 8:46 pm
Location: Oregon
3D Printer(s): HICTOP 3DP-17

Cura 3.0.4, Linux, and Post Processing scripts

Post by GrueMaster » November 14th, 2017, 2:14 am

Thought I'd document how to install post processing scripts outside of what is bundled with Cura 2.x/3.x appimages on Linux.
First, Cura stores it's config file in the home (~) directory under ~/.cura/<ver> for 15.xx versions, and in ~/.config/cura/<ver> for 2.x/3.x releases. But it stores the bulk of its settings, plugins, user-defined stuff (printers, materials, extruders, etc) in ~/.local/share/cura/<ver> (where <ver> is <major>.<minor> release - ex: 3.0).

If you download additional plugins via Cura, they are installed in ~/.local/share/cura/<ver>/plugins/<Plugin>. This includes plugins like Auto Orientation, Barbarian, etc.

The tricky part is post processing scripts, like Change Filament At Z Cura Plugin or others. The problem is that the Post Processing Plugin is itself a front end to several scripts, but it currently only looks at the PostProcessingPlugin/scripts directory that is built-in to the AppImage.

One solution is to install Cura, but currently that requires a lot of work, either downloading all of the various source trees that make up Cura and building from scratch (did it once - very painful even for a developer unless you are actively developing on Cura), or cheating by copying everything out of the AppImage while Cura is running (having an option to install from the AppImage would be really nice - hint hint).

My solution is more of a hybrid of the latter. I ran Cura, and while running, I copied the PostProcessingPlugin directory from /tmp/.mount-<random>/usr/bin/plugins/plugins/ to ~/.local/share/cura/3.0/plugins/, then edited the PostProcessingPlugin.* and the plugin.json files to rename it to MyPostProcessingPlugin (so that it would show up separately in the Cura Plugins menu), then I added the scripts I wanted to that tree.

Attached is my patch to accomplish this feat.
post-processing_patch.txt
(2.92 KiB) Downloaded 11 times
Hopefully, Google will pick up this, so future wayward searchers will know how to do this (my Google searches led to unhappy Linux users filing bugs). Sorry, not sure if it will be useful to Mac users.

nallath
Reactions:
Posts: 255
Joined: February 16th, 2016, 3:12 am
3D Printer(s): Ultimaker

Re: Cura 3.0.4, Linux, and Post Processing scripts

Post by nallath » November 14th, 2017, 11:35 am

Or you wait until next release where it also checks a second location for scripts, which is outside of the app image. Someone made a pull request for it. So yay for OS development.

GrueMaster
Reactions:
Posts: 196
Joined: March 15th, 2017, 8:46 pm
Location: Oregon
3D Printer(s): HICTOP 3DP-17

Re: Cura 3.0.4, Linux, and Post Processing scripts

Post by GrueMaster » November 14th, 2017, 10:54 pm

Yes, I read that online. Problem is, who wants to wait?

I just wish I had more time to dive in and do real dev stuff. 60+ hour work weeks are a bit draining currently though.

Post Reply

Return to “Cura”

Who is online

Users browsing this forum: No registered users and 1 guest