[英]Blender 2.5 Python video texture info
我像这样使用 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 制作它的方法。
使用img.frame_duration
; 它给出了视频中的总帧数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.