PDA

View Full Version : MAX Script Requested - a Better Weld Target


ixion2027
11-26-2002, 10:08 PM
Hello to everyone !!!!!


So , before all , scuse me to tire you with my problems ... but ... how to say ??? I searched during hours on web to find a script that would do what I want , but I wasn't able to . I'm really new in 3DS , but quite good skilled in Lightwave . And there is a tool that I use all the time in Lightwave , that doesn't exists in 3DS ( or , not exactly in the way I'd like to ... ) .

So , as exemple : I select 5 vertices on an object ( the order doesn't matter , just the lastest vertex is important ) , I press the "Magic touch" ( Ctrl+W in the Lightwave ) , and Zak !!! all vertices move themselves AND are welded onto the last selected vertex . NOT at the accurate of vertices coordinates ( if so , it would be a Collapse ) . And the Weld>Target 3DS's tool makes me waste to much time ( I use it a lot yeah .... ;) ). So , if anyone could write me a tiny script that'd do so , I would be eternally gratfull to him ( or her ... ) !!!!!!!!!!

And , as I said above , I'm really nex in 3DS , so if there are unusual steps , if it isn't asked for too much , please , gimme a small step to step log :D !!!!

With all my forward thanks to all , even people that won't read my post , but people who make the web the most incredible ressources place for CGI !!!!! THX !! :thumbsup:

ilasolomon
11-26-2002, 11:18 PM
what's your max version?
why did you switch to max? ;)

AJ
11-26-2002, 11:21 PM
You could select all BUT the last vert - hit collapse, giving you one vert for all of them - then target weld to the last one...


Not really the same as the lw way I know - but quicker than target welding them all!


:shrug:

ixion2027
11-27-2002, 11:25 AM
:D:D Thanks you so much people !!! A so quick consulting and help is cool !!!!

But , I know how to do what I want ( just a simple Weld>Target is enough ) BUT , what I really need is a way to do that in ONLY one step , without even going trough the MAX interface. I need on hotkey . An hotkey that would move the vertices , and weld them , all of that in once ...

so , pleaaaaaasssse somebody gimme that !!!!

For knowledge , I begin to work on 3DS Max 5 now , because Lightwave is poorly used in France , mainly in video-games development ... so I need to be good in a software that is used always and everywhere... so 3DS ....

with again all my forward thanks :D

LFShade
11-27-2002, 11:31 PM
I looked into this some last night. The trouble with scripting it is that I can find no way of getting the order of selection of vertices, to figure out which was the last selected (and the one to which the others should be repositioned and welded). The selected vertices are always returned in index order rather than the selection order.

Were it not for this limitation, it would be trivial to do what you suggest through MAXScript.

stillvapour
11-28-2002, 03:34 AM
welcome to 3ds:applause:
I don't find a way to do it either.
But you can assign hot keys to collapse or any functions you use frequently,and do what AJ_23 said.2 steps wouldn't be so troublesome i think...
Customizing hot keys and quads is important when modeling in max,that way you can work on expert mode and completely ignoring the interface.

ixion2027
11-28-2002, 08:01 PM
Dear everyone !!!!

thanks for trying to gimme your help !!! :bounce: It's really cool !!

TO LFShade sir :

really big big thanks !!! So cool from you to spend so much time trying to solve my prob !!! THX !!!!

So bad you can't find a way to do the trick !!! It would have been marvellous , to me !!! But , if you can't , stop trying , I can live without the script :) Don't spend too much time ... ;) , even though I'd loved you could find a way :D ...

TO stillvapour sir :

really big thanks too !!! Now I believe that Earth isn't such an ugly place !!! There are sometimes nice people do to things freely , to unknows . This is so it gave its true valor to gift !!!

The fact is that I can do it in severall steps (leaving current tool , go to the right panel , click on the right fonction , selecting , moving , and leaving the weld>Target tool , and pick up back the former one ) , but just by selecting , and pressing a key , it would be so much confortable !!!

