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:
authorPeter Schlaile <peter@schlaile.de>2010-11-28 21:23:21 +0300
committerPeter Schlaile <peter@schlaile.de>2010-11-28 21:23:21 +0300
commit510920a299478cdd50ce8ce4ff43d14eb4e2c2e4 (patch)
tree9b71b0e3e8c3ab5a746cc2f018c73541237c0893 /source/blender/makesrna
parent3f6eb67b7718e329a482d71d2340989ee0a15e76 (diff)
== Sequencer ==
This fixes Orig Dimension display (mostly). * orx, ory both didn't get calculated, if dimension already matched * putting them into Strip instead of StripData ment, that using images of different dimensions in one strip could lead to incorrect results Still TODO: on file open, timeline display happens before preview display which means: orig_width and height are calculated after the first draw of N-keys dialog. You have to hit refresh (or scrub one frame) to get the right values displayed.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c38
1 files changed, 15 insertions, 23 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index f56440d9c13..958adad86e3 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -180,19 +180,6 @@ static int rna_Sequence_frame_length_get(PointerRNA *ptr)
return seq_tx_get_final_right(seq, 0)-seq_tx_get_final_left(seq, 0);
}
-static int rna_Sequence_orx_get(PointerRNA *ptr)
-{
- Sequence *seq= (Sequence*)ptr->data;
- return seq->strip->orx;
-}
-
-static int rna_Sequence_ory_get(PointerRNA *ptr)
-{
- Sequence *seq= (Sequence*)ptr->data;
- return seq->strip->ory;
-}
-
-
static void rna_Sequence_channel_set(PointerRNA *ptr, int value)
{
Sequence *seq= (Sequence*)ptr->data;
@@ -679,6 +666,16 @@ static void rna_def_strip_element(BlenderRNA *brna)
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Filename", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+
+ prop= RNA_def_property(srna, "orig_width", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "orig_width");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Orig Width", "Original image width");
+
+ prop= RNA_def_property(srna, "orig_height", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "orig_height");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Orig Height", "Original image height");
}
static void rna_def_strip_crop(BlenderRNA *brna)
@@ -1200,16 +1197,6 @@ static void rna_def_input(StructRNA *srna)
RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_anim_endofs_final_set", NULL); // overlap tests
RNA_def_property_ui_text(prop, "Animation End Offset", "Animation end offset (trim end)");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
-
- prop= RNA_def_property(srna, "orig_width", PROP_INT, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Orig Width", "Original image width");
- RNA_def_property_int_funcs(prop, "rna_Sequence_orx_get", NULL,NULL);
-
- prop= RNA_def_property(srna, "orig_height", PROP_INT, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Orig Height", "Original image height");
- RNA_def_property_int_funcs(prop, "rna_Sequence_ory_get", NULL,NULL);
}
static void rna_def_image(BlenderRNA *brna)
@@ -1295,6 +1282,11 @@ static void rna_def_movie(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "MPEG Preseek", "For MPEG movies, preseek this many frames");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ prop= RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "strip->stripdata", "strip->len");
+ RNA_def_property_struct_type(prop, "SequenceElement");
+ RNA_def_property_ui_text(prop, "Elements", "");
+
prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_ui_text(prop, "File", "");
RNA_def_property_string_funcs(prop, "rna_Sequence_filepath_get", "rna_Sequence_filepath_length",