Commit Graph

55 Commits

Author SHA1 Message Date
David Capello b628e21e76 Replace MIN/MAX() macros with std::min/max() functions 2020-04-08 12:20:53 -03:00
David Capello 86259a64fc Replace MID() macro with base::clamp() function
In the future we will replace base::clamp() with std::clamp().
2020-04-07 19:47:16 -03:00
David Capello d6c6b00b32 Now using -script from CLI can return an error code (exit code != 0) 2019-11-01 15:04:22 -03:00
David Capello a20d55a0aa Add -sheet-columns and -sheet-rows CLI parameters 2019-11-01 14:55:52 -03:00
David Capello 3bb4ab4a75 Fixed default sprite sheet type used by -sheet in the CLI to "rows"
Older versions of Aseprite used the rows as a default type (not
horizontal), because if we specified -split-layers, each layer would
have its own row.
2019-10-24 15:09:50 -03:00
David Capello 926accf7c7 Split layers/tags explicitly on export sprite sheet when the options to split layers/tags are used
This is mainly useful when we want to include the "{tag}" in the JSON
data but we don't want to split tags in the sprite sheet
layout (e.g. using a fixed # of rows in "By Rows" sprite sheet type
without breaking rows when the tag change between a couple of
samples).
2019-10-24 08:55:11 -03:00
David Capello 258f85aafb "horizontal" must be the default sprite sheet type (as in old versions) 2019-10-23 14:49:28 -03:00
David Capello cd68a4fe0a Add "Trim Sprite" to DocExporter/Export Sprite Sheet/--trim-sprite CLI 2019-10-22 21:27:15 -03:00
David Capello 536a4c5d3a Simplify Export Sprite Sheet with preview + changes to the UI
These changes include an option to split layers and tags
by rows (fix #1118)
2019-10-18 17:00:35 -03:00
David Capello aa66ff35a2 Refactor DocExporter::DataFormat -> SpriteSheetDataFormat 2019-10-07 17:22:27 -03:00
David Capello 1c8b8051a8 Rename FrameTag -> Tag 2019-10-01 14:55:08 -03:00
David Capello dcdde74cba Print layers/tags/slices on stdout only if there are no export params -sheet/-data (fix #2143) 2019-08-30 18:24:31 -03:00
David Capello 5b782dc27e Fix several issues selecting specific layers to export (fix #2084)
Now if we choose a group to export, the children are not automatically
exported too, the original visibility state is kept. (Anyway we can
still include all those children doing something like "-layer
groupName/*" from the CLI.)
2019-08-29 17:04:58 -03:00
Gaspar Capello 3e1584e638 Refactor sprite size command params 2019-07-26 09:30:28 -03:00
David Capello 20b8ee0e57 Add Floyd-Steinberg dithering for RGBA -> Indexed conversion 2019-04-01 22:00:32 -03:00
David Capello 60e8a5967d Minor changes to f24eb75298 2019-03-22 11:26:44 -03:00
David N Campo f24eb75298 Add --trim-by-grid CLI option 2019-03-22 10:55:26 -03:00
David Capello 9e47b07219 Add TODO for --sheet-type 2019-01-09 20:40:47 -03:00
David Capello b2cafe4108 lua: Add app.params and --script-param
Now parameters for scripts can be specified from the CLI with
--script-params and from gui.xml or .aseprite-keys from <param>
sections.
2018-12-10 16:45:30 -03:00
David N Campo f6bb446031 Combination of CLI args results in jumbled layer order (fix #1644)
- The order is fixed because we now iterate a LayerList (a
  std::vector) instead of a SelectedLayers (a std::set)
- This can be an issue each time we iterate over a std::set (and
  SelectedLayers is a std::set) because it depends on the specific STL
  impl details (which vary depending on msvc/clang/gcc compiler).
- This fix iterates over layers, no matter if are visible or not
  (SelectedLayers::toLayerList() returns only browseable layers)
2018-11-12 09:06:59 -03:00
David Capello b8317805f8 Rename DocumentExporter -> DocExporter 2018-07-14 23:02:37 -03:00
David Capello 9c79ea2b77 Rename app::Document -> Doc 2018-07-07 11:54:44 -03:00
David Capello ac7e48d92d Rename DocumentUndo -> DocUndo 2018-07-07 02:55:27 -03:00
David Capello 139c5aac49 Add flag to compile CLI-only (fix #1279)
New cmake flag -DENABLE_UI=OFF can be used to turn off the GUI
and compile a CLI-only version of Aseprite.

Requested here too:
https://community.aseprite.org/t/1351
2018-05-07 00:11:50 -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 eb3143ce21 Rename CommandsModule to Commands 2017-11-30 12:24:07 -03:00
David Capello 4fc19c5466 Change "old-ordered" dithering algorithm to just "old" 2017-05-23 14:56:06 -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 7eff2b83c4 Fail when an invalid algorithm is specified in --dithering-algorithm 2017-05-19 10:23:46 -03:00
David Capello 16aeae0833 Add new ordered dithering algorithm 2017-05-17 13:32:34 -03:00
David Capello e4a4f44127 Add --color-mode CLI option 2017-05-15 15:21:02 -03:00
David Capello cc7bde6cd1 Fix some compiler warnings (implicit casts & unused vars) 2017-04-19 19:26:23 -03:00
David Capello 2c0d0d3682 Add --slice and --split-slice CLI params (#721) 2017-04-11 18:45:51 -03:00
David Capello 347ccfbb78 Add --list-slices CLI option 2017-03-16 10:35:26 -03:00
David Capello 2e47bd1fbc Fix --ignore-layer: doesn't activate all hidden layers (fix #1264) 2016-12-06 11:06:08 -03:00
David Capello 4813936a3a Add --oneframe CLI param to load just one frame 2016-12-01 12:06:35 -03:00
David Capello f57c298ad6 Merge branch 'master' into beta 2016-11-29 12:15:25 -03:00
David Capello 5c3f75c64b Merge branch 'master' into beta 2016-11-07 18:17:42 -03:00
David Capello b84d0d843e Add --ignore-layer CLI option (fix #1264) 2016-09-23 10:46:31 -03:00
David Capello a1ce0c5c73 Add support to specify multiple layers in CLI to export (fix #1174)
Now we can use --layer multiple times to modify the --save-as and
--sheet behavior to render only the filtered/selected layers. This can
be combined with --split-layers too.
2016-09-16 15:19:47 -03:00
David Capello f4b5340dfb Fix export of groups/layers via CLI
We have to propagate show/hide layers/groups visibility properly to
export them correctly. We use the same code that in the "Export Sprite
Sheet" for this (a new RestoreVisibleLayers class is separated for
this).
2016-09-16 11:15:47 -03:00
David Capello 682e9b8307 Add support to specify {group} in filename format 2016-09-16 09:04:37 -03:00
David Capello 3a9c2e8325 Fix "Export Sprite Sheet" for selected frames/layers
Now we can export a give group, layer, and (non-adjacent) selected
layers/frames.
2016-09-13 16:10:36 -03:00
David Capello 4749001473 Now --palette changes the palette of the last sprite (fix #1245) 2016-09-05 11:59:25 -03:00
David Capello 20b726f73b Merge branch 'master' into beta 2016-08-31 19:53:52 -03:00
David Capello 7b55037abb Replace LayersRange with Sprite::all*Layers() members 2016-06-21 12:02:31 -03:00
David Capello a478efd616 Add support to use --frame-tag and --frame-range at the same time 2016-06-06 17:47:47 -03:00
David Capello 04f67a1697 Automatic split layers/tags if we use {layer} or {tag} in --save-as (fix #1149) 2016-06-06 16:28:49 -03:00
David Capello 617afaed78 Centralize default filename format computation
Use get_default_filename_format() to get the default filename format on
all cases.
2016-06-06 13:57:35 -03:00
David Capello feadacbf61 Add --split-tags to save each tag as a different file 2016-06-02 13:22:08 -03:00