PDA

View Full Version : multi_weld and multi_weld2 LScripts



GruvSyco
09-29-2003, 11:27 PM
Here are a couple of LScripts I made. Still pretty new to this scripting thing (I think this is day 5) but maybe you guys can use these.

multi_weld was suggested by Remi and and multi_weld2 is a modification for that script based on suggestions by TripleG that uses David Ikeda's Select Loop.

Hope you enjoy, docs are include in pdf format.

papou
09-30-2003, 04:35 AM
yeah! u amde that at day 5! very nice!
i can't wait what u are going to do in the futur.
good luck-

GruvSyco
09-30-2003, 10:26 AM
Thanks dude, I'm glad you like it.

GruvSyco
09-30-2003, 03:09 PM
Here is the forumized version of the docs:

multi_weld.ls

http://66.124.151.154/mw_01.jpg http://66.124.151.154/mw_02.jpg

Select points sequentially around the surface in this manner. Run multi_weld.ls to weld up the points.



multi_weld2.ls

http://66.124.151.154/mw2_01.jpg http://66.124.151.154/mw2_02.jpg

Select 2 points on first surface and use DI's Edge Loop.

http://66.124.151.154/mw2_03.jpg http://66.124.151.154/mw2_04.jpg

Shift select 2 corresponding points and use DI's Edge Loop.

http://66.124.151.154/mw2_05.jpg
Run multi_weld2.ls to weld up the points.


Lastly, these are available as standard LScripts so, the noobs can be in awe of my mad programming skillz and the pros can get a good laugh at them ;).

GruvSyco
09-30-2003, 03:13 PM
And for those hesitant to download the zip file:

multi_weld.ls

//--------------------------------------------------
// Multi_Weld - for sewing up a selection of points.
// LScript for Remi by GruvScyo.
// 09/29/03
//
// Select points sequentially.
// Script welds point 1 to point 2 and,
// repeats thru the selection (3 to 4, so forth).
//--------------------------------------------------

@version 2.2
@warnings
@script modeler

main
{
selmode(DIRECT);
pntCnt = pointcount();
if (pntCnt <2) {error("Please select at least 2 points");}

editbegin();
x = 1;
y = 2;

while (x < pntCnt)
{wldPnt = pointinfo(points[y]);
pointmove(points[x],wldPnt);
x=x+2;
y=y+2;}
editend();

mergepoints();
}




multi_weld2.ls

//--------------------------------------------------
// Multi_Weld - for sewing up a selection of points.
// LScript for Remi and TripleG by GruvScyo.
// 09/29/03
//
// Select points sequentially on each edge.
// using Ikeda's edge loop between each edge
// select matching points on each surface.
//--------------------------------------------------

@version 2.2
@warnings
@script modeler

main
{
selmode(DIRECT);
pntCnt = pointcount();
if (pntCnt <2) {error("Please select at least 2 points");}

editbegin();
x = 1;
y = (pntCnt/2)+1;
while (y <= pntCnt)
{wldPnt = pointinfo(points[y]);
pointmove(points[x],wldPnt);
x=x+1;
y=y+1;}
editend();

mergepoints();
}

Remi
09-30-2003, 04:23 PM
Everybody keep an eye on this guy...he's my new personal script writer:D....hehe....great job gruv you know you rock...I don't have to tell you....:)....talk to you now:)

sketchyjay
09-30-2003, 05:06 PM
it's always amazing to see how simple these scripts look...

How long did it take you to learn to do this?

Great script btw.

Jay

GruvSyco
09-30-2003, 05:12 PM
Originally posted by sketchyjay
it's always amazing to see how simple these scripts look...

How long did it take you to learn to do this?

Great script btw.

Jay


Not too long... I started on this scripting thing late Friday night. I had a mostly functioning first script the following day.
I showed that to Remi on Monday and he said.... "you know what would be cool" and gave me the idea for the first script above... I knocked that out in a couple of hours.
I then showed it to TripleG and he said "you know what would be even cooler" and I knocked the next script out in about an hour.

I haven't done much programming in the last 15 or so years (other than a little ColdFusion). It's pretty easy to pick up but would be much easier with some better docs.

Oh, and thanks :)

riki
09-30-2003, 05:34 PM
hey very cool, send the links on to Flay.com when your done.

Triple G
09-30-2003, 05:38 PM
Great work, man...these are awesome scripts, especially for someone new to LScript! But, I've already told you that, so I'll stop complimenting you before your head gets too big with delusions of grandeur...:D

Oh, and Remi....I think you and me are gonna hafta wrassle...he's my personal script writer...:p :D

GruvSyco
09-30-2003, 05:48 PM
Originally posted by riki
hey very cool, send the links on to Flay.com when your done.


