Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey@blender.org>2020-08-12 12:05:40 +0300
committerSergey Sharybin <sergey@blender.org>2020-08-13 16:24:21 +0300
commit6fe609d4c3d0e2f820af577dc9a2affc4cf4ef0a (patch)
tree83d71714de8490e2402680c93b939974593a0699 /source/blender/makesrna/intern/rna_space.c
parent0df28e8c2044ece017c0a283625aba058c7ff5be (diff)
Sequencer: Implement zoom-to-fit view mode
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 Maniphest Tasks: T78987 Differential Revision: https://developer.blender.org/D8549
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r--source/blender/makesrna/intern/rna_space.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 155f5ab3043..9f259aba0c7 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -4796,6 +4796,12 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Waveform Displaying", "How Waveforms are drawn");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
+ prop = RNA_def_property(srna, "zoom_to_fit", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_ZOOM_TO_FIT);
+ RNA_def_property_ui_text(
+ prop, "Zoom to Fit", "Automatically zoom preview image to make it fully fit the region");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
+
prop = RNA_def_property(srna, "show_overexposed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "zebra");
RNA_def_property_ui_text(prop, "Show Overexposed", "Show overexposed areas with zebra stripes");