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>2013-01-02 20:15:45 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-01-02 20:15:45 +0400
commitea2224e28d179d1bba3e278750a42c36fa3939c5 (patch)
treebb70162f24c455bc8b866f2253985b19b9d92bf0 /source/blender
parentc0e1f23e5a6ade738aea75571f2fe374bfecd854 (diff)
changes needed for EDL import to work again.
- add sequence.update(data=False) function. - made some sequence vars editable. - correct some comments. also rename rna function sequence.getStripElem() --> strip_elem_from_frame()
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/sequencer.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c2
-rw-r--r--source/blender/editors/transform/transform_conversions.c2
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c8
-rw-r--r--source/blender/makesrna/intern/rna_sequencer_api.c20
-rw-r--r--source/blender/python/intern/bpy_interface.c5
6 files changed, 30 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 69c125b0ece..a5c1c990b9e 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -633,7 +633,7 @@ void BKE_sequence_calc(Scene *scene, Sequence *seq)
}
}
-/* note: caller should run calc_sequence(scene, seq) after */
+/* note: caller should run BKE_sequence_calc(scene, seq) after */
void BKE_sequence_reload_new_file(Scene *scene, Sequence *seq, int lock_range)
{
char str[FILE_MAX];
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index 6219a9061f4..0ade57b7ca9 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -871,7 +871,7 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op)
if (BKE_sequence_test_overlap(ed->seqbasep, seq)) BKE_sequence_base_shuffle(ed->seqbasep, seq, scene);
}
- BKE_sequencer_update_changed_seq_and_deps(scene, seq, 1, 1); /* runs calc_sequence */
+ BKE_sequencer_update_changed_seq_and_deps(scene, seq, 1, 1); /* runs BKE_sequence_calc */
/* not sure if this is needed with update_changed_seq_and_deps.
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 82ad236f7ae..12b0341d395 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -4090,7 +4090,7 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
/* Meta's can only directly be moved between channels since they
* don't have their start and length set directly (children affect that)
* since this Meta is nested we don't need any of its data in fact.
- * calc_sequence() will update its settings when run on the toplevel meta */
+ * BKE_sequence_calc() will update its settings when run on the toplevel meta */
*flag = 0;
*count = 0;
*recursive = TRUE;
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index e849e84ff38..a41551fc8da 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -1401,26 +1401,26 @@ static void rna_def_sequence(BlenderRNA *brna)
prop = RNA_def_property(srna, "frame_offset_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "startofs");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
+// RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
RNA_def_property_ui_text(prop, "Start Offset", "");
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "frame_offset_end", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "endofs");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
+// RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
RNA_def_property_ui_text(prop, "End Offset", "");
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "frame_still_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "startstill");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
+// RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
RNA_def_property_range(prop, 0, MAXFRAME);
RNA_def_property_ui_text(prop, "Start Still", "");
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "frame_still_end", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "endstill");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
+// RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
RNA_def_property_range(prop, 0, MAXFRAME);
RNA_def_property_ui_text(prop, "End Still", "");
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c
index 7602ec99c2b..69d35a3c2f0 100644
--- a/source/blender/makesrna/intern/rna_sequencer_api.c
+++ b/source/blender/makesrna/intern/rna_sequencer_api.c
@@ -37,6 +37,8 @@
#include "DNA_scene_types.h"
#include "DNA_sequence_types.h"
+#include "BLI_utildefines.h"
+
#ifdef RNA_RUNTIME
//#include "DNA_anim_types.h"
@@ -62,6 +64,16 @@
#include "WM_api.h"
+static void rna_Sequence_update_rnafunc(ID *id, Sequence *self, int do_data)
+{
+ if (do_data) {
+ BKE_sequencer_update_changed_seq_and_deps((Scene *)id, self, true, true);
+ // new_tstripdata(self); // need 2.6x version of this.
+ }
+ BKE_sequence_calc((Scene *)id, self);
+ BKE_sequence_calc_disp((Scene *)id, self);
+}
+
static void rna_Sequence_swap_internal(Sequence *seq_self, ReportList *reports, Sequence *seq_other)
{
const char *error_msg;
@@ -389,7 +401,13 @@ void RNA_api_sequence_strip(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func = RNA_def_function(srna, "getStripElem", "BKE_sequencer_give_stripelem");
+ func = RNA_def_function(srna, "update", "rna_Sequence_update_rnafunc");
+ RNA_def_function_flag(func, FUNC_USE_SELF_ID);
+ RNA_def_function_ui_description(func, "Update the strip dimensions");
+ parm = RNA_def_boolean(func, "data", false, "Frame",
+ "Update strip data");
+
+ func = RNA_def_function(srna, "strip_elem_from_frame", "BKE_sequencer_give_stripelem");
RNA_def_function_ui_description(func, "Return the strip element from a given frame or None");
parm = RNA_def_int(func, "frame", 0, -MAXFRAME, MAXFRAME, "Frame",
"The frame to get the strip element from", -MAXFRAME, MAXFRAME);
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index 08eb29a2a3e..d71c85bc3a0 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -818,7 +818,7 @@ typedef struct {
} dealloc_obj;
/* call once __file__ is set */
-void bpy_module_delay_init(PyObject *bpy_proxy)
+static void bpy_module_delay_init(PyObject *bpy_proxy)
{
const int argc = 1;
const char *argv[2];
@@ -857,6 +857,9 @@ static void dealloc_obj_dealloc(PyObject *self)
}
PyMODINIT_FUNC
+PyInit_bpy(void);
+
+PyMODINIT_FUNC
PyInit_bpy(void)
{
PyObject *bpy_proxy = PyModule_Create(&bpy_proxy_def);