Updated to match API update.
authorPaul Marshall <portsidepaul@hotmail.com>
Thu, 29 Mar 2012 02:09:01 +0000 (02:09 +0000)
committerPaul Marshall <portsidepaul@hotmail.com>
Thu, 29 Mar 2012 02:09:01 +0000 (02:09 +0000)
add_mesh_rocks/utils.py

index a135b0e1725fab23d8f0067c63c933bccc5255a8..94acaf7f127ed3ce5684dc8552d8faeb4c6b6d2b 100644 (file)
@@ -60,6 +60,10 @@ def toInts(inList):
 # Sets all faces smooth.  Done this way since I can't
 # find a simple way without using bpy.ops:
 def smooth(mesh):
-    for i in mesh.faces:
-        i.use_smooth = True
+    import bmesh
+    bm = bmesh.new()
+    bm.from_mesh(mesh)
+    for f in bm.faces:
+        f.smooth = True
+    bm.to_mesh(mesh)
     return mesh