TOP node parameter reference SOP

   2181   6   1
User Avatar
Member
20 posts
Joined: Nov. 2018
Offline
I'm trying to access SOP data from TOP network. Hscript Parameter expression brings the value to AttribCreate TOP parameter, but work item value is zero(see attachment)
Houdini 18.5.351
Edited by nuclear_polygon - Dec. 7, 2020 22:55:45

Attachments:
image_2020-12-08_06-50-41.png (51.9 KB)
assets_tests_002.hiplc (1.4 MB)

User Avatar
Staff
585 posts
Joined: May 2014
Offline
The only way to safely access SOP data from TOPs is to use a geometry import TOP node. You can use it to import points, prims or geometry, and select which attributes to copy onto work items.
User Avatar
Member
20 posts
Joined: Nov. 2018
Offline
Hmm… yep, it imports attributes. but how can I access them values?

Attachments:
image_2020-12-08_09-01-37.png (100.7 KB)

User Avatar
Member
20 posts
Joined: Nov. 2018
Offline
or even not the attribs itself but only the list of their names?
Edited by nuclear_polygon - Dec. 8, 2020 01:04:16
User Avatar
Staff
585 posts
Joined: May 2014
Offline
In your screenshot, you've configured the node to create a work item for the “specified group”. That means you get one work item for that group – it will list the attributes from elements in the group and the size, but it does not import the individual elements. If you want to import the attributes you'll need to either import “each element in the specified” group“ or ”each element".
User Avatar
Staff
585 posts
Joined: May 2014
Offline
In order to use the attributes downsteam, you can access them in expressions using the work item @attribute accessor or of the pdgattrib(..) function. If you want to get all of the values of an array attribute, you can use pdgattribvals(“primitiveattribs”) in an HScript expression on a downstream node. Both the @ operator and pdg* functions are evaluated for each input work item.
User Avatar
Member
20 posts
Joined: Nov. 2018
Offline
Thanx a lot! This is very helpful reply. This thing is kind of hard to get clear without some guidance
  • Quick Links