[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50147] branches/soc-2011-tomato: svn merge ^/trunk/blender -r50143:50146

Campbell Barton ideasman42 at gmail.com
Thu Aug 23 10:54:06 CEST 2012


Revision: 50147
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50147
Author:   campbellbarton
Date:     2012-08-23 08:54:06 +0000 (Thu, 23 Aug 2012)
Log Message:
-----------
svn merge ^/trunk/blender -r50143:50146

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50143

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/editors/screen/screen_ops.c
    branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_edit.c
    branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_intern.h
    branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_ops.c

Property Changed:
----------------
    branches/soc-2011-tomato/
    branches/soc-2011-tomato/source/blender/editors/interface/interface.c
    branches/soc-2011-tomato/source/blender/editors/space_outliner/


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-50143
   + /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-50146


Property changes on: branches/soc-2011-tomato/source/blender/editors/interface/interface.c
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers/source/blender/editors/interface/interface.c:38694-39989
/trunk/blender/source/blender/editors/interface/interface.c:36831-50143
   + /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers/source/blender/editors/interface/interface.c:38694-39989
/trunk/blender/source/blender/editors/interface/interface.c:36831-50146

Modified: branches/soc-2011-tomato/source/blender/editors/screen/screen_ops.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/screen/screen_ops.c	2012-08-23 08:10:45 UTC (rev 50146)
+++ branches/soc-2011-tomato/source/blender/editors/screen/screen_ops.c	2012-08-23 08:54:06 UTC (rev 50147)
@@ -2031,8 +2031,8 @@
 	ot->poll = ED_operator_screenactive_norender;
 	ot->flag = OPTYPE_UNDO;
 	
-	/* rna */
-	RNA_def_boolean(ot->srna, "next", 1, "Next Keyframe", "");
+	/* properties */
+	RNA_def_boolean(ot->srna, "next", TRUE, "Next Keyframe", "");
 }
 
 /* ************** switch screen operator ***************************** */


Property changes on: branches/soc-2011-tomato/source/blender/editors/space_outliner
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/trunk/blender/source/blender/editors/space_outliner:36831-50143
   + /branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/trunk/blender/source/blender/editors/space_outliner:36831-50146

Modified: branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_edit.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_edit.c	2012-08-23 08:10:45 UTC (rev 50146)
+++ branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_edit.c	2012-08-23 08:54:06 UTC (rev 50147)
@@ -2288,7 +2288,9 @@
 }
 
 
