Blender内烘焙驱动器动画到形态关键帧动画的脚本

  • 文章上次修改时间:2021年12月23日
  • Post category:图文教学
  • Post comments:2评论

有小伙伴问到物体形态关键帧动画是跟着驱动器来的,但是想变成形态关键帧的动画,看了一下自带的都不行,所以搜索了一下,这个脚本可以解您忧,拷贝到blender的文本编辑器里,选择要烘焙的物体,直接三角形运行就可。烘焙的帧数就是你场景的帧数。

				
					import bpy 
context = bpy.context 
scene = context.scene 
object = context.object 
frame = scene.frame_start 
while frame <= scene.frame_end:
    scene.frame_set(frame) 
    for fcurve in object.data.shape_keys.animation_data.drivers.values():
        object.data.shape_keys.keyframe_insert(fcurve.data_path) 
    frame = frame + 1
				
			

发表回复

这篇文章有 2 个评论

  1. 黑醋栗味梅子

    有人成功吗,我复制进去第八行报错:Python script failed, check the message in the system console

    1. 好搞网管理

      3.2测试了,没问题。你得选择带形态关键帧的那个进行烘焙。
      你看看报错报了什么