'pickSubObject()' function?

'pickSubObject()' function?

Anonymous
Not applicable
398 Views
4 Replies
Message 1 of 5

'pickSubObject()' function?

Anonymous
Not applicable
Hi all.

I want to build a modeling tool that quickly acts on pairs of edges by clicking on one edge, then dragging to another, the same way Target Weld works. The pickObject() method describes exactly what I need (filter funtion, number of hits, dashline is a bonus, current selection is unchanged) but I can't malke it work on sub-objects.

So, my problem is:

- Is there a function equivalent to pickObject() that works on sub-object?

OR

- Is there a way to set the filter function so that pickObject() works on sub-object?
0 Likes
399 Views
4 Replies
Replies (4)
Message 2 of 5

paulneale
Advisor
Advisor
I don't believe there is a direct way that you can do this on the sub object level. I think that you
would have to have a timmer running or some sort of call back to get the selected edges and do all
the viewport drawing your self.

Caprier wrote:
> Hi all.
>
> I want to build a modeling tool that quickly acts on pairs of edges by clicking on one edge, then dragging to another, the same way Target Weld works. The pickObject() method describes exactly what I need (filter funtion, number of hits, dashline is a bonus, current selection is unchanged) but I can't malke it work on sub-objects.
>
> So, my problem is:
>
> - Is there a function equivalent to pickObject() that works on sub-object?
>
> OR
>
> - Is there a way to set the filter function so that pickObject() works on sub-object?
> --
> max 9
> Photoshop CS3
> Windows XP
> tin box + plug
> Wacom Intuos3
Paul Neale

http://paulneale.com


Paul Neale




EESignature

0 Likes
Message 3 of 5

Anonymous
Not applicable
Thank you for answering, Paul. I was afraid of something like that.

By 'timer running', do you mean something with intersectRay() that would check what's under the cursor periodically?
0 Likes
Message 4 of 5

paulneale
Advisor
Advisor
Or just collects the selection of verts and compares it to the last selection, this way you will
know which has been selected first.

Caprier wrote:
> Thank you for answering, Paul. I was afraid of something like that.
>
> By 'timer running', do you mean something with intersectRay() that would check what's under the cursor periodically?
> --
> max 9
> Photoshop CS3
> Windows XP
> tin box + plug
> Wacom Intuos3
Paul Neale

http://paulneale.com


Paul Neale




EESignature

0 Likes
Message 5 of 5

Anonymous
Not applicable
I don't understand this last bit, Paul.

I'd like to identify (not select) two edges by clicking on one and dragging onto another, exactly the same way that Target Weld does it.
The fist one can be any edge of the mesh, the second has to make a angle with it (share a vertex and a poly). Think of how Target Weld works on vertices: the first can be any vertex but the second is filtered. I'd like to do the same but with edges.
But right now it's the first part - the picking - I can't figure.

Maybe I'm talking nonsense but is there a way to define edge sub-objects as a custom class and then use pickObject()?
0 Likes