Replacing Images


I'm opening up a blank RV session, and I'd like to load in images via python.  After I load in one image, I'd like to replace that image with another.  I've been struggling to find this, and I haven't found anything browsing the forums.

Thanks in advance!

3 条评论

  • 0
    Alan Trombla

    Hi Josh,

    Do you know about the RVPUSH command ?  Docs for that here:


    That'll let you push images (or arbitrary scripting code) to a running RV.  So with no RV running, this will start RV and load "first.jpg":

    rvpush set first.jpg

    Then this will replace that image with "second.jpg":

    rvpush set second.jpg

    Hope that helps,


  • 0

    I did not know about that, that's good to know.


    Is there a Python method of doing this?

  • 0
    Jon Morley

    You can always use commands.setSourceMedia if you know the source node for which you are trying to replace the media. Here are the docs from Help -> "Mu Commands API Browser...":

    Path: commands.setSourceMedia

    setSourceMedia (void; 
                    string sourceNode,
                    string[] fileNames,
                    string tag = nil)


    Replace all media in the given RVFileSource node with new media with optional tag.

    If you do not yet have a source you should call commands.addSourceVerbose and keep track of the node it returns. Then you can use that node with commands.setSourceMedia to change the media. Here are the docs from Help -> "Mu Commands API Browser..." for commands.addSourceVerbose:

    Path: commands.addSourceVerbose

    addSourceVerbose (string; 
                      string[] fileNames,
                      string tag = nil)


    Similar to addSource(), but returns the name of the source node created.

    Please let us know if you have any more questions.