How do I invert an operator selection?

n_rehberg
Enthusiast
Enthusiast

How do I invert an operator selection?

n_rehberg
Enthusiast
Enthusiast

Hi,

I've got a standin that contains lots of procedurals all pointing to the same ass file. (i.e. vegation files where one standin is scattered around a lot)

 

When I set the visibility of one item per operator it works fine.

ksnip_20220705-171629.jpg

But for layering purposes I would also need to invert a selection. But no matter what I try this always leads to all items to be hidden.

ksnip_20220705-171717.jpg

I tried to use "not /aiStandIn1/aiStandIn1Shape", "* and not /aiStandIn1/aiStandIn1Shape" or even "*.(name != '/aiStandIn1/aiStandIn1Shape')" and some other ways to get to them,

but no matter how I try to invert a selection it always hides all spheres.

 

What is the correct syntax here? Or is there a problem doing this with procedurals inside the standin?

 

Thanks,

Nico

0 Likes
Reply
Accepted solutions (1)
275 Views
2 Replies
Replies (2)

Stephen.Blair
Community Manager
Community Manager
Accepted solution

With just that "not /aiStandIn1/aiStandIn1Shape"", you're selecting the container standin too. Plus the polymeshes loaded by the other standins.

/aiStandIn5/aiStandIn5Shape is my container standin (it loads five standins)

This worked:

*.(@node=='procedural') and (not /aiStandIn5/aiStandIn5Shape) and not (*/aiStandIn1/*)



With Debug-level verbosity, I can check what selections are "cooked" by the operator:

00:21:00  2241MB         |   [proc] /aiStandIn5/aiStandIn5Shape: loaded 5 nodes (5 objects, 0 shaders)
00:21:00  2241MB         |   [operators] init op: 'aiSetParameter1'
00:21:00  2241MB         |   [operators] cook op: 'aiSetParameter1' | node: '/aiStandIn5/aiStandIn5Shape/aiStandIn3/aiStandIn3Shape'
00:21:00  2241MB         |   [operators] cook op: 'aiSetParameter1' | node: '/aiStandIn5/aiStandIn5Shape/aiStandIn4/aiStandIn4Shape'
00:21:00  2241MB         |   [operators] cook op: 'aiSetParameter1' | node: '/aiStandIn5/aiStandIn5Shape/aiStandIn2/aiStandIn2Shape'
00:21:00  2241MB         |   [operators] cook op: 'aiSetParameter1' | node: '/aiStandIn5/aiStandIn5Shape/aiStandIn/aiStandInShape'
00:21:00  2241MB         |   [operators] cook op: 'aiSetParameter1' | node: '/aiStandIn5/aiStandIn5Shape/aiStandIn1/aiStandIn1Shape'

 

 



// Stephen Blair
// Arnold Renderer Support
0 Likes

n_rehberg
Enthusiast
Enthusiast

Hi Stephen,

thanks for the tips. I think I understand it now. I was hiding the underlying geo in the leaf standins too. The trick was to only include procedurals. This works for me now>

*.(@node=='procedural') and (not /aiStandIn1/aiStandIn1Shape)

Since my operator is connect to the standin I don't think I need to include the top level standin since the help states:

If an operator is being evaluated with regards to a procedural it's connected to the selection expression is assumed to be relative to the procedural's namespace (see operator graphs below).

 

Thanks,

Nico

0 Likes