This adds a new button in the context bar so we have the three
available options to handle a transformation/drop pixels:
* Drop pixels and deselect (Esc key)
* Drop pixels but keep the selection (Enter key), new "Apply" command
* Discard changes/undo (Ctrl+Z)
This adds a new key context (Transformation) and also fixes tooltip
shortcuts on context bar buttons to show the current configured
shortcut for each action.
Reverts debab653fa and 194f8424a8
New json.decode(jsonText) and json.encode(luaTable) functions.
In this way we don't depend on third-party libraries to decode/encode
JSON text which is a quite common task (in tests and export scripts).
Replaced the App BeforePaintEmptyTilemap event (introduced in
c26351712a) with the new Sprite
AfterAddTile event triggered by draw_image_into_new_tilemap_cel().
This new event handles two cases:
1) When the user paints on an empty tilemap cel, a new tile is
created, so the tile management plugin can handle AfterAddTile
to know the existence of this new tile. (This case was disabled
with fae3c6566c, then handled with
c26351712a, now handled with this
patch).
2) When we copy & paste cels (or drag & drop cels) in the timeline
between layers, if a new tile is created, the AfterAddTile is
called and the plugin can associate tiles with its internal
information (e.g. folders)
Related to: https://github.com/aseprite/Attachment-System/issues/135
It looks like the std::variant impl doesn't convert from long long to
int64_t type automatically, but we might be wrong. Anyway this patch
does fix this.
In this way we can know if the event was generated from a
undo/redo/undo history change and not from the direct user
manipulation of the sprite.
Useful for scripts like in #3539
Also we've restored the default algorithm to bilinear + mipmapping,
which was the default on the Aseprite before we switched to Skia m96.
This was requested by some users.