fix for [#11667] Minor problem with lightmap_uvpack, LC is getting out of control...
authorCampbell Barton <ideasman42@gmail.com>
Thu, 15 May 2008 19:44:34 +0000 (19:44 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 15 May 2008 19:44:34 +0000 (19:44 +0000)
release/scripts/uvcalc_lightmap.py

index bd5a72995cbaf10d0a70ef6a65601503f2c287e3..8cd4960f518e84c67f1bbb8faa78e862bfa2e646 100644 (file)
@@ -538,7 +538,7 @@ def main():
                        return
                meshes = [ ob.getData(mesh=1) ]
        else:
                        return
                meshes = [ ob.getData(mesh=1) ]
        else:
-               meshes = dict([ (me.name, me) for ob in scn.objects.context for me in (ob.getData(mesh=1),) if not me.lib if len(me.faces)])
+               meshes = dict([ (me.name, me) for ob in scn.objects.context if ob.type == 'Mesh' for me in (ob.getData(mesh=1),) if not me.lib if len(me.faces)])
                meshes = meshes.values()
                if not meshes:
                        Draw.PupMenu('Error%t|No mesh objects selected.')
                meshes = meshes.values()
                if not meshes:
                        Draw.PupMenu('Error%t|No mesh objects selected.')