Photoshop clamps Wave's wavelengths and amplitudes to 1..999, but
filter.distort.wave takes wavelengthMin 1..998, wavelengthMax 2..999 and
amplitudeMin 1..998, so `WLMn` 999, `WLMx` 1 or `AmMn` 999 mapped to a
step that failed when it played. Such a step now stays a Photoshop step,
and export refuses those values. A minimum above its maximum, which the
command takes, still maps and plays.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A `filter.gallery.neonGlow` step without `glowColor` plays with the
effect's default glow colour, but export refused it. It now writes that
colour as Photoshop's RGBC components, unrounded (0, 158.1, 255), so the
saved step names exactly the colour PhotoCraft plays rather than a
`#009eff` rounded to whole components.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An integer key only checked for a fraction and the i32 range, so
`edgeWidth: 99` saved as `EdgW` 99, which Photoshop plays clamped and
which loads back as 14. A value outside the setting's own min..max now
refuses the step, as fields.rs refuses rather than clamps (#7287).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The gate failed in photocraft-compose's proptest the_split_route_agrees_with_the_exact_path (flaky on main, #10386), which this PR doesn't touch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Import read `Amnt` and the radius with `num`, which drops the unit, but the
step saves `Amnt` in `#Prc` and the radius in `#Pxl`, so a value in another
unit (or a bare number) loaded and saved back in the step's unit. Import now
takes only those units, for the padded `Rds ` and the unpadded `Rds` alike,
and keeps anything else as a Photoshop step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Import read Oil Paint's settings with `num`, which takes any number and drops
a unit, so a recorded `#Prc` stylization or an integer bristle detail loaded
and saved back as a plain double, and a fractional light direction loaded and
then couldn't be saved. Import now takes the types Photoshop records and the
step writes back (doubles, and an integer `LghD`), and keeps anything else
as a Photoshop step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Import rounded `SclH`/`SclV` before comparing with 100, so a recorded 99.6
loaded as an unscaled Wave and saved back as 100. A fractional scale now
keeps the Photoshop step: the step can only write the integer 100.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Import read an enumeration's value and ignored its type, so `Cnvr` recorded
as `Ordn`/`RctP` loaded as Polar Coordinates and saved back as `Cnvr`/`RctP`.
Each enumeration (and Wave's `UndA`) now loads only with the type Photoshop
records and the step saves back; another type keeps the Photoshop step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A descriptor may hold the same key more than once. `setting` read the first
and `only_keys` admitted both, so a step with two `Amnt` played the first and
saved back one. `setting` now treats a key recorded more than once as a value
it can't take, so the step stays a Photoshop step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Import took any number for `Lght`, `ClrR` and `Fade`, but export writes them
as integers and refuses a fraction, so a recorded 99.5 loaded and then could
not be saved; a whole double, a large integer or a unit double would have
saved back as a different type. Import now takes only an integer, as
export writes it, and keeps anything else as a Photoshop step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Import read `Wdth` with `num`, which drops the unit, so a width in points or
millimetres (or a bare number) loaded as that many pixels and saved back as
`#Pxl`. Import now takes only a `#Pxl` unit double, the one Trap saves, and
keeps any other width as a Photoshop step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Export wrote each enumeration with its key as the type. Photoshop's terminology
gives stroke direction (`SDir`, Graphic Pen and Sprayed Strokes) its own type,
`StrD` (strokeDirectionType), so those steps saved differently from Photoshop.
Texture keeps `TxtT` as its type: that is how Photoshop records Glass
(`TxtT` / `TxtT`), and its terminology has no separate texture type.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The identity field is as large as the image's displacement field. It was made
when Preview was first turned off and then kept until the dialog closed; now it
exists only while Preview is off.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A stroke with Preview off changes the displacement field but not the display,
and OK with Preview off applies the same warp as with Preview on.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Layers panel: draw artboard rows like Photoshop, not like folders
An artboard's row looked exactly like a layer group's: the same folder
thumbnail, font and height, so boards read as folders and it was hard to see
where one ended and the next began (#10218).
Artboard rows now have no thumbnail, a bold name, a shorter row (never taller
than a layer's) and a faint band from the theme's hover colour. Plain groups
and layers are unchanged.
Co-Authored-By: Claude <noreply@anthropic.com>
* Artboard rows: keep mask thumbnails, paint the band under label colours
Review follow-ups:
- A board with a layer or vector mask kept no mask thumbnails, so clicking,
dragging and loading its mask from the row stopped working. It now keeps a
full-height row with its mask thumbnails; only the board's own thumbnail is
left out, and the targeted mask still gets its brackets.
- The band was painted over the eye column's label colour and the dividers,
so a board's label colour looked different from other rows'. It is now
painted first.
Adds a_masked_artboard_row_keeps_its_mask_thumbnail, which failed before.
Co-Authored-By: Claude <noreply@anthropic.com>
* Artboard rows: retarget the board, keep the mask chain off the triangle
Review follow-ups:
- With a board's mask targeted, nothing on the row targeted the board again:
a board has no thumbnail to click. A click on its row, off the masks, now
targets the board.
- On a masked board the mask chain started inside the disclosure triangle's
hit area, so a click there toggled the mask link instead of opening or
closing the board. The row now leaves the gap a layer thumbnail would.
Adds a_masked_artboard_row_keeps_the_triangle_clear_and_retargets_the_board,
which failed before on each point.
Co-Authored-By: Claude <noreply@anthropic.com>
* Artboard rows: compact only for unmasked boards
Review follow-up. Leaving the thumbnail off a masked board kept costing what
the thumbnail does on any masked layer: clicking back from the mask, ending
the mask view, the target brackets and the spacing of the mask's chain, each
patched one at a time.
A board with a mask now keeps its usual row, thumbnail and all, so all of it
works as on any masked layer; only unmasked boards get the compact heading
row. This drops those special cases.
Tests: a masked board keeps its thumbnail and mask thumbnail with the chain
clear of the triangle, and its thumbnail ends the mask view and targets the
board (both failed before).
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Artboards share one canvas, so a layer dragged from one board onto another in
the Layers panel (layer.moveTo, including the Alt-drag copy) changed parent but
kept its old canvas position, outside the board it now belonged to, and the
board clipped it away.
apply_move now shifts a layer that lands on a different board by the offset
between the two boards' origins, through move_layers (the Move tool's path).
Reordering within a board, leaving or joining a board from the top level,
position-locked layers and moving a board itself are unchanged. The Layers
panel's drop preview uses apply_move, so it shows the same result.
Locks are read before the drop as well as after, so a layer whose position
was locked only through the board it left stays put (review follow-up).
Co-authored-by: Claude <noreply@anthropic.com>
`RndS` went through `as i32`, so a `LargeInteger` seed above i32::MAX
saturated to 2147483647 and a fractional one was truncated: both played
with another seed. The seed now loads only when it is a whole number in
i32::MIN..=u32::MAX (a negative one still as its signed bit pattern);
anything else keeps the Photoshop step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`keys_to` only checked that an integer fit in 32 bits, so a Pinch
`amount` of 500 was written as is and loaded back clamped to 100. Each
integer key, Wave's included, now refuses a value outside its
`min..=max`, like other out-of-range exports (fields.rs, #7287).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A present integer or enumeration key of another type (an `Amnt` as a
Boolean, a `SphM` as text), or a Wave `SclH`/`SclV`, `UndA` or `RndS` that
couldn't be read, was taken as missing, so the step played with
Photoshop's default. A `setting` helper (as in steps_image.rs) now reads
a present key with its expected type and returns None otherwise, so the
step stays a Photoshop step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A present `Lght`, `ClrR`, `Fade` or Trap `Wdth` that isn't a number read
as missing, so the step played with Photoshop's default and saved back
with it. Each key now goes through `setting`, so such a step stays a
Photoshop step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only a Boolean false kept the step: any other non-Boolean value read as
missing, so the step played as a source-less Match Color and saved back
as `noReference` true. A `setting` helper (as in steps_image.rs) reads
the present key as a Boolean, and anything but true keeps the step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`image.trap` accepts any width, and `trap_to` wrote it straight to
`Wdth`, so a step above the 32767 px the import clamps to saved a value
Photoshop doesn't take. Like other out-of-range exports (fields.rs,
#7287), it now refuses the step rather than clamping it to another width.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A present enumeration key of another type, or a Custom `Scl `/`Ofst`
that isn't a number, was read as missing and played with Photoshop's
default. A `setting` helper (as in steps_image.rs) now reads a present
key with its expected type and returns None otherwise, so the step stays
a Photoshop step. It also reads `Scl` without its padding, which the key
gate already admitted but the mapper read as the default 1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Filter Gallery steps (GEfc with the effect in GEfk, or the effect's own
event) map every effect to filter.gallery.<effect>, not only Spatter:
each key in recorded order, out-of-range values clamped and missing
keys given Photoshop's defaults, enumerations, Invert and Neon Glow's
colour mapped both ways. The table is generated from the event
reference's Group A; every integer range and default matches the
effects'. Glass maps the Frosted and Canvas textures the reference
gives codes for. A setting the event cannot hold refuses the step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
De-Interlace (Dntr), NTSC Colors (NTSC), HSB/HSL (HsbP), Custom (Cstm),
Average (Avrg) and Remove Black / White Matte (RmvB/RmvW) load as their
commands, play, and save back with the same keys. Missing keys take
Photoshop's defaults; a Custom matrix that is not 5 x 5 keeps the
Photoshop step. Replace Color and the direct Gradient Map (GrMp) are
still kept verbatim.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The enum and Boolean gates passed a present key of another type, and
the amount and radius fell back to their defaults. The key gate admits
`Rds` without its padding, but the radius was read as `Rds ` only, so it
played as 1. Every key now goes through `setting`, which reads the key
as the gate admits it and keeps a wrong-typed step as a Photoshop step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A present lightingOn or numeric key of another type passed the key-name
gate, read as missing and played with Photoshop's default. Each key now
goes through `setting`, so such a step stays a Photoshop step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A wrong-typed sampleAllLayers was read as missing and the step played
with false. A shared `setting` helper now reads a present key with its
expected type and returns None otherwise, so the step stays a Photoshop
step, like settings the command can't represent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Split Channels (SplC), Merge Spot Channel (MSpt), Trap (Trap) and Match
Color without a source (matchColor, noReference) load as channel.split,
channel.mergeSpot, image.trap and image.adjustments.matchColor and save
back with the keys Photoshop records. The split's recorded documentIDs
belong to its run and are neither replayed nor written; Trap's width is
clamped to 32767 px; Match Color takes Photoshop's defaults. Steps the
events cannot carry (a split keeping its original, a named spot
channel, a Match Color source or option) are refused on export.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pinch, Polar Coordinates, Spherize, Twirl, Wave and ZigZag steps load
as filter.distort.*, play, and save back with every key in recorded
order. Out-of-range values are clamped as Photoshop clamps them and
missing keys take Photoshop's defaults (Wave's undefined areas are
Repeat Edge Pixels). A Wave scaled below 100 % stays a Photoshop step,
as the command has no scale. Shear is still kept verbatim: its curve
points need a step recorded through its dialog.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Oil Paint (oilPaint), Smart Sharpen (smartSharpen), Focus Area
(focusMask), Select Sky (selectSky) and Remove Background
(removeBackground), recorded by string ID, load as their commands and
save back with the keys and defaults Photoshop records. Oil Paint's and
Select Sky's Photoshop defaults are written out where they differ from
the commands'. Smart Sharpen maps the legacy Lens Blur form with no
noise reduction; other forms stay Photoshop steps. Settings the events
cannot carry refuse the step on export.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>