Skip to content

Instantly share code, notes, and snippets.

@satoyuichi
Last active January 5, 2016 15:06
Show Gist options
  • Save satoyuichi/38b0552b6e8d7ef054bd to your computer and use it in GitHub Desktop.
Save satoyuichi/38b0552b6e8d7ef054bd to your computer and use it in GitHub Desktop.
Blender で毎フレーム更新するようなコード
import bpy
import math
def my_handler(scene):
cf = bpy.context.scene.frame_current
r = (cf * 10)
bpy.context.object.rotation_euler[2] = math.radians(r)
bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1)
bpy.app.handlers.frame_change_pre.append(my_handler)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment