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 <bastien@blender.org>2021-09-27 13:29:42 +0300
committerBastien Montagne <bastien@blender.org>2021-09-27 16:33:58 +0300
commitb077f0684e28ce3f200cab2a36657fb253be1786 (patch)
tree6d3a347c0b6ab8350b879b77d89b1b20e16e44b5 /source/blender/makesrna/intern/rna_sequencer.c
parenta6b53ef99492267f8f27fd58ea35104b88e1bec8 (diff)
RNA: Fix bad usages of `scene` pointer in Update callbacks.
Scene passed to the update callback is the active scene it //may// not be that actual ID owner of the affected data (although in practice it should always be currently).
Diffstat (limited to 'source/blender/makesrna/intern/rna_sequencer.c')
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index b713ffb68b4..6a03ee03f71 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -840,9 +840,9 @@ static int rna_Sequence_proxy_filepath_length(PointerRNA *ptr)
return strlen(path);
}
-static void rna_Sequence_audio_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
+static void rna_Sequence_audio_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS);
+ DEG_id_tag_update(ptr->owner_id, ID_RECALC_SEQUENCER_STRIPS);
}
static void rna_Sequence_pan_range(
@@ -940,8 +940,9 @@ static void rna_Sequence_filepath_update(Main *bmain, Scene *UNUSED(scene), Poin
rna_Sequence_invalidate_raw_update(bmain, scene, ptr);
}
-static void rna_Sequence_sound_update(Main *bmain, Scene *scene, PointerRNA *UNUSED(ptr))
+static void rna_Sequence_sound_update(Main *bmain, Scene *UNUSED(active_scene), PointerRNA *ptr)
{
+ Scene *scene = (Scene *)ptr->owner_id;
DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS | ID_RECALC_AUDIO);
DEG_relations_tag_update(bmain);
}