Fix T78920: missing depsgraph relation when using sound strips in VSE
Having a sound strip in the VSE caused a missing relation error to be logged on the console. This was caused by the AUDIO depsgraph component not having an entry node. This commits adds that node, and sets up relations correctly. Differential Revision: https://developer.blender.org/D8290 Reviewed By: Sergey
This commit is contained in:
@@ -1831,6 +1831,10 @@ void DepsgraphNodeBuilder::build_scene_audio(Scene *scene)
|
||||
return;
|
||||
}
|
||||
|
||||
OperationNode *audio_entry_node = add_operation_node(
|
||||
&scene->id, NodeType::AUDIO, OperationCode::AUDIO_ENTRY);
|
||||
audio_entry_node->set_as_entry();
|
||||
|
||||
add_operation_node(&scene->id, NodeType::AUDIO, OperationCode::SOUND_EVAL);
|
||||
|
||||
Scene *scene_cow = get_cow_datablock(scene);
|
||||
|
||||
@@ -2655,8 +2655,10 @@ void DepsgraphRelationBuilder::build_scene_sequencer(Scene *scene)
|
||||
|
||||
void DepsgraphRelationBuilder::build_scene_audio(Scene *scene)
|
||||
{
|
||||
OperationKey scene_audio_entry_key(&scene->id, NodeType::AUDIO, OperationCode::AUDIO_ENTRY);
|
||||
OperationKey scene_audio_volume_key(&scene->id, NodeType::AUDIO, OperationCode::AUDIO_VOLUME);
|
||||
OperationKey scene_sound_eval_key(&scene->id, NodeType::AUDIO, OperationCode::SOUND_EVAL);
|
||||
add_relation(scene_audio_entry_key, scene_audio_volume_key, "Audio Entry -> Volume");
|
||||
add_relation(scene_audio_volume_key, scene_sound_eval_key, "Audio Volume -> Sound");
|
||||
|
||||
if (scene->audio.flag & AUDIO_VOLUME_ANIMATED) {
|
||||
|
||||
@@ -61,6 +61,8 @@ const char *operationCodeAsString(OperationCode opcode)
|
||||
/* Scene related. */
|
||||
case OperationCode::SCENE_EVAL:
|
||||
return "SCENE_EVAL";
|
||||
case OperationCode::AUDIO_ENTRY:
|
||||
return "AUDIO_ENTRY";
|
||||
case OperationCode::AUDIO_VOLUME:
|
||||
return "AUDIO_VOLUME";
|
||||
/* Object related. */
|
||||
|
||||
@@ -61,6 +61,7 @@ enum class OperationCode {
|
||||
|
||||
/* Scene related. ------------------------------------------------------- */
|
||||
SCENE_EVAL,
|
||||
AUDIO_ENTRY,
|
||||
AUDIO_VOLUME,
|
||||
|
||||
/* Object related. ------------------------------------------------------ */
|
||||
|
||||
Reference in New Issue
Block a user