Blender常用API

【scene】

创建scene:scene = bpy.data.scenes.new('name')

设置render engine:scene.render.engine = 'CYCLES'

设置world:scene.world = world

选择scene:bpy.context.screen.scene = scene

 

【world】

创建world:world = bpy.data.worlds.new('name')

使用node:world.use_nodes = True

创建world node:world.node_tree.nodes.new('type')

创建world node link:world.node_tree.links.new(input, output)

 

【lamp】

创建lamp data:lamp = bpy.data.lamps.new('name_data', 'POINT')

创建lamp object: object = bpy.data.objects.new('name_object', lamp)

 

 

【camera】

 

【mesh】

1. 创建mesh data:mesh = bpy.data.meshes.new('name_data')

2. 创建mesh object:object = bpy.data.objects.new('name_object', mesh)

3. 链接到场景:bpy.data.scenes['Scene'].objects.link(object)

4. 设计mesh:mesh.from_pydata()

 

创建armature object

 

 

快捷键

Ctrl+R  page up page down

 

你可能感兴趣的:(Blender常用API)