Does anyone know how to use a custom mouse cursor in python states?
I found this link: https://www.sidefx.com/docs/houdini/hom/hou/qt/getCursor.html, [www.sidefx.com] and the code there works for the most part, but the list of cursors found at the directory in the link are not all usable. "busy" and "cross" seem to work, but others return an error saying no cursor by that name was found, even though they exist in that directory.
Is this they current way of using custom cursors?
Any help is appreciated
~Sky
Python States Custom Mouse Cursor
533 2 0- playBlaster
- Member
- 18 posts
- Joined: Nov. 2018
- Offline
- playBlaster
- Member
- 18 posts
- Joined: Nov. 2018
- Offline
To answer my own question, in the case this might be helpful for anyone else having the same issue:
There is a file in the directory in the link mentioned above, ($HFS/houdini/config/Cursors) called "CursorMapping". in that file you can find all the cursor names in the first column. use that name without the .file extension in the code posted in the same link. so to change the cursor to the default arrow, the code would be:
hope that is of some help to someone.
-sky
There is a file in the directory in the link mentioned above, ($HFS/houdini/config/Cursors) called "CursorMapping". in that file you can find all the cursor names in the first column. use that name without the .file extension in the code posted in the same link. so to change the cursor to the default arrow, the code would be:
default_arrow_cursor = hou.qt.getCursor("iris") QtWidgets.QApplication.setOverrideCursor(default_arrow_cursor )
hope that is of some help to someone.
-sky
- V_HOUDINI
- Member
- 3 posts
- Joined: Nov. 2022
- Offline
-
- Quick Links