Page MenuHome

Navigation (fly/walk) mode cursor themable

Authored by Campbell Barton (campbellbarton) on Feb 19 2014, 3:33 PM.



The cursor for fly and walk navigation modes is now themable under user preferences.

Diff Detail

rB Blender

Event Timeline

Don't you have to also change the python file for users to set the color?


follow the existent style (no extra white line), and leave a , in the end if it works.


cpack(0) needs to leave, it was doing glColor3ub(0,0,0)


same here, see above note


leave this pad for a datablock in the future, I would recommend adding the view_navigation_cursor replacing another pad. (the variables are kind of grouped by themes here). no big deal though


description could be: "View Navigation Cursor"

Padding doubts.
Isn't char 8bits? Why does that structure need padding to be 8 aligned if it is all chars?


I put it here because it made sense to me next to camera. In the UI, I also put this after camera (and in all code files).
I replaced the pad called 'pad' there is also pad1, pad2 and an 'hpad'. Is this ok, or should I always replace the last pad? And then, I may need to not move the pad? This structure is char only and doesn't have nested structures, but if not, I could need to leave the pad where it is? If it doesn't make sense to put my variable there and it is the only pad, do I replace it anyway, or add my variable and more padding at the end?

Inês Almeida (brita_) updated this revision to Unknown Object (????).Feb 19 2014, 10:00 PM

corrections to previous commit

Inês Almeida (brita_) updated this revision to Unknown Object (????).Feb 19 2014, 10:45 PM

forgotten corrections

Inês Almeida (brita_) updated this revision to Unknown Object (????).Feb 20 2014, 12:59 AM

trying a commit range

Looks good to me. Waiting for second opinion though. :)

Not really keen to add this, there are a few places in blender where a default color is used for the 3d view...

  • Camera guides (use wire color)
  • 3D cursor crosshair (hard coded to black)
  • Fly mode (hard coded to black)

Think it may be better to have a more general color which is used for viewport hints then adding a theme color for each.

A less negative response - we should add this but make it more generalized :)

Campbell Barton (campbellbarton) requested changes to this revision.Feb 20 2014, 2:35 AM

So, I should also add options for '3D Cursor Crosshair' and 'Camera Guides'.
Add a 'Viewport Hints' option, and the other 3 inherit from it? This is what I understood, but I didn't know the themes had 'inheritance'.
Add a 'Viewport Hints' that affects the 3 options temporarily until the specific options are done and ready?

There is no way I can make this changes, other changes, and not get fired from my day job in time for 2.70 release. There is a user waiting for this with some upvotes:
Should this get in as is, and the rest added when I can, or its only going to enter after 2.70 anyway?

Hi @Inês Almeida (brita_) Campbell meant to have all 3 components using the same UI theme settings (in your words, to have them inherit the same property).
I agree that this makes more sense in the end.

It's not a lot of work from where you left, but if you think you won't be able to do it I can step in. It would be a shame though, since you are that close.

That said, users are always waiting for this or that. Not really a determining factor in my opinion. Specially since they can always get a nice Blender after the commit is in 'master'.

Inês Almeida (brita_) updated this revision to Unknown Object (????).Feb 22 2014, 10:01 PM

Add theme option 'Viewport Hints'

The options affects 3D Cursor crosshair, View Navigation Cursor and Camera Guides. Camera Guides are 'Composition Guides' and 'Safe Areas'. 'Sensor' was not
considered because it had a different color.

In general, I think this is fine.

Was thinking of other areas this could apply to the dashed line when transforming/scaling between the mouse cursor and the center point.

but can't find any other areas this might be used.

I'd like to apply this after 2.70 release.

note, am not sure of using name hints its a bit vague, but also not sure of better name, perhaps viewport_overlay_lines ?