M3.12: Pre-compose keeps the composition's settings; New Comp from Selection is one undo step with After Effects' options
- Pre-compose makes the new composition with the original's pixel aspect, background, motion
blur and frame blending settings and 3D renderer (`Comp::nested_like`); it kept only size,
rate and background.
- File ▸ New Comp from Selection records one undo step (two per item before) and takes each
item's pixel aspect. Several items selected open the New Composition from Selection dialog:
Single / Multiple Compositions, Use Dimensions From, Still Duration (default from Settings ▸
Import ▸ Still Footage), Add to Render Queue, Sequence Layers with Overlap, Duration and
Transition. `file.newCompFromSelection {single, dimensionsFrom, duration, addToRenderQueue,
sequence, overlap, overlapDuration, transition}`; `layer.addItem {duration}` for stills.
- Docs: parity.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
89653f37de
commit
a34d0c421b
@@ -559,6 +559,29 @@ mod tests {
|
||||
assert_eq!((solid_command(&app.dialog_state), app.dialog_state.solid_pixel_aspect), ("layer.newSolid", 1.0));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn new_comp_from_selection_asks_when_several_items_are_selected() {
|
||||
let (mut app, ctx) = app();
|
||||
let a = app.session.execute("file.importSolid", json!({"name": "A", "width": 100, "height": 50})).unwrap();
|
||||
let b = app.session.execute("file.importSolid", json!({"name": "B", "width": 300, "height": 50})).unwrap();
|
||||
let ids: Vec<ItemId> = [a, b].iter().map(|r| ItemId(r["item"].as_u64().unwrap())).collect();
|
||||
app.session.state.project_selection = vec![ids[0]];
|
||||
// One item: made at once.
|
||||
crate::menus::invoke(&mut app, &ctx, "file.newCompFromSelection", json!({})).unwrap();
|
||||
assert!(app.dialog.is_none());
|
||||
app.session.state.project_selection = ids.clone();
|
||||
crate::menus::invoke(&mut app, &ctx, "file.newCompFromSelection", json!({})).unwrap();
|
||||
assert_eq!((app.dialog, app.dialog_state.form.command.as_str()), (Some(Dialog::Form), "file.newCompFromSelection"));
|
||||
frame(&mut app, &ctx);
|
||||
for k in ["single", "dimensionsFrom", "duration", "addToRenderQueue", "sequence", "overlap", "overlapDuration", "transition"] {
|
||||
assert!(app.auto.find(&format!("form.field.{k}")).is_some(), "{k}");
|
||||
}
|
||||
// Its parameters are ones the command accepts (checked as agents' calls are).
|
||||
let comps = app.session.project.comps().count();
|
||||
app.session.execute_checked("file.newCompFromSelection", app.dialog_state.form.params()).unwrap();
|
||||
assert_eq!(app.session.project.comps().count(), comps + 1, "Single Composition is the default");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn composition_settings_register_every_control_and_new_comp_remembers() {
|
||||
let (mut app, ctx) = app();
|
||||
|
||||
Reference in New Issue
Block a user