vfx-ger Posted August 16, 2007 Share Posted August 16, 2007 Okay so I have a point attribute HAIR_LEN_TEX[3] and I want to delete a point that has $HAIR_LEN_TEX[0]=0 but how do I access the first index/component of the attribute i.e. the [0] part in the Delete SOP? For attributes that are of lenght one I can do it fine like $HAIR_LEN=0 in the number filter expression. Thanks. Quote Link to comment Share on other sites More sharing options...
TheUsualAlex Posted August 16, 2007 Share Posted August 16, 2007 point("../some_sop", $PT, "HAIR_LEN_TEX", 0) == 0 Quote Link to comment Share on other sites More sharing options...
vfx-ger Posted August 17, 2007 Author Share Posted August 17, 2007 point("../some_sop", $PT, "HAIR_LEN_TEX", 0) == 0 Yeah I was thinking about doing it this way but you have to have some "../some_sop" and if you rename that sop then it breaks but I just noticed Houdini automatically adjusts point() if that happens so I'm a dumbass. Thanks. Quote Link to comment Share on other sites More sharing options...
grasshopper Posted August 17, 2007 Share Posted August 17, 2007 Yeah I was thinking about doing it this way but you have to have some "../some_sop" and if you rename that sop then it breaks but I just noticed Houdini automatically adjusts point() if that happens so I'm a dumbass.Thanks. A really great tip is to get in to the habit of using the following syntax to grab the attribute from the SOP feeding into the current one. Then you can rewire, insert another SOP above it, rename, etc and it all still works. I use this syntax all the time. point("../"+opinput(".",0), $PT, "HAIR_LEN_TEX", 0) == 0 where opinput(".",0) means get the name of the SOP that is the first input (i.e. input number 0) into the current SOP (which can be referred to in shorthand as "."). This tip is in the new Houdini on the Spot book I believe. john Quote Link to comment Share on other sites More sharing options...
edward Posted August 17, 2007 Share Posted August 17, 2007 I would actually go all the way and use opinputpath() instead of doing the "../" + opinput() Quote Link to comment Share on other sites More sharing options...
vfx-ger Posted August 18, 2007 Author Share Posted August 18, 2007 Good tip, thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.