Sound: Port more cases to be a part of dependency graph
Mainly covers RNA callbacks which were still doing direct scene update, which was causing crashes. Now corresponding ID_RECALC flags are used, so all scenes can update accordingly. Also tested animated volume/pitch on strips, which now works as well. Fixes T64133: Assert after changing FPS Fixes T64154: Immediate crash when changing the current frame on the timeline Fixes T64185: Client Crashes when the frame position value is changed Fixes T64190: Blender Crash using Timeline Editor Fixes T64128: Click to close bug type on timeline Fixes T64147: Crash when setting current frame from Python Fixes T64152: Blender Auto-Close on timeline change
This commit is contained in:
@@ -33,7 +33,6 @@
|
||||
#include "BKE_context.h"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_main.h"
|
||||
#include "BKE_sound.h"
|
||||
|
||||
#include "UI_view2d.h"
|
||||
|
||||
@@ -49,6 +48,8 @@
|
||||
#include "RNA_access.h"
|
||||
#include "RNA_define.h"
|
||||
|
||||
#include "DEG_depsgraph.h"
|
||||
|
||||
#include "WM_api.h"
|
||||
#include "WM_types.h"
|
||||
|
||||
@@ -74,7 +75,6 @@ static bool graphview_cursor_poll(bContext *C)
|
||||
/* Set the new frame number */
|
||||
static void graphview_cursor_apply(bContext *C, wmOperator *op)
|
||||
{
|
||||
Main *bmain = CTX_data_main(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SpaceGraph *sipo = CTX_wm_space_graph(C);
|
||||
/* this isn't technically "frame", but it'll do... */
|
||||
@@ -105,7 +105,7 @@ static void graphview_cursor_apply(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
SUBFRA = 0.0f;
|
||||
BKE_sound_update_and_seek(bmain, CTX_data_depsgraph(C));
|
||||
DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_SEEK);
|
||||
}
|
||||
|
||||
/* set the cursor value */
|
||||
|
||||
Reference in New Issue
Block a user