Commit Graph

75 Commits

Author SHA1 Message Date
Martín Capello 872267dc9b Avoid crash if the "New Layer" menu item is configured to ask the layer name 2023-06-27 15:24:13 -03:00
David Capello 6cbde57470 Add gridBounds parameter to NewLayer command 2023-04-19 13:25:54 -03:00
David Capello 83857ea600 Merge branch 'main' into beta 2022-08-17 22:58:12 -03:00
David Capello a66c170ded Add render::BgOptions to simplify some code 2022-08-17 22:40:25 -03:00
Gaspar Capello 12e59b887f Add remember new tilemap layer base index (fix #2735) 2022-08-04 14:30:11 -03:00
David Capello 46626bb5ce Merge branch 'main' into beta 2022-04-13 23:01:12 -03:00
David Capello 43513e0f1b Don't show tooltip when a new frame/layer is created from a script transaction
This might improve the performance of some scripts if it creates
several frames/layers at the same time.
2022-04-11 09:53:01 -03:00
David Capello 7e732b3223 Don't use cmd::TrimCel() on tiles when manual mode is enabled
Applied the fix from e1402381a8 to all
places where cmd::TrimCel() is used.
2021-02-22 16:39:40 -03:00
David Capello 26b75bdb57 Add option to specify/modify the tileset name 2020-11-10 17:48:09 -03:00
David Capello a3286fc20a Minor refactor "first visible index" -> "base index" 2020-10-30 20:58:45 -03:00
David Capello c2e5e69882 Simplify tilesets impl using tile index 0 = an empty tile
In this way we always have an empty tile available in the drawing
process. We've also added the Tileset::firstVisibleIndex field to
change the visible index of the tile 1 so we can offset the visible
number by the user (just as a visual aid / simulate old tilesets with
index=0=non-empty tile).
2020-10-30 16:33:34 -03:00
David Capello edebb57f66 Refactor clipboard code
* Moved all clipboard:: functions inside app::Clipboard class
* Convert app:📋:ClipboardFormat enum to
  app::ClipboardFormat enum class
* Added app::Context::clipboard()
2020-09-25 11:14:52 -03:00
David Capello 3623720dd4 Merge branch 'master' into beta 2020-08-18 11:05:37 -03:00
David Capello b355f34a70 Export all groups (even collapsed ones) by default in JSON metadata (fix #2484) 2020-08-17 17:14:12 -03:00
David Capello c86b4a28a6 Fix typo 2020-07-14 17:27:03 -03:00
David Capello a80af2b304 Merge branch 'master' into tilemap-editor 2020-05-18 20:24:22 -03:00
David Capello 46f4002368 Fix crashes saving sprites with '%' char in their filename
To fix this we changed the way StatusBar text is handled (we are using
fmt::format() in StatusBar instead of printf-like ... args now).
2020-05-08 17:39:55 -03:00
David Capello e56cc15326 Add possibility to use New Layer via Cut/Copy with ranges
Requested here: https://community.aseprite.org/t/5222
2020-04-17 16:13:22 -03:00
David Capello b628e21e76 Replace MIN/MAX() macros with std::min/max() functions 2020-04-08 12:20:53 -03:00
David Capello 12e1b4d934 Add dialog to create new tilemaps selecting the tileset specs 2020-02-17 09:06:01 -03:00
David Capello 26139c4ae2 Add tilemap layers (#977)
This is the first commit with a simple tilemap editor. Still buggy but
functional in several ways. Several changes were made:

* NewLayer command can receive a tilemap=true to create a new tilemap
  layer
* New ToggleTilesMode command added to switch between the palette and
  the tileset in the ColorBar (the ColorBar was expanded to show
  colors or tilesets with a generic AbstractPaletteViewAdapter)
* All commands to create new layers were moved to Layer >
  New... submenu
* There are a new tileset chunk to save tilesets in .aseprite files,
  and a new kind of cels to save tilemaps
* Added doc::LayerTilemap, doc::Tileset, etc. and several other types
  to handle tilesets/tilemaps in the doc layer.
* Added doc::Grid class with grid specifications that indicates how a
  tilemap <-> tileset must be drawn
* Added and expanded cel operations to work with tilemaps and
  conversions between regular LayerImage cels <-> LayerTilemap cels
  (e.g. copy cels in the timeline between layer types)
2020-02-17 09:06:00 -03:00
David Capello 1ae29dfc3c Check if the context can show the new layer name dialog 2019-07-10 12:45:53 -03:00
David Capello 757fadeaf0 Add New Layer via Cut/Copy commands (fix #1567) 2019-07-02 15:28:05 -03:00
David Capello a0ebecca50 Make NewLayerCommand compilable when ENABLE_UI is not defined 2019-06-28 18:53:23 -03:00
David Capello ff6538a68e Add Edit > Paste Special > Paste As New (Reference) Layer (fix #672, fix #1748) 2019-06-27 15:34:56 -03:00
David Capello 056eb28670 Fix crash destroying temporal docs (e.g. adding new reference layer) 2019-06-25 15:53:31 -03:00
David Capello 109e6fa205 Add render::Dithering() class to store all dithering parameters 2019-04-03 19:32:24 -03:00
David Capello fcf272bb69 Add amount parameter to Error Diffusion algorithm 2019-04-03 18:45:18 -03:00
David Capello 3c35887abf Specialize Params::get_as<bool>() to read "true" as a true bool
Just like new params impl Param<bool>::fromString()
2019-03-22 11:47:45 -03:00
Gaspar Capello f53544842c Fix non-normal blend modes when the backdrop is transparent (fix #1096) 2019-03-09 12:40:31 -03:00
David Capello 271865e13d Remove unused Command::clone() member function 2019-01-07 17:03:38 -03:00
David Capello 26d510fffd Support more commands without UI
- BackgroundFromLayer
- CelOpacity
- LayerFromBackground
- RemoveLayer
2018-09-06 14:18:59 -03:00
David Capello 853415332b NewLayer can be called in batch mode 2018-09-04 17:30:34 -03:00
Gaspar Capello 93d0b94929 Enhancement new layer below (issue #1822) 2018-08-30 13:31:48 -03:00
David Capello 70629d6f89 Use Tx instead of Transaction in commands 2018-08-20 16:00:59 -03:00
David Capello b83eddf2ea Fix uninitialized var 2018-08-16 12:30:23 -03:00
David Capello 9c79ea2b77 Rename app::Document -> Doc 2018-07-07 11:54:44 -03:00
David Capello ee5842cde3 Rename DocumentApi -> DocApi 2018-07-07 03:07:16 -03:00
David Capello e0a60b6748 Generate the list of command IDs from en.ini file 2017-12-01 15:10:21 -03:00
David Capello ccee49c02b Move command friendly names to the strings file
Related to #124
2017-11-30 23:41:45 -03:00
David Capello eb3143ce21 Rename CommandsModule to Commands 2017-11-30 12:24:07 -03:00
David Capello 49d2cd14f0 Don't add a reference layer if the user cancels the dialog 2017-09-05 15:26:21 -03:00
David Capello 5ef6aac925 Add --dithering-matrix CLI option
Now the dithering matrix used in ordered dithering algorithm is configurable.
2017-05-19 15:49:31 -03:00
David Capello 23272895c4 Move doc::DitheringMethod -> render::DitheringAlgorithm 2017-05-15 16:26:44 -03:00
David Capello 492e71918f Fix undo of a new ref layer 2016-11-02 16:10:42 -03:00
David Capello f895938dbb Fix adding a reference layer with a different color mode 2016-11-01 19:02:11 -03:00
David Capello bf4d6f1e4e Ask for a file when we add a new reference layer
Also the new reference layer is added centered in the sprite and scaling
it to make it fully visible in the canvas.
2016-10-12 14:41:58 -03:00
David Capello 99f37ef242 Add LayerFlags::Reference flag to identify a reference layers
With this flag we can show reference layers in a special way on the
Timeline.
2016-10-04 20:06:24 -03:00
David Capello 7cf546c826 Add menu option to insert a reference layer 2016-10-04 19:55:30 -03:00
David Capello 20b726f73b Merge branch 'master' into beta 2016-08-31 19:53:52 -03:00