[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4020] trunk/py/scripts/addons/ io_import_scene_lwo.py: Fix #33350: lightwave .lwo import of uv' s and vertex colors was not working since bmesh.

Brecht Van Lommel brechtvanlommel at pandora.be
Fri Nov 30 09:28:07 CET 2012


Revision: 4020
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4020
Author:   blendix
Date:     2012-11-30 08:28:03 +0000 (Fri, 30 Nov 2012)
Log Message:
-----------
Fix #33350: lightwave .lwo import of uv's and vertex colors was not working since bmesh.

Modified Paths:
--------------
    trunk/py/scripts/addons/io_import_scene_lwo.py

Modified: trunk/py/scripts/addons/io_import_scene_lwo.py
===================================================================
--- trunk/py/scripts/addons/io_import_scene_lwo.py	2012-11-30 05:44:17 UTC (rev 4019)
+++ trunk/py/scripts/addons/io_import_scene_lwo.py	2012-11-30 08:28:03 UTC (rev 4020)
@@ -1088,8 +1088,9 @@
             print("Adding %d Vertex Color Maps" % len(layer_data.colmaps))
             for cmap_key in layer_data.colmaps:
                 map_pack= create_mappack(layer_data, cmap_key, "COLOR")
-                vcol= me.vertex_colors.new(cmap_key)
-                if not vcol:
+                me.vertex_colors.new(cmap_key)
+                vcol= me.tessface_vertex_colors[-1]
+                if not vcol or not vcol.data:
                     break
                 for fi in map_pack:
                     if fi > len(vcol.data):
@@ -1109,10 +1110,9 @@
             print("Adding %d UV Textures" % len(layer_data.uvmaps))
             for uvmap_key in layer_data.uvmaps:
                 map_pack= create_mappack(layer_data, uvmap_key, "UV")
-                uvm= me.uv_textures.new(name=uvmap_key)
-                uvloop = me.uv_layers[-1]
-                uvm = uvloop.data
-                if not uvm:
+                me.uv_textures.new(name=uvmap_key)
+                uvm= me.tessface_uv_textures[-1]
+                if not uvm or not uvm.data:
                     break
                 for fi in map_pack:
                     if fi > len(uvm.data):



More information about the Bf-extensions-cvs mailing list