Convert effects to new single-file format
- 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>
This commit is contained in:
35
identity/effect.py
Normal file
35
identity/effect.py
Normal file
@@ -0,0 +1,35 @@
|
||||
# /// 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
|
||||
Reference in New Issue
Block a user