WIP: UI: Image Editor Interactive Zoom Control #117050
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
8 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#117050
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Harley/blender:ImageZoom"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Zoom factor widget in the header of Image Editor to interactively
change the zoom percentage. Allows entering specific values and also
works for users without a middle-mouse button.
In the Header a percentage slider, then a menu to select discrete values:
With the change to showing percentages, the "Fractional Zoom" menu also changes:
Note this PR also changes "Zoom to Border" to say "Zoom Region..." like similar operation in the 3D viewport. And also adds an ellipsis to end of "Resize" since this brings up a dialog. Of course these could be in a separate PR but these are such trivial changes.
Glad to see someone taking a stab at this feature. I attempted it many years ago but didn't follow through with it as I ran into some UI troubles I didn't know how to get past back then.
Left a few minor comments. Also, there's some missing notifications that I also had to deal with in my attempt. Using the mouse wheel to zoom or using the Keyboard shortcuts for the View -> Fractional Zoom menu won't update the UI immediately.
@ -843,2 +843,4 @@
layout.separator_spacer()
# Image zoom controls.
layout.operator("image.view_all", text="", icon='IMAGE_PLANE').fit_view = True
I think I'd prefer to leave fit_view off and have this button snap back to a 1:1 zoom, though I can see merits to fitting to the window too. Wonder what others think?
@ -5576,3 +5576,2 @@
prop = RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
RNA_def_property_array(prop, 2);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_array(prop, 1);
This is technically a breaking change. Cycles will need to be updated at least, see https://projects.blender.org/blender/blender/src/branch/main//intern/cycles/blender/session.cpp#L853
@ -5579,1 +5577,4 @@
RNA_def_property_array(prop, 1);
RNA_def_property_float_funcs(prop, "rna_SpaceImageEditor_zoom_get", nullptr, nullptr);
RNA_def_property_float_default(prop, 1.0);
RNA_def_property_range(prop, .125, 8);
The range here probably needs widened to allow the user to type in lower/higher values. e.g. I can zoom with the mouse to 0.1 but I'm not allowed to type that.
@deadpin
No idea if anyone wants this. I think I remember William wanting it. Is it useful for anyone who also has a middle mouse button?
I can see why you'd want a button to revert to 1:1. But I think I still like the "fit" one too. But I can't find a suitable icon for both. I've left it as you wanted, with one button for 1:1
Thanks for noticing this! I could not see why it is returning an array like that since the underlying value is a single float. I've just made a new property for this and left the existing one as is.
Makes sense. Done.
Ah right. Looks like those other operators are just doing a redraw tag on the main region. Would need to tag the header as well, or just the area instead.
@deadpin
Notifications should be working properly now. So the value shown in the header will update correctly as a zoom with the middle mouse wheel, ctrl-middle mouse drag, changing zoom with numpad keys, or directly selecting items in the View menu.
This is fantastic!
I just wish it also had the usual dropdown menu list with the handy zoom levels percentage, like :
+1 the more standard blender becomes, the better ✌
Can we have that in the video sequencer editor too?
Yes Harley, this is a very welcome addition. I mostly use integer multiples of zoom level (1:1, 2:1, etc) so that there is as few interpolation shenanigans as possible, so having the actual value readily available instead of having to fish out the presets in the "view" menu is valuable. This also serves as a display of the zoom value, which the image editor simply lacked until now. I second @TheRedWaxPolice in suggesting a dropdown with zoom presets. It's worth pondering whether the existing "Fractional Zoom" submenu from the "View" menu should be moved to top-level, right next to this slider.
Right, the idea that I explored 3 years ago was just to hoist the existing Fractional Zoom menu right along side it. Additionally, I wanted to use a PERCENTAGE sub-type instead of decimals and that's what tripped me up due to some ways that percentage widgets are drawn; it's related to the very wide range that this slider would have to represent.
Beyond that, aesthetically, I didn't have the energy to argue one way or another if that top-headerbar location... has enough space for another wide widget (If that came up during review; I didn't have a good answer myself). It kind of doesn't have room but many times it does, and you can scroll. There's no "footers" or status bar areas available anyways. Since then I just smash "numpad 1" anytime I'm viewing images to ensure I know where I'm at :)
@deadpin
WIP: UI: Image Editor Interactive Zoom Controlto UI: Image Editor Interactive Zoom Control@deadpin
Looking into the issue of it showing the percentage. It isn't just that want the percent sign, and don't want the blue progress bar, but I also want to have the little side up/down buttons.
The only way I have found to do this nicely is to set the property subtype as PROP_PERCENTAGE, so it shows the percentage sign. Normally this results in a UI_BTYPE_NUM_SLIDER being made. But here I am checking the
softmax
settings. If over 100 I just make it create a UI_BTYPE_NUM instead.Fairly simple and does exactly what I want. But not sure if there would be any negative consequences. Almost every single PROP_PERCENTAGE has a softmax of 100. For the ones are higher it should be equally nonsensical to show a full blue bar at that higher value.
Functions really nice now! Glad you got the percentage working :)
Shouldn't
Zoom To Border
be calledZoom Region
like in the viewport? (for consistency's sake)..of course it should
i dont know whats going on here 😕
@pablovazquez
I did find and fix the times where you could make a zoom change and not have it shown correctly in the header. It also now shows the percentage sign, but not the blue progress bar, and shows the side up/down buttons.
Works great!
Funnily enough this exposes an unrelated issue with the menu pulldown widget alignment, where even though it's aligned with the row, it doesn't get proper border radius. Will make a report.
The decision in the UI meeting two weeks ago was to do this for other editors as well, so they are all consistent. I think that means the Sequencer and Movie Clip editors, maybe the Compositor if it has a backdrop. But no other editors I think.
UI: Image Editor Interactive Zoom Controlto WIP: UI: Image Editor Interactive Zoom Controlaff5eb5da0
to319bb5baab
any eta for this?
No. It isn't shelved, but we've put it on hold while we give it more thought.
I did make changes to the "zoom" menus so they are more consistent, shows percentage, and highlights the current level if matching: #121044
But weren't able to reach consensus on including the menu on the header. Not dead, but needs thought.
thats quite concerning to be honest.
maybe a devtalk feedback thread would help?
this is great! can we have a "zoom to fit" icon/button in the UI near the zoom too please?
Checkout
From your project repository, check out a new branch and test the changes.