Commit Graph

80 Commits

Author SHA1 Message Date
Christian Kaiser 5108762f65 [WIP] Command refresh 2025-07-29 14:05:13 -03:00
Joshua Lopez 1519589184 Fix user data visibility after window size reset (fix aseprite#4923) 2025-06-04 13:37:38 -03:00
Martín Capello ba5adcaa7d Change uuidsForLayers by useLayerUuids 2025-04-22 12:42:12 -03:00
Martín Capello 7454ec2d06 Rename m_useUuidsForLayers by m_uuidsForLayers 2025-02-24 15:14:14 -03:00
Martín Capello d398bd7a2a Replace "" by std::string() 2025-02-24 10:48:55 -03:00
Martín Capello 86ad09291f Add UUIDs to layers 2025-02-24 10:10:28 -03:00
David Capello 09538f9a1a clang-format all files 2024-12-16 14:52:19 -03:00
David Capello be17c48324 Fix Timeline operations with ranges using virtual vs real ranges (#3904)
- Now we have a view::RealRange (with real frames, fr_t) and a
  view::VirtualRange (with virtual frames, columns, col_t). The timeline
  uses a virtual range internally and makes the conversion to a real
  range when it's appropiated (e.g. to execute an old DocRange operation
  using ranges with real frames).

- Added Context::range() to access to the real selected range
  instead of accessing directly to the timeline. In this way commands
  that were using the DocRange can access to the real range using the
  context, instead of the timeline's virtual range.

- Added a new ShowTagTimelineAdapter that can show just one tag in the
  timeline filtering out/hiding all other frames/tags.
2024-11-11 19:37:47 -03:00
David Capello e700cce987 Merge branch 'main' into beta 2024-09-23 15:03:11 -03:00
David Capello 0a1c5275a7 We have to list commands in Keyboard Shortcuts regardless of context
Removed KeyContext param from Command::isListed().
2024-09-16 10:53:31 -03:00
Gaspar Capello 04c45f4329 Fix duplicate items in keyboard shortcuts list (fix #4387)
Introduced Key::isListed() and Command::isListed() to customize when a
command should be displayed in the list of shortcuts.

Removed commands:
'Launch'
'OpenBrowser'
And removed unnecessary commands:
'Change Color Mode: Indexed'
'Contract Selection'
'Export Sprite Sheet'
'Flip Canvas Horizontally'
'Frame Properties'
'Load Palette'
'Open Sprite'
'Playback Speed 1x'
'Run Script'
'Save Palette'
'Select Used Colors'
'Set Palette Entry Size'
'Tileset Mode: Auto'
2024-09-16 10:14:12 -03:00
David Capello c61a5c9a01 Minor formatting fixes 2024-06-25 11:08:17 -03:00
Guilherme Belchior ffc3684b1b Compose groups separately from all other layers
Maintain hierarchical structure of sprite groups instead of flattening.
Allows opacity and blend mode to be applied correctly to groups.
Sets the foundation for future features like mask layers.

Note:
Requires full image rendering and impacts performance in some scenarios.
Avoids complex code changes for minor performance gains.

Co-authored-by: Guilherme Marcondes <guilherme.marcondes@tecnico.ulisboa.pt>
2024-06-24 18:16:42 -03:00
David Capello 8722c8ec16 Lock document in Tx() ctor (part of #2430)
This already fixes a lot of possible problems that can happen when a
script is running and modifying some part of a sprite that is being
backed up in a background thread.

We still need some work to being able to lock a sprite two or more
times in the same thread to write it. E.g. an app.transaction() should
lock the sprite for write access, but the script transaction function
could call a command, and that command could use a ContextWriter to
lock the sprite again. At the moment this is not possible because we
need a re-entrant RWLock implementation.
2023-12-27 11:05:15 -03:00
David Capello abba4684a7 Fix error messages about locked sprite when deleting multiple cels (fix #4204)
This is a combination when we modify a layer property and then
modify/delete several cels/frames/layers.
2023-12-06 12:47:52 -03:00
David Capello 62bdd8af9f Add "Advanced Options" checkbox in Tileset selector
To hide "Base Index" & "Allowed Flips" options by default.
2023-11-10 17:19:41 -03:00
David Capello 302d998218 Add support to match flipped tiles automatically in Auto/Stack modes
By default Aseprite will not try to match flipped versions of the
tiles (as it requires more CPU), but when we create a tileset we can
specify which flips can be matched automatically (new
Tileset::matchFlags() property).

These flags are just for the Auto mode, if we manually insert a
flipped tile, that is always supported, even when the matchFlags() are
not specified.
2023-11-09 16:44:46 -03:00
Martín Capello 242555ab06 Allow changing the tileset assigned to a tilemap layer 2023-07-18 18:50:57 -03:00
David Capello b28550faf5 Use new ScopedValue w/o old arg + C++17 class template argument deduction (CTAD) 2023-04-14 13:43:36 -03:00
David Capello 616f74ae2d Minor changes when accessing "properties_grid" widget 2022-10-13 09:40:54 -03:00
Joshua Ogunyinka 6bc0d312d2 Add missing language strings in the layer properties 2022-10-12 13:24:09 -03:00
David Capello 88594bfa0e Merge branch 'main' into beta 2022-09-28 16:20:03 -03:00
David Capello 008df4d03a Add ui::Paint = os::Paint = SkPaint
So now we can have access to Skia SkPaint instance directly from
Aseprite UI code (and set the shader, and other properties that are
not yet well-wrapped in laf-os).

We've simplified ui::CheckeredDrawMode with
ui::set_checkered_paint_mode() function, as now the checkered
background shader is stored in ui::Paint (SkPaint) instead of
ui::Graphics state.
2022-09-28 15:49:30 -03:00
David Capello b9206cc872 Fix locked sprite errors moving/copying multiple cels when the Cel (or Layer) Properties dialog is open (fix #3278) 2022-05-19 19:15:32 -03:00
David Capello 52779d4b09 Fix memory leak in UserDataView simplifying its ctor
Each "new gen::UserData" wasn't being freed.
2022-05-19 18:56:21 -03:00
David Capello 35bb3af6e2 Replace all base::Bind() with lambda functions 2021-03-05 20:09:42 -03:00
David Capello 26b75bdb57 Add option to specify/modify the tileset name 2020-11-10 17:48:09 -03:00
David Capello 0cf28840b5 Don't show tileset button in Layer Properties when it's open for a regular layer 2020-11-09 19:45:04 -03:00
Gaspar Capello 08f63f1b02 Fix cel and layer user data text input do not update when a fast layer change happen. 2020-11-05 18:42:32 -03:00
David Capello 505aa6119a Add option to change the "base index" from the layer properties 2020-10-30 21:11:58 -03:00
Gaspar Capello 13addb4336 UI user data window integration 2020-10-13 11:07:10 -03:00
David Capello 8a3f32b47f Replace all base::Bind() with lambda functions 2020-07-03 21:51:46 -03:00
David Capello 271865e13d Remove unused Command::clone() member function 2019-01-07 17:03:38 -03:00
David Capello 70629d6f89 Use Tx instead of Transaction in commands 2018-08-20 16:00:59 -03:00
David Capello 9c79ea2b77 Rename app::Document -> Doc 2018-07-07 11:54:44 -03:00
David Capello d00fc99138 Rename DocumentRange -> DocRange 2018-07-07 10:07:21 -03:00
David Capello 457a9999b5 Move doc::Context to app::Context (#378)
We've moved everything related to Context/active site/observable
documents from "doc" namespace to "app" namespace.
2018-07-07 02:47:42 -03:00
David Capello 612ad98392 Rename DocumentObserver/Event to DocObserver/Event 2018-07-06 21:06:03 -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 14ba0ab411 Add addition/subtract/divide blending modes
Changes:
* Added SeparatorInView() to add separators inside a ListBox or ComboBox.
* Added BlendModeItem() to represent each item in the blending modes
  ComboBox.
* Now a ComboBox can contain any kind of widgets as children (not just
  ListItem). This is required to add separators in the blending modes
  ComboBox.

Feature request:
https://community.aseprite.org/t/additive-blending-feature/121
2017-07-24 15:25:13 -03:00
David Capello d9be0572df Fix change of properties to several layers at the same time 2017-04-05 16:01:18 -03:00
David Capello 60ce295870 Move timeline code to app/ui/timeline/ folder 2017-03-26 13:33:12 -03:00
David Capello c60e0b915c Merge branch 'master' into beta 2016-10-27 13:00:57 -03:00
Keith Whitney 2d0dcc8613 Allow Esc key to close Layer Properties window 2016-10-24 23:31:21 -04:00
David Capello 1404b0ce7d Merge branch 'master' into beta 2016-09-16 16:02:26 -03:00
David Capello 6377b550e3 Replace base::Signal/Observable* with obs::signal/observable
We can use the obs library directly for signal/slots and observable
objects.
2016-09-13 15:02:00 -03:00
David Capello a104afc670 Merge branch 'master' into beta 2016-09-12 17:53:01 -03:00
David Capello 2e14064ef7 Fix crash when we switch to Home tab when blend mode is being changed (fix #1248) 2016-09-12 15:11:44 -03:00
David Capello 20b726f73b Merge branch 'master' into beta 2016-08-31 19:53:52 -03:00