diff options
Diffstat (limited to 'source/blender/depsgraph/intern/builder')
7 files changed, 7 insertions, 92 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index 64ca5902136..37712296bdf 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -58,7 +58,6 @@ extern "C" { #include "DNA_lightprobe_types.h" #include "DNA_rigidbody_types.h" #include "DNA_scene_types.h" -#include "DNA_sequence_types.h" #include "DNA_sound_types.h" #include "DNA_speaker_types.h" #include "DNA_texture_types.h" @@ -90,8 +89,6 @@ extern "C" { #include "BKE_particle.h" #include "BKE_pointcache.h" #include "BKE_rigidbody.h" -#include "BKE_scene.h" -#include "BKE_sequencer.h" #include "BKE_shader_fx.h" #include "BKE_sound.h" #include "BKE_tracking.h" @@ -1563,42 +1560,12 @@ void DepsgraphNodeBuilder::build_sound(bSound *sound) if (built_map_.checkIsBuiltAndTag(sound)) { return; } - add_id_node(&sound->id); - bSound *sound_cow = get_cow_datablock(sound); - add_operation_node(&sound->id, - NodeType::AUDIO, - OperationCode::SOUND_EVAL, - function_bind(BKE_sound_evaluate, _1, bmain_, sound_cow)); + /* Placeholder so we can add relations and tag ID node for update. */ + add_operation_node(&sound->id, NodeType::AUDIO, OperationCode::SOUND_EVAL); build_animdata(&sound->id); build_parameters(&sound->id); } -void DepsgraphNodeBuilder::build_sequencer(Scene *scene) -{ - if (scene->ed == NULL) { - return; - } - Scene *scene_cow = get_cow_datablock(scene_); - add_operation_node(&scene->id, - NodeType::SEQUENCER, - OperationCode::SEQUENCES_EVAL, - function_bind(BKE_scene_eval_sequencer_sequences, _1, scene_cow)); - /* Make sure data for sequences is in the graph. */ - Sequence *seq; - SEQ_BEGIN (scene->ed, seq) { - if (seq->sound != NULL) { - build_sound(seq->sound); - } - /* TODO(sergey): Movie clip, scene, camera, mask. */ - } - SEQ_END; -} - -void DepsgraphNodeBuilder::build_scene_audio(Scene *scene) -{ - add_operation_node(&scene->id, NodeType::AUDIO, OperationCode::SOUND_EVAL); -} - /* **** ID traversal callbacks functions **** */ void DepsgraphNodeBuilder::modifier_walk(void *user_data, diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h index 9074efefe50..68fb9ab6cc2 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h @@ -208,8 +208,6 @@ class DepsgraphNodeBuilder : public DepsgraphBuilder { void build_lightprobe(LightProbe *probe); void build_speaker(Speaker *speaker); void build_sound(bSound *sound); - void build_sequencer(Scene *scene); - void build_scene_audio(Scene *scene); /* Per-ID information about what was already in the dependency graph. * Allows to re-use certain values, to speed up following evaluation. */ diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc index 1b9524e5832..60b711d76d3 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc @@ -152,11 +152,6 @@ void DepsgraphNodeBuilder::build_view_layer(Scene *scene, build_collection(NULL, fls->group); } } - /* Sequencer. */ - if (linked_state == DEG_ID_LINKED_DIRECTLY) { - build_scene_audio(scene); - build_sequencer(scene); - } /* Collections. */ add_operation_node( &scene->id, diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 4c4bc01a3dd..9fc5dc64a60 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -58,7 +58,6 @@ extern "C" { #include "DNA_object_types.h" #include "DNA_rigidbody_types.h" #include "DNA_scene_types.h" -#include "DNA_sequence_types.h" #include "DNA_sound_types.h" #include "DNA_speaker_types.h" #include "DNA_texture_types.h" @@ -85,7 +84,6 @@ extern "C" { #include "BKE_particle.h" #include "BKE_pointcache.h" #include "BKE_rigidbody.h" -#include "BKE_sequencer.h" #include "BKE_shader_fx.h" #include "BKE_shrinkwrap.h" #include "BKE_sound.h" @@ -2316,35 +2314,6 @@ void DepsgraphRelationBuilder::build_sound(bSound *sound) build_parameters(&sound->id); } -void DepsgraphRelationBuilder::build_sequencer(Scene *scene) -{ - if (scene->ed == NULL) { - return; - } - /* Make sure dependencies from sequences data goes to the sequencer evaluation. */ - ComponentKey sequencer_key(&scene->id, NodeType::SEQUENCER); - Sequence *seq; - bool has_audio_strips = false; - SEQ_BEGIN (scene->ed, seq) { - if (seq->sound != NULL) { - build_sound(seq->sound); - ComponentKey sound_key(&seq->sound->id, NodeType::AUDIO); - add_relation(sound_key, sequencer_key, "Sound -> Sequencer"); - has_audio_strips = true; - } - /* TODO(sergey): Movie clip, scene, camera, mask. */ - } - SEQ_END; - if (has_audio_strips) { - ComponentKey scene_audio_key(&scene->id, NodeType::AUDIO); - add_relation(sequencer_key, scene_audio_key, "Sequencer -> Audio"); - } -} - -void DepsgraphRelationBuilder::build_scene_audio(Scene * /*scene*/) -{ -} - void DepsgraphRelationBuilder::build_copy_on_write_relations() { for (IDNode *id_node : graph_->id_nodes) { @@ -2408,10 +2377,6 @@ void DepsgraphRelationBuilder::build_copy_on_write_relations(IDNode *id_node) (id_type == ID_CF && comp_node->type == NodeType::CACHE)) { rel_flag &= ~RELATION_FLAG_NO_FLUSH; } - /* TODO(sergey): Needs better solution for this. */ - if (id_type == ID_SO) { - rel_flag &= ~RELATION_FLAG_NO_FLUSH; - } /* Notes on exceptions: * - Parameters component is where drivers are living. Changing any * of the (custom) properties in the original datablock (even the diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.h b/source/blender/depsgraph/intern/builder/deg_builder_relations.h index 30fbe5bcf6b..e84bd857090 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.h @@ -41,7 +41,6 @@ #include "intern/builder/deg_builder_rna.h" #include "intern/depsgraph.h" #include "intern/node/deg_node.h" -#include "intern/node/deg_node_id.h" #include "intern/node/deg_node_component.h" #include "intern/node/deg_node_operation.h" @@ -196,9 +195,7 @@ class DepsgraphRelationBuilder : public DepsgraphBuilder { void build_id(ID *id); void build_layer_collections(ListBase *lb); - void build_view_layer(Scene *scene, - ViewLayer *view_layer, - eDepsNode_LinkedState_Type linked_state); + void build_view_layer(Scene *scene, ViewLayer *view_layer); void build_collection(LayerCollection *from_layer_collection, Object *object, Collection *collection); @@ -269,8 +266,6 @@ class DepsgraphRelationBuilder : public DepsgraphBuilder { void build_lightprobe(LightProbe *probe); void build_speaker(Speaker *speaker); void build_sound(bSound *sound); - void build_sequencer(Scene *scene); - void build_scene_audio(Scene *scene); void build_nested_datablock(ID *owner, ID *id); void build_nested_nodetree(ID *owner, bNodeTree *ntree); diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc index cadb4ab3611..a325544e046 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc @@ -75,9 +75,7 @@ void DepsgraphRelationBuilder::build_layer_collections(ListBase *lb) } } -void DepsgraphRelationBuilder::build_view_layer(Scene *scene, - ViewLayer *view_layer, - eDepsNode_LinkedState_Type linked_state) +void DepsgraphRelationBuilder::build_view_layer(Scene *scene, ViewLayer *view_layer) { /* Setup currently building context. */ scene_ = scene; @@ -130,15 +128,10 @@ void DepsgraphRelationBuilder::build_view_layer(Scene *scene, build_collection(NULL, NULL, fls->group); } } - /* Sequencer. */ - if (linked_state == DEG_ID_LINKED_DIRECTLY) { - build_scene_audio(scene); - build_sequencer(scene); - } /* Build all set scenes. */ if (scene->set != NULL) { ViewLayer *set_view_layer = BKE_view_layer_default_render(scene->set); - build_view_layer(scene->set, set_view_layer, DEG_ID_LINKED_VIA_SET); + build_view_layer(scene->set, set_view_layer); } } diff --git a/source/blender/depsgraph/intern/builder/deg_builder_rna.cc b/source/blender/depsgraph/intern/builder/deg_builder_rna.cc index ca60e4370cd..ea5f86a31a8 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_rna.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_rna.cc @@ -309,8 +309,10 @@ RNANodeIdentifier RNANodeQuery::construct_node_identifier(const PointerRNA *ptr, return node_identifier; } else if (RNA_struct_is_a(ptr->type, &RNA_Sequence)) { + const Sequence *seq = static_cast<Sequence *>(ptr->data); /* Sequencer strip */ node_identifier.type = NodeType::SEQUENCER; + node_identifier.component_name = seq->name; return node_identifier; } else if (RNA_struct_is_a(ptr->type, &RNA_NodeSocket)) { |