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
This commit is contained in:
parent
ee55ac19dc
commit
ff1b5af307
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue