嗨,我有一个正在编写的脚本,但它没有像我想要的那样运行这是我到目前为止所得到的
import bpy
def Key_Frame_Points(): #Gets the key-frame values as an array.
fcurves = bpy.context.active_object.animation_data.action.fcurves
for curve in fcurves:
keyframePoints = fcurves[4].keyframe_points # selects Action channel's axis / attribute
for keyframe in keyframePoints:
print('KEY FRAME POINTS ARE @T ',keyframe.co[0])
KEYFRAME_POINTS_ARRAY = keyframe.co[0]
print(KEYFRAME_POINTS_ARRAY)
Key_Frame_Points()
当我运行它时,它会按照我的意愿打印出所选对象上的所有关键帧。但问题是我不能出于某种原因将值打印到变量中。如果您运行它并检查 System concole。它的行为很奇怪。就像它打印出关键帧对象的值一样。但是当我要求它以数组的形式获取这些值时,它只是打印出最后一帧。
这是它的简要外观