diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-12-27 17:58:06 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-12-27 17:58:06 +0300 |
commit | b674c491538cfc345f8e5a43848d498d2e1d9a15 (patch) | |
tree | 041f37cabbc1b3497487bafe2bb8c0a03e8f30ee /add_mesh_extra_objects/add_mesh_round_brilliant.py | |
parent | 1436e52654d7d33fb5f502a6f681f1be1384e738 (diff) |
Fix T50306: Unexpected behavior with brilliant diamond object.
Just use `object_utils.object_data_add()` as everyone else...
Diffstat (limited to 'add_mesh_extra_objects/add_mesh_round_brilliant.py')
-rw-r--r-- | add_mesh_extra_objects/add_mesh_round_brilliant.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/add_mesh_extra_objects/add_mesh_round_brilliant.py b/add_mesh_extra_objects/add_mesh_round_brilliant.py index ea544818..365705a1 100644 --- a/add_mesh_extra_objects/add_mesh_round_brilliant.py +++ b/add_mesh_extra_objects/add_mesh_round_brilliant.py @@ -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 |