Python States Custom Mouse Cursor

   534   2   0
User Avatar
Member
18 posts
Joined: Nov. 2018
Offline
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
User Avatar
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:

default_arrow_cursor = hou.qt.getCursor("iris")
QtWidgets.QApplication.setOverrideCursor(default_arrow_cursor )

hope that is of some help to someone.

-sky
User Avatar
Member
3 posts
Joined: Nov. 2022
Offline
hey @playBlaster, Thanks for the post. Is there a way to increase the cursor size using python states? I am having trouble working with a small cursior and i couldent find a specific setting to explicitly increase the cursor size.
  • Quick Links