PDA

View Full Version : Quick Selecting


Hobbs
03-06-2007, 10:54 PM
Is there a way in code to select all nodes, not just objects, but nodes, with a similar name?

This name would be derived from an edittext box.

so if i entered green_box

it would also select green_box01, green_box02 etc.

I understand you can do this by calling up the selectbyname() command, but i'm looking for something a little more direct.

Thanks.

Moosley
03-06-2007, 11:05 PM
something like:


objSel = for o in objects where matchpattern o.name pattern:("*"+editBox.text+"*") collect o
if (queryBox "Unhide Hidden Objects?") then objSel.isHidden = false
else messageBox "Hidden objects will be selected, but will remain hidden"
select objSel

MerlinEl
03-07-2007, 06:48 AM
select $green_box*

Hobbs
03-07-2007, 02:53 PM
Thanks Moosley. Exactly what i was looking for.:thumbsup:

MerlinEl, thanks for bringing that up, I knew about that call, but i couldn't figure out how to add the edittext.text inside $ *, and still get it work correctly

MerlinEl
03-07-2007, 05:01 PM
execute ("select $"+"my_text"+"*")

CGTalk Moderation
03-07-2007, 05:01 PM
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.