Custom cursor

Cross hair is cool but I find myself constantly wondering if I am really above what I want to click on.

Tried big cursor, too big, not a size thing.

A box would be awesome, any way to modify the mouse cursor?

I see this file
ops.generic.cursor.dat

Can’t open it though, tried open with 7zip renaming to handful of image types, no luck yet

Apparently blender used to just use the precision cursor that windows uses. That would be nice if it still did, easy to change that

Edit:
OK so I can change stuff like the cursor if I play around with what I am going to call the blender source files, pretty sure that what they are, and building it myself afterwards.

https://wiki.blender.org/wiki/Building_Blender

Big thanks to @Harley for making me aware of this and telling me where to look for cursor stuff (wm_cursors.c)

So I did a little tiny bit of research and apparently a hex editor is the type of thing that would reveal what filetype these .dat are.

Opening the smallest .dat file in the icons directory, brush.paint_vertex.alpha.dat, showed me what all of them have in common, which I am assuming is the file signature.

Problem is I have no experience, obviously, and it isn’t listed anywhere. Any help opening these .dat files? I really, really, appreciate any help.

Would be really great to change the mouse cursor. Instead of a crosshair blocking the vertex I want to select, a simple box around the bounds of the selection area, with a transparent interior, is very much an improvement.

This way, my mind gets a visual cue that the vertex is inside of my cursor, it is a completely subliminal event, rather than an active effort to try and get a headshot of the vertex when I am trying to select it.

I figure I will also give it some asymmetry if possible, in one corner, to make it a little more visible without actively searching for it.

This is what the hex editor shows for the vertex alpha paint icon, the handful of other .dat files that I opened in the icon directory share this.

56 43 4F 00 FF FF 00 00

text is
VCO�ÿÿ��
or
VCO ÿÿ

I can’t give you the help that you need, but just wanted to comment that it might be good to have some cursor options built into Blender. At the very least, maybe color inversion option so that it’s always visible no matter the color underneath.

You are still looking in the wrong place, examining those “.dat” files. The icons are not related to the cursors.

If you are able to view and edit the blender source in some way, you want to look at
…\blender\windowmanager\intern\wm_cursors.c

The particular cursor you are trying to change is on, or close to, line 540. There are comments describing the format of the cursors in the same file at around line 327

1 Like

Great thanks I left my earlier post about the dat files intact and put an edit about this new attempt I’m about to embark on at the beginning

No worries.

I still stand by my advice though, to not worry too much about the technicalities of replacing that cursor in the blender source. Instead, design the cursor in an image editor. Once you have something you like then post an image of it to this thread and ask for opinions. Some people will love it, some will yell at you that you suck (LOL). But some will give great feedback, and might give you things to help improve it. Or someone will propose something you hadn’t thought of that works better. In the end you might come up with a design that is so obviously better than what we have now that it will get replaced.

1 Like

Well I figured I had to be able to use it first to get something worth posting, currently building it, fingers crossed. Here’s what I went with for a first draft, big and small are the same, when I get something I like I’ll make the big one a little nicer maybe and make a video or something.

static char bitmap[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f,
0x08, 0x10, 0x08, 0x10, 0x08, 0x10, 0x08, 0x10,
0x08, 0x10, 0x08, 0x10, 0x08, 0x1c, 0x08, 0x0c,
0xf8, 0x17, 0x00, 0x20, 0x00, 0x40, 0x00, 0x00,
};

static char mask[] = {
0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0xfc, 0x3f,
0x0c, 0x30, 0x0c, 0x30, 0x0c, 0x30, 0x0c, 0x30,
0x0c, 0x30, 0x0c, 0x30, 0x0c, 0x3c, 0x0c, 0x1c,
0xfc, 0x3f, 0xf8, 0x77, 0x00, 0xe0, 0x00, 0xc0,
};

