magneto Posted July 28, 2012 Share Posted July 28, 2012 Hi, I am experimenting with the new namespaces but I couldn't find a way to do this. Basically I want to refer to a VEX code file stored in the Extra Files tab to be included like this: #include "myEmbeddedFile.vfl" I tried namespaced syntax too. But it doesn't work. I didn't try this method before namespaces so not sure if it would work? I assume the opdef syntax is not something the built-in include function would recognize? Python has a dedicated hou.readFile that knows about opdef paths, but for VEX is this not possible? Thanks Quote Link to comment Share on other sites More sharing options...
hopbin9 Posted July 29, 2012 Share Posted July 29, 2012 opdef references are parameter level references inside Houdini that are valid at the time of a node cooking. VEX can be compiled on the command line by vcc outside of Houdini. It's also only compiled once, where opdef can change depending on what OTL was loaded. Since the include statement is only evaluated when VEX is compiled, then I don't think it's possible to have an opdef reference. I could be wrong as I've never written VEX by hand. 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted July 29, 2012 Author Share Posted July 29, 2012 It's a shame if it can't be done. Because I have a lot of code libraries that I include but if Extra Files can't be used, then I will have to copy paste everywhere and keep track of every little code and make sure to update them if any of them changes. You did write VEX though, I got you to do it 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.