[Sidefx-houdini-list] No VEX_VexOpCleanup call in H12?

jiversen jiversen at rhythm.com
Mon Jul 16 21:53:31 EDT 2012


Yes, this changed in VEX for both Mantra and Houdini and it's quite a 
lot more awkward as the the H11 behaviour seemed ideal.

There is now a "completed" callback which is a little different to the 
cleanup callback.


As an emergency, you can enable H11-like behaviour for Houdini with 
HOUDINI_VEX_DISABLE_INSTANCE_CACHE:

%> hconfig -H HOUDINI_VEX_DISABLE_INSTANCE_CACHE
HOUDINI_VEX_DISABLE_INSTANCE_CACHE
    Disables global caching of VEX shaders for the SOP and POP contexts so
    that shader-local data (such point clouds generated with pcgenerate)
    are regenerated with each cook of that operator.



Szymon Kapeniak wrote:
> Greetings!
> Custom vex functions seem to be not calling their cleanup functions in
> shading context as of Houdini 12 (12.0.623). Is it by design or it's a bug?
> In a bellow code my_cleanup never evaluates in Mantra (It evaluates in SOPs
> on recompile or node's deletion). It works as expected in H11.1 though...
>
> static void *
> my_init()
> {
>     cout << "Entering." << endl;
>     return NULL;
> }
>
> static void
> my_cleanup(void *data)
> {
>     cout << "Leaving." << endl;
> }
>
> static void
> clean(int, void *argv[], void *data)
> {
>     int  *result = (int*) argv[0];
>     result[0] = 1;
> }
>
> void
> newVEXOp(void *)
> {
> new VEX_VexOp("clean@&I",
> clean,
> VEX_ALL_CONTEXT,
> my_init,
> my_cleanup,
> VEX_OPTIMIZE_0);
> }
>
>
> Thanks for help!
>   


More information about the Sidefx-houdini-list mailing list