Commit Graph
20 Commits
Author SHA1 Message Date
Valentin Klein 525dcfc0d8 Browse… buttons in a script's own dialogs and panels open the file dialog instead of doing nothing (#3253)
* Scripts: a ScriptUI Browse… button opens the file dialog

Fixes #2778.
Fixes #2894.

File.openDialog, File.saveDialog, Folder.selectDialog and the instance
openDlg / saveDlg / selectDlg were stubs that returned null, so a script
dialog's or a dockable ScriptUI panel's Browse… button did nothing.

On a script-host thread, in an app that shows them, the script now asks
for the dialog (Session::script_ui.file_dialogs, each with an id), hands
the session back like a modal dialog's show() does and waits for the
answer: a File (an array with multiSelect), a Folder, or null when
cancelled. The script's filter becomes the dialog's (its name, "All Files"
for *.*); without extensions every file shows. Headless runs, the Script
Console, the web and Shutdown scripts get null at once.

The app shows the dialog after the pass's events: blocking on Windows
(Hooks::pick_file_dialog), without blocking on macOS and Linux, one at a
time; a non-blocking dialog that ends without answering counts as
cancelled. scriptui.fileDialogs lists the waiting dialogs and
scriptui.fileDialog answers one (refused while file access is confined,
and refused to scripts). A dialog leaves the list only when its script
has the answer; the script's windows refuse events meanwhile, except
scriptui.close, which cancels the file dialog first. A script host that
ends takes its dialogs with it.

* Scripts: carry a file dialog's prompt, start location and filter to the native dialog (#2778)

serve_file_dialogs collected the script's prompt, start folder and save filter
but dropped them at the host boundary. FileDialog::Script now carries prompt and
start, and new ScriptFolder and ScriptSave requests carry the folder dialog's
prompt/start and the save dialog's prompt and whole filter (label, extensions,
any file) instead of the default name's extension. Both the blocking and the
non-blocking host dialogs apply title, initial directory and filters; Save also
goes through the blocking hook where one is set. Hook-level regression test
asserts all three requests.

* Scripts: a hidden window paints so a script's file dialog is shown (#3253 review)

* Scripts: formatting (#3253)
2026-11-22 12:58:56 -06:00
BFlat d975022ff5 Merge pull request #2629 from storytold/fix/2585-scriptui-dock-size
ScriptUI: a docked panel gets its dock's size and onResize (#2585)
2026-10-30 08:12:01 +07:00
BFlat 5dfccee3c7 Merge pull request #2624 from storytold/fix/2584-scriptui-mouse-capture
ScriptUI: a drag keeps its control past the window edge; MouseEvent.buttons (#2584)
2026-10-30 07:38:50 +07:00
bflatasticandClaude Opus 5.5 5bb66bad74 ScriptUI: a docked panel gets its dock's size and onResize (#2585)
A docked ScriptUI panel only ever saw its preferredSize: the host drew
it in a scroll area at max(dock, preferred) and the script's window never
learned the dock. scriptui.resize now gives a window a size: the script's
window takes it, lays itself out again and runs onResizing / onResize.
The dock host sends it whenever the panel's dock size changes, so
window.size is the dock's, as in After Effects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 07:37:19 +07:00
bflatastic 42876133d5 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/gaps.md
2026-10-30 07:05:43 +07:00
bflatasticandClaude Opus 5.5 01f92b04c5 ScriptUI: a drag keeps its control past the window edge; MouseEvent.buttons (#2584)
A drag that started on a script control stopped at the window edge:
moves outside were dropped and a release outside never reached the
control. While a button is held, the control it was pressed on now gets
the moves (with screen and control-relative coordinates) and the
release, wherever the pointer is, as in After Effects. Every MouseEvent
also carries buttons (held: 1 left, 2 right, 4 middle), so a handler can
tell a drag from a hover; scriptui.mouse accepts it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 07:04:18 +07:00
bflatastic e3c57f4fda Merge main into #2356; plugins.md keeps main's ScriptUI subfolder row and the PR's script-shortcuts row 2026-10-30 05:35:06 +07:00
bflatastic bd34ab21b6 Merge main into #2279; keep main's Scripts subfolders (RESERVED_FOLDERS) next to the Startup/Shutdown constants, merge docs rows 2026-10-30 05:34:26 +07:00
bflatasticandClaude Opus 5.5 379be9e7c8 Scripts: rustfmt the subfolder test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 00:23:08 +07:00
bflatasticandClaude Opus 5.5 8b43197065 Scripts: Startup and Shutdown folders aren't File > Scripts submenus, as in After Effects
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 23:24:20 +07:00
bflatastic 4aead36ecd Merge remote-tracking branch 'origin/main' into HEAD 2026-10-29 23:21:59 +07:00
dotCooCoo a78ce99c96 Merge main into feat/script-shortcuts
Resolves the docs/scripting-parity.md conflict by keeping the script shortcuts row and main's new Recent Script Files row.
2026-10-28 22:45:48 -07:00
dotCooCoo 509e250c4f Scripts: leave a script out of Recent Script Files when its path can't be made absolute
Services::full_path now returns None when the working directory can't be
read, instead of the relative path. file.runScript still runs the script
but does not add it to the list, so a later working directory can't make
the entry open a different file.
2026-10-28 09:37:46 -07:00
dotCooCoo b8b1a3a6a2 Run the File > Scripts entry when a panel shares its name
File > Scripts lists a bundled script even when an installed ScriptUI
panel has the same name, but running it by name opened the panel. A
script now runs before a panel of the same name, and it enters Recent
Script Files.
2026-10-28 06:33:44 -07:00
dotCooCoo 5e32a2a39c Merge main and preserve Startup script tasks across project changes 2026-10-27 11:41:43 -07:00
dotCooCoo 8ee9bc144b Keep failed scripts and selected panels out of recent script history 2026-10-27 11:06:19 -07:00
dotCooCoo 572ed5d17f Preserve script keyboard shortcuts across menu module changes 2026-10-27 10:25:26 -07:00
dotCooCoo 2c2c51ca0c Preserve recent script files across menu and settings module changes 2026-10-27 10:11:33 -07:00
onlykshitijandClaude Opus 5.5 c9d823483f Merge upstream main into feat/script-panel-submenus
Upstream moved crates/ui-egui/src/menus.rs into menus/*.rs; the dynamic-menu change that
draws script folders as submenus now lives in menus/bar.rs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 10:56:49 +05:30
aiongg a3ea645fc6 refactor(engine): move commands/ to cmd/, keeping commands as an alias 2026-10-26 21:49:10 +00:00