Again , really deep thanks for trying people !!!!

See you soon !!!!:thumbsup: :thumbsup:

megaflaizer
12-01-2002, 05:35 AM
ok, noobs!! time for some knowledge.

ok, this is not EXACTLY the same, but very easy this way.

first, select all the vertices you want to weld except the last one.

then hit target weld.

then drag the vertex selection to the weld target vertex.

all the vertices you selected will become welded to the vertex you dragged to.

it really is that easy...

AJ
12-01-2002, 06:26 AM
Originally posted by megaflaizer
ok, noobs!! time for some knowledge.

ok, this is not EXACTLY the same, but very easy this way.

first, select all the vertices you want to weld except the last one.

then hit target weld.

then drag the vertex selection to the weld target vertex.

all the vertices you selected will become welded to the vertex you dragged to.

it really is that easy...

Wow - we really are noobs...

Thanks for the knowledge...

:p :p :p :p (<--Is that enough?):surprised

ixion2027
12-01-2002, 11:27 AM
Thanks for everything guys !!!

But , this is unbelievable !!!! I WANTED this script , so I posted my request on many forums ... and on all of them , I was said : "Too hard , not doable , just evoluate man , etc ..." but NO people gimme just only one MaxScript line ...

So finally , I asked to my best friend , a programmer student . He knew nothing about MaxScript . NOTHING .

And less 10 hours , HE has been able to write me this tiny script , in just 20 MaxScript lines ...

:beer:

So , really big thanks for all yours replies , but , don't be concerned about it anymore : I HAVE MY SCRIPT , and I'm very very happy .

That is all .

Matt-Clark
12-01-2002, 12:45 PM
Originally posted by megaflaizer
ok, noobs!! time for some knowledge.

ok, this is not EXACTLY the same, but very easy this way.

first, select all the vertices you want to weld except the last one.

then hit target weld.

then drag the vertex selection to the weld target vertex.

all the vertices you selected will become welded to the vertex you dragged to.

it really is that easy...

It's true that you've long been able to do it this way with Editable Meshes, but it doesn't work with Editable Polygons. I would be pretty easy to knock up a script which would collapse the vertex selection then target weld this as the one step process required.

ixion2027
12-01-2002, 03:00 PM
Hello People !!!

So , I repeat ... I want a PERSONNAL tool . Inspired by Lightwave , which that on this very point , seems to me to be a much better and a more practical way to do .

This is my opinion , Ok ?!

And , by the hell , if I want a personnal tool , that is made available to me by MaxScripting language , why I wouldn't have the right to have it ???

This is my VERY personnal way to work OK ??? SO PLEASE STOP PISSING ME UP WITH YOUR "YOU SHOULD DO LIKE THAT , DON'T NEED A SCRIPT ... etc" :annoyed:

I want this goddam ****ing script !!!!!! I know that I would of course work without , but in this way I can earn some time ! So please , leave it up with "work in the 3DS way ..." I personnaly think that the 3DS way , on this very precise point , isn't the best one , so stop telling me not to improve 3DS to make better tools .

Is that very clear for everyone !!!!

I have written on the thread that this is a MaxScript concern !!!! NOT a "How to" !!!!!

SO STOP BORING ME WITH THAT !!!!! I have posted my request on lots of forums , and each time there are buddies saying those kind of stupid things too . So STOP !!! I'm really tired about it !

All right , my bad moment is over now :D ...

So , yeah , Matt , you're right ...

The script works in the very way I wanted it to do ( see my first original post on this thread ) but , as you said , I though too that it was bad the "autowelding" works only in Mesh mode , and nor in Poly ... although a Weld>Target tool is available in Poly mode too ...

So , my friend is working on it ... and I will have the final plug very soon ( yeah , plug , and no macroscript anymore , so I won't even need to assign manually , in the 3DS interface , the hotkey !! :D ) !!!

If anyone is interested in this script , I wil post it on this thread , if anyone ask for ...

So , again all my thanks for those who took , and spent time for try to help ( and annoy a bit too ;) ) me , and I say you : See you Soon People !!! :D

