[Bf-extensions-cvs] [c75787ff] master: OBJ importer: do not do 'smart' init of new UV layers.

Bastien Montagne noreply at git.blender.org
Tue Mar 5 21:49:00 CET 2019


Commit: c75787ff5fee88a2fc3c591da23b9977abf964a9
Author: Bastien Montagne
Date:   Tue Mar 5 21:47:42 2019 +0100
Branches: master
https://developer.blender.org/rBAc75787ff5fee88a2fc3c591da23b9977abf964a9

OBJ importer: do not do 'smart' init of new UV layers.

Not really important here (we expect to set a value for all items), but
avoids useless computation anyway.

===================================================================

M	io_scene_obj/__init__.py
M	io_scene_obj/import_obj.py

===================================================================

diff --git a/io_scene_obj/__init__.py b/io_scene_obj/__init__.py
index e52035e8..6ced0e1a 100644
--- a/io_scene_obj/__init__.py
+++ b/io_scene_obj/__init__.py
@@ -21,7 +21,7 @@
 bl_info = {
     "name": "Wavefront OBJ format",
     "author": "Campbell Barton, Bastien Montagne",
-    "version": (3, 5, 9),
+    "version": (3, 5, 6),
     "blender": (2, 80, 0),
     "location": "File > Import-Export",
     "description": "Import-Export OBJ, Import OBJ mesh, UV's, materials and textures",
diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py
index 1b591546..8cdedc77 100644
--- a/io_scene_obj/import_obj.py
+++ b/io_scene_obj/import_obj.py
@@ -676,7 +676,7 @@ def create_mesh(new_objects,
         me.loops.foreach_set("normal", loops_nor)
 
     if verts_tex and me.polygons:
-        me.uv_layers.new()
+        me.uv_layers.new(do_init=False)
         loops_uv = tuple(uv for (_, _, face_vert_tex_indices, _, _, _, _) in faces for face_uvidx in face_vert_tex_indices for uv in verts_tex[face_uvidx])
         me.uv_layers[0].data.foreach_set("uv", loops_uv)



More information about the Bf-extensions-cvs mailing list