2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Blenderでアニメーションのオブジェクトをステップごとに可視化する

Last updated at Posted at 2022-04-17

概要

アニメーションのオブジェクトがどのように動くかをひと目で確認する方法を紹介します。
ここでは、パス追従コンストレイントのオブジェクトを対象にします。

具体例

具体例で説明します。
オブジェクトとして、モンキー(Suzanneとします)を作成してください。
また、パスに沿ってアニメーションさせるために、ベジエカーブを作成し、適当に編集してください。
モンキーを選択し、Shiftを押しながらベジエカーブを選択し、Ctrl + P(ペアレント)のパス追従コンストレイントを選んでください。
スザンヌを選択し、オブジェクトコンストレイントプロパティで下記のように設定してください。

  • 前方の軸:-Y
  • カーブに従う:チェック

上図のパスアニメーションボタンを押してください。

レンダリングの最終フレームを250から100に変えてください。

この状態でスペースを押すとアニメーション実行がトグルで切り替わるので、確認しましょう。

Pythonで可視化

Scriptingワークスペースで、テキストを新規作成し、下記をコピペしテキストメニューのスクリプト実行をしてください。
スクリプトでは、フレームの20, 40, 60, 80で、Suzanneを複製し、コンストレイントを適用しています。

import bpy

bpy.ops.object.select_all(action='DESELECT')
obj = bpy.data.objects["Suzanne"]
for t in range(0, 100, 20):
    bpy.context.scene.frame_current = t
    bpy.context.view_layer.objects.active = obj
    obj.select_set(True)
    bpy.ops.object.duplicate_move()
    bpy.ops.constraint.apply(constraint="AutoPath")
    bpy.context.object.select_set(False)
bpy.context.scene.frame_current = 100

参考:BlenderでPythonを実行する方法

以上

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?