Fix #118213: Applying effects to VSE Color/Text strips makes both the effect and source strip visible

This is different from applying effects to regular "source media" strips
like images or movies; an effect "hides" the input strip when it is
below itself in the channel.

Apply the same treatment to Color & Text strips. Fixes #118213.

If someone wants previous behavior for some reason, they can drag
the effect applied on Color/Text to be below the input strip.

Pull Request: https://projects.blender.org/blender/blender/pulls/118269
This commit is contained in:
Aras Pranckevicius
2024-02-16 20:56:06 +02:00
parent 324ff4ddef
commit 6508ed8a3f

View File

@@ -1,5 +1,5 @@
/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
* SPDX-FileCopyrightText: 2003-2009 Blender Authors
* SPDX-FileCopyrightText: 2003-2024 Blender Authors
* SPDX-FileCopyrightText: 2005-2006 Peter Schlaile <peter [at] schlaile [dot] de>
*
* SPDX-License-Identifier: GPL-2.0-or-later */
@@ -21,6 +21,7 @@
#include "BKE_scene.h"
#include "SEQ_effects.hh"
#include "SEQ_iterator.hh"
#include "SEQ_relations.hh"
#include "SEQ_render.hh"
@@ -178,8 +179,8 @@ static bool must_render_strip(VectorSet<Sequence *> &strips, Sequence *strip)
}
}
/* All effects are rendered (with respect to conditions above). */
if ((strip->type & SEQ_TYPE_EFFECT) != 0) {
/* All non-generator effects are rendered (with respect to conditions above). */
if ((strip->type & SEQ_TYPE_EFFECT) != 0 && SEQ_effect_get_num_inputs(strip->type) != 0) {
return true;
}