Skip to content
Snippets Groups Projects
Commit c75787ff authored by Bastien Montagne's avatar Bastien Montagne
Browse files

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.
parent 91d241f5
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
bl_info = { bl_info = {
"name": "Wavefront OBJ format", "name": "Wavefront OBJ format",
"author": "Campbell Barton, Bastien Montagne", "author": "Campbell Barton, Bastien Montagne",
"version": (3, 5, 9), "version": (3, 5, 6),
"blender": (2, 80, 0), "blender": (2, 80, 0),
"location": "File > Import-Export", "location": "File > Import-Export",
"description": "Import-Export OBJ, Import OBJ mesh, UV's, materials and textures", "description": "Import-Export OBJ, Import OBJ mesh, UV's, materials and textures",
......
...@@ -676,7 +676,7 @@ def create_mesh(new_objects, ...@@ -676,7 +676,7 @@ def create_mesh(new_objects,
me.loops.foreach_set("normal", loops_nor) me.loops.foreach_set("normal", loops_nor)
if verts_tex and me.polygons: 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]) 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) me.uv_layers[0].data.foreach_set("uv", loops_uv)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment