Commit Graph

43 Commits

Author SHA1 Message Date
David Capello 107e846911 Remove direct TRACEARGS() calls
build / build (Debug, macos-latest, lua, cli) (push) Has been cancelled Details
build / build (Debug, macos-latest, noscripts, cli) (push) Has been cancelled Details
build / build (Debug, ubuntu-latest, lua, cli) (push) Has been cancelled Details
build / build (Debug, ubuntu-latest, noscripts, cli) (push) Has been cancelled Details
build / build (Debug, windows-latest, lua, cli) (push) Has been cancelled Details
build / build (Debug, windows-latest, noscripts, cli) (push) Has been cancelled Details
build / build (RelWithDebInfo, macos-latest, lua, gui) (push) Has been cancelled Details
build / build (RelWithDebInfo, ubuntu-latest, lua, gui) (push) Has been cancelled Details
build / build (RelWithDebInfo, windows-latest, lua, gui) (push) Has been cancelled Details
2025-10-01 16:53:07 -03:00
David Capello f61c2c3950 Revert Esc key behavior to drop+deselect (fix #5102)
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
2025-08-27 11:56:57 -03:00
David Capello 194f8424a8 Add right-click to configure the cancel selection button (#5102 / #5145) 2025-08-26 07:55:14 -03:00
Martín Capello e65b678e9e Add option to select cel compression (fix #4901) 2025-02-05 14:41:44 -03:00
David Capello 09538f9a1a clang-format all files 2024-12-16 14:52:19 -03:00
Christian Kaiser a43841f8b7 Add 'beforesitechange' event (fix #4569) 2024-11-13 15:17:02 -03:00
Gaspar Capello 3cc1c63274 Add different best fit criteria to compare colors for RgbMaps (fix #2787, #4416) 2024-09-03 13:17:06 -03:00
Martín Capello d331195c4c Add "Alpha & Opacity" section to Preferences > Color (fix #1544) 2024-01-12 14:38:04 -03:00
Gaspar Capello 2cc15cda9e Add save dynamics options between sessions (fix #3933) 2023-08-14 18:07:46 -03:00
David Capello 400456cbec Right-clicking a tileset mode button gives the possibility to set it as the default one
Feature request: https://community.aseprite.org/t/19487
2023-07-19 11:27:00 -03:00
David Capello 86a50e2e9a [lua] Add native API to decode/encode JSON text (fix #3233)
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).
2023-07-17 09:25:13 -03:00
David Capello 48275d51c2 [lua] Add new AfterAddTile event for tile management plugins
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
2023-07-07 18:40:06 -03:00
David Capello d329f38075 [lua] Add stopPropagation function to the beforecommand event
Related to:
https://github.com/aseprite/Attachment-System/issues/121
https://github.com/aseprite/Attachment-System/issues/127
2023-05-18 11:49:04 -03:00
David Capello 961dee4354 [lua] Add 'beforecommand' and 'aftercommand' app events
This will allow to implement custom horizontal/vertical flip:
https://github.com/aseprite/Attachment-System/issues/121

Related to:
https://github.com/aseprite/Attachment-System/issues/127
2023-05-18 11:29:23 -03:00
Martín Capello da80192d0f Add UUID type to user properties (fix #3810) 2023-05-08 17:13:34 -03:00
David Capello c2b7eaf97f Fix compilation with clang-10 + libstdc++ 7.5.0
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.
2023-02-28 15:06:26 -03:00
David Capello 835aa3f83d Use std::nullptr_t defined in <cstddef> 2023-02-22 19:55:32 -03:00
Martín Capello 47a1c407c3 Update the way vectors are serialized to support mixed elements types 2023-02-22 12:51:51 -03:00
David Capello d590d3f39a Add nullptr_t to doc::UserData::Variant to fix bug when undoing an previously unexistent property 2023-01-06 14:36:51 -03:00
David Capello eaa0f5e46a Fix unintentionally fall through 2023-01-05 16:22:20 -03:00
Martín Capello 03d66aa203 Introduce FLOAT and DOUBLE types 2023-01-05 15:30:45 -03:00
David Capello 9138592e98 [lua] Add support to set/get tables (arrays/maps) into user properties 2023-01-02 19:51:07 -03:00
David Capello 574f583753 Add std::visit() alternative using switch/case to push_value_to_lua() 2023-01-02 12:54:37 -03:00
David Capello 76a398b162 [lua] Add access to user data properties in Sprite object (aseprite/api#88)
This is a basic implementation where we can only access basic
properties (not maps or vectors yet).
2023-01-02 12:54:37 -03:00
David Capello 28c26aa62c [lua] Add ev.tileset value to remaptileset event 2022-12-27 15:54:41 -03:00
David Capello c8d4c60f07 [osx] Fix error using std::any_cast() without a pointer as argument (not available in macOS 10.9) 2022-12-27 15:53:41 -03:00
David Capello 25a4e67aaa [lua] Add remaptileset event for sprites 2022-12-27 14:11:05 -03:00
David Capello ba3452b059 Merge branch 'main' into beta 2022-09-29 17:23:11 -03:00
David Capello 6b21fec417 [lua] Add "ev" args to "change" sprite event, to ask for "ev.fromUndo"
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
2022-09-29 12:10:09 -03:00
David Capello 04fa9a47ab Merge branch 'main' into beta 2022-02-24 16:42:05 -03:00
David Capello 5ccf414183 Add options to change the downsampling algorithm (fix #3183)
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.
2022-02-21 15:30:09 -03:00
David Capello a012dac020 Merge branch 'main' into beta 2021-04-12 17:11:28 -03:00
David Capello 8b4746e813 Add option to disable the "open sequence of files" dialog 2021-04-12 16:57:02 -03:00
David Capello 5ee3ebdd71 Add fg/bg tiles selectors in ColorBar
Now fg/bg colors and fg/bg tiles are different widgets, and the
StatusBar can show tiles when the eyedropper is picking tiles.
2020-08-21 18:28:31 -03:00
David Capello bcf53fa54a Merge branch 'octree' into beta 2020-06-17 23:33:41 -03:00
David Capello 1ec502d242 Add "ink" parameter to app.useTool() + minor needed refactors 2020-05-20 17:15:30 -03:00
David Capello 4cfa5e743e Add addition mode back for Hue/Saturation filter (fix #1848) 2020-04-23 12:05:09 -03:00
David Capello 1f34d0e46e Add different formulas to convert RGB to Grayscale 2020-04-20 10:22:41 -03:00
Gaspar Capello 886fdf8b3f Add OctreeMap as an alternative RgbMap implementation to RgbMapRGB53A
There is a new experimental option to switch between both RgbMap
implementations.
2020-04-10 15:47:24 -03:00
David Capello aa66ff35a2 Refactor DocExporter::DataFormat -> SpriteSheetDataFormat 2019-10-07 17:22:27 -03:00
David Capello dd8a49a19c Add option to disable changing the display color profile depending on the current monitor 2019-05-08 10:55:56 -03:00
rscotchmer a08cfa9e13 Added support for 4 and 8 connected pixel fill method in paint bucket 2019-04-29 23:29:17 -03:00
David Capello 0264964c4e lua: Add app.preferences object 2019-04-24 21:14:20 -03:00