Page MenuHome

Sequencer: Implement zoom-to-fit view mode
ClosedPublic

Authored by Sergey Sharybin (sergey) on Aug 12 2020, 2:56 PM.
Tags
None
Tokens
"Love" token, awarded by sparazza."Burninate" token, awarded by lopoIsaac."The World Burns" token, awarded by tintwotin."Burninate" token, awarded by fsiddi.

Details

Summary

In this mode the preview image is always using the most of the preview
area space: it is scaled to fit, preserving aspect ratio. This makes it
possible to always have maximum of the preview region even after resize
of other areas.

This mode is enabled by default, is available in the View -> Zoom to Fit
menu. It is enabled when View All (Home key) is used, and is disabled
when manual navigation ([panning, zooming) is performed.

There is no versioning code, which means existing files will open as-is,
but new projects will have this option enabled.

Ref T78987

Diff Detail

Repository
rB Blender

Event Timeline

Sergey Sharybin (sergey) requested review of this revision.Aug 12 2020, 2:56 PM
Sergey Sharybin (sergey) created this revision.
Julian Eisel (Severin) requested changes to this revision.Aug 12 2020, 7:56 PM

Works really well in my simple tests, but found a little bug.

source/blender/makesdna/DNA_space_types.h
615

Bug: Wrong operator.

source/blender/makesrna/intern/rna_space.c
4801

I prefer not having vague terms like "best". Maybe "Automatically adjust zoom so the preview is fully visible within the region"?

This revision now requires changes to proceed.Aug 12 2020, 7:56 PM

Fixed the wrong bitfield value.

Sergey Sharybin (sergey) marked an inline comment as done.Aug 12 2020, 9:47 PM
Sergey Sharybin (sergey) added inline comments.
source/blender/makesdna/DNA_space_types.h
615

Fixed!

source/blender/makesrna/intern/rna_space.c
4801

If you hit Home button, and then zoom out to 10% zoom level the image is still fully visible.

So maybe Automatically zoom preview image to make it fully fit the area ?

Julian Eisel (Severin) added inline comments.
source/blender/makesrna/intern/rna_space.c
4801

Fine with me. But "area" is incorrect, should be "region".

This revision is now accepted and ready to land.Aug 13 2020, 1:23 AM
Sergey Sharybin (sergey) marked an inline comment as done.

Update the description.

@Brecht Van Lommel (brecht), want to give a quick pass here?

source/blender/makesrna/intern/rna_space.c
4801

Obviously. I mean, duuuh :)