Commit Graph
2 Commits
Author SHA1 Message Date
dotCooCoo f5afa0b84a Scripts: review fixes for the document defaults and the object model
- appearance.setNewArt is listed among the commands a plug-in may call, so
  every_command_is_reviewed passes.
- appearance.setNewArt refuses `tint` on a pattern that has no swatch entry,
  and its help and docs/mcp.md say an omitted `weight` keeps the stored weight.
- The dash checks of appearance.setNewArt, strokeDashes and
  defaultStrokeDashes share one helper.
- defaultStrokeWidth, defaultStrokeMiterLimit and defaultStrokeDashOffset
  compare exactly, so a slightly different value reaches new art.
- An RGB default in a CMYK document is compared in the document's color mode,
  and a color read back from a path or a default (a Gray too small for its
  value to name) assigns back without a command.
- addDocument starts from the profile's built-in first preset even when a
  saved preset has the same name.
- A saved preset's rows are read as at most 1000.
- The page item and path lists are kept for each open document, the
  selection list stops at its limit, the typename of a removed PathPoint and
  of a stale PathPoints or PathItems throws, and an item edit whose
  selection cannot be restored is undone with it.
- A path's subpath starts are counted once and kept while its points keep
  their layout, so reading or setting each of its points in turn no longer
  walks every subpath for each point.
- A run that ended while waiting for a growth answer is checked against its
  allowance again before it is kept.
- docs/mcp.md says which file limits apply to reading a profile's file.
2026-11-25 15:07:36 -08:00
dotCooCoo e97b0b49ae Scripts: Document default fill and stroke members and scaleFactor
A script that read or assigned a document's defaultFillColor,
defaultStrokeWidth or another default paint member, or read scaleFactor,
got undefined. The twelve default members now read and set the fill,
stroke and stroke options of the next object drawn, and scaleFactor
reads 1.

- appearance.setNewArt sets new art's fill, stroke and stroke options
  whatever is selected, leaving the selection, its art, the active proxy
  and Recent Colors as they were. Every value is checked before anything
  changes.
- The default members run it only when the value changes. A bad value
  throws an error with nothing changed.
- paths.rs shares its dash length checks with defaultStrokeDashes.
2026-11-25 00:31:11 -08:00