[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13006] trunk/blender/source/blender: == Sequencer ==
Peter Schlaile
peter at schlaile.de
Wed Dec 26 17:07:16 CET 2007
Revision: 13006
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13006
Author: schlaile
Date: 2007-12-26 17:07:16 +0100 (Wed, 26 Dec 2007)
Log Message:
-----------
== Sequencer ==
Moved N-keys dialog into panel (sub panel of "Scene")
_much_ better :)
Since UI-code isn't directly my main field of coding, please check
thoroughly...
Modified Paths:
--------------
trunk/blender/source/blender/include/BIF_butspace.h
trunk/blender/source/blender/include/BIF_editseq.h
trunk/blender/source/blender/include/butspace.h
trunk/blender/source/blender/src/butspace.c
trunk/blender/source/blender/src/buttons_scene.c
trunk/blender/source/blender/src/drawseq.c
trunk/blender/source/blender/src/editseq.c
trunk/blender/source/blender/src/header_buttonswin.c
trunk/blender/source/blender/src/header_seq.c
trunk/blender/source/blender/src/space.c
Modified: trunk/blender/source/blender/include/BIF_butspace.h
===================================================================
--- trunk/blender/source/blender/include/BIF_butspace.h 2007-12-26 15:25:30 UTC (rev 13005)
+++ trunk/blender/source/blender/include/BIF_butspace.h 2007-12-26 16:07:16 UTC (rev 13006)
@@ -86,9 +86,10 @@
#define TAB_OBJECT_PARTICLE 2
#define TAB_SCENE_RENDER 0
-#define TAB_SCENE_WORLD 1
+#define TAB_SCENE_WORLD 1
#define TAB_SCENE_ANIM 2
#define TAB_SCENE_SOUND 3
+#define TAB_SCENE_SEQUENCER 4
/* buts->scaflag */
Modified: trunk/blender/source/blender/include/BIF_editseq.h
===================================================================
--- trunk/blender/source/blender/include/BIF_editseq.h 2007-12-26 15:25:30 UTC (rev 13005)
+++ trunk/blender/source/blender/include/BIF_editseq.h 2007-12-26 16:07:16 UTC (rev 13006)
@@ -128,8 +128,6 @@
(seq)->endstill = 0; \
}
*/
-/* drawseq.c */
-void do_seqbuttons(short);
#endif
Modified: trunk/blender/source/blender/include/butspace.h
===================================================================
--- trunk/blender/source/blender/include/butspace.h 2007-12-26 15:25:30 UTC (rev 13005)
+++ trunk/blender/source/blender/include/butspace.h 2007-12-26 16:07:16 UTC (rev 13006)
@@ -64,6 +64,8 @@
extern void anim_panels(void);
extern void sound_panels(void);
extern void do_soundbuts(unsigned short event);
+extern void sequencer_panels(void);
+extern void do_sequencer_panels(unsigned short event);
/* object */
extern void object_panels(void);
@@ -298,7 +300,8 @@
#define B_AO_FALLOFF 1506
/* *********************** */
-#define B_RENDERBUTS 1700
+#define B_RENDERBUTS 1690
+#define B_SEQUENCERBUTS 1699
#define B_FS_PIC 1601
#define B_FS_BACKBUF 1602
@@ -347,6 +350,12 @@
#define B_ADD_RENDERLAYER 1645
#define B_SET_PASS 1646
+#define B_SEQ_BUT_PLUGIN 1691
+#define B_SEQ_BUT_RELOAD 1692
+#define B_SEQ_BUT_EFFECT 1693
+#define B_SEQ_BUT_RELOAD_ALL 1694
+#define B_SEQ_BUT_TRANSFORM 1695
+
/* *********************** */
#define B_ARMATUREBUTS 1800
#define B_POSE 1701
Modified: trunk/blender/source/blender/src/butspace.c
===================================================================
--- trunk/blender/source/blender/src/butspace.c 2007-12-26 15:25:30 UTC (rev 13005)
+++ trunk/blender/source/blender/src/butspace.c 2007-12-26 16:07:16 UTC (rev 13006)
@@ -572,6 +572,9 @@
else if(event<=B_RENDERBUTS) {
do_render_panels(event); // buttons_scene.c
}
+ else if(event<=B_SEQUENCERBUTS) {
+ do_sequencer_panels(event);
+ }
else if(event<=B_COMMONEDITBUTS) {
do_common_editbuts(event);
}
@@ -725,6 +728,8 @@
if(tab== TAB_SCENE_RENDER)
render_panels();
+ else if(tab == TAB_SCENE_SEQUENCER)
+ sequencer_panels();
else if(tab == TAB_SCENE_ANIM)
anim_panels();
else if(tab == TAB_SCENE_SOUND)
Modified: trunk/blender/source/blender/src/buttons_scene.c
===================================================================
--- trunk/blender/source/blender/src/buttons_scene.c 2007-12-26 15:25:30 UTC (rev 13005)
+++ trunk/blender/source/blender/src/buttons_scene.c 2007-12-26 16:07:16 UTC (rev 13006)
@@ -41,6 +41,7 @@
#include "DNA_space_types.h"
#include "DNA_scene_types.h"
#include "DNA_sound_types.h"
+#include "DNA_sequence_types.h"
#include "DNA_userdef_types.h"
#include "DNA_packedFile_types.h"
@@ -71,6 +72,7 @@
#include "BIF_screen.h"
#include "BIF_space.h"
#include "BIF_toolbox.h"
+#include "BIF_editseq.h"
#include "BIF_butspace.h"
@@ -84,6 +86,7 @@
#include "BKE_writeavi.h"
#include "BKE_writeffmpeg.h"
#include "BKE_image.h"
+#include "BKE_plugin_types.h"
#include "BLI_threads.h"
@@ -91,8 +94,11 @@
#include "BIF_writeimage.h"
#include "BIF_writeavicodec.h"
+#include "BSE_headerbuttons.h"
+#include "BSE_sequence.h"
+#include "BSE_seqeffects.h"
+#include "BSE_seqscopes.h"
#include "BSE_seqaudio.h"
-#include "BSE_headerbuttons.h"
#include "RE_pipeline.h"
@@ -466,7 +472,504 @@
}
}
+/* ************************* Sequencer *********************** */
+#define SEQ_PANEL_EDITING 1
+#define SEQ_PANEL_INPUT 2
+#define SEQ_PANEL_FILTER 4
+#define SEQ_PANEL_EFFECT 8
+#define SEQ_PANEL_PROXY 16
+
+static char* seq_panel_blend_modes()
+{
+ static char string[2048];
+ char formatstring[2048];
+
+ strcpy(formatstring, "Blend mode: %%t|%s %%x%d|%s %%x%d");
+ sprintf(string, formatstring,
+ "REPLACE", SEQ_BLEND_REPLACE,
+ "TODO: ALPHA OVER", SEQ_BLEND_ALPHA_OVER);
+ return string;
+
+}
+
+static void seq_panel_editing()
+{
+ Sequence *last_seq = get_last_seq();
+ char * seq_names[] = { "Image", "Meta", "Scene", "Movie",
+ "Snd RAM", "Snd HD",
+ "", "Effect" };
+ uiBlock *block;
+
+ block = uiNewBlock(&curarea->uiblocks, "seq_panel_editing",
+ UI_EMBOSS, UI_HELV, curarea->win);
+
+ if(uiNewPanel(curarea, block, "Edit", "Sequencer",
+ 10, 230, 318, 204) == 0) return;
+
+ uiDefBut(block, LABEL,
+ 0, (last_seq->type >= SEQ_EFFECT) ?
+ "Effect" : seq_names[last_seq->type],
+ 10,140,60,19, 0,
+ 0, 0, 0, 0, "");
+
+ uiDefBut(block, TEX,
+ B_NOP, "Name: ",
+ 70,140,180,19, last_seq->name+2,
+ 0.0, 21.0, 100, 0, "");
+
+ uiDefButI(block, MENU, B_SEQ_BUT_RELOAD, seq_panel_blend_modes(),
+ 10, 120, 120, 19, &last_seq->blend_mode,
+ 0,0,0,0, "Strip Blend Mode");
+
+ if (last_seq->blend_mode > 0) {
+ uiDefButF(block, NUM, B_SEQ_BUT_RELOAD, "Blend:",
+ 130, 120, 120, 19, &last_seq->blend_opacity,
+ 0.0, 100.0, 100.0, 0,
+ "Blend opacity");
+ }
+
+ uiDefButBitI(block, TOG, SEQ_MUTE,
+ B_SEQ_BUT_RELOAD_ALL, "Mute",
+ 10,100,60,19, &last_seq->flag,
+ 0.0, 1.0, 0, 0,
+ "Mute the current strip.");
+
+ uiDefButBitI(block, TOG, SEQ_LOCK,
+ B_NOP, "Lock",
+ 70,100,60,19, &last_seq->flag,
+ 0.0, 1.0, 0, 0,
+ "Lock strip, so that it can't be transformed.");
+
+ uiDefButBitI(block, TOG, SEQ_IPO_FRAME_LOCKED,
+ B_SEQ_BUT_RELOAD_ALL, "IPO Frame locked",
+ 130,100,120,19, &last_seq->flag,
+ 0.0, 1.0, 0, 0,
+ "Lock the IPO coordinates to the "
+ "global frame counter.");
+
+ if (!(last_seq->flag & SEQ_LOCK)) {
+ uiDefButI(block, NUM,
+ B_SEQ_BUT_TRANSFORM, "Start",
+ 10, 80, 120, 20, &last_seq->start,
+ 0.0, MAXFRAMEF, 0.0, 0.0, "Start of strip");
+ uiDefButI(block, NUM,
+ B_SEQ_BUT_TRANSFORM, "Chan",
+ 130, 80, 120, 20, &last_seq->machine,
+ 0.0, MAXSEQ, 0.0, 0.0, "Channel used (Y position)");
+
+ if (last_seq->type == SEQ_IMAGE) {
+ uiDefButI(block, NUM,
+ B_SEQ_BUT_TRANSFORM, "Start-Still",
+ 10, 60, 120, 20, &last_seq->startstill,
+ 0.0, MAXFRAMEF, 0.0, 0.0, "Start still");
+ uiDefButI(block, NUM,
+ B_SEQ_BUT_TRANSFORM, "End-Still",
+ 130, 60, 120, 19, &last_seq->endstill,
+ 0.0, MAXFRAMEF, 0.0, 0.0, "End still");
+ } else {
+ uiDefButI(block, NUM,
+ B_SEQ_BUT_TRANSFORM, "Start-Ofs",
+ 10, 60, 120, 20, &last_seq->startofs,
+ 0.0, last_seq->len, 0.0, 0.0, "Start offset");
+ uiDefButI(block, NUM,
+ B_SEQ_BUT_TRANSFORM, "End-Ofs",
+ 130, 60, 120, 19, &last_seq->endofs,
+ 0.0, last_seq->len, 0.0, 0.0, "End offset");
+ }
+ }
+}
+
+static void seq_panel_input()
+{
+ Sequence *last_seq = get_last_seq();
+ uiBlock *block;
+ block = uiNewBlock(&curarea->uiblocks, "seq_panel_input",
+ UI_EMBOSS, UI_HELV, curarea->win);
+
+ if(uiNewPanel(curarea, block, "Input", "Sequencer",
+ 10, 230, 318, 204) == 0) return;
+
+
+ uiDefButBitI(block, TOG, SEQ_USE_CROP,
+ B_SEQ_BUT_RELOAD, "Use Crop",
+ 10,100,240,19, &last_seq->flag,
+ 0.0, 1.0, 0, 0,
+ "Crop image before processing.");
+
+ if (last_seq->flag & SEQ_USE_CROP) {
+ if (!last_seq->strip->crop) {
+ last_seq->strip->crop =
+ MEM_callocN(sizeof(struct StripCrop),
+ "StripCrop");
+ }
+ uiDefButI(block, NUM,
+ B_SEQ_BUT_RELOAD, "Top",
+ 10, 80, 120, 20, &last_seq->strip->crop->top,
+ 0.0, 4096, 0.0, 0.0, "Top of source image");
+ uiDefButI(block, NUM,
+ B_SEQ_BUT_RELOAD, "Bottom",
+ 130, 80, 120, 20, &last_seq->strip->crop->bottom,
+ 0.0, 4096, 0.0, 0.0, "Bottom of source image");
+
+ uiDefButI(block, NUM,
+ B_SEQ_BUT_RELOAD, "Left",
+ 10, 60, 120, 20, &last_seq->strip->crop->left,
+ 0.0, 4096, 0.0, 0.0, "Left");
+ uiDefButI(block, NUM,
+ B_SEQ_BUT_RELOAD, "Right",
+ 130, 60, 120, 19, &last_seq->strip->crop->right,
+ 0.0, 4096, 0.0, 0.0, "Right");
+ }
+
+ uiDefButBitI(block, TOG, SEQ_USE_TRANSFORM,
+ B_SEQ_BUT_RELOAD, "Use Translate",
+ 10,40,240,19, &last_seq->flag,
+ 0.0, 1.0, 0, 0,
+ "Translate image before processing.");
+
+ if (last_seq->flag & SEQ_USE_TRANSFORM) {
+ if (!last_seq->strip->transform) {
+ last_seq->strip->transform =
+ MEM_callocN(sizeof(struct StripTransform),
+ "StripTransform");
+ }
+ uiDefButI(block, NUM,
+ B_SEQ_BUT_RELOAD, "X-Ofs",
+ 10, 20, 120, 20, &last_seq->strip->transform->xofs,
+ 0.0, 4096, 0.0, 0.0, "X Offset");
+ uiDefButI(block, NUM,
+ B_SEQ_BUT_RELOAD, "Y-Ofs",
+ 130, 20, 120, 20, &last_seq->strip->transform->yofs,
+ 0.0, 4096, 0.0, 0.0, "Y Offset");
+ }
+
+
+ uiDefButI(block, NUM, B_SEQ_BUT_RELOAD, "Preseek:",
+ 10,0,150,19, &last_seq->anim_preseek,
+ 0.0, 50.0, 100,0,"On MPEG-seeking preseek this many frames");
+
+}
+
+static void seq_panel_filter_video()
+{
+ Sequence *last_seq = get_last_seq();
+ uiBlock *block;
+ block = uiNewBlock(&curarea->uiblocks, "seq_panel_filter",
+ UI_EMBOSS, UI_HELV, curarea->win);
+
+ if(uiNewPanel(curarea, block, "Filter", "Sequencer",
+ 10, 230, 318, 204) == 0) return;
+
+
+ uiBlockBeginAlign(block);
+
+
+ uiDefButBitI(block, TOG, SEQ_MAKE_PREMUL,
+ B_SEQ_BUT_RELOAD, "Convert to Premul",
+ 10,110,150,19, &last_seq->flag,
+ 0.0, 21.0, 100, 0,
+ "Converts RGB values to become premultiplied with Alpha");
+
+ uiDefButBitI(block, TOG, SEQ_FILTERY,
+ B_SEQ_BUT_RELOAD, "FilterY",
+ 10,90,75,19, &last_seq->flag,
+ 0.0, 21.0, 100, 0,
+ "For video movies to remove fields");
+
+ uiDefButBitI(block, TOG, SEQ_MAKE_FLOAT,
+ B_SEQ_BUT_RELOAD, "Make Float",
+ 85,90,75,19, &last_seq->flag,
+ 0.0, 21.0, 100, 0,
+ "Convert input to float data");
+
+ uiDefButBitI(block, TOG, SEQ_FLIPX,
+ B_SEQ_BUT_RELOAD, "FlipX",
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list