bugfix [#21233] Crash in pyapi, with new object.

pass the obdata as an argument rather then assigning later so as not to allow an invalid state.
This commit is contained in:
2010-02-22 00:07:46 +00:00
parent 835c353aaa
commit bc3d96678d
9 changed files with 60 additions and 27 deletions

View File

@@ -863,10 +863,8 @@ def create_mesh(scn, new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_l
me.update()
# me.calcNormals()
ob= bpy.data.objects.new("Mesh", 'MESH')
ob.data= me
ob= bpy.data.objects.new("Mesh", me)
scn.objects.link(ob)
# ob= scn.objects.new(me)
new_objects.append(ob)
# Create the vertex groups. No need to have the flag passed here since we test for the