atrribdataid array length

   1944   4   1
User Avatar
Member
534 posts
Joined: March 2014
Offline
the new attribdataid function returns an integer array of length 4.
while the last array element is clear and can be seen also in the node info, i was wondering what the first 3 entries are referring to.
screenshot attached
Edited by fuat - Oct. 16, 2018 10:04:21

Attachments:
adata.jpg (220.1 KB)

Fuat Yüksel
FX Supervisor | RISE Visual Effects Studios
User Avatar
Member
2036 posts
Joined: Sept. 2015
Offline
From the docs:

…The length and contents of the array are not defined, and no assumptions should be made about the layout. The result will vary from run to run of Houdini, so only exact equality should be used….

As for a potential purpose of using this function and why it doesn't matter what the layout/elements represent:

…If the data id of an attribute is the same as you've seen before, you can assume the attribute contains the same data it did before…
.
User Avatar
Member
534 posts
Joined: March 2014
Offline
thanks
Fuat Yüksel
FX Supervisor | RISE Visual Effects Studios
User Avatar
Staff
6179 posts
Joined: July 2005
Offline
It's a 64-bit session id broken into two 32 bit integers. So it will be the same for all data ids you read within a session.

Dive into the Vellum Solver SOP where we recompute the graph colouring to see attribute ids being used.
User Avatar
Member
534 posts
Joined: March 2014
Offline
thanks Jeff for the explanation.
Fuat Yüksel
FX Supervisor | RISE Visual Effects Studios
  • Quick Links