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:
authorCampbell Barton <ideasman42@gmail.com>2009-06-11 15:54:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-06-11 15:54:56 +0400
commit776b8c0369300c0b76089acc577fd46882dd497c (patch)
tree15224694538ebc0435a79b9b8e6dea05dc2e8de6
parent3bdcd4f738e470dd906de239e70d54f44aa0d78e (diff)
sequencer patch from Xavier Thomas
- allocate transform and crop on "use" - bring back the scopes drawing (histogram, vectorscope, luma) - tweak properties layout (need more)
-rw-r--r--release/ui/space_sequencer.py39
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c4
-rw-r--r--source/blender/makesrna/intern/rna_sequence.c30
3 files changed, 56 insertions, 17 deletions
diff --git a/release/ui/space_sequencer.py b/release/ui/space_sequencer.py
index b1ee4153e42..b0caeee3e48 100644
--- a/release/ui/space_sequencer.py
+++ b/release/ui/space_sequencer.py
@@ -424,16 +424,26 @@ class SEQUENCER_PT_input(SequencerButtonsPanel):
if elem:
sub.itemR(elem, "filename", text="") # strip.elements[0] could be a fallback
- """
+ layout.itemR(strip, "use_translation")
+ if strip.transform:
+ flow = layout.column_flow()
+ flow.active = strip.use_translation
+ flow.itemR(strip.transform, "offset_x")
+ flow.itemR(strip.transform, "offset_y")
+
+
layout.itemR(strip, "use_crop")
+ if strip.crop:
+ flow = layout.column_flow()
+ flow.active = strip.use_crop
+ flow.itemR(strip.crop, "top")
+ flow.itemR(strip.crop, "left")
+ flow.itemR(strip.crop, "bottom")
+ flow.itemR(strip.crop, "right")
+
+ layout.itemR(strip, "animation_start_offset")
+ layout.itemR(strip, "animation_end_offset")
- flow = layout.column_flow()
- flow.active = strip.use_crop
- flow.itemR(strip, "top")
- flow.itemR(strip, "left")
- flow.itemR(strip, "bottom")
- flow.itemR(strip, "right")
- """
class SEQUENCER_PT_filter(SequencerButtonsPanel):
__label__ = "Filter"
@@ -471,15 +481,18 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel):
layout.itemR(strip, "use_color_balance")
if strip.color_balance: # TODO - need to add this somehow
- col = layout.row()
-
+ row = layout.row()
+ row.active = strip.use_color_balance
+ col = row.column()
col.itemR(strip.color_balance, "lift")
- col.itemR(strip.color_balance, "gamma")
- col.itemR(strip.color_balance, "gain")
- col = layout.row()
col.itemR(strip.color_balance, "inverse_lift")
+ col = row.column()
+ col.itemR(strip.color_balance, "gamma")
col.itemR(strip.color_balance, "inverse_gamma")
+ col = row.column()
+ col.itemR(strip.color_balance, "gain")
col.itemR(strip.color_balance, "inverse_gain")
+
class SEQUENCER_PT_proxy(SequencerButtonsPanel):
__label__ = "Proxy"
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index bd31d8d86ff..245076508a0 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -790,8 +790,8 @@ static void draw_image_seq(Scene *scene, ARegion *ar, SpaceSeq *sseq)
if(ibuf->rect==NULL && ibuf->rect_float == NULL)
return;
-
- switch(sseq->mainb != SEQ_DRAW_SEQUENCE) {
+
+ switch(sseq->mainb) {
case SEQ_DRAW_IMG_IMBUF:
if (sseq->zebra != 0) {
ibuf = make_zebra_view_from_ibuf(ibuf, sseq->zebra);
diff --git a/source/blender/makesrna/intern/rna_sequence.c b/source/blender/makesrna/intern/rna_sequence.c
index 10cfb47b385..754a3b44182 100644
--- a/source/blender/makesrna/intern/rna_sequence.c
+++ b/source/blender/makesrna/intern/rna_sequence.c
@@ -98,6 +98,7 @@ static void rna_SequenceEditor_channel_set(PointerRNA *ptr, int value)
sort_seq(sce);
}
+/* properties that need to allocate structs */
static int rna_SequenceEditor_use_color_balance_set(PointerRNA *ptr, int value)
{
Sequence *seq= (Sequence*)ptr->data;
@@ -131,6 +132,31 @@ static int rna_SequenceEditor_use_proxy_set(PointerRNA *ptr, int value)
}
}
+static int rna_SequenceEditor_use_translation_set(PointerRNA *ptr, int value)
+{
+ Sequence *seq= (Sequence*)ptr->data;
+ if(value) {
+ seq->flag |= SEQ_USE_TRANSFORM;
+ if(seq->strip->transform == NULL) {
+ seq->strip->transform = MEM_callocN(sizeof(struct StripTransform), "StripTransform");
+ }
+ } else {
+ seq->flag ^= SEQ_USE_TRANSFORM;
+ }
+}
+
+static int rna_SequenceEditor_use_crop_set(PointerRNA *ptr, int value)
+{
+ Sequence *seq= (Sequence*)ptr->data;
+ if(value) {
+ seq->flag |= SEQ_USE_CROP;
+ if(seq->strip->crop == NULL) {
+ seq->strip->crop = MEM_callocN(sizeof(struct StripCrop), "StripCrop");
+ }
+ } else {
+ seq->flag ^= SEQ_USE_CROP;
+ }
+}
/* name functions that ignore the first two characters */
static void rna_Sequence_name_get(PointerRNA *ptr, char *value)
{
@@ -546,8 +572,8 @@ static void rna_def_filter_video(StructRNA *srna)
prop= RNA_def_property(srna, "use_translation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_TRANSFORM);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // allocate transform
RNA_def_property_ui_text(prop, "Use Translation", "Translate image before processing.");
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_SequenceEditor_use_translation_set");
prop= RNA_def_property(srna, "transform", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "strip->transform");
@@ -555,8 +581,8 @@ static void rna_def_filter_video(StructRNA *srna)
prop= RNA_def_property(srna, "use_crop", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_CROP);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // allocate crop
RNA_def_property_ui_text(prop, "Use Crop", "Crop image before processing.");
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_SequenceEditor_use_crop_set");
prop= RNA_def_property(srna, "crop", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "strip->crop");