We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to do a magic wand pixel selection on 1 layer and cut and paste to a new layer.
This is the minimum reproducible version because my real script is more complicated than this.
local sprite = app.activeSprite local from_layer = sprite.layers[1] local frame_num = 1 local from_cel = from_layer:cel(frame_num) app.useTool { tool = "magic_wand", layer = from_layer, cel = from_cel, button = MouseButton.LEFT, points = {from_cel.position}, selection = SelectionMode.REPLACE } app.command.Cut() local to_layer = sprite:newLayer() app.activeLayer = to_layer app.activeFrame = to_layer.sprite.frames[1] app.activeLayer = to_layer app.command.Paste() local without_ext = app.fs.filePathAndTitle(app.activeSprite.filename) app.command.SaveFile { ["filename"] = without_ext .. ".ase", ["filename-format"] = ".ase", }
Extract folder and open command prompt in directory and run: one_pixel_paste.zip
aseprite.exe ./one_pixel.png ./test_cut.lua
73fe8099d96479364f92ff6317a5687498d43d36
The text was updated successfully, but these errors were encountered:
Thanks for this report @jestarray. I was able to reproduce it.
Sorry, something went wrong.
Fix scripting app.command.Cut() and app.command.Paste() does not work…
4d1c93f
… in --batch mode (fix aseprite#4354)
10c388f
ec043ec
a3b0c26
Gasparoken
Successfully merging a pull request may close this issue.
I'm trying to do a magic wand pixel selection on 1 layer and cut and paste to a new layer.
This is the minimum reproducible version because my real script is more complicated than this.
2024-02-29_22-09-28_c.mp4
How to reproduce:
Extract folder and open command prompt in directory and run:
one_pixel_paste.zip
Aseprite and System version
73fe8099d96479364f92ff6317a5687498d43d36
The text was updated successfully, but these errors were encountered: