Jump to content
Tronotrond

hou.fileReferences() and cache file sequences

Recommended Posts

Wonder if anyone could help a python newbie with collecting cached file sequences?

I'm definitively learning by doing here. So far I've made a script that gathers textures and needed files with hou.fileReferences(), but it only collects for the current frame.
The goal is an exported that collects all necessary files to upload and render the scene. Since we're dealing with remote offices and such in these days and often local files and drives, I need a complete upload of assets when submitting the job to Deadline. Along with a remapping of the paths.

But for cached file sequences, I'm struggling slightly as of what would be the best approach.
I could sort out all file nodes and copy all files in the source directory, but not wanting to bloat the upload more than necessary. Since the fileReferences() operation is slightly slow, I don't want to loop through and run it on each frame to be exported either.

A little more finesse would be ideal. Maybe there are even some premade functions I don't even know about?

Anyone got some tips here?
Thanks!

 

A bonus would also be to ignore any other file references in the network above any cache/file nodes.

Share this post


Link to post
Share on other sites

I found a solution that works for now.

After sorting out the file cache nodes, I can loop through the frame range I want and get all filenames I need using fileparm.evalAtFrame()
Seems to be working good!

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

×