Fix T50306: Unexpected behavior with brilliant diamond object.
Just use `object_utils.object_data_add()` as everyone else...
This commit is contained in:
parent
1436e52654
commit
b674c49153
Notes:
blender-bot
2023-02-14 19:43:11 +01:00
Referenced by issue #50306, Unexpected behavior with brilliant diamond object.
|
@ -219,11 +219,11 @@ def addBrilliant(context, s, table_w, crown_h, girdle_t, pavi_d, bezel_f,
|
|||
dmesh = bpy.data.meshes.new("dmesh")
|
||||
dmesh.from_pydata(Verts, [], Faces)
|
||||
dmesh.update()
|
||||
dobj = bpy.data.objects.new("dobj", dmesh)
|
||||
|
||||
# link object into scene
|
||||
scene.objects.link(dobj)
|
||||
|
||||
# Create object and link it into scene.
|
||||
from bpy_extras import object_utils
|
||||
dobj = object_utils.object_data_add(context, dmesh, operator=None, name="dobj").object
|
||||
|
||||
# activate and select object
|
||||
scene.objects.active = dobj
|
||||
dobj.select = True
|
||||
|
|
Loading…
Reference in New Issue