Addon: Drop to ground fails 'cause bm.from_object expects a scene now as 2nd paramete...
authorSebastian Nell <codemanx@gmx.de>
Mon, 7 Jan 2013 00:55:52 +0000 (00:55 +0000)
committerSebastian Nell <codemanx@gmx.de>
Mon, 7 Jan 2013 00:55:52 +0000 (00:55 +0000)
object_drop_to_ground.py

index c50e46e3b683c05ce40c1aaa47ffada072635b2f..12333c6629df5cec797ea9d04807a291e508a7af 100644 (file)
@@ -51,7 +51,7 @@ def transform_ground_to_world(sc, ground):
 
 def get_lowest_world_co_from_mesh(ob, mat_parent=None):
     bme = bmesh.new()
-    bme.from_object(ob)
+    bme.from_mesh(ob.data)
     mat_to_world = ob.matrix_world.copy()
     if mat_parent:
         mat_to_world = mat_parent * mat_to_world