[Sidefx-houdini-list] About custom geometry render node

Guillaume Laforge guillaume.laforge.3d at gmail.com
Tue Sep 30 15:12:58 EDT 2014

Finally back to my problem :).

Trying to use the chunk of code I spotted yesterday in the Alembic project,
it does not want to work for the moment.

Here is a simplified version of the renderFrame code for my ROP:

ROP_RENDER_CODE ROP_Foo::renderFrame(fpreal time, UT_Interrupt *){
	SOP_Node        *sop;
	UT_String        soppath;

	SOPPATH(soppath, time);
	sop = getSOPNode(soppath, 1);
	OP_Context      context(time);
	GU_DetailHandle gdh;
	gdh = sop->getCookedGeoHandle(context);

	GU_DetailHandleAutoReadLock  gdl(gdh);
	const GU_Detail *gdp = gdl.getGdp();

	const GA_Range prim_range = gdp->getPrimitiveRange();
	GT_PrimitiveHandle	primHandle = GT_GEODetail::makeDetail(gdp, &prim_range);

	switch (primHandle->getPrimitiveType())
		// always jump to the default type :(

I tried to render different types of primitives but it is always picking
the default prim type in the switch...

Any idea on the thing I'm missing ?


More information about the Sidefx-houdini-list mailing list