smartavionics / RawMouse

Cura Plugin that lets you use a HID mouse to pan/rotate/zoom the view
94 stars 7 forks source link

Rawmouse not loading in Cura 5 beta #20

Open scotfor opened 2 years ago

scotfor commented 2 years ago

I get the following when starting cura 5: rawmouse error

Cura 5 plugin dir is:

cura 5 plugin dir

I have it working in cura 4.13. This is the plugin directory structure:

cvura 4 13 plugin

smartavionics commented 2 years ago

Hi, yes, it's not compatible with Cura 5. I currently have no plans to use Cura 5 so I probably won't be doing the work to make it compatible myself. Sorry about that.

fieldOfView commented 2 years ago

Will you accept a PR if "someone else" does the work?

fieldOfView commented 2 years ago

Oh, wait, I see you are/have been working on it...

smartavionics commented 2 years ago

Hi @fieldOfView , yes, I am very happy to receive a PR to help make RawMouse compatible with Cura 5. As you saw, I've made a start and someone has now tried out those changes and reported that it doesn't work so there's more to do.

fieldOfView commented 2 years ago

My SpaceMouse is at my office. I'll try to have a look monday.

smartavionics commented 2 years ago

Thanks, but I think the problem at the moment is with the hidapi library I am using and until I get that fixed, it's not worth looking at the RawMouse code. Cheers, mb

scotfor commented 2 years ago

@smartavionics - thanks for working on making Rawmouse cura 5 compatible.

smartavionics commented 2 years ago

Hi @fieldOfView. Aldo, I've made some changes and it now loads the hidapi module but my guinea pig reports that it still doesn't work. Looking at the cura.log, it appears that the thread that is started to open the HID device and read HID events never actually runs. Are you aware of any differences in Cura/Qt/Python that affect thread starting/scheduling? If you have any free time and want to have a play, please pull the master branch. Cheers, mb.

smartavionics commented 2 years ago

Hi @fieldOfView , I think I have found the bug, the thread was being started but was silently dying because I was using removed methods from the QTime class. I changed QTime to QElapsedTimer and that should fix it. Just waiting for the next report from the tester...

smartavionics commented 2 years ago

I believe it's now working OK with Cura 5, try https://github.com/smartavionics/RawMouse/releases/tag/1.2.1

scotfor commented 2 years ago

Thanks Mark. It does work for me in Windows 10.

jxer commented 2 years ago

Confirmed to work in latest 5.0 win10

CE3-Caspernicus commented 1 year ago

Doesn't work for me in 5.4.0

DivingDuck commented 1 year ago

It works works for Cura 5.4. Simply install the latest version from this repository here: https://github.com/smartavionics/RawMouse/releases

CE3-Caspernicus commented 1 year ago

Here's the error in the log:

2023-10-18 18:19:03,932 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: Exception: Import error loading module RawMouse 2023-10-18 18:19:03,933 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: Traceback (most recent call last): 2023-10-18 18:19:03,933 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: File "UM\PluginRegistry.py", line 730, in _findPlugin 2023-10-18 18:19:03,933 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: module = imp.load_module(plugin_id, file, path, desc) # type: ignore #MyPy gets the wrong output type from imp.find_module for some reason. 2023-10-18 18:19:03,934 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: File "imp.py", line 245, in load_module 2023-10-18 18:19:03,934 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: File "imp.py", line 217, in load_package 2023-10-18 18:19:03,934 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: File "", line 719, in _load 2023-10-18 18:19:03,935 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: File "", line 688, in _load_unlocked 2023-10-18 18:19:03,935 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: File "", line 883, in exec_module 2023-10-18 18:19:03,936 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: File "", line 241, in _call_with_frames_removed 2023-10-18 18:19:03,936 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: File "C:\Users\skull\AppData\Roaming\cura\5.4\plugins\RawMouse__init__.py", line 4, in 2023-10-18 18:19:03,936 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: from . import RawMouse 2023-10-18 18:19:03,937 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: File "C:\Users\skull\AppData\Roaming\cura\5.4\plugins\RawMouse\RawMouse.py", line 23, in 2023-10-18 18:19:03,937 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: from PyQt5.QtCore import QObject, QTime 2023-10-18 18:19:03,937 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: ModuleNotFoundError: No module named 'PyQt5' 2023-10-18 18:19:03,938 - WARNING - [MainThread] UM.PluginRegistry._populateMetaData [824]: Could not find plugin RawMouse 2023-10-18 18:19:03,942 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: Exception: Import error loading module RawMouse

