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:
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user