Hey thanks riki. I don't think they are very Flay worthy though. Just me screwin around. Also I can't really host them myself. Just the hits I'm getting from this little thread alone are bogging me down.

GruvSyco
09-30-2003, 05:51 PM
Originally posted by Triple G
Great work, man...these are awesome scripts, especially for someone new to LScript! But, I've already told you that, so I'll stop complimenting you before your head gets too big with delusions of grandeur...:D

Hehe... thanks man. I appreciate the input you gave.


Originally posted by Triple G
Oh, and Remi....I think you and me are gonna hafta wrassle...he's my personal script writer...:p :D

Well... judging by avatars... ;) :D

GruvSyco
09-30-2003, 07:15 PM
I just found out CMan (http://www.m2estudios.com/plugins.html) has some very similar scripts... you should check his too.

papou
09-30-2003, 07:43 PM
ye, multimerge is nonmodal one!
but the possiblity to use your Lscript after Di2_SelectLoop can be time saver. Now, u can learn how to do nonmodal!

here an example:
it's a smooth script.


c2; c3; t2 =0; t3 = 100; firstime = 0;

main
{
selmode(USER);

reqbegin("[email protected]");
c2 = ctlminislider("Strength",t2,0,100);
c3 = ctlminislider("Iterations",t3,0,100);

ctlrefresh(c2,"GotoSmooth");
ctlrefresh(c3,"GotoSmooth");

if(reqpost()) {
}
else {
undo();
return;
}

reqend();
}


GotoSmooth: Null
{
t2 = getvalue(c2);
t3 = getvalue(c3);
t3 = (t3)+0.01;
t2 = (t2/10)+0.01;

if (firstime == 1){
undo();
}

else
{
firstime = 0;
}


smooth(t3,t2);

firstime = 1;

}

GruvSyco
09-30-2003, 08:39 PM
Wow... thanks for that little script... I'll try to work through it. I'm going to dare to show my newbishness and ask "Modal, Non-Modal?"

JONO
10-01-2003, 03:56 AM
nice one GruvSyco

when you started that friday night - 2 questions

1. why were'nt you out partying and,

2. what did you start learning from ( book, article ??? )

GruvSyco
10-01-2003, 09:34 AM
Originally posted by JONO
nice one GruvSyco
Thanks


Originally posted by JONO
when you started that friday night - 2 questions

1. why were'nt you out partying and,
Ummm... cuz I'm an old man, yo (35)


Originally posted by JONO
2. what did you start learning from ( book, article ??? )
Well, I tried the docs first. Then I looked at a few scripts. Then I tried contacting a scripter, who pointed me back to the docs.

There are a couple of functioning links here (http://members.shaw.ca/lightwavetutorials/programming.htm#Lscripting) but I think since lightwave-outpost came down (unfortunately I can't say how useful it would have been but, it seemed to be THE source for LW programming info) the docs are your only real choice.

As I progress, I'll try to keep some ideas in my head for some tuts for you guys. And if you flip through this section a bit and maybe post some questions, you may even get some help and/or advice from fellow users.

GruvSyco
10-01-2003, 09:45 AM
Oh yeah:

- alot of trial and error

- use the syntax tool in LScript Editor

- use test objects/scenes

- don't be afraid to try it your script

- be prepared to lock up your app


I froze modeler a couple of times at 99% CPU use when my script put it into some kinda of endless loop or something. hehe. Don't sweat anything.

Matt
10-01-2003, 11:03 AM
Remi - love your latest animation!!! :)

Remi
10-01-2003, 12:17 PM
Never underestimate the strength of a Redneck...:)....Hell Spawns don't scare me....I eat those things for breakfast:)

Matt
10-01-2003, 12:37 PM
Are you a redneck like Brad Pitt was in Kalifornia? :)

Or is that a stereotype?

Where abouts in the States are you from?

:)

Remi
10-01-2003, 03:45 PM
I'm not really a redneck...hehe But thanks for the laugh...it's my short series i'm working on at the moment...:) I'm trapped in SD now and most likely for quite some time. Good place to live......it's suprising there aren't more studios here though....cheap living....small town life....good summers...cold ***** winters....great place to raise kids...in fact Sioux Falls is in the top 10 places that people retire to. Odd I think...as we have one theater and 40 bars.:)

BTW...thanks for the kind words above:)

Also...I see you are a Don Bluth fan.....much respect:)

Matt
10-02-2003, 03:43 AM
SD = San Diego?

Do you have anymore anims like that one, I found myself watching it over and over! Love the bit where he says "flash your badge" and shakes his hand, quality!

:)

Remi
10-02-2003, 08:17 AM
SD = South Dakota.....work for a company here called Animation Factory.:) I've got another in the making right now....it'll be done before the end of the week.:)

Hey Gruv....when is the other script we discussed going to be done:D.....:):D