Made the remaining UV py scripts work with editmesh now.

DrawShadow option didnt check the final derived mesh had CD_MTFACE's can would crash when enabled with mirror modifier.
This commit is contained in:
2007-09-24 09:40:09 +00:00
parent adef239fc0
commit 1fde6d4570
3 changed files with 36 additions and 24 deletions

View File

@@ -183,12 +183,16 @@ def ExportCallback(f):
time1= Blender.sys.time()
if obj.type != "Mesh":
if not obj or obj.type != "Mesh":
BPyMessages.Error_NoMeshActive()
return
is_editmode = Blender.Window.EditMode()
if is_editmode: Blender.Window.EditMode(0)
mesh = obj.getData(mesh=1)
if not mesh.faceUV:
if is_editmode: Blender.Window.EditMode(1)
BPyMessages.Error_NoMeshUvActive()
return
@@ -207,6 +211,8 @@ def ExportCallback(f):
UVFaces = ExtractUVFaces(mesh, bAllFaces.val)
if is_editmode: Blender.Window.EditMode(1)
if not bSVG.val:
print "TGA export is running..."
UV_Export_TGA(UVFaces, bSize.val, bWSize.val, bWrap.val, name)