Blender VSE Python から選択中 strip のグラフのキーフレーム補間を変える

VideoSequenceEditor

はじめに

ある質問の解答からヒントを得る。

参照元で理想的ではないと前置きがあるとおり、少し泥臭いけど無いより断然良いのでメモしておきます。

参照元

blender.stackexchange.com

コード

import bpy
context = bpy.context
scene = context.scene
sed = scene.sequence_editor
sequences = sed.sequences
# 選択中 strip を取得
strip = sed.active_strip
keyframe = strip.id_data.animation_data.action.fcurves[0].keyframe_points[0]
# 'LINEAR', 'BEZIER', 'BOUNCE', 'ELASTIC', 'BACK' から選択する
keyframe.interpolation = 'BACK'Code language: PHP (php)

最後に

全く違う内容で検索していたら偶然発見。

こういう時は記録しておかないと、後日見つけられなくなってフラストレーションに変わってしまう。

タイトルとURLをコピーしました