CVEX interface

   2571   4   1
User Avatar
Member
3 posts
Joined: April 2015
Offline
Hey,

How do I add an interface to a CVEX Operator like how a VEX can take ch(..) inputs?

And why are CVEX nodes created in a SHOP and not in Object network directly (instead of via Attribute VOP)?

Thanks!
Portfolio [yazkhabiri.com]
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
Hi
Check out User Interface Pragmas:
http://www.sidefx.com/docs/houdini15.0/vex/lang [sidefx.com]

The operator style of the VEX operator defines what context it will ‘belongs’ to.
If you want your VEX operator to be used in the geo context, set the style to “Geometry Operator”.

-b
http://www.racecar.no [www.racecar.no]
User Avatar
Member
3 posts
Joined: April 2015
Offline
@bonsak, can Geometry Operator create geometry? I tried the following snippet without any luck.


sop test()
{
printf(“hello world”);

int p1 = addpoint(geoself(), {0,0,0} );
}
Portfolio [yazkhabiri.com]
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
Hi
To create geo with a CVEX operator check the file i posted in this thread:
https://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=43009&highlight=cvex+addpoint [sidefx.com]

-b
http://www.racecar.no [www.racecar.no]
User Avatar
Member
3 posts
Joined: April 2015
Offline
thanks bonsak!

I had CVEX code from earlier. Indeed it does feel hacky to use a SHOP network in a OBJ network but at least placing the SHOP network on the same level helps some of the back and forth.

For future readers:
The CVEX's parameters appear on the CVEX node in the SHOP and not the VOP in the object network. The CVEX code also needs to define the variable in the code from the pragma otherwise a warning is thrown. The variables are passed into the CVEX function via function arguments. See the screenshot for example.

Useful VEX pragmas: http://www.sidefx.com/docs/houdini15.0/vex/pragmas [sidefx.com]

Attachments:
cvex.png (114.6 KB)

Portfolio [yazkhabiri.com]
  • Quick Links