How can I write Vex functions that can be reused by other Attribute Wrangle and/or other hip files? Just like every other programming language's "library" or "module"?
I googled for a while and only found this [www.sidefx.com]. It seems pretty crazy that to create a reusable Vex function, one has to write C++ extension. Is there an easier way?
How to make reusable Vex functions?
1948 1 1-
- raincole
- Member
- 692 posts
- Joined: Aug. 2019
- Online
-
- tamte
- Member
- 9384 posts
- Joined: July 2007
- Offline
No, you don't need C++ as long as you can write your new functions using existing vex capabilities
You can follow Matt's instructions here on how to create a library of your VEX functions
https://www.tokeru.com/cgwiki/index.php?title=HoudiniVex#Vex_includes [www.tokeru.com]
You can also store it in a package rather than user prefs folder to make it easier to distribute
And you can also have a look at Houdini's existing modules in
$HFS/houdini/vex/include
that are used in various operators, just to get better idea or even to see whether some of them are useful for you to sometimes include in the code and use
You can follow Matt's instructions here on how to create a library of your VEX functions
https://www.tokeru.com/cgwiki/index.php?title=HoudiniVex#Vex_includes [www.tokeru.com]
You can also store it in a package rather than user prefs folder to make it easier to distribute
And you can also have a look at Houdini's existing modules in
$HFS/houdini/vex/include
that are used in various operators, just to get better idea or even to see whether some of them are useful for you to sometimes include in the code and use
Edited by tamte - Dec. 31, 2021 09:50:30
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- Quick Links

