RNA/Py API

change how data is added. eg.
 bpy.data.add_mesh(name) --> bpy.data.meshes.new(name)
 bpy.data.remove_lamp(lamp) --> bpy.data.lamps.remove(lamp)


image and texture stil use add_* funcs
This commit is contained in:
2010-01-09 23:44:01 +00:00
parent 99b713e8b0
commit 08c9ecb3b0
20 changed files with 526 additions and 235 deletions

View File

@@ -712,8 +712,7 @@ def create_mesh(scn, new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_l
for name, index in list(material_mapping.items()):
materials[index]= unique_materials[name]
me= bpy.data.add_mesh(dataname)
# me= bpy.data.meshes.new(dataname)
me= bpy.data.meshes.new(dataname)
# make sure the list isnt too big
for material in materials[0:16]:
@@ -864,7 +863,7 @@ def create_mesh(scn, new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_l
me.update()
# me.calcNormals()
ob= bpy.data.add_object("MESH", "Mesh")
ob= bpy.data.objects.new("Mesh", 'MESH')
ob.data= me
scn.objects.link(ob)
# ob= scn.objects.new(me)