Hello,
we use a USD File as a database to store a bunch of assets and I want to reload the USD file to refresh the data contained when we notice the asset path has a more recent version on disk. The Database update is a separate process that works quite well, so I only need to reload the import on filetime discrepancy between the database and the updated file, shouldn't be too difficult I thought.
Well, apparently I houdini caches really aggressively which seem to prevent automatic date evaluations of local files so I've learned more about how houdini executes graphs, evaluates changes and how to force it with python to cook, create depenedencies and trigger updates, yet it doesn't work on the USD reload.
I think it is because the check is cached after the first run and houdini/python uses the cache result not checking files on disk anymore. It is surprisingly complicated to find a proper solution to get nodes dirty, sometimes it works but due to recursion can't stop but when implement proper interruption it doesn't run a second time.
In python I a bunch of methods node.cook(force=true), node.invalidateOutput, hou.hscript("clearcache -all") and other cache clearing methods in houdini and USD in hopes that it starts anew, I've also read about an incremental count where I run into permission errors because it runs inside a locked node, etc, etc.
The import hda with it's checks is embedded on multiple occurences in a larger node structure and within loops which in itself is instanced through houdini engine for other tools to use.
Does anyone have ideas or have encountered similar issues? I'm pretty much running out of ideas and in circles