
[Blender][script]シーケンサーで複数の動画ストリップのソースを一括変更する
新しいソースファイルパスの設定
new_source_path に変更先の動画ファイルのフルパスを入力してください。ストリップの選択
Blenderのシーケンサーで、ソースを変更したいストリップを選択します。スクリプトを実行
Blenderのテキストエディターにスクリプトを貼り付けて実行します。
import bpy
# 一括で変更する新しいソースファイルのパス
new_source_path = "/path/to/new/video.mp4"
# シーケンサーの動画ストリップを取得
selected_strips = [strip for strip in bpy.context.scene.sequence_editor.sequences if strip.select and strip.type == 'MOVIE']
# 各選択されたストリップのソースを変更
for strip in selected_strips:
strip.filepath = new_source_path # 新しいファイルパスを設定
print(f"Updated strip: {strip.name}, New Source: {strip.filepath}")
print(f"{len(selected_strips)}本のストリップのソースを変更しました。")