How to... pick sub-objects?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 02 February 2009   #1
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.
 
Old 02 February 2009   #2
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.
__________________
Jordan Walsh
Senior FX artist

Showreel 2012
Check out my scripts at Script Spot!
 
Old 02 February 2009   #3
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?
 
Old 02 February 2009   #4
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.
 
Old 02 February 2009   #5
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.
 
Old 02 February 2009   #6
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 :/
 
Old 02 February 2009   #7
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 10:57 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.