diff options
author | Spivak Vladimir (cwolf3d) <cwolf3d@gmail.com> | 2019-02-01 03:42:15 +0300 |
---|---|---|
committer | Spivak Vladimir (cwolf3d) <cwolf3d@gmail.com> | 2019-02-01 03:42:15 +0300 |
commit | 9dcdedcaa6c590b73ec01ec9de331b671d68c8c2 (patch) | |
tree | aa82e2e64eae56e22a77edcee4cead93409afd92 /add_mesh_extra_objects/add_mesh_gears.py | |
parent | cd7ffdb8441f0a547fb0ab7169d361a3b441198d (diff) |
Update addon to Blender 2.8
Diffstat (limited to 'add_mesh_extra_objects/add_mesh_gears.py')
-rw-r--r-- | add_mesh_extra_objects/add_mesh_gears.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/add_mesh_extra_objects/add_mesh_gears.py b/add_mesh_extra_objects/add_mesh_gears.py index c631f394..6f5cc985 100644 --- a/add_mesh_extra_objects/add_mesh_gears.py +++ b/add_mesh_extra_objects/add_mesh_gears.py @@ -261,7 +261,7 @@ def add_gear(teethNum, radius, Ad, De, base, p_angle, if rack: teethNum = 1 - print(radius, width, conangle) + #print(radius, width, conangle) scale = (radius - 2 * width * tan(conangle)) / radius verts = [] @@ -660,8 +660,7 @@ class AddGear(Operator): ) # Actually create the mesh object from this geometry data. - base = create_mesh_object(context, verts, [], faces, "Gear") - obj = base.object + obj = create_mesh_object(context, verts, [], faces, "Gear") # XXX, supporting adding in editmode is move involved if obj.mode != 'EDIT': @@ -784,16 +783,15 @@ class AddWormGear(Operator): ) # Actually create the mesh object from this geometry data. - base = create_mesh_object(context, verts, [], faces, "Worm Gear") - obj = base.object + obj = create_mesh_object(context, verts, [], faces, "Worm Gear") # XXX, supporting adding in editmode is move involved if obj.mode != 'EDIT': # Create vertex groups from stored vertices. - tipGroup = obj.vertex_groups.new(name='Tips') + tipGroup = obj.vertex_groups.new(name = 'Tips') tipGroup.add(verts_tip, 1.0, 'ADD') - valleyGroup = obj.vertex_groups.new('Valleys') + valleyGroup = obj.vertex_groups.new(name = 'Valleys') valleyGroup.add(verts_valley, 1.0, 'ADD') return {'FINISHED'} |