Last active
January 5, 2016 15:06
-
-
Save satoyuichi/38b0552b6e8d7ef054bd to your computer and use it in GitHub Desktop.
Blender で毎フレーム更新するようなコード
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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