|
Simplifies effect priority management by using relative modifiers instead
of explicit numbers, making timeline reordering much more practical.
## New Priority System
Effects now use priority modifiers after EFFECT keyword:
- `+` increment priority by 1 (or start at 0 if first)
- `=` keep same priority as previous effect
- `-` decrement priority (or start at -1 if first, for background)
Old syntax:
```
EFFECT FlashEffect 0.0 0.5 0
EFFECT FadeEffect 0.1 0.3 1
EFFECT BgCube 0.2 3 -1
```
New syntax:
```
EFFECT - BgCube 0.2 3 # Priority -1 (background)
EFFECT + FlashEffect 0.0 0.5 # Priority 0
EFFECT + FadeEffect 0.1 0.3 # Priority 1
```
## Benefits
✓ Reordering effects no longer requires renumbering all priorities
✓ Priority relationships are explicit and relative
✓ File order matches render order (easier to understand)
✓ Same-priority effects clearly marked with `=`
✓ Background layers (-1) clearly marked with `-`
✓ Reduces errors when reorganizing timelines
## Implementation
- Updated seq_compiler to parse +/=/- modifiers
- Tracks current priority per sequence
- First effect sets base priority (0 or -1)
- Subsequent effects modify relative to previous
- Generated C++ code unchanged (still uses integer priorities)
## Changes to demo.seq
- All effects updated to use new syntax
- Effects reordered by priority within sequences
- Priority gaps removed (were likely unintentional)
- Comments updated to reflect new system
## Documentation
- Updated SEQUENCE.md with new syntax
- Added examples showing +, =, - usage
- Explained priority calculation rules
This makes timeline authoring significantly more maintainable, especially
when experimenting with different effect orderings during development.
|