bareja Posted September 29, 2011 Share Posted September 29, 2011 (edited) Hi I have question about CVEX_Context, I am trying to add some inputs to CVEX_Context and it always says it's equal to 0. For example: CVEX_Context cvex; cvex.addInput("Npt", CVEX_TYPE_INTEGER, &npts, 1); /* load cvex code */ CVEX_ValueList &iclist = cvex.getInputList(); std::cout << "inputs: " << iclist.entries() << std::endl; CVEX_ValueList &oclist = cvex.getOutputList(); std::cout << "outputs: "<< oclist.entries() << std::endl; and result will be like this: inputs: 0 outputs: 2 My cvex network is really simple, four parameter nodes, 2 parameter nodes to get and set P and two to get and set Cd. it looks like getOutputList() works correct, but inputlist should be equal to 3 because one input was defined. Can you help me and explain what I am doing wrong ? Cheers! Edited September 29, 2011 by bareja Quote Link to comment Share on other sites More sharing options...
bareja Posted September 29, 2011 Author Share Posted September 29, 2011 (edited) probably I am doing something wrong with code loading, because if I will comment lines responsible for loading, my output is like this: inputs: 3 outputs: 0 and it make sense, 1 - P, 2 - Cd and 3 - Npt. Please help P.S. OK it's working I did mistake with type assignment. I am sorry, Thanks. Edited September 29, 2011 by bareja Quote Link to comment Share on other sites More sharing options...
bareja Posted September 29, 2011 Author Share Posted September 29, 2011 Hey, I have another question about CVEX_Context, If I will add one input: // add input cvex.addInput("P", CVEX_TYPE_VECTOR3, true); // CVEX_Value *P; GEO_AttributeHandle ahandle = gdp->getPointAttribute("P"); how can I copy/set data from ahandle to *P ? should I copy it ? or maybe somehow I can get pointer to that data and set it to *P ? thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.