It's a little less elegant but you'd just have to loop over them looking for 
the class: 

allNodes = nuke.allNodes(recurseGroups=True) 
for n in allNodes: 
if n.Class() == "Read": 
n['selected'].setValue(True) 

Hope that helps! 
jake 

----- Original Message -----

| From: "Michael Hodges" <[email protected]>
| To: "Nuke user discussion" <[email protected]>
| Sent: Friday, February 10, 2017 2:06:10 PM
| Subject: Re: [Nuke-users] Selecting all nodes in a class

| Thanks Jake. I’m on 10.5v1 and it doesn’t appear to be working within
| the Groups.

| Still a bug? Can anyone else confirm?

| If so what would be the best way around this?

| Thanks!

| Michael

| | On Feb 10, 2017, at 12:45 PM, Jake Richards <
| | [email protected] > wrote:
| 

| | [n['selected'].setValue(True) for n in
| | nuke.allNodes(recurseGroups=True,filter="Read")]
| 

| | Although, there is a bug in at least nuke 10v1 where recurseGroups
| | and filter don't work together (not sure if that's fixed in newer
| | version though) but that code should select everything even in
| | groups. Just change the Read to your class name.
| 
| | Good luck!
| 

| | ----- Original Message -----
| 

| | | From: "Michael Hodges" < [email protected] >
| | 
| 
| | | To: "Nuke user discussion" < [email protected]
| | | >
| | 
| 
| | | Sent: Friday, February 10, 2017 12:32:33 PM
| | 
| 
| | | Subject: [Nuke-users] Selecting all nodes in a class
| | 
| 

| | | Is there a way to select all nodes in a class regardless of
| | | whether
| | | they are in a group or not?
| | 
| 

| | | All the examples I see are either for selecting in root or within
| | | a
| | | specific group.
| | 
| 

| | | I’d like to have a custom node (or class of nodes) that I can
| | | universally select/execute on within any script they reside in
| | | regardless of whether they are nested in groups or not.
| | 
| 

| | | Thanks!_______________________________________________
| | 
| 
| | | Nuke-users mailing list
| | 
| 
| | | [email protected] ,
| | | 
https://urldefense.proofpoint.com/v2/url?u=http-3A__forums.thefoundry.co.uk_&d=DwIFaQ&c=hHkK43hKb5uKUGaYMJ-p252cFdfVBHtyegDvswk59fU&r=hdh6ldFziktt1N0wAi7bK3Mjov-6LjULd6ZgRd44U6s&m=pakHvxjLBBtglNUEj5x-eeIRf99lI44TSxTuZN8HIbM&s=7JY2D1ajIgVT37VJV5NIs-qfuxUOBWbqAaiDb2G-FlI&e=
| | 
| 
| | | 
https://urldefense.proofpoint.com/v2/url?u=http-3A__support.thefoundry.co.uk_cgi-2Dbin_mailman_listinfo_nuke-2Dusers&d=DwIFaQ&c=hHkK43hKb5uKUGaYMJ-p252cFdfVBHtyegDvswk59fU&r=hdh6ldFziktt1N0wAi7bK3Mjov-6LjULd6ZgRd44U6s&m=pakHvxjLBBtglNUEj5x-eeIRf99lI44TSxTuZN8HIbM&s=VWK2cdsmFLBCdGTUfFupt-j4bQXQVnm4esldmPw2_nw&e=
| | 
| 

| | _______________________________________________
| 
| | Nuke-users mailing list
| 
| | [email protected] ,
| | http://forums.thefoundry.co.uk/
| 
| | http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
| 
| _______________________________________________
| Nuke-users mailing list
| [email protected],
| 
https://urldefense.proofpoint.com/v2/url?u=http-3A__forums.thefoundry.co.uk_&d=DwICAg&c=hHkK43hKb5uKUGaYMJ-p252cFdfVBHtyegDvswk59fU&r=hdh6ldFziktt1N0wAi7bK3Mjov-6LjULd6ZgRd44U6s&m=tJYm3FTg_ghp-wt83IjiNtN9ejt4EmLZu-6GGJjfxmo&s=iBt5adUTzVUzdHw0m2nOQUFANFTJU_ZYEDMC4fA5D0Q&e=
| 
https://urldefense.proofpoint.com/v2/url?u=http-3A__support.thefoundry.co.uk_cgi-2Dbin_mailman_listinfo_nuke-2Dusers&d=DwICAg&c=hHkK43hKb5uKUGaYMJ-p252cFdfVBHtyegDvswk59fU&r=hdh6ldFziktt1N0wAi7bK3Mjov-6LjULd6ZgRd44U6s&m=tJYm3FTg_ghp-wt83IjiNtN9ejt4EmLZu-6GGJjfxmo&s=pu-u7kHHo1Cb1nA08RlSXVZ8WEl6MhCfu5YmD20uGZ0&e=
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to