02 February 2012 | |
![]() |
|
New Member
portfolio
Yan Verde
Montreal,
Canada
|
Select layers by prefix name
Hi,
I'm still new to max script and I'm writing this function to select all nodes in layers that matches a given prefix name. so far I'm able to find the right layers, I just don't know how to select objects in these layer. here's my code :
so my array gives me: objArray: #(nodes(), nodes()), I just what ton know how to select them. Thanks! __________________
http://www.yvgrafix.com |
02 February 2012 | |
![]() |
|
Expert
portfolio
Juan Martinez
Animator
Verse, Inc
Dallas,
USA
|
It's a little weird, but nodes isn't a property of a layer. It's a function that assigns the array of nodes to a variable.
Also, you'll want to use JOIN instead of APPEND since the select command doesn't like arrays inside of arrays.
|
02 February 2012 | |
![]() |
|
New Member
portfolio
Yan Verde
Montreal,
Canada
|
nice explanation, it's working like a charm!
Thanks! __________________
http://www.yvgrafix.com |
10 October 2012 | |
![]() |
|
Veteran
portfolio
Ankur Chaudhary
Technical Artist
Crest Animation Studios Ltd
Mumbai,
India
|
I was searching something like this only.
![]() |
10 October 2012 | |
![]() |
|
New Member
André Schaarschmidt
Germany
|
A shorter version would be:
Last edited by PixelBaker : 10 October 2012 at 02:50 PM. Reason: modified after post from denisT |
10 October 2012 | |
![]() |
|
MAX Doctor
portfolio
Denis Trofimov
CA,
USA
|
if a function selects something by a condition it has to clear selection if nothing meets the criteria.
other way the selecting of empty list will keep the current selection, which is not correct. |
10 October 2012 | |
![]() |
|
Expert
portfolio
Juan Martinez
Animator
Verse, Inc
Dallas,
USA
|
Even shorter. With no arrays.
![]()
|
10 October 2012 | |
![]() |
|
MAX Doctor
portfolio
Denis Trofimov
CA,
USA
|
Originally Posted by martinez:
Even shorter. With no arrays.
![]()
more selection changed callbacks than by selecting all nodes at once ![]() |
10 October 2012 | |
![]() |
|
Swami Lama's Lovechild
portfolio
Pete Addington
Technical Director
Nexus
United Kingdom
|
In my talk at EUE the year before last I detailed a layer control script that we used in production for many years. There are a lot of methods included that you could use for writing something similar.
|
10 October 2012 | |
![]() |
|
Expert
|
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 |
«
Previous Thread
|
Next Thread
»
|
|
|