diff options
3 files changed, 32 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index 648e4a3334a..fa6d7bc6028 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -1528,6 +1528,19 @@ void DepsgraphNodeBuilder::build_mask(Mask *mask) NodeType::PARAMETERS, OperationCode::MASK_EVAL, function_bind(BKE_mask_eval_update, _1, mask_cow)); + /* Build parents. */ + LISTBASE_FOREACH (MaskLayer *, mask_layer, &mask->masklayers) { + LISTBASE_FOREACH (MaskSpline *, spline, &mask_layer->splines) { + for (int i = 0; i < spline->tot_point; i++) { + MaskSplinePoint *point = &spline->points[i]; + MaskParent *parent = &point->parent; + if (parent == NULL || parent->id == NULL) { + continue; + } + build_id(parent->id); + } + } + } } void DepsgraphNodeBuilder::build_movieclip(MovieClip *clip) diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index d2f06136b7e..c59fb5f2a38 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -2329,6 +2329,24 @@ void DepsgraphRelationBuilder::build_mask(Mask *mask) /* Final mask evaluation. */ OperationKey mask_eval_key(mask_id, NodeType::PARAMETERS, OperationCode::MASK_EVAL); add_relation(mask_animation_key, mask_eval_key, "Mask Animation -> Mask Eval"); + /* Build parents. */ + LISTBASE_FOREACH (MaskLayer *, mask_layer, &mask->masklayers) { + LISTBASE_FOREACH (MaskSpline *, spline, &mask_layer->splines) { + for (int i = 0; i < spline->tot_point; i++) { + MaskSplinePoint *point = &spline->points[i]; + MaskParent *parent = &point->parent; + if (parent == NULL || parent->id == NULL) { + continue; + } + build_id(parent->id); + if (parent->id_type == ID_MC) { + OperationKey movieclip_eval_key( + parent->id, NodeType::PARAMETERS, OperationCode::MOVIECLIP_EVAL); + add_relation(movieclip_eval_key, mask_eval_key, "Movie Clip -> Mask Eval"); + } + } + } + } } void DepsgraphRelationBuilder::build_movieclip(MovieClip *clip) diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 08768df9d1d..d31256a1425 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -210,6 +210,7 @@ static void compo_initjob(void *cjv) /* NOTE: Don't update animation to preserve unkeyed changes, this means can not use * evaluate_on_framechange. */ + DEG_graph_flush_update(bmain, cj->compositor_depsgraph); DEG_evaluate_on_refresh(cj->compositor_depsgraph); bNodeTree *ntree_eval = (bNodeTree *)DEG_get_evaluated_id(cj->compositor_depsgraph, |