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
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?
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.
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.
Replies
Id check myself but the files are encrypted.
Sorry for my english.
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?
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.
Sync: thats what I used. A hack sounds interesting though
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