moved bpy into bpy.data and bpy will be eventually replace the root level 'Blender' module.
currently we have bpy.library bpy.config and bpy.data
This commit is contained in:
2007-04-18 14:40:01 +00:00
parent a59f7c08ce
commit 3e1a5ce7a2
31 changed files with 227 additions and 106 deletions

View File

@@ -12,7 +12,7 @@ def add_mesh_simple(name, verts, edges, faces):
faces - list of int triplets/quads
'''
scn = bpy.scenes.active
scn = bpy.data.scenes.active
if scn.lib: return
ob_act = scn.objects.active
@@ -67,7 +67,7 @@ def add_mesh_simple(name, verts, edges, faces):
# Object mode add new
me = bpy.meshes.new(name)
me = bpy.data.meshes.new(name)
me.verts.extend(verts)
me.edges.extend(edges)
me.faces.extend(faces)
@@ -137,7 +137,7 @@ import bpy
def main():
# Add error checking
scn = bpy.scenes.active
scn = bpy.data.scenes.active
ob = scn.objects.active
me = ob.getData(mesh=1)