0

我使用这样的python在Blender 2.58中加载动画纹理(参见前面的这个问题):

#setup world
wtex = bpy.data.textures.new(name="WorldTexture", type='IMAGE')
# set World texture
wrld = bpy.context.scene.world
if wrld:
    slot = wrld.texture_slots.add()
    slot.texture = wtex
    slot.use_map_horizon = True
    img=bpy.data.images.load(filepath='\\vtex.avi')
    if img:
      slot.texture.image=img

如何获取视频中的帧数(img)?Blender 在从 GUI 加载纹理时显然会这样做,但我没有找到从 Python 制作它的方法。

4

1 回答 1

0

使用img.frame_duration;它给出了视频中的总帧数。

于 2013-10-26T05:30:27.147 回答