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

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


Yes I've got a break for every cases.

On Tue, Sep 30, 2014 at 3:25 PM, Arthur Graff <arthurgraff at gmail.com> wrote:

> Hi,
> just to be sure, do you have a "break" in every case in your switch ?
> ie :
> switch (primHandle->getPrimitiveType())
> {
>     case A:
>     break;
>
>     case B:
>     break;
>
>     default:
>     break;
>  }
>
> Arthur
>
> 2014-09-30 21:12 GMT+02:00 Guillaume Laforge <
> guillaume.laforge.3d at gmail.com
> >:
>
> > 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 ?
> >
> > Thanks
> > _______________________________________________
> > Sidefx-houdini-list mailing list
> > Sidefx-houdini-list at sidefx.com
> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> >
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>



More information about the Sidefx-houdini-list mailing list