Check for frames on local storage before loading. If exist load those instead


I’d like to be able to use screening room in RV and load 4k EXR/DPX sequences from a local SSD. This is obviously much faster than the server. However not all media is on the server and only some on the SSD. Is there an option for the to tell RV to check a relative file path before loading the files from the server? If they don’t exist on the SSD just load from our server? Ideally I want this to be seamless to the user when using RV.

I have read the documentation here

but this seems to relate to swapping paths across different operating systems. Perhaps i’m misreading the documentation?

Would really appreciate help if anyone has any tips.


1 Like

Hey K!

Thank you for using the community!

You can write a package that binds on source-group-complete event (Event Reference HERE), where you can cycle through media and replace the paths with what you need. The core code would look something like this:

    # Rough logic, please don't use as is!
    from rv import commands, extra_commands
    info = extra_commands.sourceMetaInfoAtFrame(rv.commands.frame())
    metadata = commands.sourceMediaInfo(info['node'])
    filename = metadata.get("file")
    sourceFrame = info['frame']
    files = commands.existingFilesInSequence(filename)
    frames = commands.existingFramesInSequence(filename)
    framesToFiles = dict(zip(frames, files))

You can set the path by modifying property on RVFileSource node by running commands.setStringProperty("" % sourceNode, "/new/path/.1001-1004.exr").

If you need help writing your first package, we have some reference her:

Hope this helps!


Thanks Alexa for taking the time to reply - super helpful. Will give it a go and let you know if I run in to issues!

1 Like