- dog: Convert to whole-video API with PEP 723 metadata - identity: Add as frame-by-frame effect Both now use @-tag docstrings for AI-readable metadata. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
36 lines
712 B
Python
36 lines
712 B
Python
# /// script
|
|
# requires-python = ">=3.10"
|
|
# dependencies = []
|
|
# ///
|
|
"""
|
|
@effect identity
|
|
@version 1.0.0
|
|
@author @giles@artdag.rose-ash.com
|
|
@temporal false
|
|
|
|
@description
|
|
Identity effect - returns input unchanged. This is the foundational
|
|
effect where identity(x) = x. Uses frame-by-frame API but simply
|
|
passes frames through unmodified.
|
|
|
|
@example
|
|
(fx identity)
|
|
"""
|
|
|
|
import numpy as np
|
|
|
|
|
|
def process_frame(frame: np.ndarray, params: dict, state) -> tuple:
|
|
"""
|
|
Identity: return frame unchanged.
|
|
|
|
Args:
|
|
frame: RGB frame as numpy array (H, W, 3)
|
|
params: Unused
|
|
state: Passed through unchanged
|
|
|
|
Returns:
|
|
(frame, state) - both unchanged
|
|
"""
|
|
return frame, state
|