Replacing paths in Blender’s Sequence Editor

Sometimes, when it comes to editing video in Blender, you might want to move your footage media files from one location to another. Such manipulations usually breaking the project file, because the sequence strips still referencing the old paths. Of course it is possible to fix the paths manually by rewriting it for each strip, but that’s really tedious for big projects.

So, we have created a simple script, which  searches the paths of all sequence strips for particular text and replaces it with another text.

Download script: ReplacePaths.py

How to use it:

  • Open the script in Blender’s Text Editor window.
  • Change the ‘oldpath’ and ‘newpath’ variables according to your needs. The ‘oldpath’ variable represents the text to search, this text will be replaced with the value of ‘newpath’ variable.
  • Then choose “Text” -> “Run Script” in the menu of Text Editor window, or just hit Alt+P.

Below you can see a video demonstration with detailed explanation of how it works.

Related Posts

12 Responses

  1. Do you thing your script is still working? I got some error … Thank you for help

    Traceback (most recent call last):
    File “/Users/filip/Dropbox/Public/master.blend/ReplacePaths.py”, line 31, in
    File “/Users/filip/Dropbox/Public/master.blend/ReplacePaths.py”, line 15, in do_replace
    AttributeError: ‘SoundSequence’ object has no attribute ‘filepath’
    Error: Python script fail, look in the console for now…

      1. Thanks for your attention, but also this version is not working on my mac. Error didnt appear, but also happened nothing. Console (or Terminal in my case) left this action without any reaction. So I don’t know how can I help now. I found addon “Path Editor”, that nicely change paths to a source, but if I have changed a name of source file, than I felt in a troubles. This addon stores each strip in separate field in a list so I have to manually insert copied path to these fields to get what I need. That’s not really for bigger project. http://blender-addon.blogspot.cz/2014/04/addon-blender-path-editor-05.html

        1. Can you please record a video of your screen when you use our script? That way I can try to determine what’s wrong. Alternatively, you can send me a file of your project (without all linked files), so I can try the script myself. ^__^

        2. Hello Filip! Thank you for providing a video. I found that there is an issue with handling images (and image sequences). The problem is that any image strip (or image sequence strip) in blender editor stores filename and filepath separately.

          I.e. for “/Users/filip/A.png” it stores “A.png” in filename property and “/Users/filip/” in filepath property. Those strings are located in different places, so when the script tries to find “/Users/filip/A.png” then in finds nothing. With images you can replace only by filename “A.png” -> “B.png” or only by directory “/Users/filip” -> “/Users/john”. That’s how it works in Blender.

  2. OK, so your script can be used for video only. OK. Primarily it wa say goal. Sometimes I have also image used in more than one strip, but not so often. Would be great to have one simple function for replacing external link. OK. I will try your script on video file. Thank you

  3. I can’t edit my post, so just want to say thank you it works for video 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: