Jump to content

HDK setting attributes from a SIM node?


stkeg

Recommended Posts

i want to set some point attributes on some geometry.

http://www.sidefx.co...accessAttribute

i was following this example:


GA_RWAttributeRef h = gdp->findFloatTuple(GA_ATTRIB_POINT, "testattr", 3);
const GA_AIFTuple *tuple = h.getAIFTuple();
if (tuple)
{
UT_Vector3 N;
for (GA_Iterator it(gdp->getPointRange()); !it.atEnd(); it.advance())
{
GA_Offset offset = it.getOffset();
tuple->get(h.getAttribute(); offset, N.data(), 3);
N.normalize();
tuple->set(h.getAttribute(), offset, N.data(), 3);
}
}
[/CODE]

it's able to get the values of the point attribute, the problem is that it doesn't seem to update the values in the gui.

when i get the values from within the hdk, it seems like the values have been written, but the details view in the gui shows that the values have not changed.

i noticed that i cannot go into the details view and manually change values. when i do, the createAttribute node that i used to create my example attribute (testattr) the red lock toggle is turned on for that node. maybe this has something to do with the fact that i can't change values from within the hdk?

Edited by stkeg
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...