「Dev:JA/Ref/Release Notes/4.40/python api」の版間の差分

提供: wiki
移動先: 案内検索
(ページの作成:「{{MARKDOWN}} 元記事:[Python API - Blender Developer Documentation](https://developer.blender.org/docs/release_notes/4.4/python_api/) # Blender 4.4: Python API[¶](…」)
 
 
(同じ利用者による、間の2版が非表示)
1行目: 1行目:
{{MARKDOWN}}
+
元記事:[https://developer.blender.org/docs/release_notes/4.4/python_api/ Python API - Blender Developer Documentation]
  
元記事:[Python API - Blender Developer Documentation](https://developer.blender.org/docs/release_notes/4.4/python_api/)
+
= Blender 4.4: Python API =
  
# Blender 4.4: Python API[¶](https://developer.blender.org/docs/release_notes/4.4/python_api/#blender-44-python-api "Permanent link")
+
== <span id="breaking-changes"></span> 互換性のなくなる変更 ==
  
## 互換性のなくなる変更
+
=== Blender タイプのサブクラス化 ===
 +
Blender タイプ(`Operator`、`PropertyGroup` など)を元に、自身の `__new__`/`__init__` コンストラクタを定義した Python 定義のクラスは、汎用の位置引数とキーワード引数を渡して[https://docs.blender.org/api/4.4/info_overview.html#construction-destruction 親の対応する関数を呼び出さないといけなくなりました]。
  
### Subclassing Blender Types[¶](https://developer.blender.org/docs/release_notes/4.4/python_api/#subclassing-blender-types "Permanent link")
+
<syntaxhighlight lang="python">
 
 
Python-defined classes based on Blender types (like `Operator`, `PropertyGroup`, etc.) that define their own `__new__`/`__init__` constructors [must now call the parent's matching function](https://docs.blender.org/api/4.4/info_overview.html#construction-destruction), and pass on generic positional and keyword arguments:
 
 
 
```py
 
 
import bpy
 
import bpy
 
class AwesomeRaytracer(bpy.types.RenderEngine):
 
class AwesomeRaytracer(bpy.types.RenderEngine):
17行目: 14行目:
 
         super().__init__(*args, **kwargs)
 
         super().__init__(*args, **kwargs)
 
         ...
 
         ...
```
+
</syntaxhighlight>
 
 
### Paint[¶](https://developer.blender.org/docs/release_notes/4.4/python_api/#paint "Permanent link")
 
 
 
-  `paint.brush` and `paint.eraser_brush` are now read-only properties. ([9e8c037375](https://projects.blender.org/blender/blender/commit/9e8c037375b42f7e2376549e55958cb98c4eea4e))
 
  
### GPU[¶](https://developer.blender.org/docs/release_notes/4.4/python_api/#gpu "Permanent link")
+
=== Paint ===
 +
* `paint.brush` と `paint.eraser_brush` が読み込み専用のプロパティになりました。([https://projects.blender.org/blender/blender/commit/9e8c037375b42f7e2376549e55958cb98c4eea4e 9e8c037375])
  
-  When drawing with `POLYLINE_FLAT_COLOR`, `POLYLINE_SMOOTH_COLOR` or `POLYLINE_UNIFORM_COLOR` or when drawing wide lines (line width greater than 1) using `FLAT_COLOR`, `SMOOTH_COLOR` or `UNIFORM_COLOR`, the following rules now apply:
+
=== GPU ===
   
+
* `POLYLINE_FLAT_COLOR` または `POLYLINE_SMOOTH_COLOR``POLYLINE_UNIFORM_COLOR` で描画、もしくは幅が2以上の線を `FLAT_COLOR` または `SMOOTH_COLOR``UNIFORM_COLOR` で描いた場合、下記のルールが適用されるようになりました。
    -  The `pos` attribute must use `F32` format `FLOAT` fetch type.
+
** `pos` 属性は `F32` 形式の `FLOAT` フェッチタイプを使用すること。
    -  The `color` attribute must use `F32` format with `FLOAT` fetch type **or** use `U8` with **4 components** and `INT_TO_FLOAT_UNIT` for fetch mode.
+
** `color` 属性は `F32` 形式の `FLOAT` フェッチタイプ'''または''' '''4コンポーネント'''の `U8` と、フェッチモードに `INT_TO_FLOAT_UNIT` を使用すること。
    -  Each attribute needs to be 4 byte aligned.
+
** 各属性は4バイトで揃える必要があります。
    -  Primitive type needs to be `GPU_PRIM_LINES`, `GPU_PRIM_LINE_STRIP` or `GPU_PRIM_LINE_LOOP`.
+
** プリミティブタイプは `GPU_PRIM_LINES` または `GPU_PRIM_LINE_STRIP``GPU_PRIM_LINE_LOOP` にする必要があります。
    -  If drawing using an index buffer, it must contain no primitive restart index.
+
** インデックスバッファを使用した描画の場合、プリミティブリスタートインデックスを入れてはいけません。
  
### Grease Pencil[¶](https://developer.blender.org/docs/release_notes/4.4/python_api/#grease-pencil "Permanent link")
+
=== Grease Pencil ===
 +
* Texture Mapping(テクスチャマッピング)モディファイアーの Influence(影響)から、頂点グループを削除しました。([https://projects.blender.org/blender/blender/commit/c452d5d9e807243ade36809b61673f590bdf67f7 c452d5d9e8])
  
-   The influence vertex group was removed from the Texture Mapping modifier ([c452d5d9e8](https://projects.blender.org/blender/blender/commit/c452d5d9e807243ade36809b61673f590bdf67f7))
+
=== Video Sequencer ===
 +
* `bpy.types.Sequence` と関連するすべてのタイプを `bpy.types.Strip` にリネームしました。完全なリストは[[#video-sequencer-strips|下記]]を参照してください。
  
### Video Sequencer[¶](https://developer.blender.org/docs/release_notes/4.4/python_api/#video-sequencer "Permanent link")
+
* Text(テキスト)ストリップの `align_x` と `align_y` を `anchor_x` と `anchor_y` にリネーム。プロパティ `alignment_x` は正しく行揃えするように。([https://projects.blender.org/blender/blender/commit/77a5478c0f5460b3284826c5f11f818c26f9823b 77a5478c0f])
  
-  The `bpy.types.Sequence` and all related types were renamed to `bpy.types.Strip`. See the [full list below](https://developer.blender.org/docs/release_notes/4.4/python_api/#video-sequencer-strips).
+
=== ユーザーインターフェイス ===
-  Text strip `align_x` and `align_y` were renamed to `anchor_x` and `anchor_y`. Property `alignment_x` does proper alignment now. ([77a5478c0f](https://projects.blender.org/blender/blender/commit/77a5478c0f5460b3284826c5f11f818c26f9823b))
+
* `UILayout.template_icon()` がビルトインのアイコンを通常サイズで表示、ボタンにあわせてスケールが変化しないように。([https://projects.blender.org/blender/blender/commit/1f88645728 1f88645728])
  
### User Interface[¶](https://developer.blender.org/docs/release_notes/4.4/python_api/#user-interface "Permanent link")
+
=== Actions ===
 +
* アクションに [../animation_rigging/#slotted-actions スロット]が付き、アクションの割り当てと編集に変更が必要です。詳しい更新方法は[[#slotted-actions |下記の説明]]をお読みください。
  
-  `UILayout.template_icon()` displays built-in icons in a normal size, not scaled up to fit the button. ([1f88645728](https://projects.blender.org/blender/blender/commit/1f88645728))
+
== 追加 ==
  
### Actions[¶](https://developer.blender.org/docs/release_notes/4.4/python_api/#actions "Permanent link")
+
=== bpy.app ===
 +
* 属性 `bpy.app.portable` は、インストールされている Blender がポータブル版かどうかを示し、`WITH_INSTALL_PORTABLE` ビルドオプションと一致します。([https://projects.blender.org/blender/blender/commit/481a8b67d42ce03249b2aa6901630254291cbe65 481a8b67d4])
  
-  Actions now have [Slots](https://developer.blender.org/docs/release_notes/4.4/animation_rigging/#slotted-actions), which requires changes to action assignment and editing. See the [detailed explanation below](https://developer.blender.org/docs/release_notes/4.4/python_api/#slotted-actions) for how to update.
+
* 属性 `bpy.app.module` は、Blender が Python モジュールとして実行中かどうかを示します。([https://projects.blender.org/blender/blender/commit/a6b293daacb0259b9879b88e33afc0220306a578 a6b293daac])
  
## Additions[¶](https://developer.blender.org/docs/release_notes/4.4/python_api/#additions "Permanent link")
+
=== Grease Pencil ===
 +
* `frame.drawing` プロパティ用のセッターを追加。([https://projects.blender.org/blender/blender/commit/dc6e879d0f45e623151398e34f9a7cc08cb70296 dc6e879d0f]).
 +
** ドローイングをどこか(他のレイヤーやオブジェクト)からコピーするのに利用可能です:`frame.drawing = other_drawing`
  
### `bpy.app`[¶](https://developer.blender.org/docs/release_notes/4.4/python_api/#bpyapp "Permanent link")
+
* 新しいプロパティ `is_expanded` をレイヤーグループに追加([https://projects.blender.org/blender/blender/commit/e5bdfd533bcc7beb1e38d30432492357bd015dcf e5bdfd533b]). そのレイヤーグループがレイヤーツリー UI 内で開いていれば `True` を返します。
  
-  Attribute `bpy.app.portable` indicates if Blender's installation is portable, matching the `WITH_INSTALL_PORTABLE` build option. ([481a8b67d4](https://projects.blender.org/blender/blender/commit/481a8b67d42ce03249b2aa6901630254291cbe65))
+
* ドローイングのストロークを並べ替える関数を追加。`drawing.reorder_strokes(new_indices=[...])`([https://projects.blender.org/blender/blender/commit/a265b591bede2a6cf9cda189bee641cbbe94a5a9 a265b591be])
-  Attribute `bpy.app.module` indicates if Blender is running as a Python module. ([a6b293daac](https://projects.blender.org/blender/blender/commit/a6b293daacb0259b9879b88e33afc0220306a578))
 
  
### Grease Pencil[¶](https://developer.blender.org/docs/release_notes/4.4/python_api/#grease-pencil_1 "Permanent link")
+
* `color_tag` 列挙プロパティをレイヤーグループに追加し、カラータグを公開。([https://projects.blender.org/blender/blender/commit/36d69e8491de1002458bc33994e7516e20fa0ebd 36d69e8491]).
  
-  Added a setter for the `drawing` property on frame python API ([dc6e879d0f](https://projects.blender.org/blender/blender/commit/dc6e879d0f45e623151398e34f9a7cc08cb70296)).
+
* Texture Mapping(テクスチャマッピング)モディファイアーから頂点グループの影響を削除。([https://projects.blender.org/blender/blender/commit/c452d5d9e807243ade36809b61673f590bdf67f7 c452d5d9e8])
    -  Can be used to copy a drawing from elsewhere (e.g. another layer or object): `frame.drawing = other_drawing`.
 
-  Added a new property `is_expanded` to layer groups ([e5bdfd533b](https://projects.blender.org/blender/blender/commit/e5bdfd533bcc7beb1e38d30432492357bd015dcf)). This returns `True` if the layer group is expanded in the layer tree UI.
 
-  Added a function to reorder strokes in a drawing: `drawing.reorder_strokes(new_indices=[...])` ([a265b591be](https://projects.blender.org/blender/blender/commit/a265b591bede2a6cf9cda189bee641cbbe94a5a9)).
 
-  Added a `color_tag` enum property to layer groups that exposes the color tag ([36d69e8491](https://projects.blender.org/blender/blender/commit/36d69e8491de1002458bc33994e7516e20fa0ebd)).
 
-  The influence vertex group was removed from the Texture Mapping modifier ([c452d5d9e8](https://projects.blender.org/blender/blender/commit/c452d5d9e807243ade36809b61673f590bdf67f7))
 
  
### Curves[](https://developer.blender.org/docs/release_notes/4.4/python_api/#curves "Permanent link")
+
=== Curves ===
 +
* 新しい `Curves.reorder_curves(new_indices=[...])`。カーブを並べ替えます。([https://projects.blender.org/blender/blender/commit/a265b591bede2a6cf9cda189bee641cbbe94a5a9 a265b591be])
  
-  New `Curves.reorder_curves(new_indices=[...])` to reorder curves. ([a265b591be](https://projects.blender.org/blender/blender/commit/a265b591bede2a6cf9cda189bee641cbbe94a5a9))
+
* 新しい `Curves.set_types()`。カーブタイプを変更します。([https://projects.blender.org/blender/blender/commit/5db88ff2e3457763ceb6090378a5ccc8bb45ab48 5db88ff2e3])
-  New `Curves.set_types()` to change curve types ([5db88ff2e3](https://projects.blender.org/blender/blender/commit/5db88ff2e3457763ceb6090378a5ccc8bb45ab48)).
 
  
### Nodes[¶](https://developer.blender.org/docs/release_notes/4.4/python_api/#nodes "Permanent link")
+
=== ノード ===
 +
* 新しい `Node.color_tag` プロパティ。ノードのカラータグ(Texture、Vector、Output など…)に対応する列挙アイテムを返します。([https://projects.blender.org/blender/blender/commit/6cd33510c33fe17e999f4cadf869fc19a637eecb 6cd33510c3])
  
-  New `Node.color_tag` property, which returns an enum item corresponding to the node color tag (Texture, Vector, Output, etc...) ([6cd33510c3](https://projects.blender.org/blender/blender/commit/6cd33510c33fe17e999f4cadf869fc19a637eecb))
+
* 新しい `bl_use_group_interface` プロパティを、カスタムノードツリー用に追加可能に。ノードグループ用の一部のビルトイン UI を無効化できます。([https://projects.blender.org/blender/blender/commit/ebfbc7757b16e7bdfc87272e89584afb8f75a2a4 ebfbc7757b])
-  New `bl_use_group_interface` property on custom node trees that allows disabling some built-in UI for node groups ([ebfbc7757b](https://projects.blender.org/blender/blender/commit/ebfbc7757b16e7bdfc87272e89584afb8f75a2a4)).
 
  
## Blender as a Python Module[¶](https://developer.blender.org/docs/release_notes/4.4/python_api/#blender-as-a-python-module "Permanent link")
+
=== マスクポイント ===
 +
* 新しい `select_left_handle`、`select_right_handle`、`select_control_point`、`select_single_handle` プロパティ。([https://projects.blender.org/blender/blender/commit/462d887114368850e77a0a4fc431fac53dd44d39 462d887114])
  
The `bpy` package on PyPI now provides access to VFX libraries used by Blender. ([PR#133082](https://projects.blender.org/blender/blender/pulls/133082))
+
== Python モジュールとしての Blender 利用 ==
 +
PyPI の `bpy` パッケージが、Blender で使用している VFX ライブラリへのアクセスを提供するように。([https://projects.blender.org/blender/blender/pulls/133082 PR#133082])
  
While most are available as separate packages on PyPI, they may not have the same version or build options as Blender. This can lead to errors when interchanging data with Blender, which are resolved by using the matching version.
+
大半は PyPI で個別のパッケージとして入手可能ですが、Blender と同じバージョンやビルドオプションではない場合があります。この所為で、Blender とデータをやり取りする際にエラーが発生する可能性がありますが、一致するバージョンを使用することで解決できます。
  
```
+
<syntaxhighlight lang="python">
 
import bpy
 
import bpy
  
# Add Blender bundled VFX libraries to sys.path.
+
# Blender バンドルの VFX ライブラリを sys.path に追加
 
bpy.utils.expose_bundled_modules()
 
bpy.utils.expose_bundled_modules()
  
# Import the library you need.
+
# 必要なライブラリをインポート
 
import pxr
 
import pxr
 
import MaterialX
 
import MaterialX
94行目: 90行目:
 
import PyOpenColorIO
 
import PyOpenColorIO
 
import pyopenvdb
 
import pyopenvdb
```
+
</syntaxhighlight>
  
## Slotted Actions[¶](https://developer.blender.org/docs/release_notes/4.4/python_api/#slotted-actions "Permanent link")
+
== <span id="slotted-actions"></span>Slotted Actions(スロット化アクション) ==
  
### Breaking[¶](https://developer.blender.org/docs/release_notes/4.4/python_api/#breaking "Permanent link")
+
=== 互換性のなくなる変更 ===
 +
アクションの割り当て(`datablock.animation_data.action = some_action`)は、特定の条件下ではアクションスロットを自動割り当てを行わないため、そのデータブロックがアニメーションされないままになることがあります。
  
Assigning an Action (`datablock.animation_data.action = some_action`) may, under certain conditions, not auto-assign an action slot, hence leave the data-block in a non-animated state. To force assignment of the first slot of the action, follow up the assignment with `datablock.animation_data.action_slot = some_action.slots[0]`. This assumes that the first slot's `target_id_type` is either `UNSPECIFIED` or the same as `datablock.id_type`. This assumption holds for just-versioned Actions.
+
アクションの最初のスロットを強制的に割り当てるには、割り当ての後に `datablock.animation_data.action_slot = some_action.slots[0]` を追加します。これは、最初のスロットの `target_id_type` `UNSPECIFIED` または `datablock.id_type` と同じであることが前提です。この前提はバージョニングされたアクションのみ有効です。
  
> **注意**:Assigning Actions to an NLA strip or an Action constraint works slightly differently. Setting strip.action = some_action or constraint.action = some_action will always auto-assign the first slot that has a compatible target_id_type (docs). As such, this is actually backward-compatible as the state after the assignment is the same (the Action animates the thing).
+
{{Note|注意| NLA ストリップまたはアクションコンストレイントへのアクションの割り当てでは、少し動作が違います。`strip.action some_action` または `constraint.action some_action` では、常に `target_id_type` と互換性のある最初のスロットが自動で割り当てられます。割り当て後の状態が同じである(アクションがアニメーションする)ため、実際には後方互換性があることになります。}}
  
### Additions
+
=== 追記 ===
 +
スロット化アクションは、アクションを完全にレイヤー化する、進行中の取り組みの一つです。レイヤー化はまだ対応していませんが、データモデルはレイヤーとストリップに対応しています。これは、スロット化アクション用の新しいAPIに反映されています。
  
Slotted Actions are part of an ongoing endeavour to make Actions fully layered. Even though layering is not supported yet, the data model is ready for layers and strips. This is reflected in the new API for slotted Actions.
+
<syntaxhighlight lang="python">
 
 
```
 
 
import bpy
 
import bpy
  
# Actions are created as before.
+
# アクションは以前に作成済み
 
action = bpy.data.actions.new("SuzanneAction")
 
action = bpy.data.actions.new("SuzanneAction")
  
# Creation of slots requires an ID type and a name.
+
# スロットの作成は ID タイプと名前が必要
 
slot = action.slots.new(id_type='OBJECT', name="Suzanne")
 
slot = action.slots.new(id_type='OBJECT', name="Suzanne")
 
print(f"slot type={slot.target_id_type} name={slot.name_display} identifier={slot.identifier}")
 
print(f"slot type={slot.target_id_type} name={slot.name_display} identifier={slot.identifier}")
# Output:
+
# 出力:
 
#  slot type=OBJECT name=Suzanne identifier=OBSuzanne
 
#  slot type=OBJECT name=Suzanne identifier=OBSuzanne
  
# F-Curves and Channel Groups are now stored on an infinite keyframe strip that sits on a layer.
+
# F カーブとチャンネルグループは単一レイヤーにある無限キーフレームストリップに格納されるように
 
layer = action.layers.new("Layer")
 
layer = action.layers.new("Layer")
 
strip = layer.strips.new(type='KEYFRAME')
 
strip = layer.strips.new(type='KEYFRAME')
 
channelbag = strip.channelbag(slot, ensure=True)
 
channelbag = strip.channelbag(slot, ensure=True)
  
# F-Curves and Groups are created on the channelbag with the same API as previously on `action`.
+
# F カーブとグループはチャンネルバッグに以前の `action` と同じ API で作成
# F-Curves and Groups themselves also still have exactly the same API as before.
+
# F カーブとグループ自体は今も完全に以前と同じ API
 
fcurve = channelbag.fcurves.new("location", index=1)
 
fcurve = channelbag.fcurves.new("location", index=1)
 
group = channelbag.groups.new("Object Transform")
 
group = channelbag.groups.new("Object Transform")
 
fcurve.group = group
 
fcurve.group = group
  
# Assigning the Action will automatically select the slot, as it matches Suzanne's ID type + name:
+
# アクションの割り当ては自動的に Suzanne ID タイプ+名前と一致するスロットを選択:
 
suzanne = bpy.data.objects["Suzanne"]
 
suzanne = bpy.data.objects["Suzanne"]
 
anim_data = suzanne.animation_data_create()
 
anim_data = suzanne.animation_data_create()
 
anim_data.action = action
 
anim_data.action = action
  
# If explicit slot assignment is needed:
+
# 明示的なスロット割り当てが必要な場合:
 
anim_data.action_slot = action.slots[0]
 
anim_data.action_slot = action.slots[0]
  
# If there are multiple slots on the Action, and you want to just pick the first one that's
+
# 複数のスロットがアクションにあり、互換性のある最初の物が欲しい時は
# compatible, use the following code. `anim_data.action_suitable_slots` can be used _after_ the
+
# 下のコードを使用すること。`anim_data.action_suitable_slots` は、
# Action has been assigned; it is a list of action slots of that Action, but only the ones that
+
# アクション割り当て後に使用可能。これはそのアクションのアクション
# are actually compatible with the owner of anim_data (in this case, Suzanne).
+
# スロットのリストだが、中は anim_data のオーナー(ここでは Suzanne)
 +
# と互換性のある物のみ
 
anim_data.action_slot = anim_data.action_suitable_slots[0]
 
anim_data.action_slot = anim_data.action_suitable_slots[0]
  
# Alternatively, you can set the 'last-used slot identifier' to determine which slot is auto-assigned:
+
# 代わりに 'last_slot_identifier'(最後に使用した識別子)を
 +
# 設定することで、自動割り当てスロットを決定させることも可能
 
anim_data.last_slot_identifier = 'OBDancing Monkey'
 
anim_data.last_slot_identifier = 'OBDancing Monkey'
 
anim_data.action = action
 
anim_data.action = action
 
print(anim_data.action_slot.identifier)
 
print(anim_data.action_slot.identifier)
# Output: OBDancing Monkey, if that slot exists on the Action
+
# 出力: OBDancing Monkey(そのアクションにスロットがある場合)
```
+
 
 +
# 特定のスロットでアニメーションを行っているデータブロックを取得
 +
for action in bpy.data.actions:
 +
    print(f"Action: {action.name}")
 +
    for slot in action.slots:
 +
        print(f"  slot {slot.identifier} is ", end="")
 +
        slot_users = slot.users()
 +
        if not slot_users:
 +
            print("unused")
 +
            continue
 +
        print("used by:")
 +
        for datablock in slot_users:
 +
            print(f"    - {datablock!r}")
 +
</syntaxhighlight>
 +
 
 +
上のコードは低レベルの機能を紹介しています。必要なのは、F カーブがアクションに存在するのを確認することだけです。指定のデータブロックをアニメーションさせたい場合は、下記の便利な関数が使用できます。
 +
 
 +
<syntaxhighlight lang="python">
 +
import bpy
  
> **注意**:Even though the data model is ready for having multiple layers, and multiple strips per layer, Blender is currently limited to only a single layer with a single keyframe strip. The strip is infinitely long, and cannot be moved.
+
# あらかじめアクションは作成しておくこと
 +
action = bpy.data.actions.new("SuzanneAction")
  
### 廃止予定
+
# アクションを割り当て、Blender に Suzanne との関係を知らせる
 +
suzanne = bpy.data.objects["Suzanne"]
 +
suzanne.animation_data_create().action = action
 +
 
 +
# F カーブを作成
 +
loc_x = action.fcurve_ensure_for_datablock(suzanne, "location", index=0)
 +
loc_y = action.fcurve_ensure_for_datablock(suzanne, "location", index=1)
 +
loc_z = action.fcurve_ensure_for_datablock(suzanne, "location", index=2)
 +
</syntaxhighlight>
 +
 
 +
単に特定のスロット用のチャンネルバッグを探したい時のために、これにも便利な関数があります。この関数はアクションに最大1レイヤー、1キーフレームストリップしかないことを前提としており、この前提は Blender 4.4内の全アクションに当てはまります。この関数を呼び出すことで、将来マルチレイヤーのアニメーションが実装された時に、そのコードに注意が必要になることを示す、いい指標となります。
 +
 
 +
<syntaxhighlight lang="python">
 +
import bpy
 +
from bpy_extras import anim_utils
 +
 
 +
# Suzanne はすでにアニメーションされていると仮定
 +
suzanne = bpy.data.objects["Suzanne"]
 +
action = suzanne.animation_data.action
 +
action_slot = suzanne.animation_data.action_slot
 +
channelbag = anim_utils.action_get_channelbag_for_slot(action, action_slot)
 +
 
 +
# これでチャンネルバッグ内の F カーブにアクセス可能に
 +
for fcurve in channelbag.fcurves:
 +
  print(f"FCurve: {fcurve.data_path}[{fcurve.array_index}]")
 +
</syntaxhighlight>
 +
 
 +
下は旧バージョンの Blender で動作するコードで、4.4でも動作します。
 +
 
 +
<syntaxhighlight lang="python">
 +
import bpy
 +
 
 +
# 単にオブジェクトを取得し、キー挿入を開始。これはアクションを
 +
# レイヤー、キーフレームストリップ、チャンネルバッグ、スロット
 +
# とともに作成し、アクションとスロットを Suzanne に割り当てます
 +
suzanne = bpy.data.objects["Suzanne"]
 +
suzanne.keyframe_insert("location", index=0)
 +
suzanne.keyframe_insert("location", index=1)
 +
suzanne.keyframe_insert("location", index=2)
 +
</syntaxhighlight>
  
These legacy function / attributes of the `Action` type have been marked as 'backward-compatible legacy API'. They all operate on the data for the first action slot only, and create the necessary data structures where needed.
+
{{Note|注意|データモデルは複数のレイヤーと、レイヤー毎に複数のストリップを持つことができるようになっていますが、現在、Blender は単一レイヤーと単一キーフレームストリップのみに制限されています。ストリップは無限長で、移動できません。}}
  
| Legacy API | Modern API |
+
=== 廃止予定 ===
| --- | --- |
+
`Action` タイプの旧関数と属性が 'backward-compatible legacy API'(後方互換性用旧 API) とマークされました。これらはすべて最初のアクションスロットのデータのみ処理を行い、必要ならデータ構造体を作成します。
| `action.fcurves` | `action.layers[0].strips[0].channelbag(action.slots[0]).fcurves` |
 
| `action.groups` | `action.layers[0].strips[0].channelbag(action.slots[0]).groups` |
 
| `action.id_root` | `action.slots[0].target_id_type` |
 
  
This legacy API will be removed in Blender 5.0
+
{|
 +
! 旧 API !! 新 API
 +
|-
 +
| `action.fcurves` || `action.layers[0].strips[0].channelbag(action.slots[0]).fcurves`
 +
|-
 +
| `action.groups` || `action.layers[0].strips[0].channelbag(action.slots[0]).groups`
 +
|-
 +
| `action.id_root` || `action.slots[0].target_id_type`
 +
|}
  
## Video Sequencer Strips
+
この旧 API は Blender 5.0 で廃止される予定です。
  
### Breaking
 
  
The type `bpy.types.Sequence` has been renamed to `bpy.types.Strip` together will all related types. ([d3ba70190b](https://projects.blender.org/blender/blender/commit/d3ba70190b97778943d08ca93f0e2346d09fa1a5))
+
== <span id="video-sequencer-strips"></span>ビデオシーケンサーストリップ ==
  
Here is the full list:
+
=== 互換性の失われる変更 ===
 +
タイプ `bpy.types.Sequence` が、関連するタイプもすべて `bpy.types.Strip` にリネームされました。([https://projects.blender.org/blender/blender/commit/d3ba70190b97778943d08ca93f0e2346d09fa1a5 d3ba70190b])
  
| `4.3` | `4.4` |
+
下記はそのフルリストです。
| --- | --- |
 
| `bpy.types.Sequence` | `bpy.types.Strip` |
 
| `bpy.types.EffectSequence` | `bpy.types.EffectStrip` |
 
| `bpy.types.AddSequence` | `bpy.types.AddStrip` |
 
| `bpy.types.AdjustmentSequence` | `bpy.types.AdjustmentStrip` |
 
| `bpy.types.AlphaOverSequence` | `bpy.types.AlphaOverStrip` |
 
| `bpy.types.AlphaUnderSequence` | `bpy.types.AlphaUnderStrip` |
 
| `bpy.types.ColorMixSequence` | `bpy.types.ColorMixStrip` |
 
| `bpy.types.ColorSequence` | `bpy.types.ColorStrip` |
 
| `bpy.types.CrossSequence` | `bpy.types.CrossStrip` |
 
| `bpy.types.GammaCrossSequence` | `bpy.types.GammaCrossStrip` |
 
| `bpy.types.GaussianBlurSequence` | `bpy.types.GaussianBlurStrip` |
 
| `bpy.types.GlowSequence` | `bpy.types.GlowStrip` |
 
| `bpy.types.MulticamSequence` | `bpy.types.MulticamStrip` |
 
| `bpy.types.MultiplySequence` | `bpy.types.MultiplyStrip` |
 
| `bpy.types.OverDropSequence` | `bpy.types.OverDropStrip` |
 
| `bpy.types.SpeedControlSequence` | `bpy.types.SpeedControlStrip` |
 
| `bpy.types.SubtractSequence` | `bpy.types.SubtractStrip` |
 
| `bpy.types.TextSequence` | `bpy.types.TextStrip` |
 
| `bpy.types.TransformSequence` | `bpy.types.TransformStrip` |
 
| `bpy.types.WipeSequence` | `bpy.types.WipeStrip` |
 
| `bpy.types.ImageSequence` | `bpy.types.ImageStrip` |
 
| `bpy.types.MaskSequence` | `bpy.types.MaskStrip` |
 
| `bpy.types.MetaSequence` | `bpy.types.MetaStrip` |
 
| `bpy.types.MovieClipSequence` | `bpy.types.MovieClipStrip` |
 
| `bpy.types.MovieSequence` | `bpy.types.MovieStrip` |
 
| `bpy.types.SceneSequence` | `bpy.types.SceneStrip` |
 
| `bpy.types.SoundSequence` | `bpy.types.SoundStrip` |
 
| `bpy.types.SequenceColorBalanceData` | `bpy.types.StripColorBalanceData` |
 
| `bpy.types.SequenceColorBalance` | `bpy.types.StripColorBalance` |
 
| `bpy.types.SequenceCrop` | `bpy.types.StripCrop` |
 
| `bpy.types.SequenceElement` | `bpy.types.StripElement` |
 
| `bpy.types.SequenceElements` | `bpy.types.StripElements` |
 
| `bpy.types.SequenceModifier` | `bpy.types.StripModifier` |
 
| `bpy.types.SequenceModifiers` | `bpy.types.StripModifiers` |
 
| `bpy.types.SequenceProxy` | `bpy.types.StripProxy` |
 
| `bpy.types.SequenceTransform` | `bpy.types.StripTransform` |
 
| `bpy.types.SequencesMeta` | `bpy.types.StripsMeta` |
 
| `bpy.types.SequencesTopLevel` | `bpy.types.StripsTopLevel` |
 
  
### Deprecated[¶](https://developer.blender.org/docs/release_notes/4.4/python_api/#deprecated_1 "Permanent link")
+
{|
 +
! 4.3 !! 4.4
 +
|-
 +
| `bpy.types.Sequence` || `bpy.types.Strip`
 +
|-
 +
| `bpy.types.EffectSequence` || `bpy.types.EffectStrip`
 +
|-
 +
| `bpy.types.AddSequence` || `bpy.types.AddStrip`
 +
|-
 +
|`bpy.types.AdjustmentSequence` || `bpy.types.AdjustmentStrip`
 +
|-
 +
|`bpy.types.AlphaOverSequence` || `bpy.types.AlphaOverStrip`
 +
|-
 +
|`bpy.types.AlphaUnderSequence` || `bpy.types.AlphaUnderStrip`
 +
|-
 +
|`bpy.types.ColorMixSequence` || `bpy.types.ColorMixStrip`
 +
|-
 +
|`bpy.types.ColorSequence` || `bpy.types.ColorStrip`
 +
|-
 +
|`bpy.types.CrossSequence` || `bpy.types.CrossStrip`
 +
|-
 +
|`bpy.types.GammaCrossSequence` || `bpy.types.GammaCrossStrip`
 +
|-
 +
|`bpy.types.GaussianBlurSequence` || `bpy.types.GaussianBlurStrip`
 +
|-
 +
|`bpy.types.GlowSequence` || `bpy.types.GlowStrip`
 +
|-
 +
|`bpy.types.MulticamSequence` || `bpy.types.MulticamStrip`
 +
|-
 +
|`bpy.types.MultiplySequence` || `bpy.types.MultiplyStrip`
 +
|-
 +
|`bpy.types.OverDropSequence` || `bpy.types.OverDropStrip`
 +
|-
 +
|`bpy.types.SpeedControlSequence` || `bpy.types.SpeedControlStrip`
 +
|-
 +
|`bpy.types.SubtractSequence` || `bpy.types.SubtractStrip`
 +
|-
 +
|`bpy.types.TextSequence` || `bpy.types.TextStrip`
 +
|-
 +
|`bpy.types.TransformSequence` || `bpy.types.TransformStrip`
 +
|-
 +
|`bpy.types.WipeSequence` || `bpy.types.WipeStrip`
 +
|-
 +
|`bpy.types.ImageSequence` || `bpy.types.ImageStrip`
 +
|-
 +
|`bpy.types.MaskSequence` || `bpy.types.MaskStrip`
 +
|-
 +
|`bpy.types.MetaSequence` || `bpy.types.MetaStrip`
 +
|-
 +
|`bpy.types.MovieClipSequence` || `bpy.types.MovieClipStrip`
 +
|-
 +
|`bpy.types.MovieSequence` || `bpy.types.MovieStrip`
 +
|-
 +
|`bpy.types.SceneSequence` || `bpy.types.SceneStrip`
 +
|-
 +
|`bpy.types.SoundSequence` || `bpy.types.SoundStrip`
 +
|-
 +
|`bpy.types.SequenceColorBalanceData` || `bpy.types.StripColorBalanceData`
 +
|-
 +
|`bpy.types.SequenceColorBalance` || `bpy.types.StripColorBalance`
 +
|-
 +
|`bpy.types.SequenceCrop` || `bpy.types.StripCrop`
 +
|-
 +
|`bpy.types.SequenceElement` || `bpy.types.StripElement`
 +
|-
 +
|`bpy.types.SequenceElements` || `bpy.types.StripElements`
 +
|-
 +
|`bpy.types.SequenceModifier` || `bpy.types.StripModifier`
 +
|-
 +
|`bpy.types.SequenceModifiers` || `bpy.types.StripModifiers`
 +
|-
 +
|`bpy.types.SequenceProxy` || `bpy.types.StripProxy`
 +
|-
 +
|`bpy.types.SequenceTransform` || `bpy.types.StripTransform`
 +
|-
 +
|`bpy.types.SequencesMeta` || `bpy.types.StripsMeta`
 +
|-
 +
|`bpy.types.SequencesTopLevel` || `bpy.types.StripsTopLevel`
 +
|}
  
Properties that refer to a `bpy.types.Strip` (previously `bpy.types.Sequence`) as "sequence" have been deprecated. New properties with "strip" are added. The old properties remain available until 5.0 but addon developers are encouraged to update their addons to use the new property names:
+
=== 廃止予定 ===
 +
`bpy.types.Strip`(従来は `bpy.types.Sequence`)を「sequence」として参照するプロパティは廃止予定になり、「strip」に名前を変えた新しいプロパティが追加されました。旧プロパティは5.0まで利用可能ですが、アドオン開発者は新しいプロパティ名を使用するようアドオンを更新することが推奨されます。
  
| Deprecated property | New property |
+
{|
| --- | --- |
+
! 廃止予定のプロパティ !! 新しいプロパティ
| `context.active_sequence_strip` | `context.active_strip` |
+
|-
| `context.selected_editable_sequences` | `context.selected_editable_strips` |
+
| `context.active_sequence_strip` || `context.active_strip`  
| `context.selected_sequences` | `context.selected_strips` |
+
|-
| `context.sequences` | `context.strips` |
+
|`context.selected_editable_sequences` || `context.selected_editable_strips`  
| `SequenceEditor.sequences` | `SequenceEditor.strips` |
+
|-
| `SequenceEditor.sequences_all` | `SequenceEditor.strips_all` |
+
|`context.selected_sequences` || `context.selected_strips`  
| `MetaStrip.sequences` | `MetaStrip.strips` |
+
|-
 +
|`context.sequences` || `context.strips`  
 +
|-
 +
|`SequenceEditor.sequences` || `SequenceEditor.strips`  
 +
|-
 +
|`SequenceEditor.sequences_all` || `SequenceEditor.strips_all`  
 +
|-
 +
|`MetaStrip.sequences` || `MetaStrip.strips`  
 +
|}

2025年3月15日 (土) 09:01時点における最新版

元記事:Python API - Blender Developer Documentation

Blender 4.4: Python API

互換性のなくなる変更

Blender タイプのサブクラス化

Blender タイプ(OperatorPropertyGroup など)を元に、自身の __new__/__init__ コンストラクタを定義した Python 定義のクラスは、汎用の位置引数とキーワード引数を渡して親の対応する関数を呼び出さないといけなくなりました

import bpy
class AwesomeRaytracer(bpy.types.RenderEngine):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        ...

Paint

  • paint.brushpaint.eraser_brush が読み込み専用のプロパティになりました。(9e8c037375)

GPU

  • POLYLINE_FLAT_COLOR または POLYLINE_SMOOTH_COLORPOLYLINE_UNIFORM_COLOR で描画、もしくは幅が2以上の線を FLAT_COLOR または SMOOTH_COLORUNIFORM_COLOR で描いた場合、下記のルールが適用されるようになりました。
    • pos 属性は F32 形式の FLOAT フェッチタイプを使用すること。
    • color 属性は F32 形式の FLOAT フェッチタイプまたは 4コンポーネントU8 と、フェッチモードに INT_TO_FLOAT_UNIT を使用すること。
    • 各属性は4バイトで揃える必要があります。
    • プリミティブタイプは GPU_PRIM_LINES または GPU_PRIM_LINE_STRIPGPU_PRIM_LINE_LOOP にする必要があります。
    • インデックスバッファを使用した描画の場合、プリミティブリスタートインデックスを入れてはいけません。

Grease Pencil

  • Texture Mapping(テクスチャマッピング)モディファイアーの Influence(影響)から、頂点グループを削除しました。(c452d5d9e8)

Video Sequencer

  • bpy.types.Sequence と関連するすべてのタイプを bpy.types.Strip にリネームしました。完全なリストは下記を参照してください。
  • Text(テキスト)ストリップの align_xalign_yanchor_xanchor_y にリネーム。プロパティ alignment_x は正しく行揃えするように。(77a5478c0f)

ユーザーインターフェイス

  • UILayout.template_icon() がビルトインのアイコンを通常サイズで表示、ボタンにあわせてスケールが変化しないように。(1f88645728)

Actions

  • アクションに [../animation_rigging/#slotted-actions スロット]が付き、アクションの割り当てと編集に変更が必要です。詳しい更新方法は下記の説明をお読みください。

追加

bpy.app

  • 属性 bpy.app.portable は、インストールされている Blender がポータブル版かどうかを示し、WITH_INSTALL_PORTABLE ビルドオプションと一致します。(481a8b67d4)
  • 属性 bpy.app.module は、Blender が Python モジュールとして実行中かどうかを示します。(a6b293daac)

Grease Pencil

  • frame.drawing プロパティ用のセッターを追加。(dc6e879d0f).
    • ドローイングをどこか(他のレイヤーやオブジェクト)からコピーするのに利用可能です:frame.drawing = other_drawing
  • 新しいプロパティ is_expanded をレイヤーグループに追加(e5bdfd533b). そのレイヤーグループがレイヤーツリー UI 内で開いていれば True を返します。
  • ドローイングのストロークを並べ替える関数を追加。drawing.reorder_strokes(new_indices=[...])。(a265b591be)
  • color_tag 列挙プロパティをレイヤーグループに追加し、カラータグを公開。(36d69e8491).
  • Texture Mapping(テクスチャマッピング)モディファイアーから頂点グループの影響を削除。(c452d5d9e8)

Curves

  • 新しい Curves.reorder_curves(new_indices=[...])。カーブを並べ替えます。(a265b591be)
  • 新しい Curves.set_types()。カーブタイプを変更します。(5db88ff2e3)

ノード

  • 新しい Node.color_tag プロパティ。ノードのカラータグ(Texture、Vector、Output など…)に対応する列挙アイテムを返します。(6cd33510c3)
  • 新しい bl_use_group_interface プロパティを、カスタムノードツリー用に追加可能に。ノードグループ用の一部のビルトイン UI を無効化できます。(ebfbc7757b)

マスクポイント

  • 新しい select_left_handleselect_right_handleselect_control_pointselect_single_handle プロパティ。(462d887114)

Python モジュールとしての Blender 利用

PyPI の bpy パッケージが、Blender で使用している VFX ライブラリへのアクセスを提供するように。(PR#133082)

大半は PyPI で個別のパッケージとして入手可能ですが、Blender と同じバージョンやビルドオプションではない場合があります。この所為で、Blender とデータをやり取りする際にエラーが発生する可能性がありますが、一致するバージョンを使用することで解決できます。

import bpy

# Blender バンドルの VFX ライブラリを sys.path に追加
bpy.utils.expose_bundled_modules()

# 必要なライブラリをインポート
import pxr
import MaterialX
import OpenImageIO
import PyOpenColorIO
import pyopenvdb

Slotted Actions(スロット化アクション)

互換性のなくなる変更

アクションの割り当て(datablock.animation_data.action = some_action)は、特定の条件下ではアクションスロットを自動割り当てを行わないため、そのデータブロックがアニメーションされないままになることがあります。

アクションの最初のスロットを強制的に割り当てるには、割り当ての後に datablock.animation_data.action_slot = some_action.slots[0] を追加します。これは、最初のスロットの target_id_typeUNSPECIFIED または datablock.id_type と同じであることが前提です。この前提はバージョニングされたアクションのみ有効です。

注意
NLA ストリップまたはアクションコンストレイントへのアクションの割り当てでは、少し動作が違います。strip.action = some_action または constraint.action = some_action では、常に target_id_type と互換性のある最初のスロットが自動で割り当てられます。割り当て後の状態が同じである(アクションがアニメーションする)ため、実際には後方互換性があることになります。


追記

スロット化アクションは、アクションを完全にレイヤー化する、進行中の取り組みの一つです。レイヤー化はまだ対応していませんが、データモデルはレイヤーとストリップに対応しています。これは、スロット化アクション用の新しいAPIに反映されています。

import bpy

# アクションは以前に作成済み
action = bpy.data.actions.new("SuzanneAction")

# スロットの作成は ID タイプと名前が必要
slot = action.slots.new(id_type='OBJECT', name="Suzanne")
print(f"slot type={slot.target_id_type} name={slot.name_display} identifier={slot.identifier}")
# 出力:
#   slot type=OBJECT name=Suzanne identifier=OBSuzanne

# F カーブとチャンネルグループは単一レイヤーにある無限キーフレームストリップに格納されるように
layer = action.layers.new("Layer")
strip = layer.strips.new(type='KEYFRAME')
channelbag = strip.channelbag(slot, ensure=True)

# F カーブとグループはチャンネルバッグに以前の `action` と同じ API で作成
# F カーブとグループ自体は今も完全に以前と同じ API
fcurve = channelbag.fcurves.new("location", index=1)
group = channelbag.groups.new("Object Transform")
fcurve.group = group

# アクションの割り当ては自動的に Suzanne の ID タイプ+名前と一致するスロットを選択:
suzanne = bpy.data.objects["Suzanne"]
anim_data = suzanne.animation_data_create()
anim_data.action = action

# 明示的なスロット割り当てが必要な場合:
anim_data.action_slot = action.slots[0]

# 複数のスロットがアクションにあり、互換性のある最初の物が欲しい時は
# 下のコードを使用すること。`anim_data.action_suitable_slots` は、
# アクション割り当て後に使用可能。これはそのアクションのアクション
# スロットのリストだが、中は anim_data のオーナー(ここでは Suzanne)
# と互換性のある物のみ
anim_data.action_slot = anim_data.action_suitable_slots[0]

# 代わりに 'last_slot_identifier'(最後に使用した識別子)を
# 設定することで、自動割り当てスロットを決定させることも可能
anim_data.last_slot_identifier = 'OBDancing Monkey'
anim_data.action = action
print(anim_data.action_slot.identifier)
# 出力: OBDancing Monkey(そのアクションにスロットがある場合)

# 特定のスロットでアニメーションを行っているデータブロックを取得
for action in bpy.data.actions:
    print(f"Action: {action.name}")
    for slot in action.slots:
        print(f"  slot {slot.identifier} is ", end="")
        slot_users = slot.users()
        if not slot_users:
            print("unused")
            continue
        print("used by:")
        for datablock in slot_users:
            print(f"    - {datablock!r}")

上のコードは低レベルの機能を紹介しています。必要なのは、F カーブがアクションに存在するのを確認することだけです。指定のデータブロックをアニメーションさせたい場合は、下記の便利な関数が使用できます。

import bpy

# あらかじめアクションは作成しておくこと
action = bpy.data.actions.new("SuzanneAction")

# アクションを割り当て、Blender に Suzanne との関係を知らせる
suzanne = bpy.data.objects["Suzanne"]
suzanne.animation_data_create().action = action

# F カーブを作成
loc_x = action.fcurve_ensure_for_datablock(suzanne, "location", index=0)
loc_y = action.fcurve_ensure_for_datablock(suzanne, "location", index=1)
loc_z = action.fcurve_ensure_for_datablock(suzanne, "location", index=2)

単に特定のスロット用のチャンネルバッグを探したい時のために、これにも便利な関数があります。この関数はアクションに最大1レイヤー、1キーフレームストリップしかないことを前提としており、この前提は Blender 4.4内の全アクションに当てはまります。この関数を呼び出すことで、将来マルチレイヤーのアニメーションが実装された時に、そのコードに注意が必要になることを示す、いい指標となります。

import bpy
from bpy_extras import anim_utils

# Suzanne はすでにアニメーションされていると仮定
suzanne = bpy.data.objects["Suzanne"]
action = suzanne.animation_data.action
action_slot = suzanne.animation_data.action_slot
channelbag = anim_utils.action_get_channelbag_for_slot(action, action_slot)

# これでチャンネルバッグ内の F カーブにアクセス可能に
for fcurve in channelbag.fcurves:
  print(f"FCurve: {fcurve.data_path}[{fcurve.array_index}]")

下は旧バージョンの Blender で動作するコードで、4.4でも動作します。

import bpy

# 単にオブジェクトを取得し、キー挿入を開始。これはアクションを
# レイヤー、キーフレームストリップ、チャンネルバッグ、スロット
# とともに作成し、アクションとスロットを Suzanne に割り当てます
suzanne = bpy.data.objects["Suzanne"]
suzanne.keyframe_insert("location", index=0)
suzanne.keyframe_insert("location", index=1)
suzanne.keyframe_insert("location", index=2)
注意
データモデルは複数のレイヤーと、レイヤー毎に複数のストリップを持つことができるようになっていますが、現在、Blender は単一レイヤーと単一キーフレームストリップのみに制限されています。ストリップは無限長で、移動できません。


廃止予定

Action タイプの旧関数と属性が 'backward-compatible legacy API'(後方互換性用旧 API) とマークされました。これらはすべて最初のアクションスロットのデータのみ処理を行い、必要ならデータ構造体を作成します。

旧 API 新 API
action.fcurves action.layers[0].strips[0].channelbag(action.slots[0]).fcurves
action.groups action.layers[0].strips[0].channelbag(action.slots[0]).groups
action.id_root action.slots[0].target_id_type

この旧 API は Blender 5.0 で廃止される予定です。


ビデオシーケンサーストリップ

互換性の失われる変更

タイプ bpy.types.Sequence が、関連するタイプもすべて bpy.types.Strip にリネームされました。(d3ba70190b)

下記はそのフルリストです。

4.3 4.4
bpy.types.Sequence bpy.types.Strip
bpy.types.EffectSequence bpy.types.EffectStrip
bpy.types.AddSequence bpy.types.AddStrip
bpy.types.AdjustmentSequence bpy.types.AdjustmentStrip
bpy.types.AlphaOverSequence bpy.types.AlphaOverStrip
bpy.types.AlphaUnderSequence bpy.types.AlphaUnderStrip
bpy.types.ColorMixSequence bpy.types.ColorMixStrip
bpy.types.ColorSequence bpy.types.ColorStrip
bpy.types.CrossSequence bpy.types.CrossStrip
bpy.types.GammaCrossSequence bpy.types.GammaCrossStrip
bpy.types.GaussianBlurSequence bpy.types.GaussianBlurStrip
bpy.types.GlowSequence bpy.types.GlowStrip
bpy.types.MulticamSequence bpy.types.MulticamStrip
bpy.types.MultiplySequence bpy.types.MultiplyStrip
bpy.types.OverDropSequence bpy.types.OverDropStrip
bpy.types.SpeedControlSequence bpy.types.SpeedControlStrip
bpy.types.SubtractSequence bpy.types.SubtractStrip
bpy.types.TextSequence bpy.types.TextStrip
bpy.types.TransformSequence bpy.types.TransformStrip
bpy.types.WipeSequence bpy.types.WipeStrip
bpy.types.ImageSequence bpy.types.ImageStrip
bpy.types.MaskSequence bpy.types.MaskStrip
bpy.types.MetaSequence bpy.types.MetaStrip
bpy.types.MovieClipSequence bpy.types.MovieClipStrip
bpy.types.MovieSequence bpy.types.MovieStrip
bpy.types.SceneSequence bpy.types.SceneStrip
bpy.types.SoundSequence bpy.types.SoundStrip
bpy.types.SequenceColorBalanceData bpy.types.StripColorBalanceData
bpy.types.SequenceColorBalance bpy.types.StripColorBalance
bpy.types.SequenceCrop bpy.types.StripCrop
bpy.types.SequenceElement bpy.types.StripElement
bpy.types.SequenceElements bpy.types.StripElements
bpy.types.SequenceModifier bpy.types.StripModifier
bpy.types.SequenceModifiers bpy.types.StripModifiers
bpy.types.SequenceProxy bpy.types.StripProxy
bpy.types.SequenceTransform bpy.types.StripTransform
bpy.types.SequencesMeta bpy.types.StripsMeta
bpy.types.SequencesTopLevel bpy.types.StripsTopLevel

廃止予定

bpy.types.Strip(従来は bpy.types.Sequence)を「sequence」として参照するプロパティは廃止予定になり、「strip」に名前を変えた新しいプロパティが追加されました。旧プロパティは5.0まで利用可能ですが、アドオン開発者は新しいプロパティ名を使用するようアドオンを更新することが推奨されます。

廃止予定のプロパティ 新しいプロパティ
context.active_sequence_strip context.active_strip
context.selected_editable_sequences context.selected_editable_strips
context.selected_sequences context.selected_strips
context.sequences context.strips
SequenceEditor.sequences SequenceEditor.strips
SequenceEditor.sequences_all SequenceEditor.strips_all
MetaStrip.sequences MetaStrip.strips