Jump to content

How to use if expressions in an object pattern field?


AiyaPK

Recommended Posts

Hi!
Suppose I'm pulling in an alembic file that holds an assortment of primitives of varying LODs.
I'd like to write an expression in the "objectPattern" field of the Selection tab in the Alembic file sop, such that it filters for the highest LOD available.
So if it finds *geo_hi* in the path, it should just select for that, otherwise, fallback to *geo_mid*, then *geo_lo*.
I tried to do a simple test with an expression but didn't work as expected...
I wrote
if(*geo_abcde*, *geo_hi*, *geo_lo*)
geo_abcde doesn't exist (since at the moment my test file has all 3 LODs), so I would've expected to default to geo_lo...  but instead, it just filters for geo_hi
Did I write something wrong? or do if statements not work like this?

Also, I would've thought I could do something like:
if(*geo_hi*,*geo_hi*,( if(*geo_mid*,*geo_mid*,*geo_lo*))
as a rudimentary fallback expression, which also doesn't work, given the above simpler case already doesn't work.
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...