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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-05-11 12:21:30 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-05-11 12:23:11 +0300
commitd5c1c0b10d5cab0639c0635c8632040dc8b97468 (patch)
tree416ab655d0df5a348057bad20ae928c54e2c6a3e /source/blender/makesrna
parent13beeb58922747cc1a28bac58ceb1b44820808cd (diff)
Fix (unreported) broken freeing code for Sequencer.
Freeing sequencer would always do usercount, which is now forbidden when called from main ID freeing code. Annoying in 2.7x, much more critical issue in 2.8! Also, moved RNA sequencer API functions to proper rna_scene_api.c file.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_scene.c8
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c15
2 files changed, 15 insertions, 8 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 07e1c85c788..bddd78dc8e3 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -7113,14 +7113,6 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "SequenceEditor");
RNA_def_property_ui_text(prop, "Sequence Editor", "");
- func = RNA_def_function(srna, "sequence_editor_create", "BKE_sequencer_editing_ensure");
- RNA_def_function_ui_description(func, "Ensure sequence editor is valid in this scene");
- parm = RNA_def_pointer(func, "sequence_editor", "SequenceEditor", "", "New sequence editor data or NULL");
- RNA_def_function_return(func, parm);
-
- func = RNA_def_function(srna, "sequence_editor_clear", "BKE_sequencer_editing_free");
- RNA_def_function_ui_description(func, "Clear sequence editor in this scene");
-
/* Keying Sets */
prop = RNA_def_property(srna, "keying_sets", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "keyingsets", NULL);
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index e6d030877d7..058c0a321ec 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -185,6 +185,11 @@ static void rna_Scene_ray_cast(
}
}
+static void rna_Scene_sequencer_editing_free(Scene *scene)
+{
+ BKE_sequencer_editing_free(scene, true);
+}
+
#ifdef WITH_ALEMBIC
static void rna_Scene_alembic_export(
@@ -317,6 +322,16 @@ void RNA_api_scene(StructRNA *srna)
parm = RNA_def_float_matrix(func, "matrix", 4, 4, NULL, 0.0f, 0.0f, "", "Matrix", 0.0f, 0.0f);
RNA_def_function_output(func, parm);
+ /* Sequencer. */
+ func = RNA_def_function(srna, "sequence_editor_create", "BKE_sequencer_editing_ensure");
+ RNA_def_function_ui_description(func, "Ensure sequence editor is valid in this scene");
+ parm = RNA_def_pointer(func, "sequence_editor", "SequenceEditor", "", "New sequence editor data or NULL");
+ RNA_def_function_return(func, parm);
+
+ func = RNA_def_function(srna, "sequence_editor_clear", "rna_Scene_sequencer_editing_free");
+ RNA_def_function_ui_description(func, "Clear sequence editor in this scene");
+
+
#ifdef WITH_ALEMBIC
/* XXX Deprecated, will be removed in 2.8 in favour of calling the export operator. */
func = RNA_def_function(srna, "alembic_export", "rna_Scene_alembic_export");