Comments (10)
Last time I check the MoveMask wasn't working from scripts. I'll try to fix it for the next version if it's possible to do it quickly (as next week I'd like to release a patch for some important fixes).
from aseprite-script-examples.
Here again, finally I was able to test a little the MoveMask
command and create some documentation about it:
I think MoveMask
will work only when the UI is available.
from aseprite-script-examples.
Thanks a lot! :D
I was very hyped when I read that you were able to test and document the MoveMask
command, but then I tested the example and it didn't work XD
So i thought, "I must be doing something wrong" and started checking and trying several things, after a while and when I was about to make a small video showing that it didn't worked for me just in case, I had an idea: "Mmmm... Maybe it's because of the quotes?" and yeah that was the problem XD
I'm using Windows 7 (Ultimate-64) and Aseprite v1.2.13-x64, and it seems that it doesn't like sigle quotes '
, but if you use double quotes "
, it works like a charm :D
So, I'd like to suggest you to test if it also does work on your usual OS (you were using Mac nowadays if I'm not mistaken?), and if it also works there, please replace the single quotes symbols by double quotes, so it'll work for everybody :)
-- Code with corrected quotation marks (for Windows 7 at least):
local spr = app.activeSprite
spr.selection = Selection(Rectangle(1,1,spr.width-2,spr.height-2))
app.command.MoveMask{
direction="right",
units="pixel",
quantity=2
}
app.command.MoveMask{
direction="up",
units="pixel",
quantity=2
}
app.command.DeselectMask()
Again, thank you very much David, you are the best! :D
from aseprite-script-examples.
I didn't test on Windows yet, but I think it's related to other issue that I forgot in the Test.lua
file: the target
field (which is not initialized on the C++ code, so it's invalid at the very beginning).
I've updated the example.
from aseprite-script-examples.
Oh, thank you so much! :D I was trying again today (using the double quotation marks) and it wasn't working, I was really confused XD
I have tried your updated example and it works perfectly! So the quotation type, single or double, seems to be irrelevant (I probably did something between one test and another, and it worked just by coincidence, and I thought it was the quotations).
Again, thank you very much!! :D :D :D
from aseprite-script-examples.
I tried asking something the same on the community help forums some weeks ago, but no luck either ^^U
https://community.aseprite.org/t/lua-scripting-can-you-move-a-selection/2773
If I learn how to use MoveMask command I'll write it there, and here as well :)
Please let me know if you succeed at it first! ;)
from aseprite-script-examples.
That would be great :D Thank you very much David! :D
from aseprite-script-examples.
You're welcome @jjhaggar! I'll check that issue about the quotes on Windows later; it shouldn't differ between macOS vs Windows (because the Lua parser code is the same on both platforms), but I'll give a try.
Just in case, see if the copy-and-paste process of the code from the web browser to your text editor didn't mess the quotes (something that is really common on both platforms).
from aseprite-script-examples.
I didn't copy-paste the text, I directly downloaded the raw file from here:
https://gist.githubusercontent.com/dacap/7be7102ea6845774e30d2d664dcfd964/raw/d49012f4cb89e7eb5d38145178be8e6dd1de931f/MoveMask%2520Test.lua
(I usually do that in order to avoid these kind of problems)
Maybe I have something installed that interferes with my Lua parser? I have no idea ^^U
from aseprite-script-examples.
I can't seem to get MoveMask to move more than one pixel when the target is 'boundaries' as opposed to 'content'. Here is the code I'm using:
app.command.MoveMask{
target='boundaries',
direction='right',
units='pixel',
quanitity=10,
wrap=true
}
from aseprite-script-examples.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aseprite-script-examples.