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

Szymon Kapeniak szymon.kapeniak at gmail.com
Tue Jul 17 04:12:07 EDT 2012


Bah!, now I see! I was suspecting something like that has happened, but
since I haven't seen new VEX_VexOp constructor taking VEX_VexOpComplated as
a parameter, I go lost. There is setCompleted() right after
the constructor though...

Thanks Jason!
skk.

ps Isn't it simplifying all thing? Cleanups are called per thread, while
onCompleted once per shader/operator, so you don't have to reference count
your global cache, is that right?


2012/7/17 jiversen <jiversen at rhythm.com>

> 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!
>>
>>
>
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>
>


-- 
skk.



More information about the Sidefx-houdini-list mailing list