mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-13 17:47:43 +00:00
Docs: pattern.options keeps current values for omitted params
The pattern and Repeat paragraph in docs/mcp.md said that every omitted or null param keeps its default. pattern.options and object.repeat.options keep the pattern's or the repeat's current value instead (except the brick offset, which a brick tileType or gridType without brickOffset sets to 0.5), object.pattern.edit and pattern.options fall back to the selected object's pattern and the pattern being edited when name is omitted, and pattern.delete requires name.
This commit is contained in:
+7
-2
@@ -3103,8 +3103,13 @@ The pattern commands (`object.pattern.make`, `object.pattern.edit`, `object.patt
|
||||
`object.repeat.options`) reject a param of the wrong type, such as `"instances": "8"`, `"edit": "false"` or
|
||||
`"tileType": 2`, and change nothing. `pattern.options` also rejects an `overlap` that is not an object, and an
|
||||
`overlap.h` other than `left` or `right` or an `overlap.v` other than `top` or `bottom`. `object.repeat.options` rejects
|
||||
a `center` that is not `[x, y]`, and `object.repeat.radial` rejects a negative `radius`. Omitting a param or giving null
|
||||
keeps its default.
|
||||
a `center` that is not `[x, y]`, and `object.repeat.radial` rejects a negative `radius`. In `object.pattern.make`,
|
||||
`object.pattern.saveCopy`, `object.repeat.radial`, `object.repeat.grid` and `object.repeat.mirror`, omitting a param or
|
||||
giving null keeps its default. In `pattern.options` and `object.repeat.options`, omitting a param or giving null keeps
|
||||
the pattern's or the repeat's current value, with one exception: a brick `tileType` in `pattern.options` or a brick
|
||||
`gridType` in `object.repeat.options` given without `brickOffset` sets the offset to 0.5. Without a `name`,
|
||||
`object.pattern.edit` edits the pattern that fills or strokes a selected object, and `pattern.options` changes the
|
||||
pattern being edited; each returns an error when there is no such pattern. `pattern.delete` requires `name`.
|
||||
|
||||
```json
|
||||
{"name":"run_command","arguments":{"command":"pattern.options","params":{"showSwatchBounds":true}}}
|
||||
|
||||
Reference in New Issue
Block a user