Jump to content

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

Link to comment
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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...