Closed Ghostkeeper closed 6 years ago
@Ghostkeeper - Thank you so much for your help looking into this - I really appreciate it!
I've tested your changes and have run into a few minor issues that I've cleaned up (i.e. the release-making script needs to copy the extruder file into the zip dir, and the extruder file isn't being copied into the correct location). My changes are here if you have any questions: https://github.com/timmehtimmeh/Cura-Dremel-3D20-Plugin/tree/Ghostkeeper-fix_installing_profiles
I'm not sure if I'm missing something, but when I clear out Cura 3.4's caches, and install the plugin with these fixes the quality profiles still seem to be the default ones (I'd expect there to only be 3 selections for the 3 profiles instead of the six I'm seeing), and the dremel_pla file doesn't seem to be loading. I'll keep banging on it, but if you have a moment here's a curapackage version of the code contained in the Ghostkeeper-fix_installing_profiles:
~link redacted to avoid confusion~
If you're too busy I completely understand and no worries - thanks so much for the help so far =)
In my branch I reverted the call to _onInitialized as that leads to the following sequence:
Alternately, If the files are installed in the init function then it seems that Cura initializes the plugin before searching for printer definitions, and the user doesn't have to restart Cura a second time. I kept the call to check whether the plugin is active very high up in the init function and return early if the plugin is deselected by the user - thanks for showing me how to get that information! I'm completely open to alternative methods if you know of any, or arguments why this is a bad idea (i know only enough python to be dangerous =)
Cheers! Tim
@Ghostkeeper - I figured out the issues I was experiencing. Thanks again for your help!
I think I had been restarting Cura so often during development that I might not have notices that you'd need to restart Cura twice. Also, sorry about introducing a bug in your install script :disappointed: As I said, I couldn't test it.
Glad you figured it out on your own! I'm not usually very fast to react...
Hey - no worries - I'll work on making the script cross-platform. I checked the script in mostly so that I could revert in case I messed something up myself, and didn't expect anyone to use it. I truly appreciate your help!
I've released version 0.4.6 that I'm testing right now on mac and linux, and if all goes well I'll submit it to you guys for inclusion in your plugin repo!
Thanks again for your time & efforts - I've credited you & the some of the other Ultimaker guys on the "Contributors" page. =)
Cheers!
I've taken some time to fix the installation of profiles for you on the current Cura master. The profiles were not being loaded because the material diameter must be set in an extruder definition now, or the extruder definition of fdmextruder.def.json would overwrite it to 2.85.
I've also made a fix for installing the mesh. It now just creates a folder 'meshes' in the data resources path and puts the file there.
Another fix included here is to not do all of these things if your plug-in is disabled by the user. That is just a bit neater, I'd say.
This was tested on the current Master branch of Cura, set for beta release in a month and a half. I didn't test on 3.4 but I would expect that it works the same. I've also not tested the release making script tool because that only runs on Windows.