fix: preserve legacy CC particle compositing (#1898)

Before v0.10.0 the CC particle systems composited their particles over the
layer, so a particle layer still showed the solid or precomp under it and any
earlier effect in the stack. v0.10.0 (4e7eafa8) made them replace the layer to
match After Effects 2026, which hides that artwork in projects written before it
(#1898).

Both effects get a Composite With Original checkbox, off by default so new
instances keep the After-Effects-matching behaviour and the frames the effects
are matched against stay green. upgrade_effects now takes the savedBy version of
the file a project came from - opened, imported, read from an Essential Graphics
template, or loaded as the New Project template - and turns the control on for
an instance from a project written before v0.10.0 that does not already carry it
(a saved value is the artist's choice).

The legacy plan is the pre-v0.10.0 code restored: Post::Combine with the old
Transfer Mode mapping (Composite, Screen and Add themselves, Black Matte 5) and
the same Add/Over accumulation. savedBy first shipped in M3.14 (948f06fb),
released after v0.2.0, so files from v0.2.1 on name their writer and get the
fix; an older file has no savedBy and keeps replacing rather than migrating on a
guess.

Tests: crates/effects/src/sim/tests.rs
composite_with_original_restores_the_old_particle_transfer_modes checks the
restored mapping against combine() in every Transfer Mode;
crates/engine/src/tests/legacy_particles.rs opens a 0.6.0 project (both particle
effects over a Fill on a solid) and checks the artwork and the earlier effect
show, that a current or anonymous file still replaces, the version gate, and the
New Project template path.

Fixes #1898.
This commit is contained in:
skylar taylor-barrick committed 2026-11-15 05:55:30 +01:00
1 parent dc2380b070
commit 69d641e30a
10 files changed
+287 -25

No files matched your search

+3 -3
View File
@@ -3,7 +3,7 @@
<!-- Generated from the effect registry (crates/effects/src/catalog.rs); do not edit by hand.
Regenerate: UPDATE_DOCS=1 cargo test -p effectcraft-effects --lib effects_doc_is_current -->
EffectCraft ships 308 effects with 2988 parameters in total, grouped into the same categories as the Effects & Presets panel. Every effect is our own implementation, written from public behaviour descriptions and standard image-processing literature. Parameter names, order, popup options, units, defaults and ranges follow the reference application so that projects, expressions and muscle memory carry over.
EffectCraft ships 308 effects with 2990 parameters in total, grouped into the same categories as the Effects & Presets panel. Every effect is our own implementation, written from public behaviour descriptions and standard image-processing literature. Parameter names, order, popup options, units, defaults and ranges follow the reference application so that projects, expressions and muscle memory carry over.
- **GPU**: 280 effects also run on the GPU compositor with identical results.
- **32**: 308 effects process 32-bit float (HDR, overbright) pixels without clamping.
@@ -325,8 +325,8 @@ Effects are addressed by id (`ec.<category>.<name>`) or display name in commands
| Caustics | `ec.sim.caustics` | 28 | GPU | 32 | Implemented |
| Foam | `ec.sim.foam` | 36 | GPU | 32 | Implemented |
| Liquid Particles | `ec.sim.ccmrmercury` | 23 | GPU | 32 | Implemented |
| Particle Emitter 2D | `ec.sim.ccparticlesystems2` | 21 | GPU | 32 | Implemented |
| Particle Emitter 3D | `ec.sim.ccparticleworld` | 36 | GPU | 32 | Implemented |
| Particle Emitter 2D | `ec.sim.ccparticlesystems2` | 22 | GPU | 32 | Implemented |
| Particle Emitter 3D | `ec.sim.ccparticleworld` | 37 | GPU | 32 | Implemented |
| Particle Playground | `ec.sim.particleplayground` | 92 | GPU | 32 | Implemented |
| Pixel Scatter | `ec.sim.ccscatterize` | 4 | GPU | 32 | Implemented |
| Pixel Shatter | `ec.sim.ccpixelpolly` | 10 | GPU | 32 | Implemented |