LFShade
12-01-2002, 06:39 PM
I'm very interested in seeing this script you've referred to. Does it collapse all the verts to the position of the last one selected, as you had wanted? I'm no novice with MAXScript, and I have been entirely unable to come up with a way to get at sub-object selection order, in order to determine which is the last selected. Please allow me to examine the script your friend has written; I'd like to see what I can learn from it.

ixion2027
12-01-2002, 07:12 PM
Hi LFShade !!

Hur ... Are you sure you have learn reading outside France ??? :)
I was asking a script , and so much people explained to me a "How to" , and now you !!!! :)
I wrote it very precisly !!!! "The script works in the very way I wanted it to do ( see my first original post on this thread )" .

But as you , my friend wasn't able , during a time , to determinate how to say Max which vertex was selected in last .

I suggest him ( with words , I know nothing about coding ... ) to go a step back in history ... with the UNDO function :beer: !!!

Always a solution !!! And the smart one is to be clever :D !!!!

So , here's the script ... but at the moment , it only works in Editable Mesh . Tomorrow , it will work in Poly too my friend says ... ;)

As I already said , he never wrote MaxScript before ... so there may be a better way to do ... But personnaly , I don't know how to , 'cause I don't understand any of the lines ... ;)

Say , if you want I post the final script tomorrow ...

Bye !!!

(script starts just after )

arr=#()
oldarr=#()
wp=0
j=$.selectedverts.count
for i=1 to j do
(
append arr $.selectedverts[i].index
)
max undo

j=$.selectedverts.count
for i=1 to j do
(
append oldarr $.selectedverts[i].index
)
---------------------------------------------------------
function findwp a b =
(
p=0
for i=1 to a.count do
(
p=finditem b a[i]
if p==0 then wp=i

)
)
------------------------------------------------------
findwp arr oldarr
max redo
Wpoint=$.selectedverts[wp].pos
meshop.weldVertSet $ arr weldpoint:Wpoint

update($)

ilasolomon
12-01-2002, 10:07 PM
I was asking a script , and so much people explained to me a "How to" , and now you !!!!
for god sake what's going on with you? where & when poor LFShade told you how to do that stupid "ONE-CLICK for DOING ALL STUFF"?!??! :annoyed: :annoyed: he just wanted to see your script. ok? show respect to your friends here & STOP attacking, dude! :shame:
Best
ILA

ixion2027
12-01-2002, 11:00 PM
hello guys !! :D

So ila_salomon , what's going on with me ??? Like I said , I did a lot of posts , that have taken lot of time to me ... and , after having always "stupid" answers ... I become a bit annoyed ...

When I say a "stupid" answer , and I have written it before , I mean that I simply asked for a simple script , and here there are nice guys , it's true , because people have taken a bit of their life time to answer me , I realize , don't worry , so , nice guys who did nice but "stupid" ( = out of concern ) answers ... "Do that ..." It's nice , but , as I wrote in my original post , I know how to do a Weld>Target , and if I ask a script , this is because the "base way" doesn't suit to me . If I ask a script , it's because that I want a script . Not hard to understand !

And , if people explain to me how to do a Weld>Target , although I wrote on my original post that I knew how to do , it make me feel angry ! Because , I wrote it ! Black on white ! And I'm precise ! And , every time , people , nice because they are trying to help me , it's true , but every time people don't read !!! and I'm tired to explain things again and again .

LFShade seems to be a very good guy , I have already said it to him , and I said him , gently , that he was asking something that I have already answered ! Just in the previous post !

And , I don't think that I have attacked him , or anyone else . And if it is the case , I'm sorry , sincertly and deeply . It wasn't the goal . The goal was to explain people that before making answers , because they are nice people , I repeat , they have to READ .

When I said "Now you" , it wasn't about an "How to" concern , it was about his question : "Does it collapse all the verts to the position of the last one selected, as you had wanted?" Just because I wrote few time before "The script works in the very way I wanted it to do ( see my first original post on this thread )" . That is all !!!

