Jump to content
acey195

Clearing cache via callback script

Recommended Posts

Hello all,

 

Im trying to composit a set of images using some vops in the comps/img context.

This works fine, however if I update the source images and recomposit, it still uses the old textures from memory.

 

Since it uses a vopcop2gen to load the source images, I cannot use the "Reload Sequence"  button as with the file input in cops.

so I basically have to force clearing the cache. This is possible using the python shell with the "%texcache -c"  command.

 

My problem is that this function doesn't seem to be available outside the python shell, as it doesn't seem to work for callback scripts for instance.

 

Does anybody know the proper syntax for using this function in a callback script, or a different workaround?

 

Twan

Share this post


Link to post
Share on other sites

Hi Twan,

 

Long time no see. ;)

 

use hscript instead

   hou.hscript("texcache -c")
   hou.hscript("glcache -c")

Share this post


Link to post
Share on other sites

Hi Kim, thanks a bunch!

 

Yeah indeed, In the end I didn't went to SideEffects, but I guess everything worked out here.

Hope you're doing fine as well.

Share this post


Link to post
Share on other sites

I've now tested this and it seems to work partially, however it still seems to linger in the "COP Cook Cache" but there doesn't seem to be a corresponding HScript command to clear this specific cache unfortunately.

 

However again, if I just force the cop node(s) to recook it works as well

something like:

hou.node("./CombineOutput/vopcop2gen1").cook(True)

 

So you basically have to clear the Cache AND recook the nodes, either doesn't cut it, it needs to be both.

 

But thanks again!

 

 

post-8658-0-98448200-1412237195_thumb.pn

Share this post


Link to post
Share on other sites

try

hscript :

compfree
opcook -F

python

hou.cache.composite
hou.Node.cook()

cheers

 

</R>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×