Closed ParkerK closed 2 years ago
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
Definitely looks interesting, but we decided to be up to the Cura 5 only. Because we want to prevent major issues with both versions support. Anyway, thanks for your time and this code changes. Lets keep it in a pull requests history.
Description
Using https://github.com/fieldOfView/Cura-OctoPrintPlugin/blob/release/OctoPrintOutputDevice.py as a reference, I made some changes that allow the plugin to work on both Cura 4.9+ and Cura 5.0 without needing different versions in the marketplace.
If you would rather have different versions for the plugin, please feel free to ignore/reject this PR.
This uses Python 3.6's 'ModuleNotFoundError' (Cura 4.9 uses Python 3.8, not sure what the version was before that) to try to import PyQt6. If it fails and throws
ModuleNotFoundError
, then it will import PyQt5.There is also a second directory called
qml_qt5
that will be used instead ofqml
is PyQt5 is used.Testing
I was able to slice and print a model in both Cura 4.13.1 and Cura 5.0 beta using these changes without issue. I was also able to add/edit/remove a printer. Feel free to test more thoroughly, but everything appears to be functioning with these changes.