Author : DanRobson


Reply
Reply
 
Thread Tools Display Modes
miauu's Avatar
Old (#1)

http://www.scriptspot.com/3ds-max/sc...elected-vertex

Offline , triangle, 276 Posts, Join Date Mar 2010, Location Bulgaria Send a message via Skype™ to miauu  
   Reply With Quote

r_fletch_r's Avatar
Old (#2)
what method did you use to store selected vertex order? I did this same thing with a callback and an array of selected verts. I've found however it can get slow on large meshes
Offline , veteran polycounter, 2,970 Posts, Join Date Feb 2010, Location Ireland  
   Reply With Quote

miauu's Avatar
Old (#3)
Whose method is faster-your or mine?
Offline , triangle, 276 Posts, Join Date Mar 2010, Location Bulgaria Send a message via Skype™ to miauu  
   Reply With Quote

r_fletch_r's Avatar
Old (#4)
I have no idea. I was asking what you had done to get max to store selection order. I was interested if you'd taken the callback and array approach.

Id check myself but the files are encrypted.

Last edited by r_fletch_r; 02-19-2011 at 06:54 AM..
Offline , veteran polycounter, 2,970 Posts, Join Date Feb 2010, Location Ireland  
   Reply With Quote

miauu's Avatar
Old (#5)
I don't use callback. I use only arrays of selected vertices and a... some kind of hack to get the last selected vertex.

Sorry for my english.
Offline , triangle, 276 Posts, Join Date Mar 2010, Location Bulgaria Send a message via Skype™ to miauu  
   Reply With Quote

r_fletch_r's Avatar
Old (#6)
Your English is geat . Care to share the concept of how this hack works?
Offline , veteran polycounter, 2,970 Posts, Join Date Feb 2010, Location Ireland  
   Reply With Quote

Bryan Cavett's Avatar
Old (#7)
I am interested in how you stored the selection order aswell. I've tried to do this in the past and could not get it working. The callback method always seemed unstable and hacky.

Edit: Just noticed that it doesn't always get the order correct. I was trying it on a simple box and selecting verts 1 through 4 in random order in paint selection mode. It doesn't seem to like it when you are holding down the mouse button to select all the verts but if you hold, select, and release then hold and select the next vert it gets it right. Are you doing anything with the mouse down and up queries?

Last edited by Bryan Cavett; 02-19-2011 at 09:01 AM..
Offline , triangle, 346 Posts, Join Date Oct 2004,  
   Reply With Quote

SyncViewS's Avatar
Old (#8)
Hi guys,
I wrote a similar script some time ago for a friend. I remember I used NodeEventCallbacks. You can get it here and have a look at the code. Enjoy.
IllusionCatalyst Instrument set for 3ds Max │ AliquaForma Personal portfolio in fieri
Offline , polygon, 595 Posts, Join Date Dec 2008, Location Leamington Spa, UK  
   Reply With Quote

r_fletch_r's Avatar
Old (#9)
Bryan: I've sent you my script that does it in a pm. check out :rt_selection_buffer_update
Sync: thats what I used. A hack sounds interesting though
Offline , veteran polycounter, 2,970 Posts, Join Date Feb 2010, Location Ireland  
   Reply With Quote

miauu's Avatar
Old (#10)
Hi, guys!
As I said before I don't use callback. I'm new to maxscript and... Sync, your code is too complicated to me.

Here the steps that I use to get the last selected vertex:
1. selecet some vertices - 10 for example
2. start script
what script do:
2.1. store vertex selection in array
2.2. max undo
2.3 store vertex selection in a new array
2.4. find the last selected vertex - the one that is in the first array, but not in the second
2.5. max redo

Now I have the last selected vertex and can weld all selected vertices to it. I know this is not verry elegant and may be my method is wrog, but in Editable mesh object with 690 000+faces(346000+vertices) it takes less than 3 seconds to weld 10 vertices.

Bryan, you can use paint selection, but the last vertex must be selected with single mouse click.


Sorry for my english
Offline , triangle, 276 Posts, Join Date Mar 2010, Location Bulgaria Send a message via Skype™ to miauu  
   Reply With Quote

Bryan Cavett's Avatar
Old (#11)
Thanks miauu that all makes sense... clever way to do it.
Offline , triangle, 346 Posts, Join Date Oct 2004,  
   Reply With Quote

r_fletch_r's Avatar
Old (#12)
Thanks maiuu, I hadnt even given doing it that way a thought.
Offline , veteran polycounter, 2,970 Posts, Join Date Feb 2010, Location Ireland  
   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

Copyright 1998-2014 Polycount