static char bitmap[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xc0, 0xff, 0xff, 0x03, 0xc0, 0xff, 0xff, 0x03,
0xc0, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x03,
0xc0, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x03,
0xc0, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x03,
0xc0, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x03,
0xc0, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x03,
0xc0, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x03,
0xc0, 0x00, 0xf0, 0x03, 0xc0, 0x00, 0xf0, 0x03,
0xc0, 0x00, 0xf0, 0x00, 0xc0, 0x00, 0xf0, 0x00,
0xc0, 0xff, 0x3f, 0x03, 0xc0, 0xff, 0x3f, 0x03,
0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0c,
0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

static char mask[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xc0, 0xff, 0xff, 0x03, 0xc0, 0xff, 0xff, 0x03,
0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
0xf0, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x0f,
0xf0, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x0f,
0xf0, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x0f,
0xf0, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x0f,
0xf0, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x0f,
0xf0, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x0f,
0xf0, 0x00, 0xf0, 0x0f, 0xf0, 0x00, 0xf0, 0x0f,
0xf0, 0x00, 0xf0, 0x03, 0xf0, 0x00, 0xf0, 0x03,
0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
0xc0, 0xff, 0x3f, 0x3f, 0xc0, 0xff, 0x3f, 0x3f,
0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc,
0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0,
};

It might be a littler easier to imagine what it looks like if you posted a copy of the IMAGE of the cursor. LOL

4 Likes

Yeah I was sitting there waiting for it to finish building, excited that I got something going so fast I expected to take a few days to get going.

It works, a little funky. Needs a bit of work. The selection is way outside of the cursor, the stuff under the bitmap and mask code probably affects this?

Can copy paste code into that cursor maker. Really handy. Thanks a ton dude, it would have taken forever to find what I needed to change without being told exactly what file and exactly what line.

PrtScn wasn’t capturing my cursor so this is a snapshot from vlc of a video from OBS, so poor quality

Hey, that’s kinda neat - looks like a magnifying glass.

The location of the “hotspot” is specified in the cursor data. You assigned that bitmap and mask data to a structure. Two members are small_hotx and small_hoty. I’m guessing you’d want to assign 7 to both of them (top-left corner is 0,0) to put it in the center. And 15 and 15 to big_hotx and big_hoty while you are at it.

1 Like

Yeah that’s what it’s set to I didn’t change it. The whole thing is way bigger on all sides, and it’s no different in the normal beta either. I guess thats just the way it is.

What I mean is, if I single click, way far away from a vert, like the same distance away as the size of the 3dcursor, it selects it. Works fine, always selects the closest vert when there’s a bunch of them close together.

Wouldn’t mind turning down the… Deadzone? Alivezone? On the select tool for when I want to click empty space to deselect. Low on the list of things.

Going to make some cursors tomorrow, using the whole 16x16 space since I know how to place the hotspot now

sorry for necroing a 5yo thread, but this one was closest to the issue I ran into:
“huge” cross hair cursor in sculpt mode which constantly is getting in the way for me, and there doesn’t seem to be an option to turn this cross hair off and leave just the brush circles, unchecking the “cursor” option in the tool tab leads to switch to Windows default arrow cursor, which isn’t ideal to say the least

so, is there a simple way of getting rid of the cross hair cursor in paint/sculpt modes without editing source code?

I added the ability to choose from a list of cursors in my custom build here.

Cursor files are different in Mac and Linux, so it does a lot less there, but is fully functional in Windows. I’m finishing up on the latest version, which will be for the upcoming release of Blender 4.1.

13:24 of this video:

You can change the paint crosshair to any of the existing cursors available in Blender and some more that I made. Other than myself, nobody has expressed interest in this feature, and since it works for Windows, I didn’t look much further into changing the cursor filetypes that Mac and Linux use. I didn’t even realize they are different until testing it out on those platforms. I think it actually uses a lot more of the OS cursors for them, which should be good if you can modify those.

So, hopefully you use Windows. Otherwise your options could be pretty limited with changing the paint cursor with my build. I’ll look into it either way, but unlikely to figure anything out immediately.

thank you for the reply, but I wanted something very simple without extras, just remove the pointless cross hair in the sculpt mode, and looking at your youtube video I saw only options to replace them with another cursor, but there was no empty/blank cursor option

so I looked at the changes to the source and figured out that the suggestions from Harley from 5 years ago are outdated, and changing the bitmap arrays in wm_cursors.cc does nothing for windows build, at least I couldn’t see any effect

my solution that worked ended up being:
edit the crossa.cur file here - C:\blender-git\blender\release\windows\icons\cursors using an online cursor editor to make it empty blank/transparent, then delete the previous test build (in my case C:\blender-git\build_windows_x64_vc16_Release), then run build (make), and the resulting build now doesn’t have the annoying cross hair in sculpt/paint modes

edit: would be great to know where the cursor files end up being compiled into (that is beyond my coding skills), so, perhaps, the compiled file could simply be copied into an installed Blender as a quick fix if that is possible

Blank cursor is a cool idea, I’ll add it to my 4.1 build. Closest I had to that is a dot, just a small dot that is a few pixels in diameter. If I knew you were compiling I would have told you more about what you can do, I just assumed since you didn’t want to edit source you had zero interest in compiling. Far as I’ve seen, you can’t change anything post-compile and affect the mouse cursors. Long term I’d like to add that to my build, but it is low priority barring any real interest / development.

My build is free, and I guarantee you will find something you like from the options I made for selection, mouse, camera, repeat, and user interface. Defaults are the same, so nothing will be different unless you want it to be. There’s also source code if you want to modify something or simply compile it yourself. Have a look at my source if you’re interested, you will see a lot of things in there including how I changed the cursors.

Whether it is my build, or something else, there’s two main things you need to make sure of if you are compiling Blender.

FIRST THING
Which version did you check out? If you followed along with the wiki, you probably checked out and compiled the “main” branch which is currently in alpha 4.2. This is for working on Blender (bugfixes, performance, new features). It is relatively unstable and unsuitable for working with Blender to make art, assets, etc.

The wiki doesn’t say, and I don’t know why, but what you need to do is a Tag Checkout of a Release version. Then modify the cursors you want to change, and compile that. A git branch -r will show you the different version numbers you can check out as well, but that will get you the beta or release candidate version of an upcoming release, not the stable release of the version you want.

You can see the latest stable tags here:

The newest one isn’t necessarily the newest one, either. Right now the LTS of versions 3.6 and even 3.3 are more recent than the latest 4.0. So keep that in mind depending what you want to use.

I do tag checkouts like this:

git checkout tags/<tag> -b <branch>

You will need to do a make update to get the latest tags to work as well.

Example:

cd blender-git\blender

make update

git checkout tags/v4.0.2 -b 402

After the make update you will see it tell you all kinds of stuff, including new tags. The third line I typed above will give you a new branch called 402, in addition to the main branch that you get by default. You can see which branch you are currently on by doing git branch

SECOND THING
If you want to render anything, chances are you want to use Cycles on your graphics card rather than your CPU. That means doing some more downloading, installing, and configuring things. Depending what computer that you, future you, and whoever else using your build is likely to have inside it, this will be different. Or you can just do all of it and spend a lot more time compiling stuff you never use. If you have Nvidia, you can save a lot of compile time by editing CmakeCache.txt and removing the CUDA binaries your graphics card doesn’t need. AMD probably has similar time-saving techniques but I’ve always just compiled everything for my builds.

Follow this closely as you can, easy to overlook something like installing a version that is newer than Blender likes:

https://developer.blender.org/docs/handbook/building_blender/cycles_gpu_binaries/

CUDA versions for each Nvidia GPU:

Before compiling everything, just do a make release nobuild and watch what it tells you about Optix, CUDA, HIP, oneAPI, etc. If it can’t see something you need, it will tell you. If you don’t plan on using a particular type of GPU, don’t worry about those. oneAPI is not that important, Blender will compile those binaries at runtime if needed, and then you are good.

To see if your build can render Cycles correctly with your GPU:

  1. Edit→Preferences→Addons

  2. Enable addon for Cycles called “Render – Cycles Render Engine”

  3. Click on the tab for whichever applies to you (CUDA, Optix, HIP, oneAPI)

  4. If you see your GPU listed, enable it by clicking the checkbox

  5. Do a test render of something, set Render Engine to Cycles and Device to “GPU Compute”, not CPU

ONE MORE THING
You got 10GB of library and source files like I do, and you were able to compile the main branch, if not more than that. Surely, there is something else about Blender you don’t like. If all you need is a blank cursor for paint, I’ll have a build that does that for 4.1 very soon. OR, fix something else you don’t like.