Sikorskiy
Sorry, but I didn't catch.. What happens, when I use my expression function in Houdini? Which function exactly starts to work?
I don't have the code in front of me, but it's in the demo HDK examples.
Sikorskiy
You've mentioned myfunc(). But how can I add it to the “symbol table of functions” and how can I make it to identify itself correctly to the table manager?
I think that's the CDMextendLibrary() you mention below.
Sikorskiy
And one more question. Is it reasonable to call the function creating my structure from CMDextendLibrary() (it adds callback function somewhere for identification) or it will be called every time, when I start Houdini? I need to create my structure only once and use it in the callback function each time.
Thank you.
May be these questions are very obvious for you, but I have no experience with writing any libraries and working with HDK too.
What you'd have to do is when your function is called, check to see if this structure exists externally. If not, create it; if it does, use it. However, this can be very inefficient, as your function could be inside an inner loop getting called 100's of times.
You might want to rethink the problem a bit, and have some OTL or python function create the external structure. The Houdini paradigm is that any external file that you create should be recreateable at will, e.g. a geometry file, or an image file, a voxel file, etc. Maybe create a ROP that writes out the data first, so that the user can restart from the beginning.
I'm a bit surprised that you're delving into the HDK at this early stage. There have been ever fewer reasons to go that deep, especially with the introduction of Python into H9.