Page MenuHome

UI WIP - Changes to Cursors
AbandonedPublic

Authored by Harley Acheson (harley) on Jul 7 2019, 3:15 AM.
Tokens
"Love" token, awarded by icappiello."Like" token, awarded by billreynish."Love" token, awarded by Zoot."Like" token, awarded by duarteframos."Love" token, awarded by amonpaike."Love" token, awarded by jonathanl."Love" token, awarded by Tetone."Mountain of Wealth" token, awarded by EitanSomething.

Details

Summary

Mostly just something to play with and give feedback on.

This is an attempt to edit the cursors in such a way as they can be used without the color-reversing we are doing for Macs. One unified set that might be (hopefully) suitable for all platforms.

The cursors in this patch look like the following:

I don't think we are using all the cursors shown, but most are edited in some way. The biggest noticeable changes would be to crosshairs, knife, text, paint, and eyedropper.

The crosshair cursor in action:

Eyedropper:

Knife:

Text:

The hope is that if the current cursors could be a updated and then later add an empty (blank) cursor and a few more painting/ sculpting alternatives.

Diff Detail

Repository
rB Blender

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Thanks to some feedback from @LazyDodo (LazyDodo), have lightened the color of the knife handle to increase contrast.

Updated zip of windows cursors (that have to be copied to "blender\release\windows\icons\" folder before compiling)::

A comparison of some of the changes. Current on left, new on right:

@Harley Acheson (harley) Will you add an interface where the user will be able to choose which icon he wants to use in a specific editor? (as I'm seeing similar icons for the same purpose)

@ThinkingPolygons (ThinkingPolygons) wrote:
..as I'm seeing similar icons for the same purpose...

Yes, one set of duplicates is a bit boring. There are two "text editing" cursors, one suitable for dark backgrounds and the other for light backgrounds. I haven't yet put in that logic though. Windows users would instead see a fancier, OS-supplied one that works on any background because it XORs itself. That technique doesn't work in other places though as this does not work on middle grey (becomes invisible).

The other duplicates are for crosshair cursors. I have tried uncountable ways of doing that and have settled on just three that are are visible on any background but offer very different levels of intrusiveness. And then I have made Windows-specific versions that have multiple resolutions and also use transparency but still match the simple monochrome ones.

The idea is that I would offer a choice of cursors for some things. So for painting and sculpting we could offer the three I have made along with none at all. I'm not exactly certain how many places people might want to select a cursor though. Maybe you can offer some suggestions? You might want one for painting and a different one for sculpting? Anything else? I'm assuming the choice itself could be made in Preferences but also directly in some editors as well? Again, any help , input, and suggestions are more than welcome.

A little nitpicking, I'm sure it is a matter of personal preference, but I think the new knife cursor is not as elegant as the previous.
Something about that 45º slanted tip looks off, like it is piercing through something. A pointier tip helps distinguish were the "hotspot" active pixel is.

I see you use mostly straight lines without curves, so some of these may not suit your style, but I've also included a few straight segments options for your consideration.

Here are a few examples, left-most is @Harley Acheson (harley) current proposal, others are mine

You might want one for painting and a different one for sculpting? Anything else?

Edit mode.
I've been looking for a way to change the cursor of the edit mode for a long time now, in fact, I've seen quite a few users asking for it as well. So yeah, sculpting, painting and edit mode are the ones that urgently need it, imo.

I'm assuming the choice itself could be made in Preferences but also directly in some editors as well?

In the preferences might be enough, but if we could do that directly in the editor as well it would be a nice touch and quite handy. 🙂

A little nitpicking, I'm sure it is a matter of personal preference, but I think the new knife cursor is not as elegant as the previous.
Something about that 45º slanted tip looks off, like it is piercing through something. A pointier tip helps distinguish were the "hotspot" active pixel is.
I see you use mostly straight lines without curves, so some of these may not suit your style, but I've also included a few straight segments options for your consideration.
Here are a few examples, left-most is @Harley Acheson (harley) current proposal, others are mine

Not nitpicking at all! Every one of yours looks better than mine. I'd be the first to admit that I'm not that good at this. I'm assuming that once I get the bones of all this in (if possible) then others might come behind me and replace the cursors with better versions.

But damn, all of your alternatives are so inspirational. Mine looks so axe-like next to yours. I'll see if I can improve it. The larger high-bit depth ones can definitely allow all of yours, but smallest mono versions might be fun. LOL

Well not really my area of expertise either, but I do enjoy it as a hobby.
Either way I made them in Inkscape, so they are available as vector graphics, should scale well to other sizes, though readability at lower res may dictate manual per-pixel adjustments.

I'll leave them here if you have any use for it

@ThinkingPolygons (ThinkingPolygons): ...looking for a way to change the cursor of the edit mode...

I didn't know that edit mode was an issue. So I'll aim for allowing a choice of different cursors for each of edit, paint, and sculpt. With paint and sculpt getting additional choice of "none".

Once I have that ability in the patch we can then see if we need to improve these cursors, add more, etc. I'm running out of ideas with them so it might need a fresh set of eyes on it. Especially eyes that spend a lot of time editing, painting, and sculpting.

@Duarte Farrajota Ramos (duarteframos) : ...but I do enjoy it as a hobby.

But then please please please lend a hand....

Lets just ignore the lowest res version (which is just 16x16 with each pixel just black, white, or transparent) for now.

Instead lets look at the Windows-specific fancier format. For these we have 32 bits at each pixel to play with, so full color including 256 levels of opacity just like a regular PNG.

For the smallest size we are trying to fit in a box about 19 x 19 pixels. bigger or smaller by a pixel (or so) is fine too.

For the larger size we just want to stay around 30x30 or so. It could hit 32 in either direction if need be.

So if you could try to hand-tune one of your knife ideas inside these two boxes that would be awesome! Of the ideas you showed earlier the ones with lighter-colored handles would work a bit better than darker because it would allow for better contrast when used on a dark background.

Will do, I'll be glad to help with my limited knowledge.
I'll probably be a bit busy next couple of weeks so I can't promise much, but I'll try to squeeze in something. After that I'll probably have some more free time.

Are these all the required cursors for now?

I'm not a big fan of pictorial cursors, I'd much rather have abstract crosshairs/arrows with a pictorial representation as an "overlay" drawn to side and out of the way. What are your thoughts on this?

I didn't know that edit mode was an issue. So I'll aim for allowing a choice of different cursors for each of edit, paint, and sculpt. With paint and sculpt getting additional choice of "none".
Once I have that ability in the patch we can then see if we need to improve these cursors, add more, etc. I'm running out of ideas with them so it might need a fresh set of eyes on it. Especially eyes that spend a lot of time editing, painting, and sculpting.

Sounds good.

The good thing about the edit mode is that we are not looking for a "fancy" cursor. Just an additional option to choose the regular "arrow" cursor would be good enough, I think.

@Duarte Farrajota Ramos (duarteframos) - Are these all the required cursors for now?

More or less. LOL. There are are some other lesser-used ones that I haven't bothered making fancier versions of too. You'll see all them as the very blocky things in the first post.

I'd much rather have abstract crosshairs/arrows with a pictorial representation as an "overlay" drawn to side and out of the way. What are your thoughts on this?

I like those too, but I *think* that would be a second round of changes later. This is more like an evolutionary drop-in replacement that I am hoping is easier to get approved. Arrow with mode indicator (like Gimp) would involve more thought for the non-Windows users. For example for our cross-platform cursors we'd have to use the 32x32 bitmaps now reserved for "large" versions for those instead. Or add yet more options.

Again, I think that is a better road to get to eventually. But does require a lot of design for those overlays. I really don't mind doing this work now and then doing it better next year. As long as we keep getting better.

I see, fair enough.

I'll try to do a few mockups in the coming days, and post them here when ready.

@ThinkingPolygons (ThinkingPolygons) - Just an additional option to choose the regular "arrow" cursor would be good enough, I think.

LOL. I had already forgotten that we want to have the regular arrow cursor as an option. Thanks for the reminder!

@Duarte Farrajota Ramos (duarteframos) -- I'll try to do a few mockups in the coming days, and post them here when ready.

Following are my current iterations as PNG files. Either to give you a sense of the size or to edit directly if you like.

This is the small one, about 20x19 in a grid that is 32x32:

and this is the larger size, here 30x27, within a 48x48 pixel grid:

Mostly more changes to the knife cursors, based on feedback from @Duarte Farrajota Ramos (duarteframos) (Duarte Farrajota Ramos)

Updated zip of windows cursors (that have to be copied to "blender\release\windows\icons\" folder before compiling)::

Mostly cleanup. Removing a couple cursors. Some work on Knife and Open Hand. Removing cursor that was going to be used for drag and drop because that needs a separate rethink.

Updated zip of windows cursors (that have to be copied to "blender\release\windows\icons\" folder before compiling):

Will probably work on cursor selection in the UI next.

Are file names hardcoded? Should I use the same for export, or am I free to name them more sanely?

I was thinking of appending suffixes for size like L or S, and name all families before variant like like ArrowUp or ArrowDown instead of DownArrow, so they are sorted together

@Duarte Farrajota Ramos (duarteframos) :
Are file names hardcoded? Should I use the same for export, or am I free to name them more sanely?
I was thinking of appending suffixes for size like L or S, and name all families before variant...

Hey, anything you think better or saner is always welcome. To be honest I really hadn't given the "cur" filenames much thought at all, so any thought by anyone would be improvement. LOL. Feel free to offer help of any and all kinds because it is all appreciated. Especially if you think we need to add more cursors of different types or anything at all.

Windows cursors getting a bit more love. Every one now has three sizes (for differing monitor DPI). "Open hand" got edited again.

Knife cursor completely replaced by one made by @Duarte Farrajota Ramos (duarteframos):

Updated zip of windows cursors (that have to be copied to "blender\release\windows\icons\" folder before compiling):

Using reversed-color version of "Text caret insertion" (ibeam) cursor for text editor or console if using dark text on light backgrounds. Only applies to Linux really now though, as both Windows and Mac are now each using nicer OS-supplied cursors for this that XOR.

Sorry for the lack of progress, not much free time right now, but here are a few first crude mockups I managed to sketch.
Work in progress at the moment, most don't work that well over dark backgrounds, so definitely needs adjustments.

Do we have support for .ani animated cursor files in Blender? Would be useful for hourglass/busy type of icons

@Duarte Farrajota Ramos (duarteframos) - but here are a few first crude mockups I managed to sketch...

Wow. I love how yours all have a unified and artful look to them. A nice matching set. And something I really wouldn't be able to do to be honest.

When I was playing with your knives earlier, it seemed quite nice and straight-forward to make the multiple sizes I need from an SVG source in Inkscape.

Do we have support for ".ani" animated cursor files in Blender? Would be useful for hourglass/busy type of icons

We do and I tested it fine. I tried making an animated "wait" cursor with the Blender logo and was disappointing with my result. Again would just have been my lack of artistic skill. But that's okay; I code fairly well and ride a bike quickly. LOL

@Duarte Farrajota Ramos (duarteframos) - but here are a few first crude mockups I managed to sketch...

When I was playing with your knives earlier, it seemed quite nice and straight-forward to make the multiple sizes I need from an SVG source in Inkscape.

Yes, I've setup a new sheet for these, they all batch export to corresponding PNG files automatically, so should be quick to reiterate.
Multiple sizes should also be easy, probably just a matter of adjusting line widths, otherwise we can just scale export. I'll share my new sheet later

Those animated Blender icons are actually pretty cool, good to know they're supported, maybe I can design a few later.
This is really not my area either, so if this catches on I was hoping someone more educated in icon design steps in, I've done a few before for personal use, but if this gets in Blender exposition will be a lot bigger, so it may require more expertise.

A few questions that came up:

  1. Are all cursors shown here currently used in Blender? I've been trying to understand where/when they are shown just for reference, but couldn't figure out some of them
  2. Are the split cursors shown when trying to split an editor area?
  3. If so, do we/will we have granular enough control to display a different cursor when splitting or joining? Not a "feature request", just wondering if I should bother. It could give a valuable feedback in an operation that is often confusing for newcomers.
  4. Under what circumstances is the Hand cursor used? Could not figure it out.

@Duarte Farrajota Ramos (duarteframos) : Yes, I've setup a new sheet for these, they all batch export to corresponding PNG...

Awesome! Mac are now using vectors for cursors and I have read (somewhere, on a link I can no longer find) it is a simple process to go from inkscape to new Apple cursor, only requiring one command-line utility (maybe to set hotspot, but not sure). So hopefully there will be a Mac dev who improves theirs as well later on.

Those animated Blender icons are actually pretty cool, good to know they're supported, maybe I can design a few later.

It was fun to play with but a bit tedious to put together. I thought my idea was okay but once I was done it was missing contrast with the background so looked flat and crappy. But mostly needs someone to design something nicer and better. LOL.

I was hoping someone more educated in icon design steps in...

Yes, I was always assuming that I'd get the needed code changes and get this working, but that someone would later just replace all my crappy cursors with better ones. But I'd much rather start with yours, since they look to be purposefully designed, versus mine which are cobbled together good enough to be functional only.

Are all cursors shown here currently used in Blender?

Most of them. Although this patch hooks up a bunch. I have since taken "comb" out of the patch - it was an amusing flourish to play with but probably not useful. But we can add as many as you wish.

Are the split cursors shown when trying to split an editor area?

The two "splitters" and four "direction" cursors are now shown just before, and during an editor split or join. You can see them illustrated here: https://docs.blender.org/manual/en/dev/interface/window_system/areas.html

do we/will we have granular enough control to display a different cursor when splitting or joining?

We do have a lot of control in there and lots of leeway to improve it if you have ideas as I was fairly recently in that code. For me personally the only "missing" thing is a cursor to show when hovering on that split/join action area. It now just shows the editing "cross" cursor but I have no idea what single thing could be shown there to indicate all that happen with those corners.

Under what circumstances is the Hand cursor used? Could not figure it out.

Personally I don't think we need that thing, but Mac people do like it for "moving" instead of showing an (ugly) four-headed arrow. You can currently see it in only one place I think. If you File/New/2D Animation. Then use the tools on the left to add an "Arc". After drawing one out, but before confirming it with Enter or MMB, you can drag the ends or a control point. For some (unfathomable) reason the ends are dragged with 4-headed arrow while the point controlling the bend is using a hand cursor.

The two "splitters" and four "direction" cursors are now shown just before, and during an editor split or join. You can see them illustrated here: https://docs.blender.org/manual/en/dev/interface/window_system/areas.html

Of course silly me. Just tested in 2.79 instead of looking at 2.8 also. Now I have seen them in action

Personally I don't think we need that thing, but Mac people do like it for "moving" instead of showing an (ugly) four-headed arrow.

I do prefer the "ugly" arrows myself eheh, but I'll try to improve those as well.

I should have some free time tonight (I hope) so I'll try to make some more progress.

BTW, what do you use to generate the .cur and .ani files? I generally use RW Cursor Editor which works fine for me, no complaints, just wondering if there is a "more official" "professional" way, or some kind of command line utility

@Duarte Farrajota Ramos (duarteframos) : I do prefer the "ugly" arrows myself eheh, but I'll try to improve those as well.

Grease Pencil will be getting lots of changes so I suspect that will all change. But nice to have these all these things looking nicer regardless of what they prefer.

I generally use RW Cursor Editor...

I've been using the same thing. It has some limitations and quirks, but I find it fun to play around with. Although some things I have had the best result by exporting from inkscape rather than trying to draw something complex inside it.

Tweaked some of them a bit for better dark background support, plus a few new ones in contrasting situations.

Closeup

Original 48x48

Damn, those are some sexy cursor goodness. We seriously need to channel this talent of yours. Are there are any other cursors you think we need or would just be cool to have? Whatever it is I can hook it up.

For example you might think of a nicer way to indicate area scaling. Or the one used when we drag-scroll property values - just the left/right arrow but could be something that indicate increasing on the right and decreasing on the left. Or there might times when showing some state, like a change of behavior when holding shift. My “comb” cursor seemed a bit dumb, but there might be some modal operations that could something special. I remember Google Earth had a “ruler” cursor while measuring...

Here are tweaked versions for dark and light backgrounds, plus a few new ones. I think these are it for now, I can design more if needed in the future.



I've got them in raster format already, now I only need to make the .cur files for these which is laregely manual process., I'll share them as soon as I get the opportunity, along with the source vector .file

@Duarte Farrajota Ramos (duarteframos) > Here are tweaked versions for dark and light backgrounds, plus a few new ones.

You are a star. Thank you for all this beautiful work.

I think these are it for now, I can design more if needed in the future.

Awesome!

I've got them in raster format already, now I only need to make the .cur files for these which is laregely manual process., I'll share them as soon as I get the opportunity, along with the source vec

Again, I appreciate all you have done and whatever you can do. If you run out of time or just need a break I can also do that manual work of getting them into "cur" files or help you in any other way you need.

Cheers, Harley

A few slightly tweaks for pixel-perfect tips on arrows. We were getting "double pixel" corners which are harmful for hotspot placement.

I can't tell when I'd get to finish them all, so in case you are eager to try it out I'll leave them here; you will probably be quicker than me.

Instructions for use of vector SVG file in Inkscape:

  1. Make sure master layer Backgrounds is off (so cursors are on a transparent background)
  2. Turn on layer Cursors
  3. Lock all layers except sublayer Slices under Layout
  4. Slices are whitish for visibility purposes. Select one of them and change its color to full transparency so cursors don't get a faint backdrop (swatches should take care of the rest automatically).
  5. Now select all slices (Ctrl+A should do it if all other layers were locked)
  6. Open the Export PNG Dialog from the file menu or with Shift + Ctrl + E
  7. Tick the option Batch export ## selected objects (should be 54 on original file)
  8. Press the Export button and a new directory called Raster should be automatically created next to the current file
  9. Folder will containing all cursors PNG files with suffix _L for large size (48x48) and _M for medium (32x32).

Now the hard work to manually generate .cur from them assigning hotspots

Zip File containing SVG file, latest generated rasters and a demo images

Anyone else more talented than me feel free to improve in any way necessary

@Duarte Farrajota Ramos (duarteframos) :

I did some tests in Blender with your (32x32) cursors and I honestly could find nothing to criticize. Every one feels and looks much better than the ones I was cobbling together.

The only detail to keep in mind is that we will need one more size. Your "M" version on 32x32 field are a normal size for a regular DPI screen, the "L" ones (on 48x48) are 50% larger and should come in handy. But we'll also need ones that are exactly twice as large as your smallest, and on a 64x64 field. This last one needed for hiDPI displays. I'm guessing we can just export your mid-sized ones to the larger size wholesale and so won't require extra work on that side.

So not a lot of choice but to align my stuff with yours. So will make room for these extra cursors and edit the backup ones (the 16x16 1-bit ones) to better match these where possible.

But we'll also need ones that are exactly twice as large as your smallest, and on a 64x64 field. This last one needed for hiDPI displays. I'm guessing we can just export your mid-sized ones to the larger size.

Should be easy-peasy, just a matter of doubling resolution for the 32x32, Here is an updated vector file plus new *_L raster exports.

@Duarte Farrajota Ramos (duarteframos) wrote: Should be easy-peasy..

If I follow the instructions perfectly (I think LOL), It might not be giving the expected output.

The export area batch checkmark properly says "Batch export 135 selected objects". Clicking "Export" does make the "Raster" folder. But is just creating 57 items inside it. I'm guessing this is caused by some name collision since there are just two of each png and these are both the same size. For example there are just two "Zoom Out" images, "Cursor_ZoomOut_M.png" and "Cursor_ZoomOut_L.png", and both are 64x64 pixels.

Sorry for the delayed response. Right you are, my mistake.

You mentioned at some point we might need smaller cursors for 16x16 so taking that into account I named mine` _M` and _L, so "retina" ones should actually _XL so they don't overwrite the 48x48 ones.
There were also some overlapping slices created by mistake that I cleaned up. Tested right now and 81 images were correctly exported for M L and XL, 27 cursors for each of the three sizes.

Here is the updated SVG and corresponding PNGs.

Let me know if something is missing

@Duarte Farrajota Ramos (duarteframos) - Sorry for the delayed response

No worries! No pressure at all.

Here is the updated SVG and corresponding PNGs.

These are awesome!

You mentioned at some point we might need smaller cursors for 16x16...

The sizing is confusing. But I should preface the following long-winded crap by saying that the sizes in your cursors are perfect.

These windows-specific cursors will have three sizes. one on a field that is 32x32, another 48x48, and one that is 64x64. Which one of these is used is actually picked by the operating system based on the DPI of your monitor. It does not depend on user preference and it doesn't care how big the cursor is inside that page of the cursor. If you have HPDI 2X it will use whatever is in the 64x64 page of the cursor.

When users select large or huge cursors in the Control Panel they are actually changing the set of cursor files. And that set of cursors has each of the images drawn larger within those same 32x32, 48x48, or 64x64 planes.

Standard practice for the 32x32 cursors is that "normal" size is in the 18-22 pixel range. Then the 48x48 is 50% larger, and 64x64 is twice as big. So again, yours are perfect.

Separate from these windows-specific full-color antialiased cursors, Blender also has a type of cursor that works on any platform. Those are more limited: each pixel can be white, black, or transparent only. so no antialiasing. The "regular" size is just 16x16 and there is a "large" size of 32x32. So there will be (rougher) versions of your cursors in this version too. But with these each will be filled with cursor, therefore the blender 16x16 version will correspond with what you have drawn inside 32x32 for the windows cursors, while the blender 32x32 "large" will correspond to what is inside your 64x64.

Let me know if something is missing

Looks great! I have now given up on trying to find some command-line tool that might help with the assembly of these things so now I am resigned to a lot of manual assembly of the cursor files from the PNGs. I still have to define some more cursors in the source to encompass all you have made. And lots of fiddling with the low-res blender cursors ahead too.

The biggest changes with this revision is that @Duarte Farrajota Ramos (duarteframos) has created a nice set of antialiased cursors in a number of sizes for us.

Therefore the default blender cursors (that work on all platforms but are only two-color and non-antialiased) have been redrawn to suit the same style. And "large" versions have been added for each of those as well.

Windows users should see a combination of OS-supplied cursors along with Duarte's custom ones, and therefore won't see the lower-res default cursors at all. Mac users will see a combination of OS-supplied cursors along with blender default cursors. Linux should mostly just notice the changes to blender cursors.

At the moment toggling "Large Cursors" in Preferences won't change the size of cursors for Windows users. That will take a bit of thought. But users with HDPI displays might see larger versions of the cursors automatically.

In total this effect is fairly subtle. You will mostly notice changes in the cursors for Annotation (and erasing annotation), Knife cursor, eyedropper, and a few you might not use often. There is a new cursor shown when scaling areas.

There are a few alternative cross cursors in here, but they are not hooked up yet. But hopefully we will end up with a small variety to choose from when doing different things according to preferences. At the moment the default cross cursor is one made to look and behave as close to what we are used to as possible.

To see this working you would need to unzip the following 21 "cur" files into your source "blender\release\windows\icons\" folder before compiling.

Note this is currently not working correctly for Mac users, who will see only built-in blender cursors (16x16 black or white only), rather than some OS-supplied cursors. But this mainly just means that the regular "pointer" cursor will looks worse than before applying the patch. Will be investigating that shortly.

Fixing a few small issues

Fixes one error that should have resulted in Macs sometimes getting the wrong cursor, but haven't yet found anything that explains why Mac are not getting any OS-supplied cursors, only Blender ones. Still investigating.

This patch now necessarily touches many more files. This is needed in order to communicate our user preference for "Large Cursors" to the platform-specific code.

We have always had the "Large Cursors" option, but that only affects the built-in blender cursors, not the OS-supplied ones. So using it was a bit funny since we have also always used a combination of cursor types. With this change the platform-specific code can (optionally) act on this preference as a hint on what cursor to use. Left off, at zero, we should treat it as default/auto. And so platform could supply large cursors if it does so automatically based on DPI. But non-zero would force them to a larger size. Just using "1" for doubled size but could possibly change later to support multiple sizes since our cursors support that (but built-in cursors do not)

So with this patch Windows users should be able to select "Large Cursors" and see large version of all new windows-specific cursors. However it doesn't (yet) work with the default OS cursors (like pointing arrow and border resize) and will continue to see the small versions. But will either figure that out or replace those cursors too.

As before you also have to unzip the 21 "cur" files into your source "blender\release\windows\icons\" folder before compiling. Zip found in a comments immediately previous.

This version does now show "Large Cursors" properly for Windows users if you click that preference in Settings. So every cursor will be shown large, even for regular pointer, resizing windows, etc.

This also means that this is fairly complete as far as addressing Windows issues. People using HD Color (HDR & WCG) should no longer have broken cursors. And those with HIghDPI systems might get nicer larger cursors automatically (I hope).

But you will need to use this updated zip file. So you'd need to unzip the following "cur" files into your source "blender\release\windows\icons\" folder before compiling.

Currently on vacations I decided to play a little more just for fun.
I wanted to try making an animated "Busy" cursor that was somewhat Blender specific without being too literal.
The idea of a spinning default cube seemed minimal enough but recognizable.

It is made in Blender itself (eat your own dog food style); not sure if this us actually usable or even desirable but I had fun, so I'll leave it here along with the source blend file.

I've been having trouble creating the .ani cursor file itself, framerate is never acceptable, it always goes too slow compared to the above gif.
Not sure how to solve, maybe it's a limitation of the .ani file format or Windows 10 itself. If anyone smarter care to solve I'll be eternally grateful.

@Duarte Farrajota Ramos (duarteframos) :

Okay that is awesome. So much better than my terrible attempt at animated blender logo.

Although... might be too evocative of the Autodesk ViewCube™.

Your attempts aren't bad at all, I found most quite adequate.

It does look a little like the Autodesk cube, I can later rework it to something different if this ever goes ahead.

@Duarte Farrajota Ramos (duarteframos) - It does look a little like the Autodesk cube

I might have spent too much time staring that cube, contemplating how we could do something similar but not infringing on their patent.

I can later rework it to something different if this ever goes ahead.

I guess Suzanne is too complex to be a spinning wait cursor? Might not look like anything that small.

I did think about Susanne but it seemed a little tacky, and it is relatively complex in terms of geometry, might not look that good as line art or at smaller scales

updating patch to compile with current master

@Duarte Farrajota Ramos (duarteframos) :
Although... might be too evocative of the Autodesk ViewCube™.

I don't want to disturb you guys but I've used Autodesk products for years and to be honest this animated cube didn't remind me to their ViewCube™ at all. Anyway, as usually is not really nice that this cursor shows up, I think in this case is preferable to use a System cursor instead of a custom, software related cursor.

@Fran Marz (franMarz) - animated cube didn't remind me to their ViewCube™ at all.

You are right. It is pretty cool.

Besides, I think it would be great to have as a "Busy" cursor, I find the design kinda appropriate.

With the current state of this patch the "busy" cursor is one supplied by the operating system (well on Windows anyway) so you get the swirling circle thing. But yes, would be nice to have something more blender-related.

is preferable to use a System cursor instead of a custom, software related cursor.

In most cases for this patch I am trying to use system cursors as much as possible, platform-specific cursors when needed, and the built-in ones as little as possible. But while making all of them as consistent as possible

Thanks for the comment!

Brecht Van Lommel (brecht) requested changes to this revision.Sep 11 2019, 7:03 PM

Seems to work fine on Linux.

intern/ghost/GHOST_C-api.h
322

This could be changed to bool cursorlarge, no need to use magic numbers for this.

intern/ghost/intern/GHOST_WindowWin32.cpp
790–791

Weird indentation, guess this patch is missing clang-format.

source/blender/windowmanager/intern/wm_cursors.c
40
/home/brecht/dev/blender/source/blender/windowmanager/intern/wm_cursors.c: In function ‘wm_init_cursor_data’:
/home/brecht/dev/blender/source/blender/windowmanager/intern/wm_cursors.c:2275:15: warning: unused variable ‘zoomout_lmsk’ [-Wunused-variable]
   static char zoomout_lmsk[] = {
               ^~~~~~~~~~~~
/home/brecht/dev/blender/source/blender/windowmanager/intern/wm_cursors.c:2263:15: warning: unused variable ‘zoomout_lbm’ [-Wunused-variable]
   static char zoomout_lbm[] = {
               ^~~~~~~~~~~
At top level:
/home/brecht/dev/blender/source/blender/windowmanager/intern/wm_cursors.c:2263:15: warning: ‘zoomout_lbm’ defined but not used [-Wunused-variable]
/home/brecht/dev/blender/source/blender/windowmanager/intern/wm_cursors.c:2275:15: warning: ‘zoomout_lmsk’ defined but not used [-Wunused-variable]
   static char zoomout_lmsk[] = {
               ^~~~~~~~~~~~
235

Can this be ghost_cursor != GHOST_kStandardCursorNotSupported?

> is a bit strange.

This revision now requires changes to proceed.Sep 11 2019, 7:03 PM

@Brecht Van Lommel (brecht) - Seems to work fine on Linux.

Thanks for trying it! I'm mostly just glad that it compiles okay on Linux. Had to touch files for Mac and Linux and just hoped to not wreck anything. LOL

Will look at the issues raised fairly soon. I'd like to keep this up-to-date but still don't see a path to acceptance. This is complex in that it changes all the cursors shown to all users, but gives most benefit to Windows users (and fixes a couple of bugs for them).

I could break it up in pieces a bit, but not sure that would work well either. So could have a patch that does nothing but change the built-in cursors. That would be fine if people preferred them. but the "look" of them is mostly to keep them consistent with the windows-specific versions.

Could make a patch that changes no built-in cursors and only adds windows-specific ones, but that would then leave the look of them a bit different between platforms.

Updated with current master.

A couple 32x32 blender cursors that I needed to fix.

Addressed Brecht's concerns, except have not (yet) changed cursorSize to largeCursor.

As always, this requires that you unzip the following 24 "cur" files into your source "blender\release\windows\icons\" folder before compiling.

Add one missing 32x32 version of blender cursor: Hand

Changed the various params that forced large cursors to bools as per @Brecht Van Lommel (brecht)'s suggestion.

Small changes to large versions (32x32) of blender-type cursors for knife, paintbrush, eraser, and stopsign to make them more consistent with small versions and with (fancier) Windows-specific versions.

I am not able to test these since I don't have Windows handy. But, the concept seems good. I think we agreed that it's acceptable to store cursors separately for each OS, so this should be ok.

Once this is then merged, we should add high-quality cursors on Mac and Linux too.

I was able to test this again in Mac - the native Mac cursor seem to work correctly now.

We agreed that this approach is alright - we just need to add support for high def cursors also on Linux and Mac after this is merged.

After that, the next job is to hook up cursors to many more areas and tools, such as using the eraser cursor for the eraser GP tool (just as an example, there are dozens and dozens of more places like this)

Then we also need to make sure the paint modes don't use the arrow cursor, and that the cursors in general follow the tool rather than the mode.

I committed a refactored version of this patch, in multiple commits.

There are a few things I intentionally left out.

  • Code that uses a different text cursor depending on the background color, I don't think we need to do this.
  • Don't use pointer.cur for the default cursors on Windows, I don't see why we would need to override that cursor.
  • Left out the change to make the Large Cursor option work for GHOST standard cursors. Really we should not have this option at all. Its only purpose now is to work around issues where our custom cursors are not correctly scaled following DPI, and I'd rather keep it limited to that. Then we can later fix that issue and remove the setting entirely.
  • Don't use different cursors for view2D. The purpose of these changes is unclear to me, they look like the wrong cursors.

@Brecht Van Lommel (brecht) - There are a few things I intentionally left out...

Yes, no worries. It was kind of a grabbag of lots of different things. LOL

Code that uses a different text cursor depending on the background color, I don't think we need to do this.

We don't. We don't even have a theme with text editing on light background. I mostly just wanted to include the cursors in the set in case we ever do. But no need to do anything with them yet.

Don't use pointer.cur...I don't see why we would need to override that cursor.

It was only there because (dumb) Windows would not force the built-in one to be large no matter what I tried, yet adding the same cursor to the set worked. But... seeing the regular cursors large when not need was nothing but a cute thing to see. Not useful in any way. LOL

Left out the change to make the Large Cursor option work for GHOST standard cursors...

Yes, I only did that for completeness. Seemed useless but fun to play with while working on it.

@Harley Acheson (harley) Hey this actually got committed, congrats!
I'll be here if any further work is required in the cursors themselves.

Thanks for all your hard work throughout the whole UI, it gradually adds a nice layer of polish on small things that make a difference.