Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-08-19 19:41:56 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-08-19 19:41:56 +0400
commit995a19a983b2c44ec9afec049395d7c1b4320137 (patch)
tree8333563ae983641434179839755aab67ecdc2aad /source/blender/makesdna
parent994d75b6ae78fee99afd949292e48c4f32292995 (diff)
Sequencer: per-sequence modifier stack for color grading
This implements basic color grading modifiers in sequencer, supporting color balance, RGB curves and HUE corrections. Implementation is close to object modifiers, some details are there: http://wiki.blender.org/index.php/User:Nazg-gul/SequencerModifiers Modifiers supports multi-threaded calculation, masks and instant parameter changes. Also added cache for pre-processed image buffers for current frame, so changing sequence properties does not require rendering of original sequence (like rendering scene, loading file from disk and so)
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h61
1 files changed, 60 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index 16e8b8904fa..d6c59456bd0 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -34,6 +34,7 @@
#define __DNA_SEQUENCE_TYPES_H__
#include "DNA_defs.h"
+#include "DNA_color_types.h"
#include "DNA_listBase.h"
#include "DNA_vec_types.h"
@@ -167,6 +168,9 @@ typedef struct Sequence {
/* is sfra needed anymore? - it looks like its only used in one place */
int sfra, pad; /* starting frame according to the timeline of the scene. */
+
+ /* modifiers */
+ ListBase modifiers;
} Sequence;
typedef struct MetaStack {
@@ -229,6 +233,40 @@ typedef struct SpeedControlVars {
int lastValidFrame;
} SpeedControlVars;
+/* ***************** Sequence modifiers ****************** */
+
+typedef struct SequenceModifierData {
+ struct SequenceModifierData *next, *prev;
+ int type, flag;
+ char name[64]; /* MAX_NAME */
+
+ /* mask input, either sequence or maks ID */
+ int mask_input_type, pad;
+
+ struct Sequence *mask_sequence;
+ struct Mask *mask_id;
+} SequenceModifierData;
+
+typedef struct ColorBalanceModifierData {
+ SequenceModifierData modifier;
+
+ StripColorBalance color_balance;
+ float color_multiply;
+ int pad;
+} ColorBalanceModifierData;
+
+typedef struct CurvesModifierData {
+ SequenceModifierData modifier;
+
+ struct CurveMapping curve_mapping;
+} CurvesModifierData;
+
+typedef struct HueCorrectModifierData {
+ SequenceModifierData modifier;
+
+ struct CurveMapping curve_mapping;
+} HueCorrectModifierData;
+
#define MAXSEQ 32
#define SELECT 1
@@ -352,5 +390,26 @@ enum {
#define SEQ_HAS_PATH(_seq) (ELEM4((_seq)->type, SEQ_TYPE_MOVIE, SEQ_TYPE_IMAGE, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD))
-#endif
+/* modifiers */
+
+/* SequenceModifierData->type */
+enum {
+ seqModifierType_ColorBalance = 1,
+ seqModifierType_Curves = 2,
+ seqModifierType_HueCorrect = 3,
+
+ NUM_SEQUENCE_MODIFIER_TYPES
+};
+
+/* SequenceModifierData->flag */
+enum {
+ SEQUENCE_MODIFIER_MUTE = (1 << 0),
+ SEQUENCE_MODIFIER_EXPANDED = (1 << 1),
+};
+
+enum {
+ SEQUENCE_MASK_INPUT_STRIP = 0,
+ SEQUENCE_MASK_INPUT_ID = 1
+};
+#endif