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

@@ -315,7 +315,7 @@ def getMeshFromObject(ob, container_mesh=None, apply_modifiers=True, vgroups=Tru
tempob= None
if apply_modifiers or type != 'Mesh':
try:
mesh.getFromObject(ob.name)
mesh.getFromObject(ob)
except:
return None
@@ -327,7 +327,7 @@ def getMeshFromObject(ob, container_mesh=None, apply_modifiers=True, vgroups=Tru
tempob= Blender.Object.New('Mesh')
tempob.shareFrom(ob)
scn.link(tempob)
mesh.getFromObject(tempob.name)
mesh.getFromObject(tempob)
scn.unlink(tempob)
if type == 'Mesh':