[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50149] branches/soc-2011-tomato: Merging r50147 through r50148 from trunk into soc-2011-tomato
Sergey Sharybin
sergey.vfx at gmail.com
Thu Aug 23 11:05:45 CEST 2012
Revision: 50149
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50149
Author: nazgul
Date: 2012-08-23 09:05:45 +0000 (Thu, 23 Aug 2012)
Log Message:
-----------
Merging r50147 through r50148 from trunk into soc-2011-tomato
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50147
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50148
Modified Paths:
--------------
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_sequencer.py
branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_intern.h
branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_modifier.c
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-50146
+ /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-50148
Modified: branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_sequencer.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_sequencer.py 2012-08-23 09:04:30 UTC (rev 50148)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_sequencer.py 2012-08-23 09:05:45 UTC (rev 50149)
@@ -904,12 +904,21 @@
row = box.row()
row.prop(mod, "show_expanded", text="", emboss=False)
- row.prop(mod, "name")
+ row.prop(mod, "name", text="")
row.prop(mod, "mute", text="")
- props = row.operator("sequencer.strip_modifier_remove", text="", icon='X')
+
+ sub = row.row(align=True)
+ props = sub.operator("sequencer.strip_modifier_move", text="", icon='TRIA_UP')
props.name = mod.name
+ props.direction = 'UP'
+ props = sub.operator("sequencer.strip_modifier_move", text="", icon='TRIA_DOWN')
+ props.name = mod.name
+ props.direction = 'DOWN'
+ props = row.operator("sequencer.strip_modifier_remove", text="", icon='X', emboss=False)
+ props.name = mod.name
+
if mod.show_expanded:
row = box.row()
row.prop(mod, "input_mask_type", expand=True)
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-50146
+ /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-50148
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-50146
+ /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-50148
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 09:04:30 UTC (rev 50148)
+++ branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_intern.h 2012-08-23 09:05:45 UTC (rev 50149)
@@ -179,6 +179,7 @@
/* sequencer_modifiers.c */
void SEQUENCER_OT_strip_modifier_add(struct wmOperatorType *ot);
void SEQUENCER_OT_strip_modifier_remove(struct wmOperatorType *ot);
+void SEQUENCER_OT_strip_modifier_move(struct wmOperatorType *ot);
#endif /* __SEQUENCER_INTERN_H__ */
Modified: branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_modifier.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_modifier.c 2012-08-23 09:04:30 UTC (rev 50148)
+++ branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_modifier.c 2012-08-23 09:05:45 UTC (rev 50149)
@@ -154,3 +154,69 @@
/* properties */
RNA_def_string(ot->srna, "name", "Name", MAX_NAME, "Name", "Name of modifier to remove");
}
+
+/*********************** Move operator *************************/
+
+enum {
+ SEQ_MODIFIER_MOVE_UP = 0,
+ SEQ_MODIFIER_MOVE_DOWN
+};
+
+static int strip_modifier_move_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene = CTX_data_scene(C);
+ Sequence *seq = BKE_sequencer_active_get(scene);
+ char name[MAX_NAME];
+ int direction;
+ SequenceModifierData *smd;
+
+ RNA_string_get(op->ptr, "name", name);
+ direction = RNA_enum_get(op->ptr, "direction");
+
+ smd = BKE_sequence_modifier_find_by_name(seq, name);
+ if (!smd)
+ return OPERATOR_CANCELLED;
+
+ if (direction == SEQ_MODIFIER_MOVE_UP) {
+ if (smd->prev) {
+ BLI_remlink(&seq->modifiers, smd);
+ BLI_insertlink(&seq->modifiers, smd->prev->prev, smd);
+ }
+ }
+ else if (direction == SEQ_MODIFIER_MOVE_DOWN) {
+ if (smd->next) {
+ BLI_remlink(&seq->modifiers, smd);
+ BLI_insertlink(&seq->modifiers, smd->next, smd);
+ }
+ }
+
+ BKE_sequence_invalidate_cache(scene, seq);
+ WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
+
+ return OPERATOR_FINISHED;
+}
+
+void SEQUENCER_OT_strip_modifier_move(wmOperatorType *ot)
+{
+ static EnumPropertyItem direction_items[] = {
+ {SEQ_MODIFIER_MOVE_UP, "UP", 0, "Up", "Move modifier up in the stack"},
+ {SEQ_MODIFIER_MOVE_DOWN, "DOWN", 0, "Down", "Move modifier down in the stack"},
+ {0, NULL, 0, NULL, NULL}
+ };
+
+ /* identifiers */
+ ot->name = "Move Strip Modifier";
+ ot->idname = "SEQUENCER_OT_strip_modifier_move";
+ ot->description = "Move modifier up and down in the stack";
+
+ /* api callbacks */
+ ot->exec = strip_modifier_move_exec;
+ ot->poll = strip_modifier_active_poll;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ /* properties */
+ RNA_def_string(ot->srna, "name", "Name", MAX_NAME, "Name", "Name of modifier to remove");
+ RNA_def_enum(ot->srna, "direction", direction_items, SEQ_MODIFIER_MOVE_UP, "Type", "");
+}
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 09:04:30 UTC (rev 50148)
+++ branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_ops.c 2012-08-23 09:05:45 UTC (rev 50149)
@@ -117,6 +117,7 @@
/* sequencer_modifiers.c */
WM_operatortype_append(SEQUENCER_OT_strip_modifier_add);
WM_operatortype_append(SEQUENCER_OT_strip_modifier_remove);
+ WM_operatortype_append(SEQUENCER_OT_strip_modifier_move);
}
More information about the Bf-blender-cvs
mailing list