Eric Mootz

mootzoid

About Me

EXPERTISE
Developer

Connect

LOCATION
Germany

Houdini Skills

Availability

Not Specified

Recent Forum Posts

HDK: a few questions July 29, 2017, 5:58 a.m.

friedasparagus
The code in the docs is fairly clear here if you haven't managed to find it.

Hello Henry,

ha, that is exactly what I was looking for! Beats me how I missed that when going through the HDK doc
I just gave it a quick try and it works like a charm, thank you!

Cheers,
Eric

HDK: a few questions July 29, 2017, 5:14 a.m.

@ndickson : with the help of your code snippets and explanations I got everything working just fine and I am now also checking the validity of the handles before setting any data. Thanks so much for the help!

@symek: marvelous, thank you!

HDK: a few questions July 28, 2017, 12:27 p.m.

Hello ndickson,

Thanks for the quick reply and the code snippet!
Here is how I set the "per shared vertex' data (in this case some normals):

// GU_Detail *gdp = ... ;

GA_RWHandleV3 rwh(gdp->addFloatTuple(GA_ATTRIB_POINT, "N", 3));
rwh->setTypeInfo(GA_TYPE_NORMAL);
for (LONG i = 0; i<numPoints; i++)
  rwh.set(i, some3DVector);

A while back, when attempting to set unique vertex data, I tried pretty much the same (as my above code), however I didn't use getPrimitiveVertexList which explains the problems I was seeing.
I will give it a try using your approach and will post here how it went!

Cheers,
Eric