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:
@@ -322,8 +322,7 @@ class AddGear(bpy.types.Operator):
|
||||
|
||||
mesh.update()
|
||||
|
||||
ob_new = bpy.data.objects.new('Gear','MESH')
|
||||
ob_new.data = mesh
|
||||
ob_new = bpy.data.objects.new('Gear', mesh)
|
||||
|
||||
tipgroup = ob_new.add_vertex_group('Tips')
|
||||
# for some reason the name does not 'stick' and we have to set it this way:
|
||||
|
||||
Reference in New Issue
Block a user