Page MenuHome

Zoom to Mouse Option for 2D Editors (Separated from 3D View)
Needs ReviewPublic

Authored by CandleComet (CandleComet) on Aug 2 2019, 9:43 PM.

Details

Reviewers
Brecht Van Lommel (brecht)
Group Reviewers
User Interface
Summary

This patch splits the Zoom to Mouse Position user-pref option into two options: for the 3D view, and other 2D editors. It's clear from the description of Zoom to Mouse Position that it was intended for the 3D view:

"Zoom in towards the mouse pointer's position in the 3D view, rather than the 2D window center."

2D editors, however, had also depended on this option. With this patch, they are separated. This makes it possible to zoom towards the mouse in the timeline, node editor, image editor, etc. without it being enabled for the viewport.

Notes:

  • This code sets the new option, 2D Editor Zoom to Mouse, to be disabled by default. Would it be better to, potentially, have it enabled by default? That would be a noteable change, but worth it?
  • Unsure what, if anything, should go into userdef_versioning.c

Diff Detail

Repository
rB Blender

Event Timeline

This needs code in versioning_userdef.c to enable USER_2D_ZOOM_TO_MOUSEPOS` if USER_ZOOM_TO_MOUSEPOS is enabled, so we keep preferences backwards compatible.

About the functionality, does anyone from the user interface team have an objection?

Brecht Van Lommel (brecht) requested changes to this revision.Aug 14 2019, 6:20 PM
This revision now requires changes to proceed.Aug 14 2019, 6:20 PM

No objection, however I wasn't aware of demand for this option either.

If we get similar patches to split 2D/3D behavior for Smooth-View, Zoom Axis, Invert direction etc..

Unless many users are requesting this, it seems like adding increasingly obscure options.

IMHO, this feature "Zoom To Mouse Position" should be enabled by default for everything.
Is there any app these days that doesn't work like that by default?

I agree with @ThinkingPolygons (ThinkingPolygons) here. Anyone I've shown this option to has always used it afterward. It's a shame that an improvement that's so obvious for most people is included disabled by default behind an option.

I'm not quite sure why it would need to be a separate option for 2D views though.

Replied to the defaults task, zoom to mouse position was infact suggested there, it seems these posts were overlooked

Re-raised this suggestion: T54943#753160

I like not needing to think about the mouse position when zooming in the 3D view, but I never got used to how it doesn't zoom to the mouse in other editors. Also, dollying in the 3D view feels different from zooming in other editors. For those reasons, IMHO, they should be separate. I don't see a need for other options to be separated for 2D vs 3D, however.

I also, don't want to care about where is my mouse whenever I do a simple zoom, it would be in the least... nauseating.

  • Added code to versioning_userdef.c

Those reasons make sense IMO, even though I will always leave it enabled.