Commit: ff1b5af30710a802c5137dab3bce3a18203b3645 Author: Sergey Sharybin Date: Mon Jul 15 13:59:07 2019 +0200 Branches: master https://developer.blender.org/rBff1b5af30710a802c5137dab3bce3a18203b3645
Fix compositor ignoring mask parenting There are two aspects to the problem: - Dependency graph update for compositor preview was missing updates flush. Apparently, update for new frame style of update will take care of flushing, but not the update tagged style of update. This goes to a legacy dependency graph and is to be changed at some point, but not so close to the release. - Movie clips were missing from the compositor dependency graph. This fixes part of T66519. Reviewers: brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D5256 =================================================================== M source/blender/depsgraph/intern/builder/deg_builder_nodes.cc M source/blender/depsgraph/intern/builder/deg_builder_relations.cc M source/blender/editors/space_node/node_edit.c =================================================================== 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, _______________________________________________ Bf-blender-cvs mailing list [email protected] https://lists.blender.org/mailman/listinfo/bf-blender-cvs
