I used a video file in the VSE which is cut into many parts. When the project grew, I needed to reorganize the linked files. I renamed this video file. Now Blender doesn't see this file anymore.

enter image description here

In Motion5, there is a function "Replace Media" that lets you replace external files used in many strips by new ones for the whole project.

Does something similar exist in Blender by default or does anybody know a script that can do this?

  • 1
    $\begingroup$ Have you tried File->External Data->Find Missing Files? It should work on vse files. $\endgroup$ – sambler Oct 22 '15 at 14:17
  • $\begingroup$ "Find Missing Files" function searches for files with the original file name. I need to replace the original file by file with different name. If it would be only one strip I can change only path to the file with changed name, but there are many strips using the same source file. $\endgroup$ – vklidu Oct 22 '15 at 15:22

You can set the filepath attribute on your sequences with python:

import bpy
for seq in bpy.data.scenes['Scene'].sequence_editor.sequences_all:
    if 'image_a' in seq.elements[0].filename:
        seq.elements[0].filename = "image_b.png"

You can optionally change the files location setting seq.directory if needed.

  • 1
    $\begingroup$ Script fails in both cases, can you be more descriptive? Thank you for help. blend: dl.dropboxusercontent.com/u/55113627/%3E%20Blender/… screen: dl.dropboxusercontent.com/u/55113627/%3E%20Blender/… $\endgroup$ – vklidu Nov 21 '15 at 1:39
  • $\begingroup$ Well, that's much better - providing a "test" file with your problem always helps so much more - great job! I updated the answer, it's working now with your blend file. Btw: you can use blend-exchange.giantcowfilms.com to upload a blend-file and use the insert image function here on stackexchange. Would be good if you'd update your question with your image - as good images always help for a better understanding of what you want to achieve. $\endgroup$ – Samoth Nov 21 '15 at 9:22
  • $\begingroup$ Yeah, thank you very much :) now it works. Would be great to have a button for that :) But I will definitely save your script. And sorry if it wasn't enough clear from question. BTW what is zero in your script? $\endgroup$ – vklidu Nov 22 '15 at 0:02
  • $\begingroup$ You mean the indices [0]? That's the first (zero based) element in a list of many. A sequence may consist of more than one file (e.g. a image sequence) with different names, but in your case as you use a video source only one file is used per sequence, so only this single one has to be altered. $\endgroup$ – Samoth Nov 22 '15 at 0:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.