[Closed] How to… pick sub-objects?
I want to pick two edges of an Editable Poly without changing the current selection, the same way Target Weld works.
pickObject() would be perfect except that I don’t know if it can pick edges. Or is there an equivalent function for sub-objects?
So, if I wanted to rewrite Target Weld (with a different filtering and doing something else than weld), how would I do it?
Thanks for any pointer.
You could always store the current selection in an array, do your function then select the stuff in the original array again. May not work if you are changing vert counts in your function though.
Thanks for the suggestion, floopyb, but this is for a modeling tool, so it needs to be fast.
With a complex model and half its edges selected, saving and retrieving the edge selection will surely slow down the process.
Also I’d like it to be a one click-and-drag operation, which I cannot figure with a standard selection.
Other ideas, anyone?
I’ve tried a lot of things but i’m getting nowhere. Though what I’m trying to do seems rather simple.
Moving the mouse over a selected Editable Poly, if it passes over an edge, the cursor changes to a cross and if I click on this edge it’s index is returned (but the edge is not selected). If I release the mouse, nothing happens. But if I hold and drag, when the cursor is over a second edge that makes an angle with the first (they share a vertex and a poly) then it changes to a cross again and if I release the mouse there, the script gets the index of that second edge.
Then I can do what it is I want to do with these two edges.
Can someone help me with this, please? I’m completely stuck.
I’m doing something similar for a loop selection tool.
The script knows the last selection set at all times and monitors whether a single element was added.
As soon as this happens, variable1 stores this new face.
As soon as another single element is selected, variable2 stores it and the action is performed.
Afterwards the 2 variables are reset and ready for the next operation.
Maybe that helps.
Thanks, harefort. Your method is what I had in mind, but only as a plan B.
The only post I could find about the same question is more than 3 years old and didn’t get any answer.
Now that’s encouraging