我是搅拌机的新手。我错过了什么吗?
但是类型:bpy.data.objects['Suzanne'].rotation_euler[2] = 1.25
在控制台窗口中将使模型旋转。
但是下面的代码根本不旋转模型。为什么?
import bpy
import math
cam = bpy.data.objects['Camera']
origin = bpy.data.objects['Suzanne']
step_count = 5
bpy.data.scenes["Scene"].cycles.samples=10
for step in range(0, step_count):
r = math.pi * step * (360.0 / step_count) / 180.0
print(r)
origin.rotation_euler[2] = r # seems not work!
fn = '/tmp/mokey_%02d.jpg' % step
print(fn)
bpy.data.scenes["Scene"].render.filepath = fn
bpy.ops.render.render( write_still=True )