smartavionics commented 1 year ago

Hi @ledgend78 , are you using the latest release as suggested by @DivingDuck ?

DivingDuck commented 1 year ago

This looks bad. Are you sure having the latest version correctly installed?

Maybe this will help you:

Please make a save copy of your file C:\Users\skull\AppData\Roaming\cura\5.4\plugins\RawMouse\config.json and then delete the complete directory: C:\Users\skull\AppData\Roaming\cura\5.4\plugins\RawMouse C:\Users\skull\AppData\Roaming\cura\5.4\plugins\FastView

In addition delete the files (if exists): C:\Users\skull\AppData\Roaming\cura\5.4\plugins\.gitignore C:\Users\skull\AppData\Roaming\cura\5.4\plugins\README.md

Now download the plugin from here (Source Code (zip)): https://github.com/smartavionics/RawMouse/releases/tag/1.2.1 and unzip the file. Now copy the complete folder RawMouse-1.2.1 into the plugin directory: C:\Users\skull\AppData\Roaming\cura\5.4\plugins\

It should look like: C:\Users\skull\AppData\Roaming\cura\5.4\plugins\RawMouse-1.2.1

The last step is to copy your previously saved configuration file config.json to this location: C:\Users\skull\AppData\Roaming\cura\5.4\plugins\RawMouse-1.2.1\RawMouse\ (this step us only needed if you had modified your configuration file)

Before you start Cura again: please rename or delete the log file C:\Users\skull\AppData\Roaming\cura\5.4\cura.log. A new log file will help to find problems easier.

By the way, I haven't test the plugin for Cura 5.5 beta. So it is possible that the plugin do not work for this version too. I'm running Cura 4.13.1, 5.3.1 and 5.4.0 on Windows10 pro (x64) and for all of this versions the plugin is working fine.

I'm using a slightly modified version of the config file in case you have a 3Dconnexion Space mouse. With this setup the 3D space mouse behave like in an CAD system like Fusion360: config1.2.1.zip

Don't forget to deactivate the 3Dconnexion driver menu for Cura:

3dconnexion_cura

DivingDuck commented 1 year ago

@smartavionics Oh, I was a little bit late. Hope you are doing well. :)

smartavionics commented 1 year ago

Thanks @DivingDuck for supporting this user. I'm fine but don't have a lot of free time for Cura related stuff right now.

CE3-Caspernicus commented 1 year ago

It worked, thank you

On Thu, Oct 19, 2023 at 1:13 PM Mark Burton @.***> wrote:

Thanks @DivingDuck https://github.com/DivingDuck for supporting this user. I'm fine but don't have a lot of free time for Cura related stuff right now.

— Reply to this email directly, view it on GitHub https://github.com/smartavionics/RawMouse/issues/20#issuecomment-1771639804, or unsubscribe https://github.com/notifications/unsubscribe-auth/APK35TMRYNLWCG3Z7OUSVCDYAGCWJAVCNFSM5UEXTWEKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZXGE3DGOJYGA2A . You are receiving this because you were mentioned.Message ID: @.***>

CE3-Caspernicus commented 1 year ago

But all the controls are inverted, how do I change that?

smartavionics commented 1 year ago

Try reading the README.md file (as displayed at https://github.com/smartavionics/RawMouse) and you will see the answer.