BlenderでPythonを使って遊ぼう。

Blender
https://www.blender.jp/

「Pythonコード」
import bpy
from math import sin
start_pos = (0,0,0)
ob = bpy.context.object
frame_num = 0
for i in range(0,100):
bpy.context.scene.frame_set(frame_num)
ob.location = (0,-i,sin(i) * 3)
ob.scale = (1,1,1 + sin(i))
ob.keyframe_insert(data_path = "location",index = -1)
ob.keyframe_insert(data_path = "scale",index = -1)
frame_num += 5
#Blender #python #animation

この記事が気に入ったらサポートをしてみませんか?