magnet line width

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
Víctor Paredes
Site Admin
Posts: 5646
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

magnet line width

Post by Víctor Paredes »

his would be very useful when you are working with shapes which have a lot of points.
just like the magnet tool, but instead of moving points, it could modify the width softer.
i was writing this in feature requests section, but maybe it could be just simple script.

what do you think?
User avatar
Hiddicop
Posts: 250
Joined: Sun Nov 07, 2004 4:18 pm
Location: Sweden

Post by Hiddicop »

If I understand you correctly, this tool already exists.

http://www.lostmarble.com/forum/viewtop ... ht=inflate

However, it doesn't work anymore for some reason. At some update of Moho it stopped working, at least for me. But I suppose it can be easily fixed.
User avatar
Víctor Paredes
Site Admin
Posts: 5646
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Post by Víctor Paredes »

thanks for the answer.
that's right, this doesn't work. i supposed that it's similar to i was thinking.

i have opened lm_magnet.lua and lm_line_width.lua files in notepad, thinking that maybe i could combine both and make my first script ever.
lamentably, i didn't understand anything... :oops:
however, that is the idea, a tool just like magnet, but when you drag left or right -instead move the points- the width change softly between several points.
User avatar
Rasheed
Posts: 2008
Joined: Tue May 17, 2005 8:30 am
Location: The Netherlands

Post by Rasheed »

Hiddicop wrote:If I understand you correctly, this tool already exists.

http://www.lostmarble.com/forum/viewtop ... ht=inflate

However, it doesn't work anymore for some reason. At some update of Moho it stopped working, at least for me. But I suppose it can be easily fixed.
I fixed it, download the new version here:

flate.zip

Install the three files in your scripts/tool folder, and restart AS. If you click on a point, the line width of that point increases by a certain amount (alt key: decreases).
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Selgin, I think that original LM Line width do exactly what you want it to do.

http://amanoalzada.iespana.es/line-width.html
Just drag your mouse!!!
User avatar
Rai López
Posts: 2228
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

selgin wrote:i have opened lm_magnet.lua and lm_line_width.lua files in notepad, thinking that maybe i could combine both and make my first script ever.
Another possibility would be put'em alone into the same folder during a night and see what happens at the next day... :lol:
selgin wrote:lamentably, i didn't understand anything... :oops:
You'd want to say... fortunately! :D Cause if you start to do things like that we'll probably never see again more selgin's animations... (como me pasó a mi :()
...
User avatar
Rasheed
Posts: 2008
Joined: Tue May 17, 2005 8:30 am
Location: The Netherlands

Post by Rasheed »

Be patient, I'm working on a scripting tutorial. The best way to start is with menu scripts first, e.g. the ones in the scriptwriting section. Of course, it helps if you understand Lua, and some of the principles of programming.

Start small, think big, and keep trying.
User avatar
Víctor Paredes
Site Admin
Posts: 5646
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Post by Víctor Paredes »

thanks rasheed!
this forum is awesome. one day i send a suggestion, the same day Hiddicop tell me someone thought before about and made a script, the samed day rasheed fix the script...
thanks.

i have tested the script and it's different to i was thinking, but i don't know if someone understood me. it's like magnet tool, when you drag the mouse, its move the points in different velocities (the center points move faster than the peripheral points). what i want is that instead of moving the points, it changes the width.

genete, thank you for your flash, but i know how linewidth works and i don't want to change all the points width at the same velocity (es mi inglés, claro, que está tan re malo).
Another possibility would be put'em alone into the same folder during a night and see what happens at the next day... Laughing

will be nice my AS with some seemonkeys.
User avatar
Rai López
Posts: 2228
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

But... :shock: THE CROSSBREED WORKED!!! :shock: ...Uh oh! What a funny can be play to be God Marble! :D ...Ejem, well, as I said it seems work for now but sure it will need some checks & additions, for now I think I like how you can modify the line width according with the direction of the mouse movement (try to move up & down and a little side to side to see) it's very fluid althought I'm not sure if it's that someone can expect, we'll see... And well, I know, I know... It's quite simple and anyone could have it done better and faster but well, for sure It've been like a good exercise to start as least :) ...ENJOY IT! :arrow: (From HERE...)
Last edited by Rai López on Mon Dec 18, 2006 7:37 am, edited 1 time in total.
...
User avatar
Víctor Paredes
Site Admin
Posts: 5646
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Post by Víctor Paredes »

THANKS THANKS THANKS THANKS!
it's the best topic reply ever for this poor (but never humble) boy working at 3:32am...

thanks ramón!
te pasaste!


(me tomé la libertad de subirlo acá, por si las moscas de megaupload)
Magnet width (right click, save as)
User avatar
Rai López
Posts: 2228
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

Jajaj, 3:32 a.m.? :roll: ...7:36 a.m. here!!! :x ...Well, now I'll go to bed with the hope to find more crossed scripts when I wake up tomorrow...

PS1: YOU ARE WELCOMED * 4! :)
PS2: ...BTW que siempre quise yo tener unos de esos "Monos del Mal" :roll:
...
User avatar
Hiddicop
Posts: 250
Joined: Sun Nov 07, 2004 4:18 pm
Location: Sweden

Post by Hiddicop »

Rasheed:

Thanks for fixing the script. However it still doesn't work. Everything seems find when you editing the line width, but the change isn't stored. When you go to another frame, the line width is reverted, as had nothing been changed. Am I perhaps doing something wrong?

Ramon:

Thanks for the script!
When I use it, it works fine, but there is an error that pops up in Lua Console:

...r\Anime Studio Pro\scripts\tool\rl_magneto_linea.lua:216: error in function 'Localize'
argument #1 is 'nil'; 'number' expected.
User avatar
Rasheed
Posts: 2008
Joined: Tue May 17, 2005 8:30 am
Location: The Netherlands

Post by Rasheed »

Hiddicop wrote:Rasheed:

Thanks for fixing the script. However it still doesn't work. Everything seems find when you editing the line width, but the change isn't stored. When you go to another frame, the line width is reverted, as had nothing been changed. Am I perhaps doing something wrong?
Well, I removed the error messages, didn't I? You're right in the sense that I doesn't store the result into keys. I've updated the script, but I did add a credit at the bottom for modifying the script Brian did. The idea was good, but the script had some syntactic errors in it.

Here is the revised version: flate.zip

I will contact Brian to tell him what I did to his script.
User avatar
Rai López
Posts: 2228
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

I'm wake up again! But nothing new...
Hiddicop wrote: ...r\Anime Studio Pro\scripts\tool\rl_magneto_linea.lua:216: error in function 'Localize'
argument #1 is 'nil'; 'number' expected.
...HI! And about that... the error doesn't happend to me in AS 5.5, I've not tried it in Moho yet but I'll do it later to see; I've been take an eye into the script now but I'm not sure about the problem, it's related with GUI functions but I must study it, plus the structure arround the error message it seems identical to other similar AS tools and, well, maybe that's the problem... The truth is that there is some lines there that I can't understand and, well, if someone more esperimented want to take an eye too meantime I go to work it could be like a good excuse to teach us some good (always welcomed) scripting lesson/s... BYE!
...
User avatar
BA
Posts: 196
Joined: Tue Mar 08, 2005 7:28 pm
Location: Griddleville
Contact:

Post by BA »

hey, does anyone still have the magnet width script available to share? i tried the links in this thread but they don't work anymore.
Create cartoon characters and comics in minutes: www.bitstrips.com
Post Reply