ApplyMaskConditional
Composite, but only on the frames you say
- destination
- source
- mask
- IMAGE
ApplyMask has a cousin that refuses to work most of the time, and that refusal is the feature. ApplyMaskConditional does the same masked composite - destination × (1−mask) + source × mask - but only on frames you list. On every other frame it returns destination untouched, as if it were a wire. In a per-frame loop where some frames need a composite and others don't, that saves you from building branching graphs.
The trigger inputs are the whole story:
current_frame_number- the frame the loop is on right now. Wire your counter (FixedQueue'scurrent).apply_at_frames- a comma-separated list of frame numbers, e.g.0, 15, 30, 45. This is the frame gate.don_not_apply_at_frames(note the author's typo in the name, it's in the schema) - a boolean that inverts the gate: set it true and the composite happens on all frames except the ones you listed. Great for "everything except the intro shot."
Then the usual destination, source, and optional mask. The destination output is the result.
Two behaviors worth knowing
First, the gate check happens first and the composite only runs when it passes - but the node is a little more forgiving than plain ApplyMask: when it does composite, it resizes both the mask and the source to the destination's dimensions with bilinear interpolation before blending. So a mismatched mask won't blow up here the way it can with the non-conditional version. It's still not magic - keep sizes sane - but it's a real robustness improvement.
Second, decide whether the frame list should be inclusive or exclusive before you wire it. The default (boolean off) is "apply only on listed frames," which is the one you want for spot composites: you want a style touch-up on frames 10–20, you list 10,11,12,...,20 and leave the rest alone. Invert it and you're building an exclusion list, which is often the cleaner way to say "everywhere except the title card." Choose once and don't flip it mid-debug, because both modes are valid and the bug is always "I forgot which mode I'm in."
When would you use this over plain ApplyMask? Any time your composite isn't meant to run every frame - special-effect windows, style pulses, or keyframed effects that only exist in a range. If you're compositing on every frame (the normal flow-blend case), skip the conditionals and use ApplyMask; the extra inputs here are exactly the overhead you don't need.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| destination | IMAGE | — | |
| source | IMAGE | — | |
| current_frame_number | INT | — | |
| apply_at_frames | STRING | — | |
| don_not_apply_at_frames | BOOLEAN | — | |
| maskopt | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |