Vse Pythonのロゴ

Vse Python

コミュニティ
TMHSDigital
vse-python

Build and inspect Video Sequence Editor timelines from Python: SequenceEditor.strips vs the removed .sequences, new_effect length vs frame_end, strip transforms, and the 5.2 COLOR strip width/height bake from scene resolution. Use when the user scripts the sequencer, hits AttributeError on sequence_editor.sequences in 5.x or a TypeError on new_effect keyword arguments, or renders COLOR strips that ignore transform scale after a resolution change. Targets 5.2 LTS with 4.5 LTS fallback.

概要

公開者TMHSDigital
リポジトリBlender-Developer-Tools
スキル名vse-python
スター
20
フォーク
5
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    TMHSDigitalがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルVse PythonをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/skills/vse-python
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/TMHSDigital/Blender-Developer-Tools.git /tmp/Blender-Developer-Tools
mkdir -p .claude/skills
cp -r /tmp/Blender-Developer-Tools/skills/vse-python .claude/skills/vse-python
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでVse Pythonを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にVse Pythonを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Vse Pythonは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Video Sequence Editor in Python

Trigger

Use this skill when the user:

  • Builds or inspects a VSE / sequencer timeline from a script
  • Mentions sequence_editor, strips, sequences, new_effect, COLOR strips, or StripTransform
  • Hits AttributeError: 'SequenceEditor' object has no attribute 'sequences' on 5.x
  • Hits TypeError on new_effect kwargs (frame_end vs length)
  • Renders a sequencer composite whose COLOR cells ignore transform.scale_* after a resolution change

High-level shape

python
import bpy

scene = bpy.context.scene
se = scene.sequence_editor or scene.sequence_editor_create()
coll = se.strips if hasattr(se, "strips") else se.sequences

if bpy.app.version >= (5, 0, 0):
    strip = coll.new_effect(
        name="A", type="COLOR", channel=1,
        frame_start=1, length=10,
    )
else:
    strip = coll.new_effect(
        name="A", type="COLOR", channel=1,
        frame_start=1, frame_end=11,
    )
strip.color = (0.85, 0.10, 0.22)

Branch on the bpy.app.version tuple for known API boundaries (such as the 5.2 COLOR strip width/height bake), never on bpy.app.version_string. Pick the .strips vs .sequences accessor with hasattr, not version: an empty bpy_prop_collection is falsy, so se.strips or se.sequences silently falls through to the legacy accessor on an empty timeline.

Accessor: .strips vs .sequences

4.5 LTS5.1 / 5.2+
Canonical collection.strips (.sequences is a bridge to the same strips).strips only
.sequencesPresent, same contents as .stripsAttributeError
python
def strips_coll(se):
    return se.strips if hasattr(se, "strips") else se.sequences

Do not write se.sequences in new code. On 5.x it is gone; on 4.5 .strips already exists. The same split applies to .sequences_all / .strips_all (measured on 4.5.14 and 5.2.1). The no-legacy-vse-sequences rule flags both.

new_effect end kwarg

strips.new_effect(...) ends a strip with one accepted end argument. The other raises TypeError.

python
span = (1, 33)  # end-exclusive [start, end)

if bpy.app.version >= (5, 0, 0):
    strip = coll.new_effect(
        name="A", type="COLOR", channel=1,
        frame_start=span[0], length=span[1] - span[0],
    )
else:
    strip = coll.new_effect(
        name="A", type="COLOR", channel=1,
        frame_start=span[0], frame_end=span[1],
    )

Timeline bounds: frame_final_start / frame_final_end / frame_final_duration on 4.5. On 5.x those names are deprecated aliases (removal announced for 6.0); canonical accessors are left_handle / right_handle / duration. Scene strips take four args — new_scene(name, scene, channel, frame_start) — with no length / frame_end kwarg on either version.

The TRANSFORM effect type is removed on 5.x. Place strips with per-strip strip.transform (StripTransform) on both versions. Effect inputs are input_1 / input_2 (creation kwargs input1 / input2).

COLOR strip intrinsic size (5.2)

4.5 LTS and 5.1 COLOR strips have no intrinsic size. transform.scale_* is a fraction of the output frame. Creating at factory resolution then rendering a tiny buffer is fine.

5.2 and later bake readonly width / height from scene render resolution at new_effect time. Scale and offset are then in that media space, not a later output size. Set scene resolution before building strips.

This split is not in the 5.2 python_api release notes. Witnessed by examples/vse-cut-list/ --check-pixels.

python
width, height = 96, 54
scene.render.resolution_x = width
scene.render.resolution_y = height

se = scene.sequence_editor or scene.sequence_editor_create()
coll = se.strips if hasattr(se, "strips") else se.sequences

if bpy.app.version >= (5, 0, 0):
    strip = coll.new_effect(
        name="A", type="COLOR", channel=1,
        frame_start=1, length=10,
    )
else:
    strip = coll.new_effect(
        name="A", type="COLOR", channel=1,
        frame_start=1, frame_end=11,
    )

if bpy.app.version >= (5, 2, 0):
    # 5.2+: readonly width/height baked at new_effect from scene.render
    assert (strip.width, strip.height) == (width, height)
    # strip.width = 64  # TypeError — readonly
else:
    # 4.5 / 5.1: no intrinsic size; hasattr(strip, "width") is False
    pass

strip.transform.scale_x = 0.36
strip.transform.scale_y = 0.36

Creating at factory 1920×1080 then dropping the scene to 96×54 for a check render makes a 0.36-scaled COLOR cell larger than the output. On 5.2 the long-runner covers the frame; pixel samples read the wrong strip.

A lone COLOR strip does honor transform.scale_* on 5.2. The break is media size vs a later output size, not "transform is ignored."

Common AI mistakes

  1. sequence_editor.sequences on 5.x. AttributeError. Use .strips (with hasattr only as a 4.5 bridge).

  2. Wrong new_effect end kwarg. frame_end= on 5.x and length= on 4.5 both raise TypeError.

  3. Creating COLOR strips, then changing render size (the 5.2 trap):

    python
    a = coll.new_effect(...)          # bakes 1920×1080 on 5.2
    scene.render.resolution_x = 96    # output changed; media size did not

    Set scene.render.resolution_* before new_effect.

  4. se.strips or se.sequences. An empty collection is falsy, so this falls through to .sequences on a fresh editor.

  5. TRANSFORM effect type on 5.x. Gone. Use strip.transform.

  6. Scene strip pointing at its own scene. Feedback loop; renders transparent. Source a separate scene.

  7. Effect strips consume their inputs only when stacked on a channel above those inputs. Below, the inputs keep compositing independently. A GAMMA_CROSS asked to outlast its inputs' overlap is silently clamped to the overlap.

See also

Runnable examples

Each example runs headless, asserts the contract, and exits non-zero when it breaks. Run one with blender --background --python <script> --; pass a falsifier flag to watch the check fail.

  • vse-cut-list: The sequencer API rename from 4.5 LTS to 5.x — strips (never .sequences), new_effect ending in length= vs frame_end=, and left_handle/right_handle/duration replacing the deprecated frame_final_*. Falsify: --swap-inputs (exit 7).
  • vse-gamma-cross: The GAMMA_CROSS fade is not the naive linear mix: it blends in a gamma-0.5 space, so the mid-cross dips below the sRGB lerp. Falsify: --swap-inputs (exit 4).
  • vse-linear-modifiers: Pathology witness for the 5.2 removal of Strip.use_linear_modifiers. Falsify: --assume-present (exit 4).

References

よくある質問

AIスキル「Vse Python」では何ができますか?

Build and inspect Video Sequence Editor timelines from Python: SequenceEditor.strips vs the removed .sequences, new_effect length vs frame_end, strip transforms, and the 5.2 COLOR strip width/height bake from scene resolution. Use when the user scripts the sequencer, hits AttributeError on sequence_editor.sequences in 5.x or a TypeError on new_effect keyword arguments, or renders COLOR strips that ignore transform scale after a resolution change. Targets 5.2 LTS with 4.5 LTS fallback.

TypingMindでVse Pythonを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Vse Pythonはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにVse Pythonをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/skills/vse-pythonを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Vse Pythonを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Vse Pythonは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもVse Pythonを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Vse Python」は無料ですか?

TMHSDigitalがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