get ptnum from an id in a pop
9271 4 1- scottp
- Member
- 26 posts
- Joined: Nov. 2008
- Offline
Does anyone know how to get a point number of a point if I have an id (in a pop network)? I'd like to write my own follow vop pop, and I'd like to use “import_attribute” using an id rather than ptnum. poppointid is very similar to what I want, except that's an expression, and I'd rather contain this all in a pop vop.
Scott Peterson, Machine Learning Graphics Engineer, Unity
- mrice
- Member
- 89 posts
- Joined: April 2008
- Offline
- scottp
- Member
- 26 posts
- Joined: Nov. 2008
- Offline
Sorry, that's not what I'm looking for.
I want the ptnum for a different particle than the one that I'm processing. I would like to look up the position and velocity of a parent particle. I can do this by adding attributes and using the expression poppointid(“P”, $PARENT, 0), but I'd like to do this all within a pop vop if possible, and without adding the extra attributes.
I want the ptnum for a different particle than the one that I'm processing. I would like to look up the position and velocity of a parent particle. I can do this by adding attributes and using the expression poppointid(“P”, $PARENT, 0), but I'd like to do this all within a pop vop if possible, and without adding the extra attributes.
Scott Peterson, Machine Learning Graphics Engineer, Unity
- mrice
- Member
- 89 posts
- Joined: April 2008
- Offline
- jacob clark
- Member
- 665 posts
- Joined: July 2005
- Offline
We developed a slick way of doing this with the Python SOP.
I'm not sure what you're after, but basically, we had to run a for loop over the points, and compare it to the id list.
This can provide good matching, if a bit overhead. Also notice the new Point SOP can match by attributes, instead of just Point Numbers!
Heh, yea… there's not a direct way for this, but hope you can find a sweet work around.
cheers,
-j
I'm not sure what you're after, but basically, we had to run a for loop over the points, and compare it to the id list.
This can provide good matching, if a bit overhead. Also notice the new Point SOP can match by attributes, instead of just Point Numbers!
Heh, yea… there's not a direct way for this, but hope you can find a sweet work around.
cheers,
-j
-
- Quick Links