[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [18879] trunk/blender/source/blender: - Py seq API - Added an option for seq_strip.update() to run update_changed_seq_and_deps and new_tstripdata

Campbell Barton ideasman42 at gmail.com
Mon Feb 9 05:18:38 CET 2009


Revision: 18879
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18879
Author:   campbellbarton
Date:     2009-02-09 05:18:30 +0100 (Mon, 09 Feb 2009)

Log Message:
-----------
- Py seq API - Added an option for seq_strip.update() to run update_changed_seq_and_deps and new_tstripdata

- Render stamp sequencer option wasn't ignoring muted strips.

Modified Paths:
--------------
    trunk/blender/source/blender/python/api2_2x/sceneSequence.c
    trunk/blender/source/blender/src/editseq.c

Modified: trunk/blender/source/blender/python/api2_2x/sceneSequence.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/sceneSequence.c	2009-02-09 03:06:52 UTC (rev 18878)
+++ trunk/blender/source/blender/python/api2_2x/sceneSequence.c	2009-02-09 04:18:30 UTC (rev 18879)
@@ -102,7 +102,7 @@
 /* Python BPy_Sequence methods table:					   */
 /*****************************************************************************/
 static PyObject *Sequence_copy(BPy_Sequence * self);
-static PyObject *Sequence_update(BPy_Sequence * self);
+static PyObject *Sequence_update(BPy_Sequence * self, PyObject *args);
 static PyObject *Sequence_new(BPy_Sequence * self, PyObject * args);
 static PyObject *Sequence_remove(BPy_Sequence * self, PyObject * args);
 static PyObject *Sequence_rebuildProxy(BPy_Sequence * self);
@@ -121,7 +121,7 @@
 		"() - Return a copy of the sequence containing the same objects."},
 	{"copy", (PyCFunction) Sequence_copy, METH_NOARGS,
 		"() - Return a copy of the sequence containing the same objects."},
-	{"update", (PyCFunction) Sequence_update, METH_NOARGS,
+	{"update", (PyCFunction) Sequence_update, METH_VARARGS,
 		"() - Force and update of the sequence strip"},
 	{"rebuildProxy", (PyCFunction) Sequence_rebuildProxy, METH_VARARGS,
 		"() - Rebuild the active strip's Proxy."},
@@ -587,8 +587,16 @@
 	Py_RETURN_NONE;
 }
 
-static PyObject *Sequence_update(BPy_Sequence * self)
+static PyObject *Sequence_update(BPy_Sequence * self, PyObject *args)
 {
+	int data= 0;
+	if (!PyArg_ParseTuple(args, "|i:update", &data))
+		return NULL; 				
+
+	if (data) {
+		update_changed_seq_and_deps(self->seq, 1, 1);
+		new_tstripdata(self->seq);
+	}
 	calc_sequence(self->seq);
 	calc_sequence_disp(self->seq);
 	Py_RETURN_NONE;

Modified: trunk/blender/source/blender/src/editseq.c
===================================================================
--- trunk/blender/source/blender/src/editseq.c	2009-02-09 03:06:52 UTC (rev 18878)
+++ trunk/blender/source/blender/src/editseq.c	2009-02-09 04:18:30 UTC (rev 18879)
@@ -183,7 +183,7 @@
 	if(!ed) return NULL;
 	
 	for (seq=ed->seqbasep->first; seq; seq= seq->next) {
-		if(seq->startdisp > frame || seq->enddisp <= frame)
+		if(seq->flag & SEQ_MUTE || seq->startdisp > frame || seq->enddisp <= frame)
 			continue;
 		/* only use elements you can see - not */
 		if (ELEM6(seq->type, SEQ_IMAGE, SEQ_META, SEQ_SCENE, SEQ_MOVIE, SEQ_MOVIE_AND_HD_SOUND, SEQ_COLOR)) {




More information about the Bf-blender-cvs mailing list