Plug-ins: Ease Presets moves out of core into a bundled ScriptUI panel
The Ease Presets panel (#254) is modelled on a third-party panel, so, as with third-party tools in After Effects, it isn't core any more: it is `extensions/scriptui-panels/Ease Presets.jsx`, a ScriptUI panel bundled as an optional extension (Window ▸ Ease Presets.jsx), written only against the public scripting API. Clicking a preset eases every pair of neighbouring selected keyframes in one undo step (per dimension, along the motion path for spatial properties, the keys' other sides as they play); the fields edit the working curve, which the panel draws; From Keys, Save, Rename and Delete as before. The twelve built-in curves are unchanged. Scripting API fixes it needed (After Effects parity): - `app.settings` lasts between runs (`script_settings.json` in the settings folder; `script.settings.get` / `script.settings.save`). - Per-key methods (`setTemporalEaseAtKey`, `setInterpolationTypeAtKey`, `removeKey`, the continuous / auto-Bezier / roving setters) no longer change the user's key selection (they selected the key they edited). - `keyInTemporalEase` / `keyOutTemporalEase` report linear and auto-Bezier sides as they play, `keyIn/OutSpatialTangent` the tangents the motion path plays. - `selectedProperties` includes the properties of selected keyframes. - `isInterpolationTypeValid` is false for Linear / Bezier on values that only hold. Removed from core: Window ▸ Ease Presets, the `keys.easePreset.*` commands, `engine::ease_presets` and the `ease_presets.json` store, `keyframe::EaseCurve` (nothing else used it) and the egui panel. User presets saved by the v0.6.0 panel move into the panel's app.settings section the first time settings load (the old file is left as is). Docs: plugins.md (bundled extensions), parity.md, gaps.md G8, agents.md. Test: app_settings_last_between_runs, per_key_methods_keep_the_key_selection_and_report_eases_as_they_play, spatial_tangents_are_reported_as_the_path_plays (each fails before), the_ease_presets_panel_eases_every_selected_pair_in_one_undo_step, a_typed_curve_scales_to_each_dimension_and_follows_motion_paths, user_presets_save_rename_delete_and_persist, presets_saved_by_the_old_core_panel_carry_over (script, through the panel's controls), ease_presets_panel_eases_the_selected_keys_from_its_list (UI: the panel docks and a click on a preset eases the keys). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9da33c157e
commit
da165724e9
+4
-1
@@ -460,7 +460,10 @@ Scripts that build ScriptUI windows publish them to the session; agents drive th
|
||||
A dialog's `show()` waits for the user: the `script.run` / `file.runScript` reply carries
|
||||
`"waiting": true`, and the script continues (its final output arrives in the reply of the click
|
||||
that closes the dialog). File ▸ Scripts: `file.scripts.list`, `file.runScript {"name": …}`,
|
||||
`file.installScript` / `file.installScriptUIPanel {"path": …}`, `window.scriptPanel {"name": …}`.
|
||||
`file.installScript` / `file.installScriptUIPanel {"path": …}`, `window.scriptPanel {"name": …}`,
|
||||
`window.restoreScriptPanels` (the panels open when the app last quit). Scripts' `app.settings`:
|
||||
`script.settings.get {"section": …, "key": …}` and `script.settings.save {…, "value": …}`.
|
||||
Extension points and the bundled extensions: [plugins.md](plugins.md).
|
||||
|
||||
### Timeline: layer order, properties and shortcuts
|
||||
|
||||
|
||||
+6
-3
@@ -200,9 +200,12 @@ The most important missing piece: it turns every other estimate here into a meas
|
||||
panels in the user's ScriptUI Panels folder are listed in the Window menu, dock like any panel
|
||||
and open again at the next launch. Missing: the Startup and Shutdown script folders, keyboard
|
||||
shortcuts for scripts, ExtendScript's `#include` / `#target` directives and `.jsxbin`.
|
||||
- Done so far: ease presets (Window ▸ Ease Presets, `keys.easePreset.*`, #254) cover what
|
||||
ease-curve plug-ins are used for: easing curves kept by name, drawn and edited in a value graph,
|
||||
and applied to pairs of keyframes ([parity.md](parity.md#update-ease-presets-254)).
|
||||
- Done so far: ease presets (#254) cover what ease-curve plug-ins are used for: easing curves kept
|
||||
by name and applied to pairs of keyframes. Modelled on a third-party panel, they are not core: a
|
||||
ScriptUI panel bundled as an optional extension (`extensions/scriptui-panels/Ease Presets.jsx`,
|
||||
Window ▸ Ease Presets.jsx) on the public scripting API, which needed `app.settings` that last,
|
||||
per-key methods that keep the key selection, and eases reported as they play
|
||||
([plugins.md](plugins.md#bundled-extensions), [parity.md](parity.md)).
|
||||
|
||||
### G9. Reach
|
||||
|
||||
|
||||
+32
-19
@@ -400,27 +400,40 @@ Browser in the web app (landed in M13.10: browser storage and File System Access
|
||||
wrong signatures and versions, fuel exhaustion, traps and bit-identical output; script
|
||||
`Socket` validates ports, and ScriptUI resource strings accept trailing array commas.
|
||||
|
||||
## Update: ease presets (#254)
|
||||
## Update: plug-ins and extensions as in After Effects; ease presets become a ScriptUI panel
|
||||
|
||||
**Window ▸ Ease Presets** is our own panel for what ease-curve plug-ins are used for in After
|
||||
Effects (G8): keep easing curves by name and apply them to pairs of keyframes. A curve is the out
|
||||
handle of the first key and the in handle of the second, in the Keyframe Velocity dialog's terms:
|
||||
influence in percent, and speed relative to the segment's average speed, so one curve fits any
|
||||
duration and change of value. Applying it eases every pair of neighbouring selected keyframes of
|
||||
each property in one undo step, per dimension, and along the motion path for spatial properties
|
||||
(as Easy Ease does); an Auto Bezier key keeps its other side. Twelve built-in curves (Linear,
|
||||
Smooth, Ease In-Out Soft / plain / Strong, Accelerate and Decelerate with Strong variants, Expo
|
||||
In-Out / Accelerate / Decelerate) are our own numbers; user presets are kept in the settings store
|
||||
(`ease_presets.json`; a corrupt file or entry is skipped, never fatal). The panel draws each preset
|
||||
as a thumbnail (a click applies it) and the working curve in a value graph whose two handles drag;
|
||||
Apply, From Keys (the curve between the first selected pair), Save Current, Rename and Delete.
|
||||
Commands: `keys.easePreset.apply {preset | curve}` (`curve` as `{outInfluence, outSpeed,
|
||||
inInfluence, inSpeed}` or cubic-bezier handles `[x1, y1, x2, y2]`), `keys.easePreset.capture`,
|
||||
`keys.easePreset.save {name, curve?}`, `keys.easePreset.list`, `keys.easePreset.rename {name,
|
||||
newName}`, `keys.easePreset.delete {name}`; automation ids `easePresets.*`.
|
||||
EffectCraft's core keeps After Effects parity; what After Effects users get from third parties is
|
||||
an extension, on the same extension points After Effects has ([plugins.md](plugins.md) compares
|
||||
them: scripts, ScriptUI panels, effect plug-ins, with a guide to writing a panel).
|
||||
|
||||
Not yet: curves with more than one bend (bounce and elastic shapes, which need keyframes in
|
||||
between), preset import / export files, and a live preview on the keys while dragging the handles.
|
||||
- **ScriptUI panels** in `Scripts/ScriptUI Panels/` of the settings folder are listed at the
|
||||
bottom of the Window menu and dock like any panel (as before); the panels open when the app quits
|
||||
now open again at the next launch (`window.restoreScriptPanels`), as After Effects reopens its
|
||||
workspace's panels.
|
||||
- **Scripting API** (parity fixes the Ease Presets panel needed): `app.settings` lasts between
|
||||
runs (`script_settings.json`, `script.settings.get` / `save`); per-key methods
|
||||
(`setTemporalEaseAtKey`, `setInterpolationTypeAtKey`, `removeKey`, the continuous / auto-Bezier /
|
||||
roving setters) no longer change the user's key selection; `keyInTemporalEase` /
|
||||
`keyOutTemporalEase` report linear and auto-Bezier sides as they play, and
|
||||
`keyIn/OutSpatialTangent` the tangents the motion path plays; `selectedProperties` includes the
|
||||
properties of selected keyframes; `isInterpolationTypeValid` is false for Linear and Bezier on
|
||||
values that only hold.
|
||||
- **Ease presets** (#254), modelled on a third-party panel, moved out of the core: they are the
|
||||
bundled ScriptUI panel `extensions/scriptui-panels/Ease Presets.jsx` (Window ▸ Ease
|
||||
Presets.jsx), written only against the public scripting API. A curve is the out side of the
|
||||
first key and the in side of the second, in the Keyframe Velocity dialog's terms (influence in
|
||||
percent, speed relative to the segment's average speed); clicking a preset eases every pair of
|
||||
neighbouring selected keyframes in one undo step, per dimension and along the motion path for
|
||||
spatial properties, leaving the keys' other sides as they play. The twelve built-in curves are
|
||||
unchanged; user presets (Save, Rename, Delete) are kept with `app.settings`, and those saved by
|
||||
the core panel of v0.6.0 (`ease_presets.json`) move there the first time settings load. The
|
||||
panel shows the working curve as a drawing and its four numbers as fields (the value graph's
|
||||
handles don't drag: ScriptUI panels get no mouse-drag events here). The `keys.easePreset.*`
|
||||
commands and `EaseCurve` are gone. Not yet: curves with more than one bend (bounce and elastic
|
||||
shapes), preset import / export files.
|
||||
- **Snapping options** (#265): the Tools bar's menu has After Effects' two options, Snap Edges
|
||||
Extended and Snap to Features in Collapsed Compositions and Text Layers (the layers inside
|
||||
collapsed precomp layers snap); the per-feature toggles are gone and every feature snaps.
|
||||
|
||||
## Update: M5.9–M5.14 keyframes, M3.15 clipboard, M12.8 responsiveness
|
||||
|
||||
|
||||
+38
-4
@@ -19,7 +19,7 @@ Guide):
|
||||
| `Scripts/ScriptUI Panels`: listed at the bottom of the Window menu, dockable like the app's own panels, `this` is the panel | `Scripts/ScriptUI Panels/` in the settings folder (File ▸ Scripts ▸ Install ScriptUI Panel… copies one there), listed at the bottom of the Window menu, docked like any panel, `this` is the panel; the panels open when the app quits open again at the next launch | Same. Where a panel was docked isn't kept: workspace layouts aren't saved between launches |
|
||||
| Keyboard shortcuts for scripts (the Keyboard Shortcuts editor lists the scripts of the Scripts folder) | Shortcuts bind to commands and menu entries; the File ▸ Scripts and Window menu entries of scripts aren't offered | Gap |
|
||||
| Running a script from the command line (`afterfx -r script.jsx`) | `effectcraft-cli script`, the control channel's and MCP's `script.run` | Same purpose, other entry points |
|
||||
| `app.settings` (kept in the preferences between sessions) | Kept for the run only | Gap |
|
||||
| `app.settings` (kept in the preferences between sessions) | Kept in `script_settings.json` in the settings folder (`script.settings.get` / `script.settings.save`) | Same |
|
||||
| Allow Scripts to Write Files and Access Network | Settings ▸ Scripting & Expressions | Same |
|
||||
|
||||
The settings folder is `~/Library/Application Support/EffectCraft` on macOS, `%APPDATA%\EffectCraft`
|
||||
@@ -84,10 +84,44 @@ Supported controls: `panel`, `group`, `button`, `iconbutton`, `statictext`, `edi
|
||||
`tabbedpanel` / `tab` and `image`, with ScriptUI's automatic layout (`orientation`,
|
||||
`alignChildren`, `alignment`, `margins`, `spacing`, `preferredSize`), resource strings, event
|
||||
handlers (`onClick`, `onChange`, `onChanging`, `onClose`, `addEventListener`) and `onDraw` with
|
||||
ScriptUIGraphics. Agents use a panel like a user: `scriptui.list`, `scriptui.get` (its controls),
|
||||
`scriptui.click`, `scriptui.set` and `scriptui.close`; every control has the automation id
|
||||
ScriptUIGraphics. Mouse events (`mousedown`, `mousemove`…) aren't sent to scripts yet. Agents use
|
||||
a panel like a user: `scriptui.list`, `scriptui.get` (its controls), `scriptui.click`,
|
||||
`scriptui.set` and `scriptui.close`; every control has the automation id
|
||||
`scriptui.<window>.<control id or name>`. The bundled sample `Layer Tools.jsx`
|
||||
(`crates/engine/scripts/ScriptUI Panels/`) is a longer example.
|
||||
(`crates/engine/scripts/ScriptUI Panels/`) and the Ease Presets extension below are longer
|
||||
examples.
|
||||
|
||||
## Bundled extensions
|
||||
|
||||
Optional tools that ship with EffectCraft but are not part of its core: they are scripts on the
|
||||
public scripting API, like the third-party scripts After Effects users install, and are listed
|
||||
with the bundled samples (`file.scripts.list` reports them as `extension`). A script of the same
|
||||
name in your Scripts folders takes their place.
|
||||
|
||||
### Ease Presets (`extensions/scriptui-panels/Ease Presets.jsx`)
|
||||
|
||||
Window ▸ Ease Presets.jsx: easing curves kept by name and applied to pairs of neighbouring
|
||||
selected keyframes (#254; it was a core panel in v0.6.0). A curve is the out side of a segment's
|
||||
first key and the in side of its second, in the Keyframe Velocity dialog's terms: influence in
|
||||
percent, and speed relative to the segment's average speed (1 = as fast as a straight line, 0 = at
|
||||
rest), so one curve fits any duration and change of value.
|
||||
|
||||
* Click a preset to apply it to every pair of neighbouring selected keyframes of each selected
|
||||
property, in one undo step (per dimension, and along the motion path for spatial properties;
|
||||
the keys' other sides keep playing as they did). The keys stay selected, so you can try another.
|
||||
* The drawing shows the working curve; type its numbers (Out % and Speed, In % and Speed) and
|
||||
click Apply, or click From Keys to read the curve between the first selected pair.
|
||||
* Save keeps the working curve under the typed name (replacing a preset of that name); Rename
|
||||
and Delete act on the selected preset of your own. The twelve built-in presets can't change.
|
||||
* User presets are kept with `app.settings` (section `Ease Presets`, key `userPresets`, in
|
||||
`script_settings.json` in the settings folder). Presets saved by the v0.6.0 core panel
|
||||
(`ease_presets.json`) move there the first time a later version loads its settings; the old
|
||||
file is left as it was.
|
||||
|
||||
It uses only After Effects' documented scripting API (`comp.selectedProperties`,
|
||||
`Property.selectedKeys`, `keyInTemporalEase` / `keyOutTemporalEase`, `setTemporalEaseAtKey` with
|
||||
`KeyframeEase`, `setInterpolationTypeAtKey`, `app.settings`, ScriptUI), so it is also a worked
|
||||
example of a keyframe tool.
|
||||
|
||||
## Effect plug-ins
|
||||
|
||||
|
||||
Reference in New Issue
Block a user