David Capello
60c54a3242
Fix edge case w/alpha compositing on indexed images
...
On indexed images, if we paint with alpha compositing and opacity=255,
we can act just like the simple ink, copying the color (the original
index). If we go through the process of color blending, we might loss
the index in sprites that contain palettes with the same color two or
more times.
2020-05-21 20:36:04 -03:00
David Capello
c6720b543a
Move doc::rgba_to_graya_* functions from .h to .cpp
2020-05-21 20:07:23 -03:00
Gaspar Capello
1509699a46
Fix Alpha Compositing Ink - Indexed Mode - Pencil tool with transparent color selected.
...
The normal Alpha Compositing Ink behavior is:
Do nothing when the user wants to paint with the transparent color.
Before this fix, Alpha Compositing in Indexed Mode worked like Simple Ink
2020-05-20 17:16:51 -03:00
David Capello
1ec502d242
Add "ink" parameter to app.useTool() + minor needed refactors
2020-05-20 17:15:30 -03:00
David Capello
b922cfcc10
Refactor ToolLoop creation w/ToolLoopParams to add more options to app.useTool()
...
This will be used to add more testing capabilities to app.useTool()
2020-05-19 20:11:47 -03:00
David Capello
39f2269ea5
Don't scale the marching ants pattern
2020-05-19 09:27:24 -03:00
David Capello
3d2013b33c
Draw mask boundaries with a gfx::Path
...
The path is also cached so on each re-paint we can re-use it while
it's still valid.
2020-05-18 17:58:22 -03:00
David Capello
a2cdde8ec8
[lua] Add "enabled" and "visible" properties when creating new widgets
...
Fixed https://github.com/aseprite/api/issues/29
2020-05-15 19:03:46 -03:00
David Capello
f491a2a506
Add ui::Entry::Range to simplify code
2020-05-15 18:24:35 -03:00
David Capello
fa187b35a8
Don't delete extra char using Ctrl+backspace to delete words in ui::Entry
2020-05-15 18:15:59 -03:00
David Capello
7cde901047
Alt+backspace deletes a word too on ui::Entry fields
2020-05-12 15:11:15 -03:00
David Capello
68720424c0
[lua] Dialog:modify{} now can modify the text of a separator
...
Fixes https://github.com/aseprite/api/issues/27
2020-05-11 12:26:43 -03:00
David Capello
d9b0887a3a
Fix crashes running tests from CLI
2020-05-08 19:44:29 -03:00
David Capello
72ceaa010f
Save user data changes correctly in current recovery session
2020-05-08 18:34:54 -03:00
David Capello
7e1e9a238e
Write/read user data from layers when recovering lost sprites ( fix #2373 )
2020-05-08 18:31:48 -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
a54e2ce13f
Fix eraser tool/stylus tip when dynamics for gradients are on
2020-05-07 21:40:03 -03:00
David Capello
7b105261ea
Fix syncing brush size/angle with max values after opening dynamics popup
2020-05-07 18:39:58 -03:00
David Capello
4123e98d16
Add option to switch dynamic gradient between BG>FG and FG>BG
2020-05-07 16:08:32 -03:00
David Capello
4087bd5782
Merge branch 'master' of https://github.com/grauw/aseprite into grauw-master
2020-05-07 14:04:17 -03:00
David Capello
c3ebf40cb1
Fix shading ink for RGB and Grayscale modes
...
The colors in the shades are not necessary to be in the palette or
related to a palette index in these modes (or even more, the color
palettes can be duplicated), the only important things are the values
in the shades for RGB and Grayscale, so in these modes now we access to
ToolLoop::getShade() directly and create a mini-palette to find the
colors there (ignoring the sprite palette completely).
2020-05-06 17:14:47 -03:00
David Capello
6294ac74e0
Fix accessing to invalid indexes in the doc::Remap created for ColorShades
...
This can happen when we've configured a set of color entries in the
shading ink and then we switch between documents with different color
palettes, etc.
2020-05-05 20:13:53 -03:00
David Capello
056cd3cdfc
Minor changes in ColorShades member functions to avoid copying a Shade object
2020-05-05 20:10:54 -03:00
David Capello
82ab0bc40a
Avoid creating an extra brush for the brush preview
2020-05-05 19:42:07 -03:00
David Capello
263236deb3
Several fixed for Dynamics
...
* Now the max value in dynamics is equal to the brush size, so changing
the brush size (e.g. switching between pencil/eraser tools) will
change the max brush size (which is the most common parameter to
change)
* Added mini_slider style for min/max brush/angle values
* Fixed some issues clicking outside the dynamics popup
2020-05-02 11:59:34 -03:00
David Capello
cc7bdbcec4
Add a slider style in theme
...
We've added some code to handle backward compatibility with themes. In
this way we can still load old themes in the latest version but should
look as in previous versions (this will not be done with previous
properties or parts migrated to styles, so we start from now on).
2020-05-01 23:31:10 -03:00
David Capello
3555bbe29f
Fix Show Brushes/Dynamics commands to switch the popup
2020-05-01 13:38:12 -03:00
Laurens Holst
b3681fdbb0
[lua] Implement Dialog:modify for more properties
...
Support modifying the following properties:
Dialog:number { decimals }
Dialog:slider { min, max, value }
Dialog:combobox { option }
Dialog:color { color }
Dialog:shades { colors }
Dialog:file { filename }
2020-04-30 22:47:00 +02:00
David Capello
0ad50373d3
Enable dynamics for Eraser
2020-04-30 09:02:05 -03:00
David Capello
b989b46ff2
Log warnings about widget styles only on debug build
2020-04-30 08:45:34 -03:00
Laurens Holst
1311173d97
[lua] Add missing Dialog onchange and onrelease events
...
Adding the following events:
Dialog:entry { onchange }
Dialog:number { onchange }
Dialog:slider { onchange, onrelease }
Dialog:combobox { onchange }
2020-04-29 23:38:15 +02:00
David Capello
776336320f
Fix issues encoding TGA files
2020-04-29 17:42:14 -03:00
David Capello
682b2c230c
Fix ASSERT that can fail when loading a sequence of files
2020-04-29 17:30:47 -03:00
David Capello
99a9ee49cb
Fix crash at start up on trial version (when !ENABLE_SCRIPTING)
2020-04-25 09:38:19 -03:00
David Capello
2418a075ca
Restore DynamicsField selected status when popup is closed
2020-04-24 13:39:03 -03:00
David Capello
a6c55b0210
Fix DynamicsPopup::MinMaxSlider when UI scale change
2020-04-24 12:34:54 -03:00
David Capello
b6a86e6aea
Fix DitheringSelector widget issues with UI Scaling changes
2020-04-24 12:25:24 -03:00
David Capello
1d5edd6dc1
Fix min/max marks X positions in DynamicsPopup sensors
2020-04-24 12:04:56 -03:00
David Capello
79900db158
Fix issue showing the dynamics popup when the UI scaling changed
2020-04-24 12:04:36 -03:00
David Capello
c99a566635
Refactor velocity sensor with tools::VelocitySensor class
2020-04-24 11:19:35 -03:00
David Capello
bb07d25025
[osx] Fix some leaks regenerating native menus
2020-04-24 09:24:42 -03:00
David Capello
7ad1b7b965
Simplify handling of dithering matrices in extensions to avoid memory leaks
2020-04-23 23:41:08 -03:00
David Capello
fa54bb1950
Fix memory leak in load_document()
2020-04-23 23:32:09 -03:00
David Capello
9fd9ea365f
Fix regression introduced with dynamic gradients
...
Now inks need a prepareForPointShape() call.
2020-04-23 20:26:18 -03:00
David Capello
1d15bacdcd
Add sensor tweaks to specify min/max thresholds of the sensor input
...
In this way we can translate the sensor input to a better output range
for our specific device (mouse, stylus, etc.).
2020-04-23 18:03:34 -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
d1843fcf55
Fix interpolation between stroke points with line brush ( fix #728 )
...
Related to #245 , and there are still problems with gaps using new
dynamic angle parameters.
2020-04-23 11:30:36 -03:00
David Capello
3b370c2ff5
Minor formatting changes
2020-04-22 20:20:04 -03:00
David Capello
3c1ea2f407
Add/process dynamic data in/from stroke points (related to #710 )
...
* Converted Stroke points from gfx::Point to Stroke::Pt
* Process gradient data to create shading betweens points or dithering
with new doc::Brush patterns
2020-04-22 20:17:14 -03:00
David Capello
79f9e28ce8
Added pen pressure sensitivity ( fix #710 )
...
- Added support to detect eraser tip on Linux (#610 )
- Related to #139
- Still needs works for gradients and better brush interpolations
between stroke points
- Requested several times, e.g. https://community.aseprite.org/t/1077
https://community.aseprite.org/t/1881 , steam forum, etc.
2020-04-21 22:27:49 -03:00
David Capello
5affdbbae1
Shox extensions in different categories in the Preferences dialog
2020-04-20 14:20:07 -03:00
David Capello
ff3e9504fd
Fix crash disabling extensions
2020-04-20 14:11:48 -03:00
David Capello
1f34d0e46e
Add different formulas to convert RGB to Grayscale
2020-04-20 10:22:41 -03:00
David Capello
07f1510ebd
User can configure "auto select layer" in quick mode independently
...
Now we have one "auto select layer" option for the quick mode of Move
tool (Ctrl/Cmd key, true by default) an other option for the regular
Move tool mode (false by default).
2020-04-18 21:21:14 -03:00
David Capello
f689c2c48e
Fix compilation of trial version
2020-04-17 18:31:03 -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
fb68407e04
Add support to call Flip command without UI
2020-04-17 12:32:10 -03:00
David Capello
c0d4264789
Fix crash loading some kind of .zip extensions w/filename w/Unicode chars
2020-04-17 10:58:47 -03:00
David Capello
9a06deb0e6
[lua] Clear selected colors with app.range:clear() too
2020-04-16 21:26:28 -03:00
David Capello
e149f76934
[lua] Add Range.layers/frames setters and Range:clear()
2020-04-16 19:19:18 -03:00
David Capello
48e941cb2f
[lua] Add Dialog:newrow{ always }
2020-04-16 11:48:44 -03:00
David Capello
7482024827
[win] Fix opening files from File Explorer in the running instance through DDE messages
2020-04-16 11:19:39 -03:00
David Capello
58e78ad886
[win] Disable warning 4244 on MSVC
2020-04-16 11:18:45 -03:00
David Capello
2af6a0493e
Fix recent list of files menu
...
This is a problem introduced with the plugin groups, but now we use a
group to store the list of recent files. With this commit we fixed
some bugs in the impl of menu groups.
2020-04-08 17:50:17 -03:00
David Capello
85af3ce735
Fix Widget::previousSibling() impl
2020-04-08 17:48:26 -03:00
David Capello
8b1b624320
Replace NULL to nullptr in ui library
2020-04-08 17:48:06 -03:00
David Capello
b491e589fd
Remove unused variable
2020-04-08 17:29:47 -03:00
David Capello
be79b519ad
Fix linker error when compiling without -O2 (e.g. debug mode)
2020-04-08 12:25:23 -03:00
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
fd651c4189
Set alpha=255 if the current color is MaskType when picking colors from ColorSelectors
...
This is a little UI improvement: If we've just picked the mask color,
and click a color selector, generally we would like to use the opaque
version of that color (instead of the completely transparent version
of that color, alpha=0, which is an useless option).
2020-04-07 12:04:07 -03:00
David Capello
ed5deb9ca3
[lua] Add Dialog:color{ onchange } event
2020-04-07 11:25:58 -03:00
David Capello
4eefb84cf3
[lua] Add possibility to change dialog title with Dialog:modify{ title=... }
2020-04-07 11:14:06 -03:00
David Capello
bb8d0e7a6a
[lua] Add possibility to modify a widget label and focus it
2020-04-07 11:13:30 -03:00
David Capello
8fe01b43f6
Fix typo in dialog_class.cpp
2020-04-07 11:01:46 -03:00
David Capello
482fcd3b8c
Fix crash when loading plugins from CLI and compilation when !ENABLE_UI
2020-04-07 10:56:48 -03:00
David Capello
a7f3fc968a
Fix compilation when !ENABLE_SCRIPTING
2020-04-07 10:44:26 -03:00
David Capello
c1a62510a5
Fix crash clicking and deleting layers from timeline sequentially (and quickly
...
Reported in https://igarastudio.zendesk.com/agent/tickets/656
2020-04-07 10:40:56 -03:00
David Capello
8d8c116fa8
[lua] Fix some Dialog functions to convert to string implicitly
2020-04-06 14:54:11 -03:00
David Capello
3cd97c9822
Fix crash starting the program for first time ( fix #2330 )
...
Regression introduced in 6b6b9057bf
2020-04-05 20:47:52 -03:00
David Capello
55a1fa8b81
[lua] Add Dialog:modify{} method to change widget properties
2020-04-04 19:42:44 -03:00
David Capello
2c3fd2171b
[lua] Fix Dialog.data for checkboxes if the last pressed button was a checkbox
2020-04-04 19:41:30 -03:00
David Capello
150ca293ef
[lua] Fix checking for missing fields on tables in Dialog methods
...
We've to use LUA_TNIL instead of LUA_TNONE.
2020-04-04 19:40:52 -03:00
David Capello
c73d745245
Don't show warning for untranslated text that start with '!' on widgets
2020-04-04 17:33:23 -03:00
David Capello
9da4b76976
Possibility to scroll menus ( fix #2263 )
2020-04-03 17:56:35 -03:00
David Capello
298c2e24e8
Add possibility to put plugin:newCommand{} in specific menu locations identified as "groups" ( #1949 )
2020-04-02 23:18:08 -03:00
David Capello
6b6b9057bf
Add support for scripts on extensions ( #1949 )
...
It still need some work to associate the command to menus easily.
Related issues:
https://github.com/aseprite/aseprite/issues/1403
https://github.com/aseprite/aseprite/issues/1949
https://github.com/aseprite/api/issues/20
https://community.aseprite.org/t/lua-script-extension-and-menu-api/5085
2020-04-02 20:21:21 -03:00
David Capello
9609e541e5
Fix some issue with saved defaults (selection mode and snap to grid)
...
These two preferences are confusing when saved with non-default
values. For example, snap to grid should be almost always turned off
and turned on only when the user do it explicitly.
The other one is the subtraction selection mode, if we save that as a
default mode, users will find that the selection tool stop working
when the program is re-started.
Both of these issues generated user support over all these years.
2020-03-30 10:39:07 -03:00
David Capello
d358e6055f
Add auto-fit screen option ( fix #789 , fix #2267 )
2020-03-30 09:16:14 -03:00
David Capello
70afe4195e
[lua] Add Image(sprite) constructor (renders the first sprite frame)
2020-03-28 13:28:30 -03:00
David Capello
c7b3e15d05
[lua] Fix crash using invalid width/height in Image()
2020-03-28 13:28:25 -03:00
David Capello
76ef344f49
[lua] Support to use Image:drawSprite(sprite) without frame to render the first frame
2020-03-28 13:28:18 -03:00
David Capello
32fd67e187
[lua] Add ev.button property onclick of shades widget
2020-03-27 16:14:00 -03:00
David Capello
09ea577a08
Match ui::MouseButton values to os::Event::MouseButton
2020-03-27 15:40:43 -03:00
David Capello
2c42f8670a
Update tga module (again, trying to fix compilation errors in CIs)
2020-03-25 19:52:23 -03:00
David Capello
2a0751c6dd
Update tga module
2020-03-25 19:09:55 -03:00
David Capello
ba1a8611a9
Use ASSERT instead of assert
2020-03-25 18:42:24 -03:00
David Capello
f532539a76
Minor change in flic library
2020-03-25 18:31:20 -03:00
David Capello
780133be6f
Use tga library to encode files
2020-03-25 18:31:14 -03:00
David Capello
538dc9e6aa
Fix loading fully transparent TGA images in 32 bpp
2020-03-25 11:11:13 -03:00
David Capello
319c89c2ad
Use the new tga library to decode tga files
2020-03-24 17:07:35 -03:00
David Capello
4f1eacfddc
Simplify bits scaling function from 3/5/6 bits to 8 bits
2020-03-24 17:02:15 -03:00
Hamed Zaghaghi
123fa7d106
add css export
2020-03-24 05:51:02 +04:30
David Capello
5c0a82e9e0
Update FLIC library
2020-03-23 11:33:09 -03:00
David Capello
b95b01aa9a
Fix loading invalid FLIC or with huge image sizes
2020-03-21 20:54:41 -03:00
David Capello
72b5f0e701
Add missing files for the new TGA options
2020-03-20 20:15:29 -03:00
David Capello
c230e8f0ab
Add options to save TGA files with 16/24/32bpp & uncompressed/compressed
2020-03-20 19:18:03 -03:00
David Capello
ffdb5f2e42
Update status bar and mouse cursor when editor scroll changes
2020-03-20 15:04:53 -03:00
David Capello
3b9274b9b5
Improve TGA encoder to save files compressed
2020-03-20 12:35:27 -03:00
David Capello
1826d66f10
Fix loading some particular TGA files (multiple scanlines compressed, invalid alpha information, etc.)
2020-03-19 20:52:03 -03:00
David Capello
de1019342a
Fixes for aseprite.desktop file ( fix #2295 )
2020-03-19 12:13:51 -03:00
David Capello
941219363b
Keep "Export File" window position saved on preferences ( fix #2300 )
2020-03-19 09:50:18 -03:00
David Capello
28248bf228
[lua] Add Tag.color property (fix https://github.com/aseprite/api/issues/24 )
2020-03-19 08:41:29 -03:00
David Capello
a0882ba443
Move PACKAGE/VERSION, etc. to new ver-lib
...
* As we moved the VERSION macro to a .c file, we don't have to
recompile the whole project when we change the version number.
* Removed the version number from gui.xml
* Removed the invalid first menu item that might appear in the root
menu when the gui.xml version is outdated in debug mode.
2020-03-16 10:31:32 -03:00
David Capello
609b9accfc
[win] Fix error entering to files as a folder when the full path is used in the file selector
2020-03-11 12:27:31 -03:00
David Capello
fd8beb573c
We can use slashes in the file selector to go to other folders
2020-03-11 12:26:58 -03:00
David Capello
a19e317212
Merge branch 'fix/2228' of https://github.com/Adrijaned/aseprite into fix-2228
2020-03-11 09:51:32 -03:00
David Capello
afefac73bd
Fix compilation when !ENABLE_UI
2020-03-09 10:59:28 -03:00
David Capello
3f3928cdf2
Fix invalid var name
2020-03-06 15:32:40 -03:00
David Capello
1fe3c3a4bc
Add a number to each new slice that is created (related to #1651 )
2020-03-06 15:18:10 -03:00
David Capello
99cb95357a
Add support to send crash reports from macOS
2020-03-06 14:45:13 -03:00
David Capello
b106e2c717
Update clip module
2020-03-02 23:09:19 -03:00
David Capello
302dcdc7cf
Fix Shift+Enter to play animation in Preview window ( fix #2249 )
2020-03-02 14:49:38 -03:00
David Capello
95b655168c
Use new laf + skia m81 branch
...
* Some minor refactors due laf changes.
* Updated the instructions to compile Aseprite linking to external
skia instructions and pre-built packages.
2020-03-01 23:42:08 -03:00
David Capello
eaa2dd14b6
Update submodules
2020-02-27 12:15:41 -03:00
David Capello
817c6e361f
Fix crash closing/reopening sprites when "keep closed sprite data in memory" is disabled
2020-02-27 12:02:01 -03:00
David Capello
e3f28acf9e
Fix deleting docs from memory when "keep closed docs alive" is disabled & the backup on disk is enabled
2020-02-27 11:32:18 -03:00
David Capello
f0e60d2068
Fix crashes using MaskByColor command after we cannot lock the sprite
...
If ContextWriter thrown an exception (i.e. we cannot lock the sprite
for writing purposes), the "Mask by Color" ui::Window would persist
with its signal slots, and it creates an unstable scenario where color
change signals are generated from sliders and crashes the program
because we were using a deleted ContextReader variable which was
stored in the stack in MaskByColorCommand::onExecute().
2020-02-26 12:49:23 -03:00
David Capello
5cd23b8522
Fix moving 9-slices rules (regression introduced in 73de6c8b1d)
2020-02-25 15:25:36 -03:00
David Capello
53cb226f09
Fix crash using Flatten Visible when the active layer is a child of a group
2020-02-25 14:12:20 -03:00
Gaspar Capello
54bb39a9d3
Fix tile mode glitch with image brushes
...
This fix solves u,v set calculation when 'image brush' are used.
The cause of this bug is that we considered the set m_u, m_v as constants.
We have several cases when we are working on X axis:
- Scanline entirely contained in a tile, but OUTSIDE of the reference tile.
- Scanline entirely contained in a tile, but INSIDE of the reference tile.
- The left side of a scanline which was sliced (by the tile limit).
- The right side of a scanline which was sliced (by the tile limit).
Each one has its own m_u, so we need to recalculate it before every loop->getInk()->inkHline(...).
We have to take similar considerations when we are working in the Y axis.
We need recalculate m_v according if 'y+scanline.y' is INSIDE or OUTSIDE of the reference tile, each case has its own m_v.
Bug reports:
* https://community.aseprite.org/t/1183
* https://community.aseprite.org/t/4695
2020-02-20 16:01:12 -03:00
David Capello
9fe05a5dd5
Fix crash double-clicking a moving selection (fix regression in 7b07f29f0b)
...
Here we avoid two ExpandCelCanvas at the same time with
MovingPixelsState + DrawingState. Double-clicking inside the selection
when we are moving it (MovingPixelsState) could start a new
DrawingState which creates a new ToolLoopImpl that needs a new
ExpandCelCanvas. So we have to drop the pixels before.
2020-02-17 08:28:30 -03:00
David Capello
7b07f29f0b
Add possibility to select multiple tiles with double-click + dragging mouse ( fix #1988 )
...
Fixes: https://community.aseprite.org/t/1929
Related to #939
2020-02-16 12:42:29 -03:00
David Capello
6b7a593858
Minor formatting change in SelectTileCommand
2020-02-14 14:32:28 -03:00
David Capello
a1317eaede
Show some extra debug info if Object::setId() assert fails
2020-02-12 23:07:00 -03:00
David Capello
294401b18a
Select the correct tile when we double-click on negative coordinates of the grid
2020-02-11 12:43:29 -03:00
Gaspar Capello
f8cca1eba4
Removed unnecessary lines in remap.cpp
2020-02-11 09:24:24 -03:00
Adrijaned
90ba6d77dd
Fix file selector not allowing choosing files by path
2020-02-09 17:42:46 +01:00
David Capello
47a568ee86
Resize selection correctly on "Sprite Size" even when the Bilinear method is used
2020-02-07 15:11:03 -03:00
David Capello
59fa7d956b
DocExporter: Don't share the original size between samples
...
If we use two sprites with different canvas sizes, and both sprites
have a similar cel, they can share the inTextureBounds, but not the
original size (which is the original sprite canvas size of each cel).
This can be reproduced using the CLI and creating a texture
atlas (-sheet) with two or more sprites.
2020-02-06 15:07:40 -03:00
David Capello
a7f1f4bd64
DocExporter: render samples with trimmed size
...
This fix an issue merging similar cels from different sprites with
different canvas sizes.
2020-02-06 14:23:33 -03:00
David Capello
00cdda7b85
Minor change in DocExporter
2020-02-06 12:01:29 -03:00
David Capello
1c39d907cb
Fix bug genering "spriteSourceSize" for similar cels but with different positions in the canvas
...
This can happen when we use -trim (Trim Cels) + -merge-duplicates
options together. The trimmed bounds are unique to each sample, and
only the position in the texture (inTextureBounds) can be shared.
Fixes: https://igarastudio.zendesk.com/agent/tickets/407
2020-02-06 11:59:29 -03:00
David Capello
df74444347
Now ContextWriter will always wait 1/2 second to unlock the backup thread
2020-02-05 17:50:17 -03:00
David Capello
d316781e8a
Remove usage of ContextWriter from all Command::onEnabled() impls
2020-02-05 17:39:56 -03:00
David Capello
7306a685f8
Fix random bug showing disabled menu items right-clicking the timeline
...
When the backup thread is running, the upgradeToWrite() needed some
extra time to lock the document to check if we can write or not in the
sprite. Now we just check the ability to write the sprite with the new
RWLock::canWriteLockFromRead() function.
2020-02-05 17:03:48 -03:00
David Capello
28969d968c
Finally removing a problematic assert from ~UIContext()
2020-02-05 12:23:11 -03:00
David Capello
66864beb77
lua: Fix crash calling app.refresh() from a script using -b -script from CLI
2020-02-05 12:18:12 -03:00
David Capello
7507c2e4eb
Minor change in BrushLockAlphaInkProcessing<IndexedTraits>::processPixel()
...
We can use m_transparentColor directly (as in other inks) and ask for
the transparent color before pre-processing the pixel if it's not
needed.
2020-02-04 12:51:02 -03:00
David Capello
1bb126fade
Fix pasting text on empty cel when the timeline range is enabled
...
Bug report: https://community.aseprite.org/t/4489
2020-01-30 19:47:23 -03:00
David Capello
d5f0e3189c
Fix bug drawing and zooming with the mouse wheel or pinch gesture
...
The mouse position jumps from one side to other when we zoom because
there were an intermediate scroll change event where the mouse
position is converted using the old zoom.
Fixed regressiong from 951fb7c357
Fixed bug https://community.aseprite.org/t/4587
2020-01-13 15:01:45 -03:00
David Capello
cd598e5539
lua: Add Image:saveAs{ filename, palette } function
2020-01-13 12:27:32 -03:00
David Capello
df63fb9388
Update copyright year on Windows properties and About dialog
2020-01-08 17:44:59 -03:00
David Capello
70a211d978
Fix Palette:setColor() and Color Range command when alpha != 255
...
Use the app::Color alpha property to create the color for an
image (app::color_utils::color_for_image()) in several cases.
Fixed https://community.aseprite.org/t/4548
2020-01-08 17:40:43 -03:00
David Capello
e68cc7dbf9
Fix crash exporting sprite sheets into .gif or .jpg files (formats with onAskUserForFormatOptions())
2020-01-03 10:48:52 -03:00
David Capello
8efb11915f
Fix usage of freed memory after check_flood_line() returns true when 8-connectivity is used
2020-01-02 18:39:23 -03:00
David Capello
c1d5f8eb0a
Move AnimatedWidget from app to ui
2019-12-23 11:14:23 -03:00
David Capello
78353199bb
Remove UI_FOREACH_WIDGET_*() macros
2019-12-20 15:24:41 -03:00
David Capello
34ec123ecc
Remove MIN/MAX/MID macros from ui library
2019-12-20 15:08:34 -03:00
David Capello
87c754a11c
Fix Alt+arrow keys to move selection borders on selection-like tools
2019-12-18 18:00:11 -03:00
David Capello
9d818e0304
lua: Update scripting API number to 9
2019-12-17 15:07:59 -03:00
David Capello
c9b330ab65
lua: Added Dialog:shades{} widget
...
Also ColorShades is a little more generic now (doesn't depends so much
on the ColorBar).
2019-12-16 21:17:12 -03:00
David Capello
2b1903ee02
lua: Add Dialog{ title, onclose } constructor
2019-12-13 10:23:22 -03:00
David Capello
484de6bd3a
lua: Fix memory leak of dialogs with callbacks pointing to itself
...
Now we store the callbacks in a table that depends of the lifetime of
the dialog (instead of the global registry), so when the dialog is not
used anymore/closed, the whole "island" of objects (dialog +
callbacks) is GC'd.
2019-12-12 09:13:21 -03:00
David Capello
45fc74f596
lua: Fix crash on program exit if some metatable.__gc calls print()
2019-12-11 23:46:33 -03:00
David Capello
ff2af4f3e8
lua: Add app.fs object with some functions/properties for file names
2019-12-11 15:39:40 -03:00
David Capello
8139b8a1d4
Move Preferences instance to app::Context
...
With this change we fix some tests when !ENABLE_UI and we start using
less Preferences::instance() (maybe in the future we could exclusively
access the preferences from the new Context::preferences() function).
2019-12-11 12:27:56 -03:00
David Capello
e553777d24
Fix warnings of unused varisables when !ENABLE_UI
2019-12-11 12:22:01 -03:00
David Capello
fa013f4b63
Preferences can be used in non-UI contexts
...
Fixed bug running app_preferences.lua from tests repository.
2019-12-10 19:10:47 -03:00
David Capello
b7f41b811a
Add Screenshot command
2019-12-05 12:05:18 -03:00
David Capello
70ff67e890
Clear save_copy preference values of saved copies (related to #1964 )
2019-12-03 17:38:28 -03:00
David Capello
b190cc985e
Save the whole group of grid/bg/pixel grid settings when these elements are displayed in the Editor
...
https://community.aseprite.org/t/3303/10
2019-12-03 17:37:54 -03:00
David Capello
d8b933c3f1
Load GIF files w/pixels outside the canvas bounds anyway ( fix #2211 )
2019-12-03 09:33:30 -03:00
David Capello
6cab7b208c
Fix using default preferences on new documents ( fix #2198 )
...
Fixed regression introduced in 002abc9245 .
Bug reports:
* https://github.com/aseprite/aseprite/issues/2198
* https://steamcommunity.com/app/431730/discussions/2/1657817111845334892/
* https://community.aseprite.org/t/grid-size-for-new-documents-not-applied/4305
Added new ASEPRITE_USER_FOLDER environment variable to test
preferences from a clean folder.
2019-12-02 19:13:27 -03:00
David Capello
f53ecab282
lua: Add support for app.preferences.document(nil) to get default preferences for new documents
2019-12-02 18:51:43 -03:00
David Capello
f500929ab4
win: Include user fonts directory from AppData
2019-11-29 17:42:33 -03:00
David Capello
ea0e51e82d
Export Sprite Sheet: Fixed exporting selected layers when Split Layers is not checked
...
Bug reported here: https://community.aseprite.org/t/4248/6
2019-11-29 11:50:33 -03:00
David Capello
48c4e49d67
Fix Layer.stackIndex setter when we use a stackIndex greater than the current one
2019-11-29 11:08:18 -03:00
David Capello
116420f978
Put the button to delete backup sessions far away from the button to recover sessions
2019-11-29 11:07:17 -03:00
David Capello
aec82eccb2
Add recent file and folder after exporting sprite sheet ( fix #2202 )
2019-11-29 10:12:21 -03:00
David Capello
a85368c6c2
win: We need psapi to show memory info when ENABLE_DEVMODE is defined ( fix #2205 )
2019-11-28 12:18:16 -03:00
David Capello
52d4818196
Fix crash of cli_tests using copies of AppOptions instances
2019-11-26 17:57:02 -03:00
David Capello
d5e167fc37
Fix crash in case we copy & paste data between 32-bit <-> 64-bit versions of Aseprite
...
For example, this is common when an user installs Aseprite
trial (which is distributed in 32-bit) and then installs the full
64-bit version (e.g. using the installer instead of the portable
version).
2019-11-26 16:45:23 -03:00
David Capello
27f96d6c01
Fix outline_filter.h include guards
2019-11-25 12:01:23 -03:00
David Capello
19a101543e
Add required ImageTraits from dio/pixel_io.h when compiling with modules feature
2019-11-25 11:43:32 -03:00
David Capello
c06fbdf346
Use doc::rgba() to avoid confusion with gfx::rgba()
...
I was testing the Clang modules feature, and this is necessary if we
enable modules because it looks like "gfx/color.h" is included in some
way from this file too.
2019-11-25 11:41:59 -03:00
David Capello
2d79834b1f
Remove unused type in app_options.cpp
2019-11-25 11:40:49 -03:00
David Capello
94dcaf8008
Don't export sprite sheet image on preview or after cancel
2019-11-20 12:18:15 -03:00
David Capello
a60fea2e5f
Don't include untagged frames in the export when we use split tags option
2019-11-19 11:22:09 -03:00
David Capello
f6dea3dfbf
Remove unused vars
2019-11-15 16:24:35 -03:00
David Capello
6777c2f34b
Add ui::Widget::kCutTopWindowsAndUseChildArea flag
2019-11-15 16:22:44 -03:00
David Capello
0b6f2d4e8f
Update flic module (fix crashes loading invalid FLIC files)
2019-11-15 11:29:55 -03:00
David Capello
da37bec54d
Fix unused var on release compilation
2019-11-15 10:46:37 -03:00
David Capello
b5b450afba
Fix crashes using deleted items from the file selector navigation history ( fix #2192 )
...
Now if we detect that a folder doesn't exist anymore, we remove the
item from the navigation history to avoid having a pointer to an
invalid IFileItem.
2019-11-15 10:44:43 -03:00
David Capello
c1d5c94e22
Disable forward button correctly when the file selector is opened
2019-11-14 17:55:13 -03:00
David Capello
497eb97067
Minor refactors in ui/file_selector.cpp
2019-11-14 15:36:56 -03:00
David Capello
bc96cd00fb
Fix warning about signed vs unsigned comparison
2019-11-14 12:37:50 -03:00
David Capello
8c2a99f952
Add option to reset symmetry to the center ( fix #2195 )
2019-11-11 15:47:21 -03:00
David Capello
5ac07c0823
Fix pressing buttons with Alt+mnemonic or Cmd+mnemonic (regression introduced in 536a4c5d3a)
2019-11-05 10:46:47 -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
c2acc973ee
Add support to show multiple sections in Export Sprite Sheet
2019-10-29 16:37:06 -03:00
David Capello
f43f7e2ada
Use latest Export Sprite Sheet used params when the document doesn't have preferences
2019-10-29 11:22:14 -03:00
David Capello
002abc9245
Don't set preferences with latest defaults if there is an existent .ini file for the sprite
...
Might fix: https://community.aseprite.org/t/grid-for-new-documents/3303
2019-10-29 11:19:53 -03:00
David Capello
31efa1ce0f
Minor changes in Export Sprite Sheet
2019-10-29 10:34:03 -03:00
David Capello
9461c5d02c
Don't allow call Exit command (e.g. Cmd+Q on macOS) when there is a foreground window
...
The same for drop files, we've disabled dropping files when there is a
foreground window (at least temporarily to avoid strange UI states).
2019-10-29 10:31:12 -03:00
David Capello
8a499ae175
Initialize Width/Height/Columns/Rows fields correctly in Export Sprite Sheet
2019-10-29 10:12:50 -03:00
David Capello
c0dfd76114
Change Export Sprite Sheet dialog with a tab-like UI
2019-10-26 13:24:27 -03:00
David Capello
ad12ec4a0d
Export Sprite Sheet: Select old sprite tab when the preview is unchecked
2019-10-25 14:40:21 -03:00
David Capello
ae9a8128be
Don't duplicate meta data (tags/slices) when -split-layers is used ( fix #1582 )
2019-10-24 19:55:42 -03:00
David Capello
4bafbe461a
Don't include empty samples in the sprite sheet when the whole sprite is trimmed
...
We have to include at least one pixel for each sample.
2019-10-24 19:01:48 -03:00
David Capello
a74cec6369
Use "By Rows" as the default sprite sheet type in Export Sprite Sheet
2019-10-24 19:01:18 -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
11da527490
Don't show the app on the dock bar when we run tests from the terminal
2019-10-24 14:59:22 -03:00
David Capello
f76585fbb8
macOS: Don't activate app in batch/terminal mode
2019-10-24 13:44:36 -03:00
David Capello
ea5e67b0ea
Merge duplicate cels in SimpleLayoutSamples (not only linked cels)
2019-10-24 13:12:22 -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
13d042f346
Add options to merge duplicates/ignore empty cels in Export Sprite Sheet
2019-10-23 21:09:56 -03:00
David Capello
0a2d5e171b
Fix crash previewing Export Sprite Sheet in certain cases
2019-10-23 20:15:09 -03:00
David Capello
d6efddee92
Cache trimmed bounds calculation on DocExporter
...
The cache of the whole sprite trimmed bounds makes sense only in the
UI preview mode.
2019-10-23 15:55:08 -03:00
David Capello
a0b389e87a
Delete old cel of previewed sprite sheet ASAP
2019-10-23 14:51:08 -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
b6fce0b1df
Print to stdout from DocExporter only in CLI mode
2019-10-23 14:48:18 -03:00
David Capello
450742af4b
Remove unused getters from DocExporter class
2019-10-23 14:48:05 -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
f375ced883
Fix loading tooltips for comboboxes
2019-10-22 20:31:06 -03:00
Gaspar Capello
398daf14db
Fix Flatten Visible crash when no layers are visible
...
Bug founded by Jerry Pie from Steam
https://steamcommunity.com/app/431730/discussions/0/1606022547906751802/
2019-10-22 19:22:43 -03:00
Gaspar Capello
558943ebec
Fix Set Ink Type command crash when it is executed without UI
2019-10-22 19:20:49 -03:00
David Capello
66ccf51eb9
Move the logic to get the refColor for trimming to app::get_best_refcolor_for_trimming() function
2019-10-22 19:19:42 -03:00
Gaspar Capello
695d85e566
Fix Trim command when top-left corner is non-transparent ( fix #1659 )
2019-10-20 12:00:29 -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
Gaspar Capello
7fd1c7e0e7
Add ink type Copy Alpha+Color to custom brush
2019-10-15 10:06:42 -03:00
Gaspar Capello
7160f45296
Fix Custom brushes + Pen + Shading Ink breaks pattern alignment ( fix #1615 )
...
Add specialization of shadingProcessPixel for each ImageTraits.
Additionally, to avoid code repetition, we reuse ShadingInkProcessing
functions to process the new added BrushShadingInkProcessing. To
accomplish it, we did nest a code portion from original
ShadingInkProcess::processPixel(). This code portion was named:
shadingProcessPixel(...)
2019-10-15 09:59:15 -03:00
David Capello
30b2585037
Save grid bounds inside .aseprite files and doc::Sprite ( fix #688 )
2019-10-10 15:08:59 -03:00
David Capello
86ef6979e2
Remove undefined function from app::cmd::SetPixelRatio
2019-10-09 15:44:52 -03:00
David Capello
9e45934c6e
Remove "using namespace doc" from app/cmd/with_sprite.h
...
We should remove all "using namespace" from header files, but it's a
progressive thing to do/not critical.
2019-10-09 15:43:06 -03:00
David Capello
aa66ff35a2
Refactor DocExporter::DataFormat -> SpriteSheetDataFormat
2019-10-07 17:22:27 -03:00
David Capello
fa246d9c60
Add Packed style to File > Export Sprite Sheet
2019-10-04 15:22:58 -03:00
Gaspar Capello
2b1be4f288
Fix custom brush is available with the eraser tool ( fix #1408 )
2019-10-04 15:05:02 -03:00
David Capello
d99e642c55
Add split layers option in ExportSpriteSheet
2019-10-03 15:52:19 -03:00
David Capello
7a10139a87
Minor refactor in ExportSpriteSheet adding functions to update params from window widgets and update DocExporter from params
2019-10-03 10:08:46 -03:00
Gaspar Capello
b533e77b3f
Fix export sprite sheet rows and columns calculation and others
...
Several things are changed to fix columns and rows calculation in de Export Sprite Sheet Dialog.
- onSizeChange() Conditions were added to consider padding and sprite sheet type in columns and rows calculation.
- onSheetTypeChange() Condition was added to consider best_fit mode, and consequent columns and rows calculation.
- On ExportSpriteSheetWindow creation, unnecessary conditions and onSizeChange execution were removed. Because, we need update columns, rows, fitWith and fitHeight according the current sprite data (done in onColumnsChange()), instead of the saved params.
- best_fit() function: type sprite sheet argument was added to fix columns and rows calculation when Columns type sprite sheet is selected in best fit mode.
- best_fit() function: it was simplified by removing the “for” iterations since they were unnecessary. We found a simpler way to do that.
- best_fit() function: it have no longer gfx::Region and gfx::Rect variables, because, the calculation is simpler now.
- MID macros were replaced by base::clamp() function.
2019-10-02 17:03:42 -03:00
David Capello
51be644bf4
Merge duplicated samples when -sheet-pack is used ( fix #1316 )
2019-10-02 12:55:09 -03:00
David Capello
01821ed989
Don't discard empty frames if the cel is empty but the user doesn't want to discard empty frames ( fix #2116 )
...
E.g. Useful to match frames with tags information.
2019-10-01 20:39:02 -03:00
David Capello
1c8b8051a8
Rename FrameTag -> Tag
2019-10-01 14:55:08 -03:00
David Capello
c25c67733b
Include ui/scroll_helper.h in ui/ui.h
2019-10-01 14:35:47 -03:00
David Capello
4e4cafece6
Rename FrameTags -> Tags in file spec/encoder/decoder functions
2019-10-01 13:16:35 -03:00
David Capello
cefeb9cbc0
Make "Duplicate Cels" commands behave like the timeline range is enabled even for the case of one cel
...
In this way we can use Alt+D to duplicate the active cel, and Alt+M to
link the active cel in the next frame.
2019-10-01 12:05:04 -03:00
David Capello
b6fceaf549
Keep the transparent color index on the output of Export Sprite Sheet
2019-10-01 10:08:07 -03:00
David Capello
5e25d5a021
[lua] Add support to call AddColor from scripts
2019-10-01 09:37:04 -03:00
David Capello
944634542e
Refresh screen/current palette automatically on Transaction::commit() ( #378 )
...
Removed app_update_current_palette() with this patch.
2019-10-01 09:24:03 -03:00
Gaspar Capello
7c92fe207a
Fix caret position when click on a text entry ( #2160 )
2019-09-30 16:22:01 -03:00
David Capello
b4c0a032e8
Fix previous commit
2019-09-27 17:48:51 -03:00
David Capello
46de0c95c3
Preserve links when moving cels to different layer (continuation of 75636afd64)
2019-09-27 14:37:19 -03:00
Gaspar Capello
3e1fe9771a
Add LockAlpha ink type to Brush Ink ( #2133 )
...
Now we can use LockAlpha ink type with Image Brush.
In addition, we defined Simple ink type with Image Brush.
2019-09-26 19:21:25 -03:00
David Capello
75636afd64
Preserve cel links when we copy/move a range of cels/frames
...
This is a common solution in the DocApi wrapper that takes cares of
the duplicated cels that we're copying with copyCel() and that are
linked in the source, so then it maps the links into the destination.
Solving this in DocApi we fixed the problem on the timeline
drag-and-drop (doc_range_ops), copy/paste clipboard ranges, and merged
the code in NewFrame to duplicate (linked) cels.
We've also added 3 variants of Duplicate Cels with this change:
- Duplicate Cels: Copies the whole cel block without linking to
previous cels.
- Duplicate Linked Cels: Copies the whole cel block linking all cels to
previous cels.
- Duplicate Cels w/Layer Mode: Depending on the layer mode (continuous
or not) the cels will be linked or not (this is how "duplicate
linked cels" was working before, and was added just in case for
backward compatibility).
Fixes: http://steamcommunity.com/app/431730/discussions/1/142261352649813598/
2019-09-26 19:09:23 -03:00
David Capello
4ff77a4d55
Fix auto-pick of layers when alpha in 1...127 range ( fix #2156 )
...
The threshold of 50% was chosen to select layers that are more visible
than others (whatever is the order of layers in the stack) but it
might not be working as expected (e.g. if both composed layers has
alpha < 128 it will select no layer at all). Maybe in the we could
choose a higher threshold than 1, but let's see how it works for
users.
2019-09-26 11:51:15 -03:00
David Capello
6adbf899d4
Fix progress bar applying filters ( fix #2152 , related to 1659401642)
...
Regression introduced in 4264f199cd
2019-09-25 14:33:56 -03:00
David Capello
1659401642
Fix progress bar applying filters ( fix #2152 )
...
Regression introduced in 4264f199cd
2019-09-24 15:57:26 -03:00
David Capello
ccb9dc6f25
Add missing PngOptions (related to a532f21ec4, #2153 )
2019-09-24 09:59:22 -03:00
David Capello
8d5133fe09
Move editor_type() -> Editor::Type()
2019-09-23 20:02:19 -03:00
David Capello
636531c6da
Fix verbose text when a font is loaded
2019-09-23 15:33:27 -03:00
David Capello
a532f21ec4
Load/save unknown chunks from/to png files ( fix #2153 )
2019-09-23 15:32:33 -03:00
David Capello
de4a7454ce
Minor changes in png_format.cpp
...
* Renamed png_ptr -> png
* Renamed info_ptr -> info
* Added DestroyReadPng and DestroyWritePng
2019-09-23 10:57:23 -03:00
David Capello
1748e4f59c
[lua] Add some operations (add,sub,mul,etc.) to points/size/rectangles
2019-09-23 10:22:09 -03:00
David Capello
d43ff9b32b
Check missing theme styles to avoid crashes w/broken themes
2019-09-23 09:03:10 -03:00
David Capello
79f4e892f1
Add missing strings for extensions panel
2019-09-23 08:54:04 -03:00
David Capello
2c9fe85748
Fix doc_api_tests.cpp compilation
2019-09-11 20:32:17 -03:00
David Capello
845c2071da
[lua] Update API version to 6
2019-09-11 19:20:43 -03:00
David Capello
cbd3ee2cd7
[lua] Fix Sprite:resize() to resize non-active sprite
2019-09-11 19:19:58 -03:00
David Capello
b0a8b50246
Use one transaction per document (fix https://community.aseprite.org/t/3851 )
2019-09-11 19:12:11 -03:00
David Capello
26fbacc772
Fix a crash selecting a tile or pasting clipboard when we are moving the selection boundaries
...
This is because the MovingSelectionState freeze the document mask, and
we should unfreeze it before we execute any other command.
2019-09-11 18:19:29 -03:00
David Capello
76681dc416
Minor changes in editor.cpp (using some auto)
2019-09-11 18:18:31 -03:00
David Capello
602d844085
Restore DropPixelsField on ContextBar when switch to a editor in MovingPixelsState
2019-09-11 16:08:58 -03:00
David Capello
d588777b40
Remove unnecessary calls to Doc::resetTransformation/generateMaskBoundaries()
2019-09-11 15:41:35 -03:00
David Capello
fe42245ed9
[lua] Fix Sprite:newTag() so it generates undo info and can be used in transactions
2019-09-11 15:02:27 -03:00
David Capello
138cd2970c
Add option to disable transforming multiple cels when we have only layers/frames selected on the Timeline
2019-09-11 14:01:50 -03:00
Gaspar Capello
492576de3c
Fix Contour Tool: cannot draw one pixel in excepcional condition
...
Before this fix, with Contour Tool activated (Pixel Perfect = OFF), if
we did click while we were moving the mouse inside the same pixel, it
wasn't drawn.
Related to: https://community.aseprite.org/t/3509
2019-09-11 13:18:09 -03:00
David Capello
761ccd8217
Fix invalidation of the Timeline range on kMouseDownMessage
2019-09-10 15:19:41 -03:00
David Capello
559c3df6de
Fix crash using Edit > Cut after pasting the clipboard content on an empty cel
2019-09-07 11:43:22 -03:00
David Capello
0b44b83cf3
Add a timer to MovingPixelsState to avoid RotSprite on each mouse move
...
We can use the fast algorithm for fast feedback, and use a timer to
draw with RotSprite when the mouse doesn't move after 50ms.
2019-09-05 20:03:16 -03:00
David Capello
d03f5e9145
Add option to force RotSprite usage (as in old versions)
2019-09-05 18:22:51 -03:00
David Capello
3e391670b9
Fix preview of certain tools in tiled mode ( fix #2145 )
...
Fixes #2145 and https://community.aseprite.org/t/3833
Regression introduced in: 6a88713213
2019-09-05 18:04:38 -03:00
David Capello
1c68c25594
Fix preview center when tiled mode is enabled
2019-09-05 17:56:55 -03:00
David Capello
42b1154c25
Remove unused variable
2019-09-05 17:56:41 -03:00
David Capello
4acd3675b0
Remove unused code
2019-09-05 15:34:01 -03:00
David Capello
3e478d3efa
Transform/scale/rotate multiple cels at the same time ( fix #1148 , #1172 , #1238 , #1364 )
...
Requested in twitter, the forum, and in several other places and
frequently over all these years:
https://community.aseprite.org/t/scaling-multiple-frames-simultaneously/240
2019-09-05 15:03:13 -03:00
David Capello
2d979c521c
Update status bar info immediately after rotating/transforming the selection
2019-09-03 16:37:12 -03:00
David Capello
e19119cae2
Keep rotation angle inside -180...180 range when using Edit > Rotate commands
2019-09-03 16:34:47 -03:00
David Capello
47ff85e871
Avoid RotSprite for 90/180 degree rotations
...
Reported several times:
https://community.aseprite.org/t/better-90-180-rotation-from-menu/2937
https://community.aseprite.org/t/rotate-90-should-not-use-rotsprite/3267
https://community.aseprite.org/t/improvements-to-rotsprite/3613/4
https://community.aseprite.org/t/buggy-90-degree-rotation/3793
2019-09-03 15:10:02 -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
eb2e0e52dc
Fix crash using Sprite:close() Lua API on modified sprites ( fix #2142 )
2019-08-30 17:17:58 -03:00
David Capello
51fa0d471e
Fix crash generating thumbnails for certain sprites w/cels in specific positions
2019-08-29 17:51:44 -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
David Capello
fe0563664d
Remove unused #include
2019-08-27 20:01:23 -03:00
David Capello
75c127872b
[lua] Add several properties to handle layer groups ( fix aseprite/api#16 )
...
New properties to manage groups/sublayers:
* Layer.layers: property to access sublayers of a group
* Layer.stackIndex: property with the index of the layer in the list
of layers
* Layer.parent setter: to move the layer to other group
2019-08-27 19:57:49 -03:00
David Capello
55594a4d33
[lua] Add support to index layers by name
2019-08-27 19:56:33 -03:00
David Capello
e968758117
Use the simple ink when there is just one color for the shading ink
2019-08-26 16:27:53 -03:00
David Capello
8e1f98a45f
Fix ColorShades() painting of default text
...
Regression introduced in 9a75d01efe
2019-08-26 16:11:37 -03:00
David Capello
9c81ed46f2
Use threads in shrink_bounds() when it's possible
...
Improves the performance when we edit big images (shrink + crop +
image allocations are the performance issues we have when we're
editing big images).
The real solution for image allocations would be to change the
internal representation of images to a tile-based images with a cache
of tiles. But that is not planned in the short-term.
2019-08-21 20:21:57 -03:00
David Capello
0812ea8224
[lua] Add negation operation (unary -) into Point() metatable
2019-08-13 18:19:05 -03:00
David Capello
ad1a39714e
[lua] Add Image:resize() function
...
Closes: https://community.aseprite.org/t/3633
2019-08-13 18:16:30 -03:00
David Capello
b6de9d924b
Indent colored-layer part for nested layers
...
Request: https://community.aseprite.org/t/3658
2019-08-12 19:47:42 -03:00
David Capello
2a42cc1bf6
Quantization: Generate 1st pal entry w/alpha=0 for mask color on transparent layers when possible ( fix #2109 )
2019-08-12 16:43:36 -03:00
David Capello
f317f9594d
Add support to use ColorQuantization from scripts
2019-08-12 16:42:30 -03:00
David Capello
35aaa18ee3
[lua] Add app.range.colors + Move/CopyColors commands
...
Closes: https://community.aseprite.org/t/2512
2019-08-10 14:37:18 -03:00
David Capello
5cb5ff9393
[lua] Fix Sprite:resize() function (resize sprite+images instead of just the canvas)
2019-08-07 13:35:48 -03:00
David Capello
744bd36408
Fix transparent color for sprites created w/NewSpriteFromSelection
...
Fixes https://community.aseprite.org/t/3629
2019-08-06 16:18:01 -03:00
David Capello
b55d407ac1
Fix zooming w/tiled mode ( fix #2120 )
...
Regression introduced in d0962eb737
Bug reported in:
* https://github.com/aseprite/aseprite/issues/2120
* https://community.aseprite.org/t/less-jank-in-tile-view/3659
2019-08-06 15:19:21 -03:00
David Capello
a70a3a11c7
Add missing #include <memory> into editor_state.h
2019-08-01 23:38:38 -03:00
David Capello
6fff771118
Fix crash using mismatch of FormatOptions ( fix #2130 )
2019-08-01 20:20:02 -03:00
David Capello
d32fd97da5
Replace base::SharedPtr with std::shared_ptr
...
We can remove our smart pointer (base::SharedPtr) as we're already
using C++11 compilers on all platforms.
2019-08-01 19:16:16 -03:00
Gaspar Capello
2d3be681e0
Fix ScrollingState crash ( fix #2115 )
...
Before this fix Aseprite was crashing when we kept holding the mouse
middle button down, then pasting, and finally pressing undo.
2019-07-31 15:28:35 -03:00
David Capello
c409494639
Call os::System::activateApp() even on _DEBUG mode (because we are not in a bundle when we debug)
2019-07-31 15:25:32 -03:00
David Capello
4264f199cd
Create the ContextWriter+Tx from UI thread on filters (related to #2122 )
...
When we create a Tx the active site is queried, and the UIContext
needs access to the UI to calculate the active site correctly.
2019-07-29 12:13:53 -03:00
David Capello
b5547251f5
We cannot create a ContextReader in the filter background thread
...
This is because ContextReader gets the activeSite, which (in case of
the UIContext) asks to the UI thread this information (app::Editor).
2019-07-26 12:06:21 -03:00
David Capello
f248d8ed65
Merge pull request #2117 from Gasparoken/refactor-sprite-size
...
Refactor sprite size command params
2019-07-26 10:49:54 -03:00
Gaspar Capello
3e1584e638
Refactor sprite size command params
2019-07-26 09:30:28 -03:00
David Capello
4c4c20ace6
[lua] Add support to use ColorCurve/ConvolutionMatrix commands from scripts
2019-07-25 22:23:38 -03:00
David Capello
ccef22f187
lua: Add support to construct Point/Size/Rectangles from array of integers
2019-07-19 18:39:06 -03:00
David Capello
1ef67cada4
lua: Support more filters from scripts (BrightnessContrast, Despeckle, HueSaturation, InvertColor, Outline)
2019-07-18 11:47:26 -03:00
David Capello
814250e325
Add support to call ReplaceColor from scripts when the UI is disabled (e.g. from CLI)
2019-07-16 16:36:09 -03:00
David Capello
9143523827
Add params to ReplaceColor command (now this filter can be used from a script without UI)
2019-07-16 09:31:25 -03:00
David Capello
655ce92836
Use a Tx instead of a Transaction on FilterManagerImpl ( fix #2108 )
2019-07-15 14:30:59 -03:00
David Capello
6c7f1ff05b
lua: Add "bounds" parameter to Dialog:show() function
2019-07-12 16:44:54 -03:00
David Capello
568aadbfc8
lua: invalidate Dialog() after changing its bounds
2019-07-12 16:42:43 -03:00
Gaspar Capello
33dd70f89d
Fix contour tool cannot draw only one pixel
...
The purpose of this fix is enable drawing of one pixel with contour
tool is active and we drag the cursor inside of the same
pixel (https://community.aseprite.org/t/3509 ).
Added 3 tests in polygon_tests.cpp to test polygon function when the
expected results is a simple pixel.
2019-07-12 14:41:48 -03:00
David Capello
04d547ce37
Use Tx instead of Transaction on PixelsMovement
2019-07-12 14:36:28 -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
fed9a2b45c
Don't make layer indentation wider for child layers when we zoom in the timeline
2019-07-01 16:18:32 -03:00
David Capello
f2fae67734
Fix invisible brush edges in certain cases/zoom levels
2019-07-01 15:51:58 -03:00
David Capello
a0ebecca50
Make NewLayerCommand compilable when ENABLE_UI is not defined
2019-06-28 18:53:23 -03:00
David Capello
fe4106457f
Add "Edit > Paste Special > Paste As New Sprite" option ( fix #1024 )
2019-06-28 18:51:14 -03:00
David Capello
e9d8392a46
lua: Several app.useTool() calls can be used in one transaction now ( fix aseprite/api#18 )
2019-06-28 16:44:52 -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
86ffa37fdd
Fix rendering bug with new engine and zoom out (canvas is not updated correctly)
2019-06-11 10:42:41 -03:00
David Capello
922505e8af
Fix performance problem after viewing an huge sprite
...
When we were viewing an huge sprite, a temporal buffer (os::Surface*)
used to render it would increase its size to the size of the
canvas. After that, whatever other sprite that we saw (even for the
smallest one) we were unnecessary clearing the entire (huge) internal
buffer with os::Surface::clear() on each render.
This problem was visible only using the new render engine.
2019-06-10 17:43:38 -03:00
David Capello
8e193b592a
Avoid refreshing the list of backup sessions when an item is doing some work/task
2019-06-10 11:02:03 -03:00
David Capello
07f64b7682
Fix Jumble tool brush behavior and improve IntertwineAsLines impl
...
* Fixed Jumble tool behavior: When brush is circular, all the brush
bounds (square) where randomized. And at the end all the pixels were
re-randomized.
* Solved the double-point in IntertwineAsLines from
62802cfbdf in an alternative way: Just
don't draw the first point when we join consecutive 2 points
strokes (the issue here is that freehand controller generates
strokes of two points, so every call on joinStroke() of
IntertwineAsLines has only two points, we have to check if we're
drawing the first stroke, and if we are drawing the second 2 points
stroke, we skip the first pixel to avoid drawing it two times,
solved with IntertwineAsLines::m_firstStroke).
2019-06-08 13:35:30 -03:00
David Capello
8405add137
Fix error using an invalid crop_image() with Width < 1, Height < 1 when using New Brush with right-click outside the canvas bounds
2019-06-07 18:39:36 -03:00
Gaspar Capello
8281e49798
Fix joinStroke function from class IntertwineAsLines
...
The purpose of this fix is draw correctly the
first stroke point as result of a joinStroke() execution
from class IntertwineAsLines when following
conditions are meet:
- pencil tool
- pixel perfect OFF,
- custom brush
- try to draw a line of 2 pixel.
The original issue was detected by the tests functions
based in useTool function on Lua scripts.
The issue was presented in tool.lua.
2019-06-07 17:28:03 -03:00
David Capello
45a09f1a15
Disable keepEditedSpriteData checkbox if dataRecovery is disabled
2019-06-07 15:12:39 -03:00
David Capello
fb05e91d01
Hide "Recover Files" button when it's disabled (fix crash clicking it in this case)
2019-06-07 14:40:11 -03:00
David Capello
2a364c3ad2
Fix saving general.keep_closed_sprite_on_memory_for preference with decimals
2019-06-07 13:27:31 -03:00
David Capello
ffee4e5407
Add a note about CLOSEDOC_TRACE that must be TRACEARGS if we want to debug it
2019-06-07 13:22:18 -03:00
David Capello
0554b53385
Rename TRACE() to RECO_TRACE() in data_recovery.cpp
2019-06-07 13:22:02 -03:00
David Capello
8201d62124
The assert can fail if we have the data recovery disabled
2019-06-07 13:18:23 -03:00
David Capello
c7d1e4a472
New option to configure how much time we keep a closed sprite on RAM
2019-06-07 13:17:21 -03:00