Multiple outputs from HDK node?

   1839   0   0
User Avatar
Member
228 posts
Joined: Dec. 2012
Offline
Has anyone been able to properly output geometry from a second output with an HDK node?

OP_Operator's constructor has a max outputs argument, so I increase that to 2.

I tried the following but just getting an “invalid input” if I try to pipe my node's second output anywhere. I used this function signature because that's what I found in SOP_Node.h (the only mention I can find anywhere of cookMySopOutput). Is this wrong? My assumption is that this is similar to cookMySop() in that I don't call it myself?

Would be great if the HDK docs had at least brief descriptions of what functions do. As usual, the cookMySopOutput is totally blank

GU_DetailHandle
SOP_myNode::cookMySopOutput(OP_Context &context, int outputidx, SOP_Node *interests)
{
GU_Detail* second_input = new GU_Detail();
duplicateSource(1, context, second_input);
/*
* Do some computation
*/
GU_DetailHandle handle;
handle.setGdp(second_input);
return handle;
}
www.kmcnamara.com
  • Quick Links