[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35778] trunk/blender/source/blender/ editors/space_sequencer/sequencer_edit.c: Fix for [#25932] Video Sequencer: F-curve insertion failure after un-meta

Janne Karhu jhkarh at gmail.com
Fri Mar 25 12:45:55 CET 2011


Revision: 35778
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35778
Author:   jhk
Date:     2011-03-25 11:45:55 +0000 (Fri, 25 Mar 2011)
Log Message:
-----------
Fix for [#25932] Video Sequencer: F-curve insertion failure after un-meta
* Copying/pasting sequence strips didn't properly check for unique names between the copied/pasted strips, so the rna paths of copypasted strips couldn't always be checked properly.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c

Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c
===================================================================
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c	2011-03-25 11:07:57 UTC (rev 35777)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c	2011-03-25 11:45:55 UTC (rev 35778)
@@ -2613,6 +2613,8 @@
 	Editing *ed= seq_give_editing(scene, FALSE);
 	Sequence *seq;
 
+	ListBase nseqbase= {NULL, NULL};
+
 	seq_free_clipboard();
 
 	if(seqbase_isolated_sel_check(ed->seqbasep)==FALSE) {
@@ -2620,7 +2622,28 @@
 		return OPERATOR_CANCELLED;
 	}
 
-	seqbase_dupli_recursive(scene, NULL, &seqbase_clipboard, ed->seqbasep, SEQ_DUPE_UNIQUE_NAME);
+	seqbase_dupli_recursive(scene, NULL, &nseqbase, ed->seqbasep, SEQ_DUPE_UNIQUE_NAME);
+
+	/* To make sure the copied strips have unique names between each other add
+	 * them temporarily to the end of the original seqbase. (bug 25932)
+	 */
+	if(nseqbase.first) {
+		Sequence *seq, *first_seq = nseqbase.first;
+		BLI_movelisttolist(ed->seqbasep, &nseqbase);
+
+		for(seq=first_seq; seq; seq=seq->next)
+			seq_recursive_apply(seq, apply_unique_name_cb, scene);
+
+		seqbase_clipboard.first = first_seq;
+		seqbase_clipboard.last = ed->seqbasep->last;
+
+		if(first_seq->prev) {
+			first_seq->prev->next = NULL;
+			ed->seqbasep->last = first_seq->prev;
+			first_seq->prev = NULL;
+		}
+	}
+
 	seqbase_clipboard_frame= scene->r.cfra;
 
 	/* Need to remove anything that references the current scene */
@@ -2690,8 +2713,14 @@
 		}
 	}
 
+	iseq = nseqbase.first;
+
 	BLI_movelisttolist(ed->seqbasep, &nseqbase);
 
+	/* make sure the pasted strips have unique names between them */
+	for(; iseq; iseq=iseq->next)
+		seq_recursive_apply(iseq, apply_unique_name_cb, scene);
+
 	WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
 
 	return OPERATOR_FINISHED;




More information about the Bf-blender-cvs mailing list