diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-06-11 15:54:56 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-06-11 15:54:56 +0400 |
commit | 776b8c0369300c0b76089acc577fd46882dd497c (patch) | |
tree | 15224694538ebc0435a79b9b8e6dea05dc2e8de6 /source | |
parent | 3bdcd4f738e470dd906de239e70d54f44aa0d78e (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)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sequence.c | 30 |
2 files changed, 30 insertions, 4 deletions
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"); |