made mesh.getFromObject() accept a python object as well as the object name.

accepting the name only was causing big problems when exporting library data, because duplicate names are possible the wrong data was exporting.
This commit is contained in:
2006-11-13 17:37:01 +00:00
parent 745aaf01c6
commit 26ef99157e
3 changed files with 21 additions and 11 deletions

View File

@@ -746,7 +746,7 @@ class Mesh:
@type texMesh: Mesh or None
"""
def getFromObject(name,cage=0, render=0):
def getFromObject(object, cage=0, render=0):
"""
Replace the mesh's existing data with the raw mesh data from a Blender
Object. This method supports all the geometry based objects (mesh, text,
@@ -758,8 +758,8 @@ class Mesh:
be multiplied by the object's 4x4 transform matrix (see L{transform}).
@note: The objects materials will not be copied into the existing mesh,
however the face material indices will match the material list of the original data.
@type name: string
@param name: name of the Blender object which contains the geometry data.
@type name: blender object or string
@param name: The Blender object or its name, which contains the geometry data.
@type cage: int
@param cage: determines whether the original vertices or derived vertices
@type render: int