-static int find_next_prev_edit(Scene *scene, int cfra, int side)
+static int find_next_prev_edit(Scene *scene, int cfra,
+                               const short side,
+                               const short do_skip_mute, const short do_center)
 {
 	Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
 	Sequence *seq, *best_seq = NULL, *frame_seq = NULL;
@@ -2299,19 +2301,32 @@
 	if (ed == NULL) return cfra;
 	
 	for (seq = ed->seqbasep->first; seq; seq = seq->next) {
+		int seq_frame;
+
+		if (do_skip_mute && (seq->flag & SEQ_MUTE)) {
+			continue;
+		}
+
+		if (do_center) {
+			seq_frame = (seq->startdisp + seq->enddisp) / 2;
+		}
+		else {
+			seq_frame = seq->startdisp;
+		}
+
 		dist = MAXFRAME * 2;
 			
 		switch (side) {
 			case SEQ_SIDE_LEFT:
-				if (seq->startdisp < cfra) {
-					dist = cfra - seq->startdisp;
+				if (seq_frame < cfra) {
+					dist = cfra - seq_frame;
 				}
 				break;
 			case SEQ_SIDE_RIGHT:
-				if (seq->startdisp > cfra) {
-					dist = seq->startdisp - cfra;
+				if (seq_frame > cfra) {
+					dist = seq_frame - cfra;
 				}
-				else if (seq->startdisp == cfra) {
+				else if (seq_frame == cfra) {
 					frame_seq = seq;
 				}
 				break;
@@ -2326,83 +2341,77 @@
 	/* if no sequence to the right is found and the
 	 * frame is on the start of the last sequence,
 	 * move to the end of the last sequence */
-	if (frame_seq) cfra = frame_seq->enddisp;
+	if (frame_seq) {
+		if (do_center) {
+			cfra = (frame_seq->startdisp + frame_seq->enddisp) / 2;
+		}
+		else {
+			cfra = frame_seq->enddisp;
+		}
+	}
 
-	return best_seq ? best_seq->startdisp : cfra;
+	if (best_seq) {
+		if (do_center) {
+			cfra = (best_seq->startdisp + best_seq->enddisp) / 2;
+		}
+		else {
+			cfra = best_seq->startdisp;
+		}
+	}
+
+	return cfra;
 }
 
-static int next_prev_edit_internal(Scene *scene, int side)
+static int strip_jump_internal(Scene *scene,
+                                   const short side,
+                                   const short do_skip_mute, const short do_center)
 {
-	int change = 0;
+	int change = FALSE;
 	int cfra = CFRA;
-	int nfra = find_next_prev_edit(scene, cfra, side);
+	int nfra = find_next_prev_edit(scene, cfra, side, do_skip_mute, do_center);
 	
 	if (nfra != cfra) {
 		CFRA = nfra;
-		change = 1;
+		change = TRUE;
 	}
 
 	return change;
 }
 
-/* move frame to next edit point operator */
-static int sequencer_next_edit_exec(bContext *C, wmOperator *UNUSED(op))
+/* jump frame to edit point operator */
+static int sequencer_strip_jump_exec(bContext *C, wmOperator *op)
 {
 	Scene *scene = CTX_data_scene(C);
-	
-	if (!next_prev_edit_internal(scene, SEQ_SIDE_RIGHT))
-		return OPERATOR_CANCELLED;
+	short next = RNA_boolean_get(op->ptr, "next");
+	short center = RNA_boolean_get(op->ptr, "center");
 
-	WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
-
-	return OPERATOR_FINISHED;
-}
-
-void SEQUENCER_OT_next_edit(wmOperatorType *ot)
-{
-	/* identifiers */
-	ot->name = "Next Edit";
-	ot->idname = "SEQUENCER_OT_next_edit";
-	ot->description = "Move frame to next edit point";
-	
-	/* api callbacks */
-	ot->exec = sequencer_next_edit_exec;
-	ot->poll = sequencer_edit_poll;
-	
-	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-	
-	/* properties */
-}
-
-/* move frame to previous edit point operator */
-static int sequencer_previous_edit_exec(bContext *C, wmOperator *UNUSED(op))
-{
-	Scene *scene = CTX_data_scene(C);
-	
-	if (!next_prev_edit_internal(scene, SEQ_SIDE_LEFT))
+	/* currently do_skip_mute is always TRUE */
+	if (!strip_jump_internal(scene, next ? SEQ_SIDE_RIGHT : SEQ_SIDE_LEFT, TRUE, center)) {
 		return OPERATOR_CANCELLED;
+	}
 
 	WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
 	
 	return OPERATOR_FINISHED;
 }
 
-void SEQUENCER_OT_previous_edit(wmOperatorType *ot)
+void SEQUENCER_OT_strip_jump(wmOperatorType *ot)
 {
 	/* identifiers */
-	ot->name = "Previous Edit";
-	ot->idname = "SEQUENCER_OT_previous_edit";
+	ot->name = "Jump to Strip";
+	ot->idname = "SEQUENCER_OT_strip_jump";
 	ot->description = "Move frame to previous edit point";
-	
+
 	/* api callbacks */
-	ot->exec = sequencer_previous_edit_exec;
+	ot->exec = sequencer_strip_jump_exec;
 	ot->poll = sequencer_edit_poll;
-	
+
 	/* flags */
 	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 	
 	/* properties */
+	RNA_def_boolean(ot->srna, "next", TRUE, "Next Strip", "");
+	RNA_def_boolean(ot->srna, "center", TRUE, "Use strip center", "");
 }
 
 static void swap_sequence(Scene *scene, Sequence *seqa, Sequence *seqb)

Modified: branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_intern.h
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_intern.h	2012-08-23 08:10:45 UTC (rev 50146)
+++ branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_intern.h	2012-08-23 08:54:06 UTC (rev 50147)
@@ -95,8 +95,7 @@
 void SEQUENCER_OT_meta_make(struct wmOperatorType *ot);
 void SEQUENCER_OT_meta_separate(struct wmOperatorType *ot);
 void SEQUENCER_OT_snap(struct wmOperatorType *ot);
-void SEQUENCER_OT_previous_edit(struct wmOperatorType *ot);
-void SEQUENCER_OT_next_edit(struct wmOperatorType *ot);
+void SEQUENCER_OT_strip_jump(struct wmOperatorType *ot);
 void SEQUENCER_OT_swap(struct wmOperatorType *ot);
 void SEQUENCER_OT_swap_data(struct wmOperatorType *ot);
 void SEQUENCER_OT_rendersize(struct wmOperatorType *ot);

Modified: branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_ops.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_ops.c	2012-08-23 08:10:45 UTC (rev 50146)
+++ branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_ops.c	2012-08-23 08:54:06 UTC (rev 50147)
@@ -72,8 +72,7 @@
 	WM_operatortype_append(SEQUENCER_OT_meta_make);
 	WM_operatortype_append(SEQUENCER_OT_meta_separate);
 	WM_operatortype_append(SEQUENCER_OT_snap);
-	WM_operatortype_append(SEQUENCER_OT_next_edit);
-	WM_operatortype_append(SEQUENCER_OT_previous_edit);
+	WM_operatortype_append(SEQUENCER_OT_strip_jump);
 	WM_operatortype_append(SEQUENCER_OT_swap);
 	WM_operatortype_append(SEQUENCER_OT_swap_data);
 	WM_operatortype_append(SEQUENCER_OT_rendersize);
@@ -189,9 +188,21 @@

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list