[Bf-blender-cvs] [875be10] master: Sequencer: Tweak to how/when the "use_framerate" option is enabled

Joshua Leung noreply at git.blender.org
Fri Jan 8 12:12:41 CET 2016


Commit: 875be10903465978562d6865ce06f6ff5bae20b4
Author: Joshua Leung
Date:   Sat Jan 9 00:12:33 2016 +1300
Branches: master
https://developer.blender.org/rB875be10903465978562d6865ce06f6ff5bae20b4

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?

===================================================================

M	source/blender/editors/space_sequencer/sequencer_add.c

===================================================================

diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index d09a686..b9e6daf 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")) ||




More information about the Bf-blender-cvs mailing list