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:
authorJoshua Leung <aligorith@gmail.com>2016-01-08 14:12:33 +0300
committerJoshua Leung <aligorith@gmail.com>2016-01-08 14:12:33 +0300
commit875be10903465978562d6865ce06f6ff5bae20b4 (patch)
tree40342ee6ad355baa2446360eb2eaba628ddd10ce /source/blender/editors/space_sequencer
parent4ef918d661510610728fe9bbebb3df1fb565eef2 (diff)
Sequencer: Tweak to how/when the "use_framerate" option is enabled
In response to feedback from plasmasolutions that having this option "always on" caused some examples of more destructive errors, this commit introduces an attempt at seeking a better balance between doing what people expect when casually importing clips, and not clobbering existing timelines. Specifically: 1) When there's nothing in the scene, the option will default to being enabled. This accounts for users doing this for the first time with no strips 2) When there are already sequence strips, the option will default to being disabled. In this case, changing the framerate could be dangerous. Hopefully this new check is sufficient. 3) There's always still the option for users to control what exactly happens. However, there have been reports that this cannot always be seen/set?
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index d09a686a487..b9e6daf5c3a 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -638,6 +638,20 @@ static int sequencer_add_movie_strip_invoke(bContext *C, wmOperator *op, const w
{
PropertyRNA *prop;
Scene *scene = CTX_data_scene(C);
+ Editing *ed = BKE_sequencer_editing_get(scene, false);
+
+ /* only enable "use_framerate" if there aren't any existing strips
+ * - When there are no strips yet, there is no harm in enabling this,
+ * and it makes the single-strip case really nice for casual users
+ * - When there are strips, it's best we don't touch the framerate,
+ * as all hell may break loose (e.g. audio strips start overlapping
+ * and can't be restored)
+ * - These initial guesses can still be manually overridden by users
+ * from the modal options panel
+ */
+ if (ed && ed->seqbasep && ed->seqbasep->first) {
+ RNA_boolean_set(op->ptr, "use_framerate", false);
+ }
/* This is for drag and drop */
if ((RNA_struct_property_is_set(op->ptr, "files") && RNA_collection_length(op->ptr, "files")) ||