And I don't think that my words were aggresive ! I even suggest to give him the final script when it will be written !!!

Do you think THIS is aggressive ???

I tell him , with humor ( I evidently know that people read outside France !!!!!! Of course it was a joke , it couldn't have been anything else !!! ), that he was getting wrong him too ( that's why I told him "Now you" ) , because he was asking something that he wouldn't have to , 'cause he already had the answer ! That is all !

And again , I don't think that my answer was aggresive .

And , you are talking to me about respect ... Personnaly , I always , in every ones of my post , thank the people for giving to me their help , I always say hello , and always say bye .. so please ... I would like you explain to me where or/and when I was wrong ... please , I would like to know ...

READ again all my posts , and then , we will talk about it again , if you want , around a coffee cup ;) ...

Have a great day everyone !!! :D

I hope tomorrow will be a bright and shiny day for every one .

See ya !

ilasolomon
12-01-2002, 11:14 PM
:) I see you are still a littttttle angry! that's OK, I just wanted to tell you that don't be panic if people don't answer your question in a right way or something like that, it's not so important, is it? ignore, just ignore then you will be in PEACE!
with best wishes for you my Fresh French Friend.
Ila

megaflaizer
12-01-2002, 11:17 PM
waaah.

y not just make you models in precious lightwave and export when ur done.

bwahahaha, ur still all caught up in the toolset.

ilasolomon
12-01-2002, 11:25 PM
y not just make you models in precious lightwave and export when ur done.
u gonna play w/ sleepin' TIGER's tail?!! LOL! :D

ixion2027
12-01-2002, 11:33 PM
Hi ( again :D )

I don't panic , or anything in this kind of way ... I just want to explain people that sometimes , even when you want to do a nice thing , it doesn't work in that way ...

Of course it isn't very important , but every time I do a request on a forum , I always have so much "stupid" ;) answers , that today , on my tiny scale , I try to make people a bit more attentive , that is all !

To be in peace , I follow this : I say what I think , and I do what I say .

I'm not really angry , it's just ... how to say ??? ... I'm still so incredibly surprised that people do so much out of concern answers ...

By the way , they don't seem to be stupid ones ... ????

Just here !!!!! See the last post of megaflaizer .... ( about it : HELLO megaflaizer !!! :D ) . He is asking why I work on 3DS ( because he has of course noticed that I am a big Lightwave user ) .

Remember ? I wrote in my second post on this thread " For knowledge , I begin to work on 3DS Max 5 now , because Lightwave is poorly used in France , mainly in video-games development ... so I need to be good in a software that is used always and everywhere... so 3DS .... "

And still "stupid" question ....

yeah , finally , I'm gonna do as you says ... "Saying nothing" , but this isn't a way that I like ...

Here you have your answer megaflaizer ... pffff .
For a bit , I would even not want to wish you a good day ... and I'm really not a bad mooded guy ... but when I see that ...

If he did just for , OK it's fun , but I'm not really sure ...

So ... pffff ... have a good day everyone ... I gonna sleep ... :p

LFShade
12-01-2002, 11:58 PM
Let's get something clear, here. I wasn't asking if the script worked as intended because of any failure on my part to read or attempt to understand any of your previous posts. I only wanted to confirm, absolutely, one functional detail of the script's operation. It's something that I did not fully understand from your earlier postings.

I know that you probably don't mean to appear so abrasive or angry, but please be careful about accusing the good citizens of this community of any measure of stupidity. If someone asks you a question that you feel you've already answered, please consider that it might be because they have not completely understood what you have written. Consider, as well, the language barrier that we are all crossing when we post to this international forum. Have patience with people. It's one of the hallmarks of collaboration, which is at least part of what CgTalk is all about.

Thank you for posting the script. As far as I am concerned this matter is closed, with no hard feelings.

Cheers!

CGTalk Moderation
01-13-2006, 10:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.