David Capello
34d1906034
lua: use ObjectId to refer doc objects from script variables
...
This should fix several crashes using objects in invalid ways where
the object doesn't exist anymore (e.g. an undo deleted referenced
objects in scripts).
2018-11-20 18:12:43 -03:00
David Capello
f6e3aa9fd8
Add security dialog to access files from scripts
2018-09-17 13:14:56 -03:00
David Capello
aed23f4751
lua: use the active EngineDelegate::onConsolePrint() in print() function
...
This is needed to output print() messages in the DevConsoleView when
it's open.
2018-09-14 20:38:27 -03:00
David Capello
6108d2d5ad
lua: add missing get_image_from_arg() function
2018-09-13 11:53:41 -03:00
David Capello
02388e2d6a
lua: add app.sprites
2018-09-12 12:55:56 -03:00
David Capello
b2f83e0a90
lua: complete some app.active* set/get properties
2018-09-12 12:17:48 -03:00
David Capello
03c663da21
lua: add functions to create layers/frames/cels/tags/slices
...
Some extra additions:
* Layer.cels
* AniDir constants
* Slice property setters
* Tag.sprite
* Fixed frame numbers in Tag properties
2018-09-11 18:29:15 -03:00
David Capello
4eefcaaa09
lua: add Sprite:setPalette()
2018-09-10 13:49:41 -03:00
David Capello
10d7020b23
lua: add Image:pixels(Rectangle) function
2018-09-07 18:03:33 -03:00
David Capello
3035820d39
Add script::ScopedEngineDelegate
2018-09-06 15:12:48 -03:00
David Capello
f456f3cba3
lua: Initial support for sprite properties
...
Frames, Palettes/Color, Layers, Cels, Tags, Slices, etc.
2018-09-04 16:10:32 -03:00
David Capello
a107dd29a4
lua: add image iterators
...
In this way we can use:
local img = Image(32, 32)
for it in img:pixels() do
local pixelValue = it() -- get pixel
...
it(pixelValue) -- set pixel
end
2018-09-03 18:20:23 -03:00
David Capello
3edc7c7b9a
Share scripting engine in the whole App instance life
2018-08-31 14:30:32 -03:00
David Capello
17366056b6
Use a ImageObj with a ImageRef for scripts
...
Also added __gc/new/clone methods, and colorMode property.
2018-08-30 20:47:11 -03:00
David Capello
4fe66f2ffb
Change scripting language to Lua
2018-08-22 14:54:51 -03:00