Commit Graph
2 Commits
Author SHA1 Message Date
dotCooCoo 19ba7e3d85 Plug-ins: Edit Generated Art… edits one object of the document it opened in
- Edit Generated Art… is enabled only when the selection is one object,
  a generated art object. A generated art object selected with another
  object no longer enables it, and plugin.editGenerated and
  plugin.generatedInfo without `id` refuse that selection.
- The dialog keeps the document it was opened in. When another document
  is active at OK, OK draws nothing, closes the dialog and reports that
  the document is no longer active.
- A whole-number generator parameter is compared with its bounds as
  integers, so a value just past a maximum above 2^53 is refused instead
  of being clamped.
- A stroke or effect scale of 0, saved after a transform that flattens
  the art, reads back intact instead of damaged.
- The MCP UI command mirror lists ui.editGeneratedArt and the new
  plugin.dialog text (cargo xtask ui-commands).
- The generated art fields fuzz test checks the group's art by id, also
  when its generated art fields are not read back.
2026-11-22 14:20:28 -08:00
dotCooCoo 6857811e1f Plug-ins: generators draw generated art objects that keep their parameters
A plug-in of the new kind `generator` draws art from its parameters alone.
plugin.generate runs it and adds its art as a generated art object: a group
that keeps the plug-in's id and name, the parameters and the transform since
the art was drawn. Object › Plug-ins lists each generator, and
Object › Plug-ins › Edit Generated Art… (plugin.editGenerated) runs it again
with changed parameters and replaces the art as one undo step, placed,
stroke-scaled and pattern-transformed as the old art was. Parameters that
change nothing run nothing and make no undo step. Object › Expand makes the
object an ordinary group. plugin.generatedInfo reports an object's plug-in,
parameters and state.

- Given parameters are checked against the manifest: an undeclared name, a
  number outside its range (each number of a numberList too) and text past
  its maxLength are errors. Parameters are capped at 64 KiB of JSON, art at
  16 MiB, and the output is checked before the document changes.
- The native file keeps the plug-in id, name, parameters, transforms, scales
  and a SHA-256 of the art's JSON. Opening a file never runs a plug-in: a
  missing plug-in, a plug-in of another kind, a damaged saved field or a hash
  mismatch keeps the art as the file has it. The open's warnings name the
  plug-in, except for damaged fields, which get one warning that names no
  plug-in. A damaged object stays damaged when saved again.
- plugin.run of a generator is an error naming plugin.generate.
- import_fuzz replaces each saved field with arbitrary JSON.

Docs: docs/plugins.md (Generators), docs/mcp.md, docs/target-app-parity.md.
2026-11-22 12:38:26 -08:00