BPyMesh getMeshFromObject was failing to copy the vert weights because is a dumb...
[blender.git] / release / scripts / bpymodules / BPyMesh.py
index a4f745a3d19ea17583918dad7fbcac8dcd28c3b1..92fe58c1dce3f28f9517796c99b9178ae6024fac 100644 (file)
@@ -198,7 +198,7 @@ def getMeshFromObject(ob, container_mesh=None, apply_modifiers=True, vgroups=Tru
                        tempob.link(mesh)
                        try:
                                # Copy the influences if possible.
-                               groupNames, vWeightDict= meshWeight2Dict(tempMe)
+                               groupNames, vWeightDict= meshWeight2Dict(ob.getData(mesh=1))
                                dict2MeshWeight(mesh, groupNames, vWeightDict)
                        except:
                                # if the modifier changes the vert count then it messes it up for us.