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:
authorAntony Riakiotakis <kalast@gmail.com>2015-05-13 21:30:53 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-05-15 14:39:30 +0300
commite4c93dc7db9b50acf898b667c95b208856b80ea8 (patch)
treec3db350ee276b7437d8ed69133fe51d21750e9ae /source/blender/makesrna
parentc86a6f3efbffbf81b663eb1fb57b4736d8e906ee (diff)
Zoom to frame options, requested by the Hwoozeberry (dutch translation)
team. There are 3 options here: 1) Keep range (previous behaviour) 2) Seconds - allows a specified offset in seconds around current frame 3) keyframes - zoom to include a number of keyframes around the cursor Options 2 and 3 have their own properties to tweak the behaviour and all options can be found in User Preferences->Interface under the 2D viewports section. Number 3 will probably need some refinement so commiting here for the hwoozeberry team to test first.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index a441f2f57dc..82afcfdbf29 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -3263,7 +3263,14 @@ static void rna_def_userdef_view(BlenderRNA *brna)
"Direct conversion of frame numbers to seconds"},
{0, NULL, 0, NULL, NULL}
};
-
+
+ static EnumPropertyItem zoom_frame_modes[] = {
+ {ZOOM_FRAME_MODE_KEEP_RANGE, "KEEP_RANGE", 0, "Keep Range", ""},
+ {ZOOM_FRAME_MODE_SECONDS, "SECONDS", 0, "Seconds", ""},
+ {ZOOM_FRAME_MODE_KEYFRAMES, "KEYFRAMES", 0, "Keyframes", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
+
PropertyRNA *prop;
StructRNA *srna;
@@ -3505,6 +3512,22 @@ static void rna_def_userdef_view(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "TimeCode Style",
"Format of Time Codes displayed when not displaying timing in terms of frames");
RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop = RNA_def_property(srna, "view_frame_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, zoom_frame_modes);
+ RNA_def_property_enum_sdna(prop, NULL, "view_frame_type");
+ RNA_def_property_ui_text(prop, "Zoom To Frame Type", "How zooming to frame focuses around current frame");
+
+ prop = RNA_def_property(srna, "view_frame_keyframes", PROP_INT, PROP_NONE);
+ RNA_def_property_range(prop, 1, 500);
+ RNA_def_property_ui_text(prop, "Zoom Keyframes",
+ "Keyframes around cursor that we zoom around");
+
+ prop = RNA_def_property(srna, "view_frame_seconds", PROP_FLOAT, PROP_TIME);
+ RNA_def_property_range(prop, 0.0, 10000.0);
+ RNA_def_property_ui_text(prop, "Zoom Seconds",
+ "Seconds around cursor that we zoom around");
+
}
static void rna_def_userdef_edit(BlenderRNA *brna)
@@ -3625,7 +3648,7 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "New Interpolation Type",
"Interpolation mode used for first keyframe on newly added F-Curves "
"(subsequent keyframes take interpolation from preceding keyframe)");
-
+
prop = RNA_def_property(srna, "keyframe_new_handle_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, keyframe_handle_type_items);
RNA_def_property_enum_sdna(prop, NULL, "keyhandles_new");