Commit Graph

8856 Commits

Author SHA1 Message Date
Martín Capello
6534d37b40 Add custom properties serialization/deserialization lua tests 2023-01-06 19:28:02 -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
8f09728105 Merge branch 'custom-properties-serialization' (fix #3632, #3645) 2023-01-06 10:03:19 -03:00
Martín Capello
b00b96877a Remove unused include 2023-01-06 10:02:14 -03:00
David Capello
f5bc573bfc Remove base::thread, we use std::thread 2023-01-05 16:43:09 -03:00
David Capello
177f42898a Replace std::stringstream() with fmt::format() 2023-01-05 16:35:24 -03:00
David Capello
a0ddefb732 Remove note about "extension:" prefix in external files chunk 2023-01-05 16:28:47 -03:00
David Capello
eaa0f5e46a Fix unintentionally fall through 2023-01-05 16:22:20 -03:00
David Capello
7ede783926 [lua] Add key modifiers to mouse and touch messages on canvas widget 2023-01-05 16:14:00 -03:00
David Capello
8aa49479b8 [lua] Add Sprite.id and Layer.id properties 2023-01-05 16:01:42 -03:00
Martín Capello
3e55baec1a Update laf submodule 2023-01-05 15:42:02 -03:00
Martín Capello
03d66aa203 Introduce FLOAT and DOUBLE types 2023-01-05 15:30:45 -03:00
Martín Capello
eebc661a56 Add serialization/deserialization tests of sprite's user data properties 2023-01-05 15:17:02 -03:00
Martín Capello
dbeec18ef5 Add operator== to Fixed type to enable Vector comparisons 2023-01-05 15:17:02 -03:00
Martín Capello
db9db191f5 Fix serialization of external files chunk 2023-01-05 15:17:02 -03:00
Martín Capello
03f0c7ff08 Replace use of new with make_unique 2023-01-05 15:17:02 -03:00
Martín Capello
6c886cfa19 Add serialization/deserialization of user data custom properties 2023-01-05 15:16:57 -03:00
David Capello
1ce3e8e392 Take care of not using UI-related stuff on Clipboard class when ENABLE_UI=0 2023-01-05 14:23:15 -03:00
David Capello
7a1d6aef21 Include Clipboard utilities even when ENABLE_UI=0 2023-01-05 14:23:15 -03:00
David Capello
988cba2c2b Add "Copy Path" option when right-clicking a sprite tab 2023-01-05 14:23:15 -03:00
David Capello
fa3bdf853c Add support for sRGB and linear color profile (none) 2023-01-05 14:23:01 -03:00
David Capello
d3aac6a1cd Add support for .qoi file format (fix #3121) 2023-01-05 14:23:01 -03:00
David Capello
2e02bd307e [lua] Add ev.fromUndo=false in Sprite change event (so the event object isn't nil) 2023-01-05 11:23:42 -03:00
David Capello
84765c5052 Add several notes related to macOS 10.9 limitations 2023-01-05 10:21:50 -03:00
David Capello
17825921e0 [lua] Add onkeydown/onkeyup events to canvas widget 2023-01-04 14:40:10 -03:00
Martín Capello
8b4b803a22 Refactor AsepriteExternalFiles usage 2023-01-03 16:59:36 -03:00
Martín Capello
243fbc3fbc Extend User Data Chunk to support custom properties 2023-01-03 16:59:26 -03:00
Martín Capello
9fef25a674 Clarify where the external files chunk is in the file 2023-01-03 13:18:05 -03:00
David Capello
420278d5a4 Merge branch 'lua-api-for-properties' (fix aseprite/api#88) 2023-01-03 11:34:23 -03:00
David Capello
cf776adc9a Minor formatting changes in set_user_data.h 2023-01-03 11:14:52 -03:00
David Capello
645605305f [lua] Add undo information when we modify user data properties 2023-01-03 11:14:19 -03:00
David Capello
e2024c6edd [lua] Add "properties" property to all objects with user data 2023-01-03 09:00:58 -03:00
David Capello
427efef257 [lua] Add possibility to set the whole properties object 2023-01-03 09:00:36 -03:00
David Capello
b9537dbbe0 [lua] Add object.properties("extID") syntax to get extension properties 2023-01-03 08:34:14 -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
11dbb22efa [lua] Correctly call PropertiesIterator destructor using its __gc
This was detected by MSVC with its _ITERATOR_DEBUG_LEVEL=2 where
orphan iterators are detected when the map/container is destroyed.
2023-01-02 17:05:08 -03:00
David Capello
9f0491ddb6 [lua] Add support to iterate properties using pairs() 2023-01-02 14:36:49 -03:00
David Capello
ef0596fd01 [lua] Add __len operator to Properties 2023-01-02 12:54:37 -03:00
David Capello
c77c95181a Fix MSVC issue converting a string literal (const char*) to bool when assigning to a variant<bool, string, ...>
More information: https://twitter.com/davidcapello/status/1609918634075226121
2023-01-02 12:54:37 -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
c7864c9fac Avoid MSVC issue converting implicitly a string literal (const char*) to bool when assigning to a variant<bool, string, ...>
More information:
https://twitter.com/davidcapello/status/1609918634075226121
https://developercommunity.visualstudio.com/t/10242620
2023-01-02 12:42:22 -03:00
Martín Capello
3167f8836c Add custom properties types constants 2022-12-30 17:23:31 -03:00
David Capello
dc0e57728a Minor changes to improve the UserData::Variant/Properties API
Mainly added ways to forward operator= and the default copy
constructor to the std::variant so we don't have to assign values
creating new Variant{}s.
2022-12-30 14:01:07 -03:00
David Capello
1830e5343f [lua] Add onwheel and ontouchmagnify events to Dialog:canvas() 2022-12-29 15:12:15 -03:00
Martín Capello
95a195b99b Fix how string properties are set to avoid tests failures in windows 2022-12-28 13:51:53 -03:00
Martín Capello
49ae010c7a Add UserData tests 2022-12-28 11:40:23 -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
Martín Capello
8568390306 Add a map of custom properties to be used by extensions (#3631) 2022-12-27 14:24:48 -03:00