mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-03 06:31:42 +01:00
Merge current main into the PhotoCraft nightly packaging branch
This commit is contained in:
commit
e49f993bd0
13 files changed
+609
-34
No files matched your search
@@ -87,6 +87,7 @@ cargo xtask test-corpus # psd, io, codecs, compose, gpu, text, format
|
||||
Conventions and paths:
|
||||
|
||||
- `unsafe` is allowed only in `crates/tablet/src/macos.rs` and `windows.rs`; the workspace sets `unsafe_code = "forbid"`. The example plug-in in `examples/plugins/` is outside the workspace and uses `unsafe` for the WebAssembly host calls. Every new crate sets `[lints] workspace = true`.
|
||||
- Parity headless column ([RFC-0052](https://github.com/storytold/craft-contrib/blob/main/rfcs/0052-headless-reach.md)): `cargo xtask parity` marks a catalog item `headless: yes` only when `photocraft_engine::commands::find` has its id, the registry `photocraft-cli` and the MCP server load. Panel toggles, workspaces and tool shortcuts that are live only in the desktop app are `no` (window). Other ids take a `no`/`partial` mark with a `window`, `os` or `engine-gap` reach from `HEADLESS` in `crates/ui-egui/src/menus/parity.rs`, or read `unknown`. Never write `yes` there; stale marks fail `headless_marks_are_current`.
|
||||
- Attribution file: `ATTRIBUTION.md`. Fonts come from storytold/craft-fonts through `CRAFT_FONTS_DIR` (`docs/development.md` > Fonts).
|
||||
- Test corpora: storytold/photocraft-corpus, fetched into `corpus/` by `cargo xtask corpus --all` at the pins in `xtask/src/corpus_pins.rs`. `cargo xtask test-corpus` runs each directory's fixed sample; `PHOTOCRAFT_FULL_SWEEP=1` runs every file (CI: samples on pull requests and main, every file nightly).
|
||||
- Feature names are recorded in `docs/feature-names.md`.
|
||||
|
||||
@@ -60,6 +60,23 @@ pub(super) fn save_selection(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
Ok(json!({ "channel": i, "name": name, "document": di }))
|
||||
}
|
||||
|
||||
/// The history name of `select.loadSelection` with `p`. The Layers panel names its layer by id (a thumbnail
|
||||
/// ⌘-click, Select Pixels), and those loads take Photoshop's names (#16786): `Selection Change` for a shape's
|
||||
/// path or a vector mask, `Load Selection` for another layer's transparency or a layer mask. Calls that don't
|
||||
/// name a layer by id (Select › Load Selection) keep their names.
|
||||
fn load_label(doc: &Document, p: &Value) -> &'static str {
|
||||
let channel = p.get("channel").and_then(|v| parse_ref(v, doc));
|
||||
let layer = p.get("layer").and_then(Value::as_u64).and_then(|id| doc.layer(super::LayerId(id)));
|
||||
match (channel, layer) {
|
||||
(Some(ChanRef::Transparency), Some(l)) if matches!(l.content, super::LayerContent::Shape(_)) => "Selection Change",
|
||||
(Some(ChanRef::Transparency), Some(l)) if !l.is_group() => "Load Selection",
|
||||
(Some(ChanRef::VectorMask), Some(l)) if l.vector_mask.is_some() => "Selection Change",
|
||||
(Some(ChanRef::Transparency), _) => "Load Transparency",
|
||||
(Some(ChanRef::LayerMask), None) => "Load Layer Mask",
|
||||
_ => "Load Selection",
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn load_selection(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
let cmd = "select.loadSelection";
|
||||
let mode = match operation(p, "operation") {
|
||||
@@ -89,11 +106,7 @@ pub(super) fn load_selection(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
// Composite and colour channels load their luminosity / values, as ⌘-clicking them does.
|
||||
let plane = source(s, p, cmd, true)?.into_iter().next().ok_or_else(|| bad(cmd, "the channel has no pixels"))?;
|
||||
let doc = &s.active().ok_or(EngineError::NoDocument)?.doc;
|
||||
let label = match p.get("channel").and_then(|v| parse_ref(v, doc)) {
|
||||
Some(ChanRef::Transparency) => "Load Transparency",
|
||||
Some(ChanRef::LayerMask) => "Load Layer Mask",
|
||||
_ => "Load Selection",
|
||||
};
|
||||
let label = load_label(doc, p);
|
||||
let selected = s.edit(label, |doc, _| {
|
||||
doc.selection = sel::combine(doc.selection.as_ref(), &plane, doc.bounds(), mode);
|
||||
Ok(doc.selection.is_some())
|
||||
|
||||
@@ -550,7 +550,16 @@ pub fn background_to_layer(doc: &mut photocraft_doc::Document, id: photocraft_do
|
||||
|
||||
fn toggle_mask(s: &mut Session, p: &Value, key: &str) -> Result<Value> {
|
||||
let id = layer_param(s, p)?;
|
||||
let label = if key == "enabled" { "Enable/Disable Layer Mask" } else { "Link/Unlink Layer Mask" };
|
||||
// A call that says the direction (the Layers panel's ⇧-click and chain) is named by it, as in Photoshop
|
||||
// (#16786); a plain toggle (Layer › Layer Mask) keeps its two-way name.
|
||||
let label = match (key, p.get(key).and_then(Value::as_bool)) {
|
||||
("enabled", Some(true)) => "Enable Layer Mask",
|
||||
("enabled", Some(false)) => "Disable Layer Mask",
|
||||
("enabled", None) => "Enable/Disable Layer Mask",
|
||||
(_, Some(true)) => "Link Mask",
|
||||
(_, Some(false)) => "Unlink Mask",
|
||||
(_, None) => "Link/Unlink Layer Mask",
|
||||
};
|
||||
let v = s.edit(label, |doc, _| {
|
||||
let m = doc.layer_mut(id).and_then(|l| l.mask.as_mut()).ok_or(EngineError::Other("the layer has no layer mask".into()))?;
|
||||
let slot = if key == "enabled" { &mut m.enabled } else { &mut m.linked };
|
||||
|
||||
@@ -99,7 +99,8 @@ fn set_mask_with(s: &mut Session, p: &Value, label: &str, mask: Option<LayerMask
|
||||
|
||||
/// Drag a layer mask's thumbnail onto another layer or group in the Layers panel: the mask moves
|
||||
/// there (⌥: a copy goes there and the original stays), as in Photoshop (#10485). A layer that
|
||||
/// already has a mask keeps it unless `replace` (Photoshop asks first). One history step.
|
||||
/// already has a mask keeps it unless `replace` (Photoshop asks first). One history step, named
|
||||
/// `Add Layer Mask` for a move and a copy alike, as Photoshop names the drop (#16786).
|
||||
pub(super) fn move_mask(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
let bad = |m: &str| EngineError::BadParams { cmd: "layer.layerMask.moveTo".into(), msg: m.into() };
|
||||
let from = layer_param(s, p)?;
|
||||
@@ -109,8 +110,7 @@ pub(super) fn move_mask(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
if from == to {
|
||||
return Err(bad("the mask is already on that layer"));
|
||||
}
|
||||
let label = if copy { "Copy Layer Mask" } else { "Move Layer Mask" };
|
||||
s.edit(label, |doc, _| {
|
||||
s.edit("Add Layer Mask", |doc, _| {
|
||||
let mask = doc.layer(from).ok_or(EngineError::NoLayer(from))?.mask.clone().ok_or_else(|| bad("the layer has no layer mask"))?;
|
||||
if doc.layer(to).ok_or(EngineError::NoLayer(to))?.mask.is_some() && !replace {
|
||||
return Err(bad("the layer already has a layer mask (pass `replace`)"));
|
||||
|
||||
@@ -58,6 +58,11 @@ pub(super) fn vector_mask_add(s: &mut Session, p: &Value, from_path: bool) -> Re
|
||||
}
|
||||
|
||||
pub(super) fn vector_mask_edit(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
edit_vector_mask(s, p, "Edit Vector Mask")
|
||||
}
|
||||
|
||||
/// `layer.vectorMask.edit` with `p`, its history step named `label`.
|
||||
fn edit_vector_mask(s: &mut Session, p: &Value, label: &str) -> Result<Value> {
|
||||
const CMD: &str = "layer.vectorMask.edit";
|
||||
let id = layer_id(s, p)?;
|
||||
let path = p.get("path").map(parse_path).transpose().map_err(|e| bad(CMD, e))?;
|
||||
@@ -100,7 +105,7 @@ pub(super) fn vector_mask_edit(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
})?;
|
||||
return vector_mask_info(s, id);
|
||||
}
|
||||
s.edit("Edit Vector Mask", |doc, _| {
|
||||
s.edit(label, |doc, _| {
|
||||
let l = doc.layer_mut(id).ok_or(EngineError::NoLayer(id))?;
|
||||
let vm = l.vector_mask.as_mut().ok_or_else(|| EngineError::Other("layer has no vector mask".into()))?;
|
||||
if let Some(pth) = path {
|
||||
@@ -194,6 +199,15 @@ pub(super) fn toggle_vector_mask(s: &mut Session, p: &Value, key: &str) -> Resul
|
||||
let vm = d.doc.layer(id).ok_or(EngineError::NoLayer(id))?.vector_mask.as_ref().ok_or_else(|| EngineError::Other("layer has no vector mask".into()))?;
|
||||
if key == "enabled" { vm.enabled } else { vm.linked }
|
||||
};
|
||||
// A call that says the direction (the Layers panel's ⇧-click and chain) is named by it, as in Photoshop
|
||||
// (#16786); a plain toggle (Layer › Vector Mask) keeps its name.
|
||||
let label = match (key, p.get(key).and_then(Value::as_bool)) {
|
||||
("enabled", Some(true)) => "Enable Vector Mask",
|
||||
("enabled", Some(false)) => "Disable Vector Mask",
|
||||
(_, Some(true)) => "Link Vector Mask",
|
||||
(_, Some(false)) => "Unlink Vector Mask",
|
||||
(_, None) => "Edit Vector Mask",
|
||||
};
|
||||
let v = p.get(key).and_then(Value::as_bool).unwrap_or(!cur);
|
||||
vector_mask_edit(s, &json!({ "layer": id.0, key: v }))
|
||||
edit_vector_mask(s, &json!({ "layer": id.0, key: v }), label)
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
//! History names of the Layers panel's thumbnail gestures (#16786), run with the params the panel sends, and the
|
||||
//! Layer and Select menus' calls of the same commands, which keep their names.
|
||||
|
||||
use photocraft_engine::Session;
|
||||
use serde_json::{Value, json};
|
||||
|
||||
fn session() -> Session {
|
||||
let mut s = Session::new();
|
||||
s.execute("file.new", json!({"width": 40, "height": 30})).unwrap();
|
||||
s
|
||||
}
|
||||
|
||||
fn active(s: &Session) -> u64 {
|
||||
s.active().unwrap().active_layer.unwrap().0
|
||||
}
|
||||
|
||||
/// A new pixel layer filled with red, active.
|
||||
fn pixel_layer(s: &mut Session) -> u64 {
|
||||
s.execute("layer.new.layer", json!({})).unwrap();
|
||||
s.execute("edit.fill", json!({"color": "#ff0000"})).unwrap();
|
||||
active(s)
|
||||
}
|
||||
|
||||
/// The name of the one history state `cmd` with `params` adds.
|
||||
fn step(s: &mut Session, cmd: &str, params: Value) -> String {
|
||||
let before = s.active().unwrap().history.entries().len();
|
||||
s.execute(cmd, params.clone()).unwrap_or_else(|e| panic!("{cmd} {params}: {e}"));
|
||||
let after = s.active().unwrap().history.entries();
|
||||
assert_eq!(after.len(), before + 1, "{cmd} {params} adds one state: {after:?}");
|
||||
after[before].clone()
|
||||
}
|
||||
|
||||
/// ⌘-click (with ⇧ / ⌥ too) on a pixel, type, smart object or adjustment thumbnail, Select Pixels and ⌘-click on a
|
||||
/// layer mask are `Load Selection`; on a shape thumbnail or a vector mask, `Selection Change`.
|
||||
#[test]
|
||||
fn thumbnail_loads_are_named_as_their_kind() {
|
||||
let mut s = session();
|
||||
let pixel = pixel_layer(&mut s);
|
||||
pixel_layer(&mut s);
|
||||
s.execute("layer.smartObjects.convertToSmartObject", json!({})).unwrap();
|
||||
let smart = active(&s);
|
||||
let typ = s.execute("type.create", json!({"text": "A", "x": 5, "y": 20})).unwrap()["layer"].as_u64().unwrap();
|
||||
s.execute("layer.newAdjustmentLayer.invert", json!({})).unwrap();
|
||||
let adjustment = active(&s);
|
||||
for layer in [pixel, smart, typ, adjustment] {
|
||||
for operation in ["new", "add", "subtract", "intersect"] {
|
||||
let params = json!({"channel": "transparency", "layer": layer, "operation": operation});
|
||||
assert_eq!(step(&mut s, "select.loadSelection", params), "Load Selection", "layer {layer}, {operation}");
|
||||
}
|
||||
}
|
||||
s.execute("layer.layerMask.revealAll", json!({"layer": pixel})).unwrap();
|
||||
assert_eq!(step(&mut s, "select.loadSelection", json!({"channel": "mask", "layer": pixel, "operation": "new"})), "Load Selection");
|
||||
|
||||
let shape = s.execute("shape.create", json!({"kind": "rect", "rect": [2, 2, 20, 20]})).unwrap()["layer"].as_u64().unwrap();
|
||||
let params = json!({"channel": "transparency", "layer": shape, "operation": "new"});
|
||||
assert_eq!(step(&mut s, "select.loadSelection", params), "Selection Change", "shape thumbnail");
|
||||
s.execute("layer.vectorMask.revealAll", json!({"layer": pixel})).unwrap();
|
||||
let params = json!({"channel": "vectorMask", "layer": pixel, "operation": "add"});
|
||||
assert_eq!(step(&mut s, "select.loadSelection", params), "Selection Change", "vector mask");
|
||||
}
|
||||
|
||||
/// Select › Load Selection names no layer, and keeps its names.
|
||||
#[test]
|
||||
fn the_menu_load_keeps_its_names() {
|
||||
let mut s = session();
|
||||
let layer = pixel_layer(&mut s);
|
||||
s.execute("layer.layerMask.revealAll", json!({"layer": layer})).unwrap();
|
||||
assert_eq!(step(&mut s, "select.loadSelection", json!({"channel": "transparency"})), "Load Transparency");
|
||||
assert_eq!(step(&mut s, "select.loadSelection", json!({"channel": "mask"})), "Load Layer Mask");
|
||||
}
|
||||
|
||||
/// ⇧-click on a mask and the chain say which way they went; the Layer menu's plain toggles keep their names.
|
||||
#[test]
|
||||
fn mask_toggles_and_chains_name_their_direction() {
|
||||
let mut s = session();
|
||||
let layer = pixel_layer(&mut s);
|
||||
s.execute("layer.layerMask.revealAll", json!({"layer": layer})).unwrap();
|
||||
s.execute("layer.vectorMask.revealAll", json!({"layer": layer})).unwrap();
|
||||
let cases = [
|
||||
("layer.layerMask.enabled", "enabled", ["Disable Layer Mask", "Enable Layer Mask"], "Enable/Disable Layer Mask"),
|
||||
("layer.layerMask.linked", "linked", ["Unlink Mask", "Link Mask"], "Link/Unlink Layer Mask"),
|
||||
("layer.vectorMask.enabled", "enabled", ["Disable Vector Mask", "Enable Vector Mask"], "Edit Vector Mask"),
|
||||
("layer.vectorMask.linked", "linked", ["Unlink Vector Mask", "Link Vector Mask"], "Edit Vector Mask"),
|
||||
];
|
||||
for (cmd, key, [off, on], toggle) in cases {
|
||||
assert_eq!(step(&mut s, cmd, json!({"layer": layer, key: false})), off);
|
||||
assert_eq!(step(&mut s, cmd, json!({"layer": layer, key: true})), on);
|
||||
assert_eq!(step(&mut s, cmd, json!({})), toggle, "{cmd} from the menu");
|
||||
}
|
||||
}
|
||||
|
||||
/// Dragging a layer mask onto another layer, or ⌥-dragging a copy there, is one `Add Layer Mask` state, and one undo
|
||||
/// puts both layers back.
|
||||
#[test]
|
||||
fn a_mask_drop_is_one_add_layer_mask_state() {
|
||||
for copy in [false, true] {
|
||||
let mut s = session();
|
||||
let from = pixel_layer(&mut s);
|
||||
let to = pixel_layer(&mut s);
|
||||
s.execute("layer.layerMask.revealAll", json!({"layer": from})).unwrap();
|
||||
let before = s.active().unwrap().doc.clone();
|
||||
assert_eq!(step(&mut s, "layer.layerMask.moveTo", json!({"layer": from, "to": to, "copy": copy})), "Add Layer Mask", "copy {copy}");
|
||||
s.execute("edit.undo", json!({})).unwrap();
|
||||
let doc = &s.active().unwrap().doc;
|
||||
for id in [from, to] {
|
||||
let has_mask = |d: &photocraft_doc::Document| d.layer(photocraft_doc::LayerId(id)).unwrap().mask.is_some();
|
||||
assert_eq!(has_mask(doc), has_mask(&before), "copy {copy}: one undo restores layer {id}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -92,6 +92,7 @@ mod layer_delete_last;
|
||||
mod layer_mask_depth;
|
||||
mod layer_props_several;
|
||||
mod layer_range_panel_order;
|
||||
mod layers_thumbnail_history_names;
|
||||
mod live_dab_matches_replay;
|
||||
mod live_line_transform;
|
||||
mod magnetic_lasso_composite;
|
||||
|
||||
@@ -6,6 +6,93 @@
|
||||
use crate::menu_catalog::CATALOG;
|
||||
use crate::menus::is_live;
|
||||
|
||||
/// RFC-0052 hand marks for catalog ids that aren't engine commands: `(id, headless, reach, why)`.
|
||||
///
|
||||
/// `headless` is `no` or `partial`; `reach` is `window` (needs a desktop window, dialog or pointer),
|
||||
/// `os` (needs an OS service the engine doesn't wrap) or `engine-gap` (could be an engine command,
|
||||
/// isn't one yet). `yes` is never written here: an item is `yes` only when
|
||||
/// `photocraft_engine::commands::find` has its id, the registry `photocraft-cli` and the MCP server
|
||||
/// load. [`is_live`] also counts a dozen desktop-only sources; those make an item live in the menu,
|
||||
/// not headless. Without a mark, an id the desktop serves as a panel, workspace or pointer tool is
|
||||
/// `no` with `reach: window` ([`desktop_window`]); any other is `unknown`.
|
||||
pub const HEADLESS: &[(&str, &str, &str, &str)] = &[];
|
||||
|
||||
/// Why a non-engine id needs a desktop window, when the desktop serves it as a panel, a workspace
|
||||
/// or a pointer tool.
|
||||
fn desktop_window(id: &str) -> Option<&'static str> {
|
||||
if super::invoke::panel_alias(id).is_some() || crate::panel_docking::toggle_panel(id).is_some() {
|
||||
Some("shows or hides a desktop panel")
|
||||
} else if super::invoke::workspace_id(id).is_some() || crate::workspace_ui::handles(id) {
|
||||
Some("a desktop workspace")
|
||||
} else if crate::tool_shortcuts::tool(id).is_some() {
|
||||
Some("picks a pointer tool")
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
/// An item's RFC-0052 `(headless, reach, why)`: `yes` for an engine command, else its mark in
|
||||
/// `marks`, else `no`/`window` for a desktop panel, workspace or tool, else `unknown`.
|
||||
pub fn headless_of<'a>(id: &str, in_engine: bool, marks: &[(&'a str, &'a str, &'a str, &'a str)]) -> (&'a str, Option<&'a str>, &'a str) {
|
||||
if in_engine {
|
||||
return ("yes", None, "");
|
||||
}
|
||||
if let Some(m) = marks.iter().find(|m| m.0 == id) {
|
||||
return (m.1, Some(m.2), m.3);
|
||||
}
|
||||
match desktop_window(id) {
|
||||
Some(why) => ("no", Some("window"), why),
|
||||
None => ("unknown", None, ""),
|
||||
}
|
||||
}
|
||||
|
||||
/// Problems with `marks` against `ids` (`(id, is an engine command)`): bad values, repeats, ids
|
||||
/// not in the catalog, and marks on engine commands (they would hide a `yes`).
|
||||
pub fn headless_errors(marks: &[(&str, &str, &str, &str)], ids: &[(&str, bool)]) -> Vec<String> {
|
||||
let mut errs = Vec::new();
|
||||
for (i, (id, value, reach, _)) in marks.iter().enumerate() {
|
||||
if !matches!(*value, "no" | "partial") {
|
||||
errs.push(format!("headless mark `{id}`: `{value}` is not `no` or `partial` (`yes` comes from the registry)"));
|
||||
}
|
||||
if !matches!(*reach, "window" | "os" | "engine-gap") {
|
||||
errs.push(format!("headless mark `{id}`: reach `{reach}` is not window, os or engine-gap"));
|
||||
}
|
||||
if marks[..i].iter().any(|m| m.0 == *id) {
|
||||
errs.push(format!("headless mark `{id}` is written twice"));
|
||||
}
|
||||
match ids.iter().find(|x| x.0 == *id) {
|
||||
None => errs.push(format!("headless mark `{id}` is not a catalog id")),
|
||||
Some((_, true)) => errs.push(format!("headless mark `{id}` is stale: it is an engine command, so it is `yes`")),
|
||||
Some(_) => {}
|
||||
}
|
||||
}
|
||||
errs
|
||||
}
|
||||
|
||||
/// RFC-0052 counts over the catalog.
|
||||
#[derive(Clone, Debug, Default, PartialEq, Eq, serde::Serialize)]
|
||||
pub struct HeadlessCounts {
|
||||
pub yes: usize,
|
||||
pub no_window: usize,
|
||||
pub no_os: usize,
|
||||
pub no_engine_gap: usize,
|
||||
pub partial: usize,
|
||||
pub unknown: usize,
|
||||
}
|
||||
|
||||
impl HeadlessCounts {
|
||||
fn add(&mut self, value: &str, reach: Option<&str>) {
|
||||
match (value, reach) {
|
||||
("yes", _) => self.yes += 1,
|
||||
("no", Some("window")) => self.no_window += 1,
|
||||
("no", Some("os")) => self.no_os += 1,
|
||||
("no", _) => self.no_engine_gap += 1,
|
||||
("partial", _) => self.partial += 1,
|
||||
_ => self.unknown += 1,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Minimum number of live catalog items. Raise it when parity grows; never lower it.
|
||||
pub const FLOOR: usize = 663;
|
||||
|
||||
@@ -17,6 +104,8 @@ pub struct MenuParity {
|
||||
pub total: usize,
|
||||
/// Labels (with submenu path) of items not implemented yet.
|
||||
pub missing: Vec<String>,
|
||||
/// Items that aren't `headless: yes`, with their value (RFC-0052).
|
||||
pub not_headless: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, serde::Serialize)]
|
||||
@@ -24,6 +113,7 @@ pub struct Parity {
|
||||
pub live: usize,
|
||||
pub total: usize,
|
||||
pub menus: Vec<MenuParity>,
|
||||
pub headless: HeadlessCounts,
|
||||
}
|
||||
|
||||
impl Parity {
|
||||
@@ -42,6 +132,18 @@ impl Parity {
|
||||
let pct = if m.total == 0 { 0.0 } else { 100.0 * m.live as f64 / m.total as f64 };
|
||||
s.push_str(&format!("| {} | {} | {} | {:.0}% |\n", m.menu, m.live, m.total, pct));
|
||||
}
|
||||
let h = &self.headless;
|
||||
s.push_str(&format!(
|
||||
"\n**Headless ([RFC-0052](https://github.com/storytold/craft-contrib/blob/main/rfcs/0052-headless-reach.md)): {} yes, {} no (window {}, os {}, engine-gap {}), {} partial, {} unknown.**\n\n",
|
||||
h.yes,
|
||||
h.no_window + h.no_os + h.no_engine_gap,
|
||||
h.no_window,
|
||||
h.no_os,
|
||||
h.no_engine_gap,
|
||||
h.partial,
|
||||
h.unknown
|
||||
));
|
||||
s.push_str("Live counts the desktop app's own panels, workspaces, tools and view handlers. Headless counts only the engine registry that `photocraft-cli` and the MCP server load: an item is `yes` when its id is an engine command. The rest are listed under [Not headless](#not-headless), with the hand mark from `HEADLESS` in `crates/ui-egui/src/menus/parity.rs`, `no` (`window`) for a desktop panel, workspace or tool, or `unknown`.\n");
|
||||
s.push_str("\n## Not yet implemented\n");
|
||||
for m in self.menus.iter().filter(|m| !m.missing.is_empty()) {
|
||||
s.push_str(&format!("\n### {} ({})\n\n", m.menu, m.missing.len()));
|
||||
@@ -49,6 +151,13 @@ impl Parity {
|
||||
s.push_str(&format!("- {item}\n"));
|
||||
}
|
||||
}
|
||||
s.push_str("\n## Not headless\n");
|
||||
for m in self.menus.iter().filter(|m| !m.not_headless.is_empty()) {
|
||||
s.push_str(&format!("\n### {} ({})\n\n", m.menu, m.not_headless.len()));
|
||||
for item in &m.not_headless {
|
||||
s.push_str(&format!("* {item}\n"));
|
||||
}
|
||||
}
|
||||
s
|
||||
}
|
||||
}
|
||||
@@ -57,6 +166,7 @@ impl Parity {
|
||||
pub fn compute() -> Parity {
|
||||
let mut menus: Vec<MenuParity> = Vec::new();
|
||||
let mut seen = std::collections::HashSet::new();
|
||||
let mut headless = HeadlessCounts::default();
|
||||
for &(path, label, _, id) in CATALOG {
|
||||
if id == "---" || !seen.insert(id) {
|
||||
continue;
|
||||
@@ -65,21 +175,28 @@ pub fn compute() -> Parity {
|
||||
let i = match menus.iter().position(|m| m.menu == top) {
|
||||
Some(i) => i,
|
||||
None => {
|
||||
menus.push(MenuParity { menu: top.to_string(), live: 0, total: 0, missing: Vec::new() });
|
||||
menus.push(MenuParity { menu: top.to_string(), live: 0, total: 0, missing: Vec::new(), not_headless: Vec::new() });
|
||||
menus.len() - 1
|
||||
}
|
||||
};
|
||||
let Some(m) = menus.get_mut(i) else { continue };
|
||||
m.total += 1;
|
||||
let mut full: Vec<&str> = path[1..].to_vec();
|
||||
full.push(label);
|
||||
let name = format!("{} (`{id}`)", full.join(" › "));
|
||||
let (value, reach, why) = headless_of(id, photocraft_engine::commands::find(id).is_some(), HEADLESS);
|
||||
headless.add(value, reach);
|
||||
if value != "yes" {
|
||||
let reach = reach.map(|r| format!(", reach: {r} ({why})")).unwrap_or_default();
|
||||
m.not_headless.push(format!("{name}: headless: {value}{reach}"));
|
||||
}
|
||||
if is_live(id) {
|
||||
m.live += 1;
|
||||
} else {
|
||||
let mut full: Vec<&str> = path[1..].to_vec();
|
||||
full.push(label);
|
||||
m.missing.push(format!("{} (`{id}`)", full.join(" › ")));
|
||||
m.missing.push(name);
|
||||
}
|
||||
}
|
||||
Parity { live: menus.iter().map(|m| m.live).sum(), total: menus.iter().map(|m| m.total).sum(), menus }
|
||||
Parity { live: menus.iter().map(|m| m.live).sum(), total: menus.iter().map(|m| m.total).sum(), menus, headless }
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
@@ -93,10 +210,51 @@ mod tests {
|
||||
assert!(p.live >= FLOOR, "menu parity regressed: {} live < floor {FLOOR}", p.live);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn headless_marks_are_current() {
|
||||
let ids: Vec<(&str, bool)> = CATALOG.iter().filter(|c| c.3 != "---").map(|c| (c.3, photocraft_engine::commands::find(c.3).is_some())).collect();
|
||||
let errs = headless_errors(HEADLESS, &ids);
|
||||
assert!(errs.is_empty(), "{errs:?}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn headless_yes_is_the_engine_registry_only() {
|
||||
let p = compute();
|
||||
let h = &p.headless;
|
||||
assert_eq!(h.yes + h.no_window + h.no_os + h.no_engine_gap + h.partial + h.unknown, p.total);
|
||||
assert!(h.yes < p.live, "desktop-only sources are live, not headless");
|
||||
let listed: usize = p.menus.iter().map(|m| m.not_headless.len()).sum();
|
||||
assert_eq!(listed, p.total - h.yes);
|
||||
// A panel toggle is live in the desktop app and never headless.
|
||||
let window = p.menus.iter().find(|m| m.menu == "Window").map(|m| m.not_headless.len()).unwrap_or(0);
|
||||
assert!(window > 0, "Window panels read as not headless");
|
||||
assert!(p.to_markdown().contains(&format!("{} yes,", h.yes)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn headless_values_and_bad_marks() {
|
||||
let marks = [("c.d", "no", "engine-gap", "could be a command")];
|
||||
assert_eq!(headless_of("c.d", true, &marks).0, "yes", "an engine id is yes whatever the mark says");
|
||||
assert_eq!(headless_of("c.d", false, &marks), ("no", Some("engine-gap"), "could be a command"));
|
||||
assert_eq!(headless_of("q.never", false, &marks).0, "unknown");
|
||||
let ids = [("a.b", true), ("c.d", false)];
|
||||
let bad = [("c.d", "yes", "os", ""), ("c.d", "no", "desk", ""), ("a.b", "no", "os", ""), ("z.z", "no", "os", "")];
|
||||
let errs = headless_errors(&bad, &ids);
|
||||
for want in ["is not `no` or `partial`", "reach `desk`", "written twice", "`a.b` is stale", "`z.z` is not a catalog id"] {
|
||||
assert!(errs.iter().any(|e| e.contains(want)), "{want}: {errs:?}");
|
||||
}
|
||||
let mut c = HeadlessCounts::default();
|
||||
for (v, r) in [("yes", None), ("no", Some("window")), ("no", Some("os")), ("no", Some("engine-gap")), ("partial", Some("os")), ("unknown", None)] {
|
||||
c.add(v, r);
|
||||
}
|
||||
assert_eq!(c, HeadlessCounts { yes: 1, no_window: 1, no_os: 1, no_engine_gap: 1, partial: 1, unknown: 1 });
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn markdown_lists_every_missing_item() {
|
||||
let p = compute();
|
||||
let md = p.to_markdown();
|
||||
// `- ` lines are the missing items; the Not headless list uses `* `.
|
||||
let listed = md.lines().filter(|l| l.starts_with("- ")).count();
|
||||
assert_eq!(listed, p.total - p.live);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ fn type_allow(typed: bool) -> BoxAllow {
|
||||
}
|
||||
|
||||
/// The session over the source frame `rect`: the stored settings, the interpolation default and the nudge pause.
|
||||
/// `warp_ok` is false where the content cannot warp (a lone mask or channel, several layers, Content-Aware Scale).
|
||||
/// `warp_ok` is false where the content cannot warp (a lone mask or channel, several layers, a group, Content-Aware Scale).
|
||||
fn open_session(app: &PhotocraftApp, rect: [f64; 4], allow: BoxAllow, warp_ok: bool) -> TransformSession<SessionWarp> {
|
||||
TransformSession::new(frame_of(rect))
|
||||
.allow(allow.with_warp(warp_ok))
|
||||
@@ -130,6 +130,8 @@ pub fn begin(app: &mut PhotocraftApp, ctx: &egui::Context) -> Result<(), String>
|
||||
let opacity = layer.opacity * layer.fill_opacity;
|
||||
let whole = lifted.is_none();
|
||||
let allow = type_allow(matches!(layer.content, LayerContent::Text(_)));
|
||||
// A group doesn't warp, as several layers don't (#16731).
|
||||
let warp_ok = !frame_only && !matches!(layer.content, LayerContent::Group(_));
|
||||
// Reading the moving pixels and compositing the layers over them is the heavy part: hundreds
|
||||
// of megapixels on a large canvas. Done on the UI thread, the window stopped answering for
|
||||
// long enough that a Wayland compositor dropped it, so a large layer prepares as a job
|
||||
@@ -161,7 +163,7 @@ pub fn begin(app: &mut PhotocraftApp, ctx: &egui::Context) -> Result<(), String>
|
||||
..OpenPreview::new(session, shown, textures, app.ui.tool)
|
||||
});
|
||||
app.ui.transform = Some(FreeTransform {
|
||||
session: open_session(app, rect, allow, !frame_only),
|
||||
session: open_session(app, rect, allow, warp_ok),
|
||||
id: session,
|
||||
layer: id.0,
|
||||
layers: Vec::new(),
|
||||
@@ -373,9 +375,38 @@ pub(super) fn moves_kind(app: &PhotocraftApp, t: &FreeTransform, kind: fn(&Layer
|
||||
app.session.active().is_some_and(|st| moving_layers(t).iter().any(|id| st.doc.layer(*id).is_some_and(|l| kind(&l.content))))
|
||||
}
|
||||
|
||||
/// Does the box move a group as one layer (not its mask, a path or a selection outline)?
|
||||
pub(super) fn moves_group(app: &PhotocraftApp, t: &FreeTransform) -> bool {
|
||||
t.layers.is_empty() && !t.selection && t.target.is_none() && t.path.is_none() && moves_kind(app, t, |c| matches!(c, LayerContent::Group(_)))
|
||||
}
|
||||
|
||||
/// Why Warp refuses with several layers selected.
|
||||
pub const WARP_ONE_LAYER: &str = "Warp works on one layer at a time: select a single layer";
|
||||
|
||||
/// Why Warp refuses on a group (#16731).
|
||||
pub const WARP_GROUP: &str = "Warp doesn't work on a group";
|
||||
|
||||
/// Why the open box can't warp: several layers (#6501) or a group (#16731).
|
||||
fn warp_refusal(app: &PhotocraftApp) -> Option<&'static str> {
|
||||
let t = app.ui.transform.as_ref()?;
|
||||
if !t.layers.is_empty() { Some(WARP_ONE_LAYER) } else { moves_group(app, t).then_some(WARP_GROUP) }
|
||||
}
|
||||
|
||||
/// Would [`begin`] box the active group as one layer? Asked before it runs: a large layer's box
|
||||
/// opens only when its preparing job lands, too late for [`warp_refusal`].
|
||||
fn opens_group_box(app: &PhotocraftApp) -> bool {
|
||||
if crate::vector_ui::free_transform_path(app).is_some() {
|
||||
return false;
|
||||
}
|
||||
let target = crate::canvas::paint_target(app);
|
||||
let Some(st) = app.session.active() else { return false };
|
||||
let Some(id) = st.active_layer else { return false };
|
||||
let targets = photocraft_engine::transform_cmds::box_targets(&st.doc, &photocraft_engine::transform_cmds::selection_targets(st));
|
||||
targets == [id]
|
||||
&& photocraft_engine::transform_cmds::lone_target(&st.doc, Some(id), &json!({ "target": target })).is_ok_and(|t| t.is_none())
|
||||
&& st.doc.layer(id).is_some_and(|l| matches!(l.content, LayerContent::Group(_)))
|
||||
}
|
||||
|
||||
/// Free Transform on a copy (⌥⌘T, no menu item): duplicates the active layer (with a selection,
|
||||
/// its selected pixels, as Layer via Copy) and transforms the copy (#352).
|
||||
pub fn begin_copy(app: &mut PhotocraftApp, ctx: &egui::Context) -> Result<(), String> {
|
||||
@@ -688,14 +719,17 @@ pub fn begin_warp(app: &mut PhotocraftApp, ctx: &egui::Context) -> Result<(), St
|
||||
if app.ui.transform.as_ref().is_some_and(|t| t.content_aware.is_some()) {
|
||||
return Err(CAS_ONLY_SCALES.into());
|
||||
}
|
||||
if app.ui.transform.as_ref().is_some_and(|t| !t.layers.is_empty()) {
|
||||
return Err(WARP_ONE_LAYER.into());
|
||||
if let Some(why) = warp_refusal(app) {
|
||||
return Err(why.into());
|
||||
}
|
||||
if app.ui.transform.is_none() {
|
||||
if opens_group_box(app) {
|
||||
return Err(WARP_GROUP.into());
|
||||
}
|
||||
begin(app, ctx)?;
|
||||
if app.ui.transform.as_ref().is_some_and(|t| !t.layers.is_empty()) {
|
||||
if let Some(why) = warp_refusal(app) {
|
||||
cancel(app);
|
||||
return Err(WARP_ONE_LAYER.into());
|
||||
return Err(why.into());
|
||||
}
|
||||
}
|
||||
enter_warp(app, ctx);
|
||||
|
||||
@@ -2,7 +2,7 @@ use craft::behavior::EditEvent;
|
||||
use craft::behavior::kurbo::Point;
|
||||
use craft::draw::ui::transform::{TransformEdit, TransformRequest};
|
||||
|
||||
use super::begin::{fold_made, moves_kind, moving_layers, rect_to_quad_affine, take_back_made};
|
||||
use super::begin::{fold_made, moves_group, moves_kind, moving_layers, rect_to_quad_affine, take_back_made};
|
||||
use super::{
|
||||
Arc, DocId, FreeTransform, JobEvent, JobId, JobOutcome, LayerContent, LayerId, MadeLayer, OpenPreview, PhotocraftApp, SessionWarp, Several, json,
|
||||
preset_for_command, swap_mode_texels,
|
||||
@@ -398,6 +398,20 @@ pub fn is_enabled(app: &PhotocraftApp, id: &str) -> Option<bool> {
|
||||
return Some(false);
|
||||
}
|
||||
let t = app.ui.transform.as_ref()?;
|
||||
// One box over several layers doesn't warp (#6501), nor one over a group (#16731), and not
|
||||
// while its commit runs either.
|
||||
if matches!(
|
||||
id,
|
||||
"edit.transform.warp"
|
||||
| "layer.smartObjects.warp"
|
||||
| "edit.transform.splitWarpCrosswise"
|
||||
| "edit.transform.splitWarpHorizontally"
|
||||
| "edit.transform.splitWarpVertically"
|
||||
| "edit.transform.removeWarpSplit"
|
||||
) && (!t.layers.is_empty() || moves_group(app, t))
|
||||
{
|
||||
return Some(false);
|
||||
}
|
||||
if committing(app).is_some() {
|
||||
return box_command(id).then_some(false);
|
||||
}
|
||||
@@ -414,17 +428,6 @@ pub fn is_enabled(app: &PhotocraftApp, id: &str) -> Option<bool> {
|
||||
SAVE_FOR_WEB | COPY_CSS => Some(false),
|
||||
// Rotate and Flip turn the box (not while warping, where the mesh is the box).
|
||||
_ if preset_for_command(id).is_some() => Some(t.session.warp().is_none()),
|
||||
// One box over several layers doesn't warp (#6501).
|
||||
"edit.transform.warp"
|
||||
| "layer.smartObjects.warp"
|
||||
| "edit.transform.splitWarpCrosswise"
|
||||
| "edit.transform.splitWarpHorizontally"
|
||||
| "edit.transform.splitWarpVertically"
|
||||
| "edit.transform.removeWarpSplit"
|
||||
if !t.layers.is_empty() =>
|
||||
{
|
||||
Some(false)
|
||||
}
|
||||
// Editable type can't be distorted (#2630, as #2701 rules for the menus outside a box).
|
||||
"edit.transform.distort" | "edit.transform.perspective" if moves_type(app, t) => Some(false),
|
||||
_ => None,
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
//! #16731: a box over a group doesn't warp, as one over several layers doesn't; a box over one
|
||||
//! layer of any other kind still does.
|
||||
|
||||
use super::*;
|
||||
use crate::transform_tool::begin::WARP_GROUP;
|
||||
|
||||
/// The Edit › Transform rows of the Warp block.
|
||||
const WARP_BLOCK: [&str; 5] = [
|
||||
"edit.transform.warp",
|
||||
"edit.transform.splitWarpCrosswise",
|
||||
"edit.transform.splitWarpHorizontally",
|
||||
"edit.transform.splitWarpVertically",
|
||||
"edit.transform.removeWarpSplit",
|
||||
];
|
||||
|
||||
/// Is the Warp row of the open box's right-click menu enabled?
|
||||
fn warp_row(app: &PhotocraftApp) -> bool {
|
||||
let words = TransformMenuWords::english();
|
||||
open(app).session.menu(&words).iter().find(|e| matches!(e.value(), Some(TransformChoice::Warp))).map(|e| e.is_enabled()).expect("the menu has a Warp row")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_group_box_greys_warp_in_its_menu_and_in_edit_transform() {
|
||||
let mut app = app_with_square(64, photocraft_geom::Rect::new(8, 8, 24, 24));
|
||||
let ctx = app.ctx().clone();
|
||||
app.session.execute("layer.new.groupFromLayers", json!({})).unwrap();
|
||||
let st = app.session.active().unwrap();
|
||||
assert!(st.active_layer.and_then(|id| st.doc.layer(id)).is_some_and(|l| matches!(l.content, LayerContent::Group(_))), "the group is active");
|
||||
begin(&mut app, &ctx).unwrap();
|
||||
assert!(open(&app).layers.is_empty(), "a box over the group as one layer");
|
||||
assert!(!warp_row(&app), "Warp is greyed in the box's menu");
|
||||
for id in WARP_BLOCK {
|
||||
assert!(!crate::menus::is_enabled(&app, id), "{id} is greyed while the group box is open");
|
||||
}
|
||||
// Asked anyway (automation), Warp refuses and leaves the box as it was.
|
||||
assert_eq!(begin_warp(&mut app, &ctx), Err(WARP_GROUP.into()));
|
||||
assert!(open(&app).session.warp().is_none(), "the box doesn't switch to Warp");
|
||||
cancel(&mut app);
|
||||
// With no box open, Warp refuses without leaving one behind.
|
||||
assert_eq!(begin_warp(&mut app, &ctx), Err(WARP_GROUP.into()));
|
||||
assert!(app.ui.transform.is_none(), "no box is left open");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn single_pixel_type_and_smart_object_layers_keep_warp() {
|
||||
let ctx = egui::Context::default();
|
||||
let pixel = app_with_square(64, photocraft_geom::Rect::new(8, 8, 24, 24));
|
||||
let mut typed = app_with_square(64, photocraft_geom::Rect::new(8, 8, 24, 24));
|
||||
typed.run("type.create", json!({"x": 10, "y": 40, "text": "Hi"})).unwrap();
|
||||
let mut smart = app_with_square(64, photocraft_geom::Rect::new(8, 8, 24, 24));
|
||||
smart.session.execute("layer.smartObjects.convertToSmartObject", json!({})).unwrap();
|
||||
for (name, mut app) in [("pixel", pixel), ("type", typed), ("smart object", smart)] {
|
||||
begin(&mut app, &ctx).unwrap();
|
||||
assert!(warp_row(&app), "a {name} layer's box offers Warp");
|
||||
assert!(crate::menus::is_enabled(&app, "edit.transform.warp"), "Edit › Transform › Warp is live over a {name} layer");
|
||||
cancel(&mut app);
|
||||
}
|
||||
}
|
||||
@@ -2219,3 +2219,6 @@ fn an_unskewed_box_shows_its_horizontal_skew_as_zero() {
|
||||
|
||||
#[path = "warp_remove_split_tests.rs"]
|
||||
mod warp_remove_split_tests;
|
||||
|
||||
#[path = "group_warp_greyed_tests.rs"]
|
||||
mod group_warp_greyed_tests;
|
||||
@@ -16,4 +16,175 @@ Generated by `cargo xtask parity` from `crates/ui-egui/src/menu_catalog.rs` (Pho
|
||||
| View | 76 | 76 | 100% |
|
||||
| Window | 62 | 62 | 100% |
|
||||
|
||||
**Headless ([RFC-0052](https://github.com/storytold/craft-contrib/blob/main/rfcs/0052-headless-reach.md)): 517 yes, 48 no (window 48, os 0, engine-gap 0), 0 partial, 99 unknown.**
|
||||
|
||||
Live counts the desktop app's own panels, workspaces, tools and view handlers. Headless counts only the engine registry that `photocraft-cli` and the MCP server load: an item is `yes` when its id is an engine command. The rest are listed under [Not headless](#not-headless), with the hand mark from `HEADLESS` in `crates/ui-egui/src/menus/parity.rs`, `no` (`window`) for a desktop panel, workspace or tool, or `unknown`.
|
||||
|
||||
## Not yet implemented
|
||||
|
||||
## Not headless
|
||||
|
||||
### File (6)
|
||||
|
||||
* Open… (`file.open`): headless: unknown
|
||||
* Save (`file.save`): headless: unknown
|
||||
* Save As… (`file.saveAs`): headless: unknown
|
||||
* Export › Quick Export as PNG (`file.export.quickExportAsPng`): headless: unknown
|
||||
* Export › Export As… (`file.export.exportAs`): headless: unknown
|
||||
* Exit (`file.exit`): headless: unknown
|
||||
|
||||
### Edit (7)
|
||||
|
||||
* Search… (`edit.search`): headless: unknown
|
||||
* Free Transform (`edit.freeTransform`): headless: unknown
|
||||
* Transform › Scale (`edit.transform.scale`): headless: unknown
|
||||
* Transform › Rotate (`edit.transform.rotate`): headless: unknown
|
||||
* Transform › Skew (`edit.transform.skew`): headless: unknown
|
||||
* Transform › Distort (`edit.transform.distort`): headless: unknown
|
||||
* Transform › Perspective (`edit.transform.perspective`): headless: unknown
|
||||
|
||||
### Type (14)
|
||||
|
||||
* Panels › Character Panel (`type.panels.character`): headless: unknown
|
||||
* Panels › Paragraph Panel (`type.panels.paragraph`): headless: unknown
|
||||
* Panels › Glyphs Panel (`type.panels.glyphs`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Panels › Character Styles Panel (`type.panels.characterStyles`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Panels › Paragraph Styles Panel (`type.panels.paragraphStyles`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Font Preview Size › Small (`type.fontPreviewSize.small`): headless: unknown
|
||||
* Font Preview Size › Medium (`type.fontPreviewSize.medium`): headless: unknown
|
||||
* Font Preview Size › Large (`type.fontPreviewSize.large`): headless: unknown
|
||||
* Font Preview Size › Extra Large (`type.fontPreviewSize.extraLarge`): headless: unknown
|
||||
* Font Preview Size › Huge (`type.fontPreviewSize.huge`): headless: unknown
|
||||
* Language Options › Default Features (`type.languageOptions.defaultFeatures`): headless: unknown
|
||||
* Language Options › East Asian Features (`type.languageOptions.eastAsianFeatures`): headless: unknown
|
||||
* Language Options › Middle Eastern Features (`type.languageOptions.middleEasternFeatures`): headless: unknown
|
||||
* Language Options › Middle Eastern & South Asian Composer (`type.languageOptions.middleEasternAndSouthAsianComposer`): headless: unknown
|
||||
|
||||
### Select (1)
|
||||
|
||||
* Select and Mask… (`select.selectAndMask`): headless: unknown
|
||||
|
||||
### View (57)
|
||||
|
||||
* Proof Setup › Custom… (`view.proofSetup.custom`): headless: unknown
|
||||
* Proof Setup › Working CMYK (`view.proofSetup.workingCmyk`): headless: unknown
|
||||
* Proof Setup › Internet Standard RGB (sRGB) (`view.proofSetup.internetStandardRgb`): headless: unknown
|
||||
* Proof Setup › Monitor RGB (`view.proofSetup.monitorRgb`): headless: unknown
|
||||
* Pixel Aspect Ratio › Custom Pixel Aspect Ratio… (`view.pixelAspectRatio.custom`): headless: no, reach: window (a desktop workspace)
|
||||
* Pixel Aspect Ratio › Square (`view.pixelAspectRatio.square`): headless: unknown
|
||||
* Pixel Aspect Ratio › D1/DV NTSC (0.91) (`view.pixelAspectRatio.d1DvNtsc`): headless: unknown
|
||||
* Pixel Aspect Ratio › D1/DV PAL (1.09) (`view.pixelAspectRatio.d1DvPal`): headless: unknown
|
||||
* Pixel Aspect Ratio › D1/DV NTSC Widescreen (1.21) (`view.pixelAspectRatio.d1DvNtscWidescreen`): headless: unknown
|
||||
* Pixel Aspect Ratio › HDV 1080/DVCPRO HD 720 (1.33) (`view.pixelAspectRatio.hdv1080`): headless: unknown
|
||||
* Pixel Aspect Ratio › D1/DV PAL Widescreen (1.46) (`view.pixelAspectRatio.d1DvPalWidescreen`): headless: unknown
|
||||
* Pixel Aspect Ratio › DVCPRO HD 1080/HDV 1080 (1.5) (`view.pixelAspectRatio.dvcproHd1080`): headless: unknown
|
||||
* Pixel Aspect Ratio › Anamorphic 2:1 (2) (`view.pixelAspectRatio.anamorphic2To1`): headless: unknown
|
||||
* Pixel Aspect Ratio Correction (`view.pixelAspectRatioCorrection`): headless: unknown
|
||||
* Zoom In (`view.zoomIn`): headless: unknown
|
||||
* Zoom Out (`view.zoomOut`): headless: unknown
|
||||
* Fit on Screen (`view.fitOnScreen`): headless: unknown
|
||||
* Fit Layer(s) on Screen (`view.fitLayersOnScreen`): headless: unknown
|
||||
* Fit Artboard on Screen (`view.fitArtboardOnScreen`): headless: unknown
|
||||
* 100% (`view.actualPixels`): headless: unknown
|
||||
* 200% (`view.twoHundredPercent`): headless: unknown
|
||||
* Print Size (`view.printSize`): headless: unknown
|
||||
* Flip Horizontal (`view.flipHorizontal`): headless: unknown
|
||||
* Screen Mode › Standard Screen Mode (`view.screenMode.standard`): headless: unknown
|
||||
* Screen Mode › Full Screen Mode With Menu Bar (`view.screenMode.fullScreenWithMenuBar`): headless: unknown
|
||||
* Screen Mode › Full Screen Mode (`view.screenMode.fullScreen`): headless: unknown
|
||||
* Extras (`view.extras`): headless: unknown
|
||||
* Show › Layer Edges (`view.show.layerEdges`): headless: unknown
|
||||
* Show › Selection Edges (`view.show.selectionEdges`): headless: unknown
|
||||
* Show › Target Path (`view.show.targetPath`): headless: unknown
|
||||
* Show › Grid (`view.show.grid`): headless: unknown
|
||||
* Show › Guides (`view.show.guides`): headless: unknown
|
||||
* Show › Canvas Guides (`view.show.canvasGuides`): headless: unknown
|
||||
* Show › Artboard Guides (`view.show.artboardGuides`): headless: unknown
|
||||
* Show › Count (`view.show.count`): headless: unknown
|
||||
* Show › Smart Guides (`view.show.smartGuides`): headless: unknown
|
||||
* Show › Slices (`view.show.slices`): headless: unknown
|
||||
* Show › Notes (`view.show.notes`): headless: unknown
|
||||
* Show › Pixel Grid (`view.show.pixelGrid`): headless: unknown
|
||||
* Show › Brush Preview (`view.show.brushPreview`): headless: unknown
|
||||
* Show › Mesh (`view.show.mesh`): headless: unknown
|
||||
* Show › Edit Pins (`view.show.editPins`): headless: unknown
|
||||
* Show › All (`view.show.all`): headless: unknown
|
||||
* Show › Show Extras Options… (`view.show.showExtrasOptions`): headless: no, reach: window (a desktop workspace)
|
||||
* Rulers (`view.rulers`): headless: unknown
|
||||
* Snap (`view.snap`): headless: unknown
|
||||
* Snap To › Guides (`view.snapTo.guides`): headless: unknown
|
||||
* Snap To › Grid (`view.snapTo.grid`): headless: unknown
|
||||
* Snap To › Layers (`view.snapTo.layers`): headless: unknown
|
||||
* Snap To › Slices (`view.snapTo.slices`): headless: unknown
|
||||
* Snap To › Document Bounds (`view.snapTo.documentBounds`): headless: unknown
|
||||
* Snap To › All (`view.snapTo.all`): headless: unknown
|
||||
* Guides › Edit Selected Guides (`view.editSelectedGuides`): headless: unknown
|
||||
* Guides › Lock Guides (`view.lockGuides`): headless: unknown
|
||||
* Guides › Clear Selected Guides (`view.clearSelectedGuides`): headless: unknown
|
||||
* Pattern Preview (`view.patternPreview`): headless: unknown
|
||||
* Pixel Art Preview (`view.pixelArtPreview`): headless: unknown
|
||||
|
||||
### Window (62)
|
||||
|
||||
* Arrange › Tile All Vertically (`window.arrange.tileAllVertically`): headless: unknown
|
||||
* Arrange › Tile All Horizontally (`window.arrange.tileAllHorizontally`): headless: unknown
|
||||
* Arrange › 2-up Horizontal (`window.arrange.twoUpHorizontal`): headless: unknown
|
||||
* Arrange › 2-up Vertical (`window.arrange.twoUpVertical`): headless: unknown
|
||||
* Arrange › 3-up Horizontal (`window.arrange.threeUpHorizontal`): headless: unknown
|
||||
* Arrange › 3-up Vertical (`window.arrange.threeUpVertical`): headless: unknown
|
||||
* Arrange › 3-up Stacked (`window.arrange.threeUpStacked`): headless: unknown
|
||||
* Arrange › 4-up (`window.arrange.fourUp`): headless: unknown
|
||||
* Arrange › 6-up (`window.arrange.sixUp`): headless: unknown
|
||||
* Arrange › Consolidate All to Tabs (`window.arrange.consolidateAllToTabs`): headless: unknown
|
||||
* Arrange › Cascade (`window.arrange.cascade`): headless: unknown
|
||||
* Arrange › Tile (`window.arrange.tile`): headless: unknown
|
||||
* Arrange › Float in Window (`window.arrange.floatInWindow`): headless: unknown
|
||||
* Arrange › Float All in Windows (`window.arrange.floatAllInWindows`): headless: unknown
|
||||
* Arrange › Match Zoom (`window.arrange.matchZoom`): headless: unknown
|
||||
* Arrange › Match Location (`window.arrange.matchLocation`): headless: unknown
|
||||
* Arrange › Match Rotation (`window.arrange.matchRotation`): headless: unknown
|
||||
* Arrange › Match All (`window.arrange.matchAll`): headless: unknown
|
||||
* Arrange › New Window (`window.arrange.newWindowForDocument`): headless: unknown
|
||||
* Workspace › Essentials (`window.workspace.essentials`): headless: no, reach: window (a desktop workspace)
|
||||
* Workspace › Photography (`window.workspace.photography`): headless: no, reach: window (a desktop workspace)
|
||||
* Workspace › Painting (`window.workspace.painting`): headless: no, reach: window (a desktop workspace)
|
||||
* Workspace › Pixel Art (`window.workspace.pixelArt`): headless: no, reach: window (a desktop workspace)
|
||||
* Workspace › Graphic and Web (`window.workspace.graphicAndWeb`): headless: no, reach: window (a desktop workspace)
|
||||
* Workspace › Motion (`window.workspace.motion`): headless: no, reach: window (a desktop workspace)
|
||||
* Workspace › Reset Workspace (`workspace.reset`): headless: no, reach: window (a desktop workspace)
|
||||
* Workspace › New Workspace… (`workspace.new`): headless: no, reach: window (a desktop workspace)
|
||||
* Workspace › Delete Workspace… (`workspace.delete`): headless: no, reach: window (a desktop workspace)
|
||||
* Workspace › Lock Workspace (`workspace.lock`): headless: no, reach: window (a desktop workspace)
|
||||
* Actions (`window.panel.actions`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Adjustments (`window.panel.adjustments`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Brush Settings (`window.panel.brushSettings`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Brushes (`window.panel.brushes`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Channels (`window.panel.channels`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Character (`window.panel.character`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Character Styles (`window.panel.characterStyles`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Clone Source (`window.panel.cloneSource`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Color (`window.panel.color`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Glyphs (`window.panel.glyphs`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Gradients (`window.panel.gradients`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Histogram (`window.panel.histogram`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* History (`window.panel.history`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Info (`window.panel.info`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Layer Comps (`window.panel.layerComps`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Layers (`window.panel.layers`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Measurement Log (`window.panel.measurementLog`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Modifier Keys (`window.panel.modifierKeys`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Navigator (`window.panel.navigator`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Notes (`window.panel.notes`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Paragraph (`window.panel.paragraph`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Paragraph Styles (`window.panel.paragraphStyles`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Paths (`window.panel.paths`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Patterns (`window.panel.patterns`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Properties (`window.panel.properties`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Shapes (`window.panel.shapes`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Styles (`window.panel.styles`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Swatches (`window.panel.swatches`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Timeline (`window.panel.timeline`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Tool Presets (`window.panel.toolPresets`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Options (`window.panel.options`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Tools (`window.panel.tools`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
* Contextual Task Bar (`window.panel.contextualTaskBar`): headless: no, reach: window (shows or hides a desktop panel)
|
||||
Reference in new issue
Block a user