Blender 2.5 Python animated world texture setup

时间秒杀一切 提交于 2019-12-05 20:04:15

For data addition/removal, its best not to use operators, we have api functions from bpy.data for this.

import bpy
# create new clouds texture
wtex = bpy.data.textures.new(name="MyTexture", 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

Tested with blender 2.58a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!