[Sidefx-houdini-list] get attribute from second input

Gregory Ecker gregory.ecker at gmail.com
Fri Sep 1 01:50:15 EDT 2017


 When you access attributes like this (i.e. With the 'op' syntax),  the assumption is that the ptnums match between the inputs.  So if you are accessing '@opinput1_Cd',  you are accessing the Cd attribute for the point which matches the ptnum of the point currently being processed (when in points mode).  In fact it doesn't make sense to access the 'ptnum' attribute at all,  as you know what it will be ( always 0 through numpoints-1).  Another way to think about it is that the wrangle is iterating over all the points,  and if you access an attribute from another input,  you are processing the same point number in that input.  If you want to access a different point number from the second input ,  you can use the 'point' function.

 -G

> On Sep 1, 2017, at 1:21 AM, Gary Jaeger <gary at corestudio.com> wrote:
> 
> Hi. I’m struggling with the syntax of getting an attribute from the second input of an attribwrangle. Say I have declared this 
> 
> f at ptn = @ptnum;
> 
> in my snippet and it’s working fine. But now I want ptnum from input 1. I’ve read the docs but I’m not getting it. My pea brain says it should just be 
> 
> f at ptn = @ptnum(@opinput1) or @(1)ptnum but obviously those don't work. Help!
> 
> Gary Jaeger / 650.728.7957 direct / 415.518.1419 mobile
> http://corestudio.com <http://corestudio.com/>
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list



More information about the Sidefx-houdini-list mailing list